diff -c mit/server/Imakefile:1.1.1.2 mit/server/Imakefile:2.15 *** mit/server/Imakefile:1.1.1.2 Sat Mar 12 00:34:46 1994 --- mit/server/Imakefile Sat Mar 12 00:34:46 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/server/Imakefile,v 2.15 1993/10/07 13:53:44 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.135 91/09/22 10:27:51 rws Exp $ /* * Server Master Makefile *************** *** 9,14 **** --- 10,17 ---- #define MFBSubdirs StdSubdirs ddx/mfb #define CFBSubdirs MFBSubdirs ddx/cfb #define StdLibs $(DIX) $(OS) $(MI) $(EXTENSIONS) + #define NoMFBLibs $(DIX) $(OS) $(FONT) $(MI) $(EXTENSIONS) + #define NoMFBBareLibs $(DIX) $(OS) $(FONT) $(MI) #define MFBBareLibs $(DIX) $(OS) $(FONT) $(MFB) $(MI) #define MFBLibs MFBBareLibs $(EXTENSIONS) #define CFBBareLibs $(DIX) $(OS) $(FONT) $(CFB) $(MFB) $(MI) *************** *** 35,41 **** --- 38,48 ---- NONPEXEXTS = $(OTHEREXTS) $(EXTENSIONSRC)/server/libext.a EXTENSIONS = $(NONPEXEXTS) $(PEXLIBS) XAULIB = $(XAUTHSRC)/libXau.a + #if Amoeba || Minix + XDMCPLIB = + #else XDMCPLIB = $(XDMCPLIBSRC)/libXdmcp.a + #endif OS = os/libos.a $(XAULIB) $(XDMCPLIB) BSDEMUL = $(LIBSRC)/Berk/Berklib.o MFB = ddx/mfb/libmfb.a *************** *** 42,53 **** CFB = ddx/cfb/libcfb.a MI = ddx/mi/libmi.a DIX = dix/libdix.a ! FONT = $(FONTSRC)/lib/font/libfont.a ! #if SystemV4 && X386Server ! SYSLIBS = -lm /usr/ucblib/libucb.a #else ! SYSLIBS = -lm -ldbm #endif CBRT = ddx/mi/cbrt.o XCOMM --- 49,76 ---- CFB = ddx/cfb/libcfb.a MI = ddx/mi/libmi.a DIX = dix/libdix.a ! FONT = $(FONTSRC)/lib/font/libfont.a $(RENDERERLIBS) ! #if i386Mach ! #ifdef i386Mach_BsdTree ! EXTRASYSLIBS = /usr/lib/libmach.a ! #else ! EXTRASYSLIBS = /usr/misc/.mach/lib/libmach.a ! #endif ! #endif ! #ifndef XFree86Version ! #if HasSdbm ! DBMLIB = -lsdbm ! #else ! #if Amoeba || Minix ! DBMLIB = ../lib/sdbm/libsdbm.a #else ! #if !i386Bsd ! DBMLIB = -ldbm #endif + #endif + #endif + #endif + SYSLIBS = -lm $(DBMLIB) $(MALLOCLIBS) $(EXTRASYSLIBS) CBRT = ddx/mi/cbrt.o XCOMM *************** *** 121,128 **** ALL1 = Xmips #endif ! #if X386Server ! ALL1 = X386 #endif #if XnonServer --- 144,151 ---- ALL1 = Xmips #endif ! #ifdef XFree86Version ! ALL1 = xf86all #endif #if XnonServer *************** *** 245,251 **** --- 268,278 ---- SUNMDIRS = $(SUBDIRS0) $(SUBDIRS2) $(DEPDIRS) SUNMOBJS = ddx/sun/sunInitMono.o ddx/sun/sunInitExtMono.o SUNMLIBS = ddx/sun/libsun.a MFBBareLibs $(NONPEXEXTS) + #if Amoeba + SUNSYSLIBS = $(CBRT) $(SYSLIBS) + #else SUNSYSLIBS = $(SYSLIBS) $(SUNWINDOWSLIBS) + #endif ServerTarget(XsunMono,$(SUNMDIRS),$(SUNMOBJS),$(SUNMLIBS),$(SUNSYSLIBS)) #endif /* XsunMonoServer */ *************** *** 328,350 **** #endif /* XmipsServer */ ! #if X386Server XCOMM ! XCOMM X386 server XCOMM ! SUBDIRS0 = MFBSubdirs ddx/x386 ! X386DIRS = $(SUBDIRS0) $(DEPDIRS) ! X386OBJS = ddx/x386/x386Init.o #ifdef i386SVR3Architecture ! X386SYSLIBS = $(CBRT) $(BSDEMUL) #endif - X386LIBS = ddx/x386/libx386.a ddx/x386/vga/libvga.a ddx/x386/drivers/libdrivers.a ddx/x386/cfb.banked/libcfb.a MFBLibs $(X386SYSLIBS) INSTPGMFLAGS = $(INSTUIDFLAGS) /* server must be suid root */ ! ServerTarget(X386,$(X386DIRS),$(X386OBJS),$(X386LIBS),$(SYSLIBS)) ! #endif /* X386Server */ #if XnonServer XCOMM XCOMM non server, just compile sources for build test --- 355,554 ---- #endif /* XmipsServer */ ! #ifdef XFree86Version ! XCOMM ! XCOMM XFree86 XCOMM ! XCOMM This stuff is common to all XFree86 servers XCOMM ! ! #include ! ! #ifdef XFree86DefaultServer ! XF86DEFSERVER = XFree86DefaultServer ! #endif ! #ifdef i386SVR3Architecture ! XF86SYSLIBS = $(CBRT) $(BSDEMUL) ! #endif ! #if defined(LinuxArchitecture) || defined(Amoeba) || defined(Minix) ! XF86SYSLIBS = $(CBRT) ! #endif ! ! #if SpecialMalloc ! MALLOCLIBS = -ldbmalloc #endif INSTPGMFLAGS = $(INSTUIDFLAGS) /* server must be suid root */ ! ! SUBDIRS0 = include StdSubdirs ddx/x386 ! XF86COMMONLIB = ddx/x386/common/libx386.a ! XF86OSLIB = ddx/x386/os-support/libxf86_os.a ! XF86HWLIB = ddx/x386/common_hw/libxf86_hw.a ! XF86COMMONOBJ = $(RENDERERCONFOBJ) ddx/x386/common/xf86_Option.o ! ! /* Common rules */ ! ! $(CONFIGSRC)/X386Conf.tmpl: $(ICONFIGFILES) ! @echo Checking in $(CONFIGSRC)... ! @cd $(CONFIGSRC); set -x; $(MAKE) $(MFLAGS) Makefiles ! ! $(RENDERERCONFOBJ): $(ICONFIGFILES) ! @for i in $(RENDERERCONFSUBDIR); do \ ! (echo Checking in $$i...; cd $$i; set -x; \ ! $(MAKE) $(MFLAGS) Configure); done ! ! #if ExtraRenderers ! $(RENDERERLIBS):: $(ICONFIGFILES) ! @echo Checking in $(RENDERERSRC)...; cd $(RENDERERSRC); set -x; \ ! $(MAKE) $(MFLAGS) SUBDIRS="$(RENDERERSUBDIRS)" Makefiles; \ ! $(MAKE) $(MFLAGS) SUBDIRS="$(RENDERERSUBDIRS)" Depend; \ ! $(MAKE) $(MFLAGS) SUBDIRS="$(RENDERERSUBDIRS)" subdirs ! touch $(RENDERERLIBS) ! @for i in $(RENDERERLIBS); do (set -x; \ ! RanLibrary($$i)); done ! #endif ! ! /* ! * Adding a new XFree86 server: ! * ! * In most cases just use one of the current servers as an example. ! * If the server uses ddx/mfb, set SUBDIRS1 = ddx/mfb ! * If the server uses ddx/cfb, set SUBDIRS2 = ddx/cfb ! * If the server has configurable drivers like XF86_SVGA and XF86_Mono, ! * use XFree86Server() to define the build rules. ! * If the server doesn't have drivers (like XF86_S3), use XFree86ServerNoDrv() ! * to define the build rules. ! * The usage of these macros is documented in config/xf86.rules. ! * ! */ ! ! #if XF86SVGAServer ! XCOMM ! XCOMM XFree86 SVGA server ! XCOMM ! ! SVGASPECIALOBJS = ddx/x386/common/x386Init.o dix/dixfonts.o ddx/mi/mibitblt.o ! XF86SVGALIBS = ddx/x386/vga256/libvga256.a MFBLibs ! ! SUBDIRS1 = ddx/mfb ! ! XFree86Server(XF86_SVGA,ddx/mfb,$(XF86SVGALIBS),$(SVGASPECIALOBJS),$(VGAOBJS),$(VGADRIVERSRC),$(X386CONFOBJS),$(X386CONFSUBDIRS)) ! ! #endif /* XF86SVGAServer */ ! ! #if XF86VGA16Server ! XCOMM ! XCOMM XFree86 16 Colour (largely generic) VGA server ! XCOMM ! ! VGA16SPECIALOBJS = ddx/x386/common/x386Init_m.o dix/dixfonts_m.o \ ! ddx/x386/vga16/mi/mipushpx16.o ddx/x386/vga16/mi/mibitblt16.o ! VGA16LIB = ddx/x386/vga16/libvga16.a ! VGA16SRC = $(VGA16DRIVERSRC) ! ! XF86VGA16LIBS = $(VGA16LIB) NoMFBBareLibs $(NONPEXEXTS) ! XF86VGA16OBJS = $(VGA16OBJS) ! XF86VGA16DRIVSRC = $(VGA16SRC) ! ! XFree86Server(XF86_VGA16,/**/,$(XF86VGA16LIBS),$(VGA16SPECIALOBJS),$(XF86VGA16OBJS),$(XF86VGA16DRIVSRC),$(VGA16CONFOBJS),$(VGA16CONFSUBDIRS)) ! ! #endif /* XF86VGA16Server */ ! ! #if XF86MonoServer ! XCOMM ! XCOMM XFree86 Mono server ! XCOMM ! ! MONOSPECIALOBJS = ddx/x386/common/x386Init_m.o dix/dixfonts_m.o \ ! ddx/mi/mibitblt_m.o ! ! #if BuildVga2 ! VGA2LIB = ddx/x386/vga2/libvga2.a ! VGA2SRC = $(VGA2DRIVERSRC) ! #endif ! #if BuildHga2 ! HGA2LIB = ddx/x386/hga2/libhga2.a ! HGA2SRC = $(HGA2DRIVERSRC) ! #endif ! #if BuildBdm2 ! BDM2LIB = ddx/x386/bdm2/libbdm2.a ! BDM2SRC = $(BDM2DRIVERSRC) ! #endif ! ! XF86MONOLIBS = $(VGA2LIB) $(HGA2LIB) $(BDM2LIB) NoMFBBareLibs $(NONPEXEXTS) ! XF86MONOOBJS = $(VGA2OBJS) $(HGA2OBJS) $(BDM2OBJS) ! XF86MONODRIVSRC = $(VGA2SRC) $(HGA2SRC) ! ! XFree86Server(XF86_Mono,/**/,$(XF86MONOLIBS),$(MONOSPECIALOBJS),$(XF86MONOOBJS),$(XF86MONODRIVSRC),$(X386MCONFOBJS),$(X386MCONFSUBDIRS)) ! ! #endif /* XF86MonoServer */ ! ! #if XF86S3Server ! XCOMM ! XCOMM XFree86 S3 server ! XCOMM ! ! S3SPECIALOBJS = ddx/x386/common/x386Init.o dix/dixfonts.o ddx/mi/mibitblt.o ! XF86S3LIBS = ddx/x386/accel/s3/s3mmio/libs3mmio.a \ ! ddx/x386/accel/s3/libs3.a CFBLibs ! ! SUBDIRS1 = ddx/mfb ! SUBDIRS2 = ddx/cfb ! ! XFree86Server(XF86_S3,ddx/mfb ddx/cfb,$(XF86S3LIBS),$(S3SPECIALOBJS),$(S3OBJS),$(S3DRIVERSRC),$(S3CONFOBJ),$(S3CONFSUBDIR)) ! ! #endif /* XF86S3Server */ ! ! #if XF86I8514Server ! XCOMM ! XCOMM XFree86 8514/A server ! XCOMM ! ! X8514SPECIALOBJS = ddx/x386/common/x386Init.o dix/dixfonts.o ddx/mi/mibitblt.o ! XF86I8514LIBS = ddx/x386/accel/ibm8514/lib8514.a CFBLibs ! ! SUBDIRS1 = ddx/mfb ! SUBDIRS2 = ddx/cfb ! ! XFree86ServerNoDrv(XF86_8514,ddx/mfb ddx/cfb,$(XF86I8514LIBS),$(X8514SPECIALOBJS)) ! ! #endif /* XF86I8514Server */ ! ! #if XF86Mach8Server ! XCOMM ! XCOMM XFree86 Mach8 server ! XCOMM ! ! MACH8SPECIALOBJS = ddx/x386/common/x386Init.o dix/dixfonts.o ddx/mi/mibitblt.o ! XF86MACH8LIBS = ddx/x386/accel/mach8/libmach8.a CFBLibs + SUBDIRS1 = ddx/mfb + SUBDIRS2 = ddx/cfb + XFree86ServerNoDrv(XF86_Mach8,ddx/mfb ddx/cfb,$(XF86MACH8LIBS),$(MACH8SPECIALOBJS)) + + #endif /* XF86Mach8Server */ + + #if XF86Mach32Server + XCOMM + XCOMM XFree86 Mach32 server + XCOMM + + MACH32SPECIALOBJS = ddx/x386/common/x386Init.o dix/dixfonts.o ddx/mi/mibitblt.o + XF86MACH32LIBS = ddx/x386/accel/mach32/libmach32.a CFBLibs + + SUBDIRS1 = ddx/mfb + SUBDIRS2 = ddx/cfb + + XFree86ServerNoDrv(XF86_Mach32,ddx/mfb ddx/cfb,$(XF86MACH32LIBS),$(MACH32SPECIALOBJS)) + + #endif /* XF86Mach32Server */ + + #endif /* XFree86Version */ + + + #if XnonServer XCOMM XCOMM non server, just compile sources for build test *************** *** 355,367 **** #endif /* XnonServer */ ! ! SUBDIRS = $(SUBDIRS0) $(SUBDIRS1) $(SUBDIRS2) $(SUBDIRS3) ! InstallMultipleFlags($(ALL),$(BINDIR),$(INSTPGMFLAGS)) install:: -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) $(ALL1) X) #define IHaveSubdirs --- 559,581 ---- #endif /* XnonServer */ ! #ifdef XFree86Version ! #ifdef XFree86DefaultServer ! #if !Amoeba ! install:: ! -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) $(XF86DEFSERVER) X) ! #endif ! #endif /* XFree86DefaultServer */ ! #else InstallMultipleFlags($(ALL),$(BINDIR),$(INSTPGMFLAGS)) + #if !Amoeba install:: -(cd $(DESTDIR)$(BINDIR); $(RM) X; $(LN) $(ALL1) X) + #endif + #endif /* XFree86Version */ + + SUBDIRS = $(SUBDIRS0) $(SUBDIRS1) $(SUBDIRS2) $(SUBDIRS3) #define IHaveSubdirs *************** *** 371,377 **** --- 585,593 ---- ForceSubdirs($(DEPDIRS) $(SUBDIRS)) + #ifndef XFree86Version clean:: $(RM) $(ALL) + #endif InstallManPage(Xserver,$(MANDIR)) diff -c mit/server/dix/Imakefile:1.1.1.1 mit/server/dix/Imakefile:2.2 *** mit/server/dix/Imakefile:1.1.1.1 Sat Mar 12 00:34:48 1994 --- mit/server/dix/Imakefile Sat Mar 12 00:34:48 1994 *************** *** 1,14 **** XCOMM $XConsortium: Imakefile,v 1.37 91/07/16 22:54:10 gildea Exp $ #include SRCS = atom.c colormap.c cursor.c devices.c dispatch.c dixutils.c events.c \ extension.c gc.c globals.c glyphcurs.c grabs.c \ main.c property.c resource.c swaprep.c swapreq.c \ ! tables.c window.c initatoms.c dixfonts.c OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \ extension.o gc.o globals.o glyphcurs.o grabs.o \ main.o property.o resource.o swaprep.o swapreq.o \ ! tables.o window.o initatoms.o dixfonts.o INCLUDES = -I. -I../include -I$(INCLUDESRC) -I$(FONTSRC)/include LINTLIBS = ../os/llib-los.ln --- 1,28 ---- + XCOMM $XFree86: mit/server/dix/Imakefile,v 2.2 1993/08/28 07:57:08 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.37 91/07/16 22:54:10 gildea Exp $ #include + #ifdef XFree86Version + SRC2 = dixfonts_m.c + #endif + SRCS = atom.c colormap.c cursor.c devices.c dispatch.c dixutils.c events.c \ extension.c gc.c globals.c glyphcurs.c grabs.c \ main.c property.c resource.c swaprep.c swapreq.c \ ! tables.c window.c initatoms.c dixfonts.c $(SRC2) ! ! ! #ifndef XFree86Version ! OBJ2 = dixfonts.o ! #else ! OBJ3 = dixfonts.o ! OBJ4 = dixfonts_m.o ! #endif ! OBJS = atom.o colormap.o cursor.o devices.o dispatch.o dixutils.o events.o \ extension.o gc.o globals.o glyphcurs.o grabs.o \ main.o property.o resource.o swaprep.o swapreq.o \ ! tables.o window.o initatoms.o $(OBJ2) INCLUDES = -I. -I../include -I$(INCLUDESRC) -I$(FONTSRC)/include LINTLIBS = ../os/llib-los.ln *************** *** 40,47 **** --- 54,72 ---- SITE_DISPLAY_CLASS = -DCOMPILEDDISPLAYCLASS=\"$(DEFAULTDISPLAYCLASS)\" #endif + #ifdef XVendorString + VENDORSTRING = XVendorString + VENDOR_STRING = -DVENDOR_STRING='$(VENDORSTRING)' + #endif + + #ifdef XVendorRelease + VENDORRELEASE = XVendorRelease + VENDOR_RELEASE = -DVENDOR_RELEASE='$(VENDORRELEASE)' + #endif + SITE_DEFINES = $(SITE_FONT_PATH) $(SITE_RGB_DB) $(SITE_DISPLAY_CLASS) + VENDOR_DEFINES = $(VENDOR_STRING) $(VENDOR_RELEASE) NormalLibraryObjectRule() NormalLibraryTarget(dix,$(OBJS)) *************** *** 48,54 **** LintLibraryTarget(dix,$(SRCS)) NormalLintTarget($(SRCS)) ! SpecialObjectRule(globals.o, $(ICONFIGFILES), $(SITE_DEFINES)) #if HasSaberC saber_src: --- 73,91 ---- LintLibraryTarget(dix,$(SRCS)) NormalLintTarget($(SRCS)) ! #ifdef XFree86Version ! all:: $(OBJ3) $(OBJ4) ! #endif ! ! SpecialObjectRule(globals.o, globals.c $(ICONFIGFILES), $(SITE_DEFINES)) ! SpecialObjectRule(main.o, main.c $(ICONFIGFILES), $(VENDOR_DEFINES)) ! #ifdef XFree86Version ! ObjectFromSpecialSource(dixfonts_m,dixfonts,MonoDefines) ! #endif ! ! InstallLinkKitLibrary(dix,$(LINKKITDIR)/lib) ! InstallLinkKitNonExecFile(dixfonts.o,$(LINKKITDIR)/lib) ! InstallLinkKitNonExecFile(dixfonts_m.o,$(LINKKITDIR)/lib) #if HasSaberC saber_src: diff -c mit/server/dix/dispatch.c:1.1.1.2 mit/server/dix/dispatch.c:1.9 *** mit/server/dix/dispatch.c:1.1.1.2 Sat Mar 12 00:34:52 1994 --- mit/server/dix/dispatch.c Sat Mar 12 00:34:53 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/dix/dispatch.c,v 1.9 1993/03/20 04:20:29 dawes Exp $ */ /* $XConsortium: dispatch.c,v 5.36 91/10/30 14:51:40 rws Exp $ */ /************************************************************ Copyright 1987, 1989 by Digital Equipment Corporation, Maynard, Massachusetts, *************** *** 235,240 **** --- 236,249 ---- FlushIfCriticalOutputPending(); } + #ifdef _MINIX + if (client->osPrivate == NULL) { + /* should not happen; bug in WaitForSomething? */ + ErrorF("Dispatch: client %d gone\n", clientReady[nready]); + break; + } + #endif + /* now, finally, deal with client requests */ result = ReadRequestFromClient(client); diff -c mit/server/dix/dixfonts.c:1.1.1.1 mit/server/dix/dixfonts.c:1.5 *** mit/server/dix/dixfonts.c:1.1.1.1 Sat Mar 12 00:34:53 1994 --- mit/server/dix/dixfonts.c Sat Mar 12 00:34:54 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/dix/dixfonts.c,v 1.5 1993/03/20 04:20:32 dawes Exp $ */ /************************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. *************** *** 77,84 **** BitmapFormatScanlineUnit8; - static int FinishListFontsWithInfo(); - extern pointer fosNaturalParams; extern FontPtr defaultFont; --- 78,83 ---- *************** *** 1164,1169 **** --- 1163,1200 ---- { fpe->refcount--; if (force || fpe->refcount == 0) { + /* + * This is a hack to work around a problem that occurs when using + * the Type1 renderer. The problem is that a free'd element of + * font_path_elements is getting referenced during server shutdown + * (and server reset?). This occurs when there is a path containing + * Type 1 fonts in font_path_elements, and a path has been added + * using "xset +fp". The real solution to the problem would be to + * find where refcount is getting out of sync. + * + * The real problem is that the resouce list of a client started + * before the "xset" somehow gets the new path -- so when the client + * is shutdown it free's the fontpath when it shouldn't. I haven't + * been able to track down where this is happening -- and don't know + * for sure if it's connected to the Type 1 renderer. + * DHD Feb 1992 + */ + + if (!force) { + int i; + for (i=0; irefcount++; + return; + } + } + } + (*fpe_functions[fpe->type].free_fpe) (fpe); xfree(fpe->name); xfree(fpe); diff -c mit/server/dix/events.c:1.1.1.2 mit/server/dix/events.c:1.5 *** mit/server/dix/events.c:1.1.1.2 Sat Mar 12 00:34:55 1994 --- mit/server/dix/events.c Sat Mar 12 00:34:56 1994 *************** *** 23,28 **** --- 23,29 ---- ********************************************************/ + /* $XFree86: mit/server/dix/events.c,v 1.5 1993/03/20 04:20:34 dawes Exp $ */ /* $XConsortium: events.c,v 5.54 92/03/19 11:30:46 rws Exp $ */ #include "X.h" *************** *** 1895,1901 **** } if (grab) DeliverGrabbedEvent(xE, keybd, deactivateGrab, count); ! else DeliverFocusedEvent(keybd, xE, sprite.win, count); if (deactivateGrab) (*keybd->DeactivateGrab)(keybd); --- 1896,1902 ---- } if (grab) DeliverGrabbedEvent(xE, keybd, deactivateGrab, count); ! else if (sprite.win) DeliverFocusedEvent(keybd, xE, sprite.win, count); if (deactivateGrab) (*keybd->DeactivateGrab)(keybd); diff -c mit/server/dix/main.c:1.1.1.1 mit/server/dix/main.c:2.0 *** mit/server/dix/main.c:1.1.1.1 Sat Mar 12 00:35:00 1994 --- mit/server/dix/main.c Sat Mar 12 00:35:00 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/dix/main.c,v 2.0 1993/09/22 15:49:13 dawes Exp $ */ /* $XConsortium: main.c,v 5.17 91/07/24 12:33:14 rws Exp $ */ #include "X.h" *************** *** 41,46 **** --- 42,64 ---- #include "servermd.h" #include "site.h" + extern char *getenv(); + + #if !defined(PATH_MAX) && defined(_POSIX_SOURCE) + #include + #endif + + #ifndef PATH_MAX + #include + #ifndef PATH_MAX + #ifdef MAXPATHLEN + #define PATH_MAX MAXPATHLEN + #else + #define PATH_MAX 1024 + #endif + #endif + #endif + extern long defaultScreenSaverTime; extern long defaultScreenSaverInterval; extern int defaultScreenSaverBlanking; *************** *** 139,144 **** --- 157,164 ---- { int i, j, k; long alwaysCheckForInput[2]; + char *xwinhome; + char fontpath[PATH_MAX*4], rgbpath[PATH_MAX]; /* Notice if we're restart. Probably this is because we jumped through * uninitialized pointer */ *************** *** 152,157 **** --- 172,189 ---- argcGlobal = argc; argvGlobal = argv; display = "0"; + + if ((xwinhome = getenv("XWINHOME")) != NULL) + { + char fontdir[PATH_MAX]; + sprintf(fontdir, "%s/lib/X11/fonts", xwinhome); + sprintf(fontpath, "%s/misc/,%s/Speedo/,%s/75dpi/,%s/100dpi/", + fontdir, fontdir, fontdir, fontdir); + defaultFontPath = fontpath; + sprintf(rgbpath, "%s/lib/X11/rgb", xwinhome); + rgbPath = rgbpath; + } + ProcessCommandLine(argc, argv); alwaysCheckForInput[0] = 0; *************** *** 240,252 **** FatalError("failed to initialize core devices"); InitFonts (); ! if (SetDefaultFontPath(defaultFontPath, &i) != Success) ! ErrorF("failed to set default font path '%s'", defaultFontPath); if (!SetDefaultFont(defaultTextFont)) ! FatalError("could not open default font '%s'", defaultTextFont); if (!(rootCursor = CreateRootCursor(defaultCursorFont, 0))) ! FatalError("could not open default cursor font '%s'", ! defaultCursorFont); for (i = 0; i < screenInfo.numScreens; i++) InitRootWindow(WindowTable[i]); DefineInitialRootWindow(WindowTable[0]); --- 272,296 ---- FatalError("failed to initialize core devices"); InitFonts (); ! if (j = (SetDefaultFontPath(defaultFontPath, &i) != Success)) ! ErrorF("\nfailed to set default font path '%s'\n", defaultFontPath); if (!SetDefaultFont(defaultTextFont)) ! { ! char *badpath = "FontPath is invalid"; ! char *badfont = "it is in none of the FontPath directories"; ! ! if (!j) ! ErrorF("\nFontPath is set to '%s'", defaultFontPath); ! FatalError("could not open default font '%s'\nbecause %s\n", ! defaultTextFont, j ? badpath : badfont); ! } if (!(rootCursor = CreateRootCursor(defaultCursorFont, 0))) ! { ! ErrorF("\nFontPath is set to '%s'", defaultFontPath); ! FatalError("could not open default cursor font '%s'\n%s\n", ! defaultCursorFont, ! "because it is in none of the FontPath directories"); ! } for (i = 0; i < screenInfo.numScreens; i++) InitRootWindow(WindowTable[i]); DefineInitialRootWindow(WindowTable[0]); diff -c /dev/null mit/server/include/Imakefile:2.3 *** /dev/null Sat Mar 12 00:35:09 1994 --- mit/server/include/Imakefile Sat Mar 12 00:35:09 1994 *************** *** 0 **** --- 1,28 ---- + XCOMM $XFree86: mit/server/include/Imakefile,v 2.3 1994/02/28 14:12:41 dawes Exp $ + + all:: + + InstallLinkKitNonExecFile(colormap.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(cursor.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(dix.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(dixfont.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(dixfontstr.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(gc.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(gcstruct.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(input.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(misc.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(miscstruct.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(os.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(pixmap.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(pixmapstr.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(property.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(resource.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(region.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(regionstr.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(screenint.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(servermd.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(scrnintstr.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(window.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(windowstr.h,$(LINKKITDIR)/include) + + depend:: diff -c mit/server/include/dix.h:1.1.1.2 mit/server/include/dix.h:2.0 *** mit/server/include/dix.h:1.1.1.2 Sat Mar 12 00:35:09 1994 --- mit/server/include/dix.h Sat Mar 12 00:35:09 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/include/dix.h,v 2.0 1993/09/09 06:03:29 dawes Exp $ */ /* $XConsortium: dix.h,v 1.60 91/10/30 14:49:57 rws Exp $ */ #ifndef DIX_H *************** *** 33,38 **** --- 34,41 ---- #define SAMETIME 0 #define LATER 1 + extern void (* miCacheFreeSlot)(); + #define NullClient ((ClientPtr) 0) #define REQUEST(type) \ register type *stuff = (type *)client->requestBuffer *************** *** 101,106 **** --- 104,110 ---- pGC = client->lastGC;\ pDraw = client->lastDrawable;\ }\ + (*miCacheFreeSlot)(pDraw);\ if (pGC->serialNumber != pDraw->serialNumber)\ ValidateGC(pDraw, pGC); diff -c mit/server/include/misc.h:1.1.1.1 mit/server/include/misc.h:2.0 *** mit/server/include/misc.h:1.1.1.1 Sat Mar 12 00:35:10 1994 --- mit/server/include/misc.h Sat Mar 12 00:35:10 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/include/misc.h,v 2.0 1993/07/24 11:57:55 dawes Exp $ */ /* $XConsortium: misc.h,v 1.58 91/04/10 08:53:39 rws Exp $ */ #ifndef MISC_H #define MISC_H 1 *************** *** 102,107 **** --- 103,114 ---- */ #define lowbit(x) ((x) & (~(x) + 1)) + #ifdef MAXSHORT + #undef MAXSHORT + #endif + #ifdef MINSHORT + #undef MINSHORT + #endif #define MAXSHORT 32767 #define MINSHORT -MAXSHORT diff -c mit/server/include/os.h:1.1.1.1 mit/server/include/os.h:2.1 *** mit/server/include/os.h:1.1.1.1 Sat Mar 12 00:35:10 1994 --- mit/server/include/os.h Sat Mar 12 00:35:10 1994 *************** *** 22,27 **** --- 22,28 ---- ******************************************************************/ + /* $XFree86: mit/server/include/os.h,v 2.1 1993/12/25 14:04:31 dawes Exp $ */ /* $XConsortium: os.h,v 1.44 91/07/18 23:01:12 keith Exp $ */ #ifndef OS_H *************** *** 58,64 **** #if HCVERSION < 21003 #define ALLOCATE_LOCAL(size) alloca((int)(size)) ! pragma on(alloca); #else /* HCVERSION >= 21003 */ #define ALLOCATE_LOCAL(size) _Alloca((int)(size)) #endif /* HCVERSION < 21003 */ --- 59,65 ---- #if HCVERSION < 21003 #define ALLOCATE_LOCAL(size) alloca((int)(size)) ! #pragma on(alloca); #else /* HCVERSION >= 21003 */ #define ALLOCATE_LOCAL(size) _Alloca((int)(size)) #endif /* HCVERSION < 21003 */ *************** *** 86,97 **** --- 87,112 ---- #ifndef alloca char *alloca(); #endif + #ifdef DEBUG_ALLOCA + extern char *debug_alloca(); + extern void debug_dealloca(); + #define ALLOCATE_LOCAL(size) debug_alloca(__FILE__,__LINE__,(int)(size)) + #define DEALLOCATE_LOCAL(ptr) debug_dealloca(__FILE__,__LINE__,(ptr)) + #else #define ALLOCATE_LOCAL(size) alloca((int)(size)) #define DEALLOCATE_LOCAL(ptr) /* as nothing */ + #endif #endif /* who does alloca */ #endif /* NO_ALLOCA */ + #ifdef CAHILL_MALLOC + #define Xalloc(len) debug_Xalloc(__FILE__,__LINE__,(len)) + #define Xcalloc(len) debug_Xcalloc(__FILE__,__LINE__,(len)) + #define Xrealloc(ptr,len) debug_Xrealloc(__FILE__,__LINE__,(ptr),(len)) + #define Xfree(ptr) debug_Xfree(__FILE__,__LINE__,(ptr)) + #endif + #ifndef ALLOCATE_LOCAL #define ALLOCATE_LOCAL(size) Xalloc((unsigned long)(size)) #define DEALLOCATE_LOCAL(ptr) Xfree((pointer)(ptr)) *************** *** 98,106 **** #endif /* ALLOCATE_LOCAL */ ! #define xalloc(size) Xalloc((unsigned long)(size)) ! #define xrealloc(ptr, size) Xrealloc((pointer)(ptr), (unsigned long)(size)) ! #define xfree(ptr) Xfree((pointer)(ptr)) #ifndef X_NOT_STDC_ENV #include --- 113,121 ---- #endif /* ALLOCATE_LOCAL */ ! #define xalloc(size) Xalloc(((unsigned long)(size))) ! #define xrealloc(ptr, size) Xrealloc(((pointer)(ptr)), ((unsigned long)(size))) ! #define xfree(ptr) Xfree(((pointer)(ptr))) #ifndef X_NOT_STDC_ENV #include *************** *** 124,134 **** void Error(); void FatalError(); void ProcessCommandLine(); - void Xfree(); void FlushAllOutput(); void FlushIfCriticalOutputPending(); unsigned long *Xalloc(); unsigned long *Xrealloc(); long GetTimeInMillis(); #endif /* OS_H */ --- 139,157 ---- void Error(); void FatalError(); void ProcessCommandLine(); void FlushAllOutput(); void FlushIfCriticalOutputPending(); + #ifndef CAHILL_MALLOC + void Xfree(); unsigned long *Xalloc(); + unsigned long *Xcalloc(); unsigned long *Xrealloc(); + #else + void debug_Xfree(); + unsigned long *debug_Xalloc(); + unsigned long *debug_Xcalloc(); + unsigned long *debug_Xrealloc(); + #endif long GetTimeInMillis(); #endif /* OS_H */ diff -c mit/server/include/pixmapstr.h:1.1.1.1 mit/server/include/pixmapstr.h:2.1 *** mit/server/include/pixmapstr.h:1.1.1.1 Sat Mar 12 00:35:10 1994 --- mit/server/include/pixmapstr.h Sat Mar 12 00:35:10 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/include/pixmapstr.h,v 2.1 1993/11/09 10:31:11 dawes Exp $ */ /* $XConsortium: pixmapstr.h,v 5.0 89/06/09 15:00:35 keith Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, *************** *** 52,57 **** --- 53,60 ---- int refcnt; int devKind; DevUnion devPrivate; + int slot; /* Offscreen cache slot number */ + int cacheId; /* Pixmap id number */ } PixmapRec; #endif /* PIXMAPSTRUCT_H */ diff -c mit/server/include/servermd.h:1.1.1.1 mit/server/include/servermd.h:2.2 *** mit/server/include/servermd.h:1.1.1.1 Sat Mar 12 00:35:11 1994 --- mit/server/include/servermd.h Sat Mar 12 00:35:11 1994 *************** *** 23,28 **** --- 23,30 ---- ******************************************************************/ #ifndef SERVERMD_H #define SERVERMD_H 1 + + /* $XFree86: mit/server/include/servermd.h,v 2.2 1994/02/10 21:27:23 dawes Exp $ */ /* $XConsortium: servermd.h,v 1.60 91/06/30 11:29:35 rws Exp $ */ /* *************** *** 97,102 **** --- 99,108 ---- * Currently defined for SPARC. */ + #if !defined(MACH) && !defined(MACH386) && !defined(__OSF__) + #include + #endif + #ifdef vax #define IMAGE_BYTE_ORDER LSBFirst /* Values for the VAX only */ *************** *** 107,113 **** #endif /* vax */ ! #ifdef sun #if defined(sun386) || defined(sun5) # define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */ --- 113,119 ---- #endif /* vax */ ! #if defined(sun) && !defined (SOLX86) #if defined(sun386) || defined(sun5) # define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */ *************** *** 131,137 **** #define GLYPHPADBYTES 4 #define GETLEFTBITS_ALIGNMENT 1 ! #endif /* sun */ #ifdef apollo --- 137,143 ---- #define GLYPHPADBYTES 4 #define GETLEFTBITS_ALIGNMENT 1 ! #endif /* sun && !SOLX86 */ #ifdef apollo *************** *** 251,265 **** #endif /* luna */ ! #ifdef SYSV386 #define IMAGE_BYTE_ORDER LSBFirst ! #define BITMAP_BIT_ORDER LSBFirst #define GLYPHPADBYTES 4 #define GETLEFTBITS_ALIGNMENT 1 #define AVOID_MEMORY_READ ! #endif /* SYSV386 */ /* size of buffer to use with GetImage, measured in bytes. There's obviously * a trade-off between the amount of stack (or whatever ALLOCATE_LOCAL gives --- 257,289 ---- #endif /* luna */ ! #if defined(SYSV386) || defined(SOLX86) || (defined(BSD) && defined(__i386__)) || defined(MACH386) || defined(linux) || (defined(AMOEBA) && defined(i80386)) || defined(_MINIX) || defined(__OSF__) + #ifndef IMAGE_BYTE_ORDER #define IMAGE_BYTE_ORDER LSBFirst ! #endif ! ! #ifndef BITMAP_BIT_ORDER ! # if defined(X386MONOVGA) || defined(XF86VGA16) ! # define BITMAP_BIT_ORDER MSBFirst ! # else ! # define BITMAP_BIT_ORDER LSBFirst ! # endif ! #endif ! ! #ifndef BITMAP_SCANLINE_UNIT ! # if defined(X386MONOVGA) || defined(XF86VGA16) ! # define BITMAP_SCANLINE_UNIT 8 ! # endif ! #endif ! ! #ifndef GLYPHPADBYTES #define GLYPHPADBYTES 4 + #endif #define GETLEFTBITS_ALIGNMENT 1 #define AVOID_MEMORY_READ ! #endif /* SYSV386 || SOLX86 || (BSD && __i386__) || MACH386 || linux || (AMOEBA && i80386) || _MINIX */ /* size of buffer to use with GetImage, measured in bytes. There's obviously * a trade-off between the amount of stack (or whatever ALLOCATE_LOCAL gives diff -c mit/server/os/Imakefile:1.1.1.1 mit/server/os/Imakefile:2.2 *** mit/server/os/Imakefile:1.1.1.1 Sat Mar 12 00:35:14 1994 --- mit/server/os/Imakefile Sat Mar 12 00:35:14 1994 *************** *** 1,7 **** XCOMM $XConsortium: Imakefile,v 1.49 91/08/22 14:23:54 rws Exp $ #include ! #if (SystemV || SystemV4) && !HasSockets #undef ConnectionFlags #define ConnectionFlags -DTCPCONN -DUNIXCONN #endif --- 1,8 ---- + XCOMM $XFree86: mit/server/os/Imakefile,v 2.2 1993/12/23 13:26:25 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.49 91/08/22 14:23:54 rws Exp $ #include ! #if (SystemV || SystemV4) && !HasSockets && !defined(XFree86Version) #undef ConnectionFlags #define ConnectionFlags -DTCPCONN -DUNIXCONN #endif *************** *** 10,15 **** --- 11,21 ---- * If you have any extra files to be put into the library, define them here. */ + #ifdef Amoeba + #define OtherSources iopreader.c + #define OtherObjects iopreader.o + #endif + #ifdef HPArchitecture #define OtherSources hpsocket.c #define OtherObjects hpsocket.o dbm.o *************** *** 16,23 **** #endif #ifdef R4FontStructtures ! FONTSRCS = osfonts.c fonttype.c ! FONTOBJS = osfonts.o fonttype.o FONT_DEFINES = FontDefines FontFilters #endif --- 22,29 ---- #endif #ifdef R4FontStructtures ! FONTSRCS = osfonts.c fonttype.c decompress.c ! FONTOBJS = osfonts.o fonttype.o decompress.o FONT_DEFINES = FontDefines FontFilters #endif *************** *** 53,73 **** RPCSRCS = #endif BOOTSTRAPCFLAGS = SRCS = WaitFor.c access.c connection.c io.c oscolor.c \ osinit.c utils.c auth.c mitauth.c $(FONTSRCS) $(XDMAUTHSRCS) \ ! $(RPCSRCS) xdmcp.c decompress.c OtherSources OBJS = WaitFor.o access.o connection.o io.o oscolor.o \ osinit.o utils.o auth.o mitauth.o $(FONTOBJS) $(XDMAUTHOBJS) \ ! $(RPCOBJS) xdmcp.o decompress.o OtherObjects #if SpecialMalloc ! OS_DEFINES = -DSPECIAL_MALLOC ! #else ! OS_DEFINES = #endif /* SpecialMalloc */ DBM_DEFINES = NdbmDefines ADM_DEFINES = -DADMPATH=\"$(ADMDIR)/X\%smsgs\" ! DEFINES = ConnectionFlags $(OS_DEFINES) $(XDMAUTHDEFS) $(RPCDEFS) $(SIGNAL_DEFINES) INCLUDES = -I. -I../include -I$(INCLUDESRC) -I$(TOP)/lib/Xau EXT_DEFINES = ExtensionDefines LINTLIBS = ../dix/llib-ldix.ln --- 59,90 ---- RPCSRCS = #endif + #if PartialNetDefault + PART_NET = -DPART_NET + #else + PART_NET = + #endif + BOOTSTRAPCFLAGS = SRCS = WaitFor.c access.c connection.c io.c oscolor.c \ osinit.c utils.c auth.c mitauth.c $(FONTSRCS) $(XDMAUTHSRCS) \ ! $(RPCSRCS) xdmcp.c OtherSources OBJS = WaitFor.o access.o connection.o io.o oscolor.o \ osinit.o utils.o auth.o mitauth.o $(FONTOBJS) $(XDMAUTHOBJS) \ ! $(RPCOBJS) xdmcp.o OtherObjects #if SpecialMalloc ! MALLOC_DEFINES = -DSPECIAL_MALLOC #endif /* SpecialMalloc */ + #ifdef XFree86Version + OS_DEFINES = -DXFREE86 + RGB_DEFINES = -DUSE_RGB_TXT + #endif + #if WantServerLocks + LOCK_DEFINES = -DSERVER_LOCK + #endif /* WantServerLocks */ DBM_DEFINES = NdbmDefines ADM_DEFINES = -DADMPATH=\"$(ADMDIR)/X\%smsgs\" ! DEFINES = ConnectionFlags $(OS_DEFINES) $(XDMAUTHDEFS) $(RPCDEFS) $(SIGNAL_DEFINES) $(LOCK_DEFINES) $(PART_NET) $(MALLOC_DEFINES) $(RGB_DEFINES) INCLUDES = -I. -I../include -I$(INCLUDESRC) -I$(TOP)/lib/Xau EXT_DEFINES = ExtensionDefines LINTLIBS = ../dix/llib-ldix.ln *************** *** 86,91 **** --- 103,110 ---- LintLibraryTarget(os,$(SRCS)) NormalLintTarget($(SRCS)) + InstallLinkKitLibrary(os,$(LINKKITDIR)/lib) + XCOMM these depend on ConnectionFlags access.o: $(ICONFIGFILES) connection.o: $(ICONFIGFILES) *************** *** 129,143 **** ar x $(PWLIB) alloca.o #endif /* NEED_ALLOCA_FROM_LIBPW */ ! SpecialObjectRule(osinit.o,$(ICONFIGFILES),$(ADM_DEFINES)) ! SpecialObjectRule(WaitFor.o,$(ICONFIGFILES),$(EXT_DEFINES)) ! SpecialObjectRule(fonttype.o,$(ICONFIGFILES),$(FONT_DEFINES)) #if defined(SparcArchitecture) && HasGcc oscolor.o: $(ICONFIGFILES) $(RM) $@ cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c #else ! SpecialObjectRule(oscolor.o,$(ICONFIGFILES),$(DBM_DEFINES)) #endif #if HasSaberC --- 148,164 ---- ar x $(PWLIB) alloca.o #endif /* NEED_ALLOCA_FROM_LIBPW */ ! SpecialObjectRule(osinit.o,osinit.c $(ICONFIGFILES),$(ADM_DEFINES)) ! SpecialObjectRule(WaitFor.o,WaitFor.c $(ICONFIGFILES),$(EXT_DEFINES)) ! SpecialObjectRule(fonttype.o,fonttype.c $(ICONFIGFILES),$(FONT_DEFINES)) #if defined(SparcArchitecture) && HasGcc oscolor.o: $(ICONFIGFILES) $(RM) $@ cc -c $(DBM_DEFINES) $(CDEBUGFLAGS) $(ALLDEFINES) $*.c #else ! # if !defined(XFree86Version) ! SpecialObjectRule(oscolor.o,oscolor.c $(ICONFIGFILES),$(DBM_DEFINES)) ! # endif #endif #if HasSaberC diff -c mit/server/os/WaitFor.c:1.1.1.2 mit/server/os/WaitFor.c:2.0 *** mit/server/os/WaitFor.c:1.1.1.2 Sat Mar 12 00:35:14 1994 --- mit/server/os/WaitFor.c Sat Mar 12 00:35:15 1994 *************** *** 22,27 **** --- 22,28 ---- ******************************************************************/ + /* $XFree86: mit/server/os/WaitFor.c,v 2.0 1993/09/22 15:49:40 dawes Exp $ */ /* $XConsortium: WaitFor.c,v 1.57 92/03/13 15:47:39 rws Exp $ */ /***************************************************************** *************** *** 38,49 **** --- 39,58 ---- #include "X.h" #include "misc.h" + #ifndef _MINIX #include + #endif /* !_MINIX */ #include + + #ifdef _MINIX + #include + #endif + #include "osdep.h" #include "dixstruct.h" #include "opaque.h" + #ifndef _MINIX extern long AllSockets[]; extern long AllClients[]; extern long LastSelectMask[]; *************** *** 55,64 **** --- 64,89 ---- extern long ScreenSaverTime; /* milliseconds */ extern long ScreenSaverInterval; /* milliseconds */ + #else /* _MINIX */ + extern asio_fd_set_t InprogressFdSet; + extern asio_fd_set_t ListenFdSet; + extern asio_fd_set_t ClientFdSet; + extern asio_fd_set_t CompletedFdSet; + extern asio_fd_set_t IgnoreFdSet; + extern asio_fd_set_t GrabFdSet; + + extern Bool AnyClientsWithInput; + extern int GrabInProgress; + + void EnqueueNewConnection(); + void UpdateClientIOStatus(); + #endif /* _MINIX */ extern int ConnectionTranslation[]; extern Bool NewOutputPending; + #ifndef _MINIX extern Bool AnyClientsWriteBlocked; + #endif extern WorkQueuePtr workQueue; *************** *** 104,109 **** --- 129,135 ---- static long timeTilFrob = 0; /* while screen saving */ + #if !defined(AMOEBA) && !defined(_MINIX) int WaitForSomething(pClientsReady) int *pClientsReady; *************** *** 167,181 **** waittime.tv_sec = timeout / MILLI_PER_SECOND; waittime.tv_usec = (timeout % MILLI_PER_SECOND) * (1000000 / MILLI_PER_SECOND); ! wt = &waittime; } else { ! wt = NULL; } } else ! wt = NULL; COPYBITS(AllSockets, LastSelectMask); #ifdef apollo COPYBITS(apInputMask, LastWriteMask); --- 193,209 ---- waittime.tv_sec = timeout / MILLI_PER_SECOND; waittime.tv_usec = (timeout % MILLI_PER_SECOND) * (1000000 / MILLI_PER_SECOND); ! wt = &waittime; } else { ! wt = NULL; } } else ! { ! wt = NULL; ! } COPYBITS(AllSockets, LastSelectMask); #ifdef apollo COPYBITS(apInputMask, LastWriteMask); *************** *** 196,203 **** else if (AnyClientsWriteBlocked) { COPYBITS(ClientsWriteBlocked, clientsWritable); ! i = select (MAXSOCKS, (int *)LastSelectMask, ! (int *)clientsWritable, (int *) NULL, wt); } else #ifdef apollo --- 224,231 ---- else if (AnyClientsWriteBlocked) { COPYBITS(ClientsWriteBlocked, clientsWritable); ! i = select (MAXSOCKS, (fd_set *)LastSelectMask, ! (fd_set *)clientsWritable, (fd_set *) NULL, wt); } else #ifdef apollo *************** *** 204,211 **** i = select (MAXSOCKS, (int *)LastSelectMask, (int *)LastWriteMask, (int *) NULL, wt); #else ! i = select (MAXSOCKS, (int *)LastSelectMask, ! (int *) NULL, (int *) NULL, wt); #endif selecterr = errno; WakeupHandler((unsigned long)i, (pointer)LastSelectMask); --- 232,239 ---- i = select (MAXSOCKS, (int *)LastSelectMask, (int *)LastWriteMask, (int *) NULL, wt); #else ! i = select (MAXSOCKS, (fd_set *)LastSelectMask, ! (fd_set *) NULL, (fd_set *) NULL, wt); #endif selecterr = errno; WakeupHandler((unsigned long)i, (pointer)LastSelectMask); *************** *** 291,293 **** --- 319,784 ---- return (FALSE); } #endif + + #else /* AMOEBA || _MINIX */ + #ifdef AMOEBA + int init_waiters = 0; + semaphore init_sema; + + /* + * Force caller thread to wait until main has + * finished the initialization + */ + void + WaitForInitialization() + { + init_waiters++; + #ifdef XDEBUG + if (amDebug) ErrorF("Waiting for initialization (%d)\n", init_waiters); + #endif + sema_down(&init_sema); + } + + static semaphore main_sema; + + /* + * The X-server consists of one main thread, running the non re-entrant + * X code, and a number of auxilary threads that take care of reading + * the input streams, and input devices. The following set of routines + * wake up the main thread when it has something to do. + */ + void + InitMainThread() + { + sema_init(&main_sema, 0); + } + + void + WakeUpMainThread() + { + sema_up(&main_sema); + } + + static int + SleepMainThread(timo) + interval timo; + { + + #ifdef XDEBUG + if (amDebug) ErrorF("Sleeping main thread timeout %d\n", timo); + #endif /* XDEBUG */ + return (sema_trydown(&main_sema, timo) == 0) ? 0 : -1; + } + + int + WaitForSomething(pClientsReady) + int *pClientsReady; + { + register int i, wt, nt; + struct timeval *wtp; + long alwaysCheckForInput[2]; + int nready; + + /* + * First, wakeup threads in initial sleep + */ + if (init_waiters > 0) { + #ifdef XDEBUG + if (amDebug) + ErrorF("%d waiters wait for something to happen ...\n", + init_waiters); + #endif + while (init_waiters-- > 0) + sema_up(&init_sema); + } + + /* + * Be sure to check for input on every sweep in the dispatcher. + * This routine should be in InitInput, but since this is more + * or less a device dependent routine, and the semantics of it + * are device independent I decided to put it here. + */ + alwaysCheckForInput[0] = 0; + alwaysCheckForInput[1] = 1; + SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]); + + while (TRUE) { + /* + * Deal with any blocked jobs + */ + if (workQueue) ProcessWorkQueue(); + + /* + * Screen saver actions + */ + if (ScreenSaverTime) { + int timeout = ScreenSaverTime - TimeSinceLastInputEvent(); + if (timeout <= 0) { /* may be forced by AutoResetServer() */ + long timeSinceSave; + + timeSinceSave = -timeout; + if ((timeSinceSave >= timeTilFrob) && (timeTilFrob >= 0)) { + SaveScreens(SCREEN_SAVER_ON, ScreenSaverActive); + if (ScreenSaverInterval) + /* round up to the next ScreenSaverInterval */ + timeTilFrob = ScreenSaverInterval * + ((timeSinceSave + ScreenSaverInterval) / + ScreenSaverInterval); + else + timeTilFrob = -1; + } + timeout = timeTilFrob - timeSinceSave; + } else { + if (timeout > ScreenSaverTime) + timeout = ScreenSaverTime; + timeTilFrob = 0; + } + wt = timeTilFrob >= 0 ? timeout : -1; + } else + wt = -1; + + /* + * Check for new clients. We do this here and not in the + * listener() threads because we cannot be sure that dix + * is re-entrant, and we need to call some dix routines + * during startup. + */ + if (nNewConns) EstablishNewConnections(); + + /* + * Every device driver can install handlers which are called after + * a certain amount of time. These handlers implement, for example, + * key repeat on a Sun. The following construction will determine + * the correct time-out value, given the available handlers. For + * compatibility the timeout is a timeval structure. + */ + wtp = (struct timeval *) NULL; + BlockHandler((pointer)&wtp, (pointer)NULL); + if (wtp) wt = (wtp->tv_sec * 1000) + (wtp->tv_usec / 1000); + + /* + * Check for clients needing attention. They might want to + * die or they might have input. In the second case, only + * accept from the grabClient (if there is one). + */ + for (i = 0, nready = 0; i < maxClient; i++) { + if (Clients[i] && Clients[i]->osPrivate) { + register OsCommPtr oc = (OsCommPtr)Clients[i]->osPrivate; + register int n; + + if (oc->status & CONN_KILLED) { + CloseDownClient(Clients[i]); + if (maxClient == i) maxClient--; + continue; + } + if ((n = am_avail(oc, VC_IN)) < 0) { + CloseDownClient(Clients[i]); + if (maxClient == i) maxClient--; + continue; + } + if (n > 0 || oc->status & REQ_PUSHBACK) { + if (grabClient == NULL || grabClient == Clients[i]) { + *pClientsReady++ = Clients[i]->index; + nready++; + } + } + } + } + + /* + * Well, if we found some work, or the hardware has + * events available, we return. + */ + if (nready || AmoebaEventsAvailable()) break; + + /* + * Nothing interesting is available. Go to sleep with a + * timeout and the other threads will wake us when needed. + */ + if (dispatchException) return 0; + i = SleepMainThread(wt); + + /* + * Wake up any of the sleeping handlers + */ + WakeupHandler((unsigned long)0, (pointer)NULL); + if (dispatchException) return 0; + + /* + * An error or timeout occurred + */ + if (i == -1) return 0; + } + return nready; + } + #endif /* AMOEBA */ + + #ifdef _MINIX + static int timed_fwait(); + + int + WaitForSomething(pClientsReady) + int *pClientsReady; + { + long timeout; + struct timeval waittime[2]; + int nready; + struct fwait fw; + asio_fd_set_t wait_fd_set; + int i, r; + int fw_fd, fw_operation, fw_result, fw_errno; + + /* We need a while loop here to handle + crashed connections and the screen saver timeout */ + nready= 0; + while (1) + { + /* deal with any blocked jobs */ + if (workQueue) + ProcessWorkQueue(); + + sysutime(UTIME_TIMEOFDAY, &waittime[1]); + waittime[0].tv_sec= 0; + if (ScreenSaverTime) + { + timeout = (ScreenSaverTime - + (GetTimeInMillis() - lastDeviceEventTime.milliseconds)); + if (timeout <= 0) /* may be forced by AutoResetServer() */ + { + long timeSinceSave; + + timeSinceSave = -timeout; + if ((timeSinceSave >= timeTilFrob) && (timeTilFrob >= 0)) + { + ResetOsBuffers(); /* not ideal, but better than nothing */ + SaveScreens(SCREEN_SAVER_ON, ScreenSaverActive); + if (ScreenSaverInterval) + /* round up to the next ScreenSaverInterval */ + timeTilFrob = ScreenSaverInterval * + ((timeSinceSave + ScreenSaverInterval) / + ScreenSaverInterval); + else + timeTilFrob = -1; + } + timeout = timeTilFrob - timeSinceSave; + } + else + { + if (timeout > ScreenSaverTime) + timeout = ScreenSaverTime; + timeTilFrob = 0; + } + if (timeTilFrob >= 0) + { + waittime[0]= waittime[1]; + waittime[0].tv_sec += timeout / MILLI_PER_SECOND; + waittime[0].tv_usec += (timeout % MILLI_PER_SECOND) * + (1000000 / MILLI_PER_SECOND); + if (waittime[0].tv_usec >= 1000000) + { + waittime[0].tv_usec -= 1000000; + waittime[0].tv_sec += 1; + } + } + } + + wait_fd_set= InprogressFdSet; + + /* Let's fill in the fwait structure */ + fw.fw_flags= FWF_MORE; /* Ignored by the kernel, but makes loop + * termination easier + */ + + fw.fw_bits= wait_fd_set.afds_bits; + fw.fw_maxfd= ASIO_FD_SETSIZE; + + if (AnyClientsWithInput) + fw.fw_flags |= FWF_NONBLOCK; + + BlockHandler((pointer)waittime, (pointer)&wait_fd_set); + if (NewOutputPending) + FlushAllOutput(); + #ifdef XTESTEXT1 + /* XXX how does this interact with new write block handling? */ + if (playback_on) { + XTestComputeWaitTime (waittime); + } + #endif /* XTESTEXT1 */ + for(;fw.fw_flags & FWF_MORE; fw.fw_flags |= FWF_NONBLOCK) + { + /* keep this check close to select() call to minimize race */ + if (dispatchException) + { + r = -1; + errno= EAGAIN; + } + else if (waittime[0].tv_sec != 0) + { + assert(waittime[0].tv_sec >= waittime[1].tv_sec); + r= timed_fwait(&fw, &waittime[0]); + } + else + r= fwait(&fw); + if (r == -1) + break; + fw_fd= fw.fw_fd; + fw_operation= fw.fw_operation; + fw_result= fw.fw_result; + fw_errno= fw.fw_errno; + if (ASIO_FD_ISSET(fw_fd, fw_operation, &ListenFdSet)) + { + /* Got a new connection */ + EnqueueNewConnection(fw_fd, fw_operation, fw_result, fw_errno); + fw.fw_fd= -1; + continue; + } + if (ASIO_FD_ISSET(fw_fd, fw_operation, &ClientFdSet)) + { + /* The read or write of a client is done */ + UpdateClientIOStatus(fw_fd, fw_operation, fw_result, fw_errno); + fw.fw_fd= -1; + + /* Store the client in the ready set if the operation was a + * read + */ + if (fw_operation == ASIO_READ) + { + pClientsReady[nready++] = ConnectionTranslation[fw_fd]; + } + continue; + } + + /* Only thing left is a device, let's break out of this loop */ + break; + } + if (r == -1) + { + if (errno != EINTR && errno != EAGAIN) + FatalError("WaitForSomething(): fwait error: %s\n", + strerror(errno)); + WakeupHandler(0, NULL); /* Nothing happend to a device */ + } + else + { + WakeupHandler(0, (pointer)&fw); + if (fw.fw_fd != -1) + FatalError("Unable to locate module for completed I/O\n"); + } + #ifdef XTESTEXT1 + if (playback_on) { + i = XTestProcessInputAction (i, &waittime); + } + #endif /* XTESTEXT1 */ + if (r < 0) /* An error or timeout occurred */ + { + + if (dispatchException) + return 0; + if (*checkForInput[0] != *checkForInput[1]) + return 0; + } + + break; + } + + if (AnyClientsWithInput) + { + /* These were left over from the previous round */ + AnyClientsWithInput= FALSE; + for (i= 0; itv_sec - tv.tv_sec; + tv.tv_usec= tvp->tv_usec - tv.tv_usec; if (tv.tv_usec < 0) + { tv.tv_usec += 1000000; tv.tv_sec--; } + ErrorF("timed_fwait: timeout at now+%d.%06d\n", tv.tv_sec, + tv.tv_usec); } + #endif + + /* Assume that only timed_fwait is allowed to let the timer running + * between calls. + */ + tv= *tvp; + if (!timer_running) + { + signal(SIGALRM, tf_handler); + sysutime(UTIME_SETALARM, &tv); + assert(tv.tv_sec == 0); + timer_value= *tvp; + timer_running= TRUE; + } + else if (tv.tv_sec < timer_value.tv_sec || + (tv.tv_sec == timer_value.tv_sec && + tv.tv_usec < timer_value.tv_usec)) + { + /* If the previous timer expires just before we set the + * new timer, the handler is lost unless tf_critical is set, + * then the handler will set a new new timer 1 second later. + */ + tf_critical= TRUE; + sysutime(UTIME_SETALARM, &tv); + timer_value= *tvp; + tf_critical= FALSE; + } + tf_critical= TRUE; + if (tf_expired) + { + tf_critical= FALSE; + tf_expired= FALSE; + errno= EINTR; + return -1; + } + r= fwait(fwp); + tf_critical= FALSE; + return r; + } + #endif /* _MINIX */ + #endif /* AMOEBA || _MINIX */ diff -c mit/server/os/access.c:1.1.1.2 mit/server/os/access.c:2.6 *** mit/server/os/access.c:1.1.1.2 Sat Mar 12 00:35:15 1994 --- mit/server/os/access.c Sat Mar 12 00:35:16 1994 *************** *** 22,27 **** --- 22,28 ---- ******************************************************************/ + /* $XFree86: mit/server/os/access.c,v 2.6 1993/09/22 15:49:42 dawes Exp $ */ /* $XConsortium: access.c,v 1.54 92/05/19 17:23:02 keith Exp $ */ #include "Xos.h" *************** *** 30,47 **** #include "misc.h" #include "site.h" #include #include #include #include ! #ifdef TCPCONN #include ! #endif /* TCPCONN */ #ifdef DNETCONN #include #include #endif #ifdef hpux # include # ifdef HAS_IFREQ --- 31,82 ---- #include "misc.h" #include "site.h" #include + #ifndef AMOEBA + #ifndef _MINIX + #ifdef ESIX + #include + #else #include + #endif #include + #endif + #else /* AMOEBA */ + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #endif /* AMOEBA */ #include ! #if defined(TCPCONN) || defined(ISC) ! #ifndef _MINIX #include ! #else ! #include ! #include ! #include ! #include ! #include ! #endif /* _MINIX */ ! #endif /* TCPCONN || ISC */ #ifdef DNETCONN #include #include #endif + #if defined(SVR4) || defined(ISC) || defined(linux) + #define USE_FALLBACK_DEFINESELF + #endif + #ifdef hpux # include # ifdef HAS_IFREQ *************** *** 48,63 **** # include # endif #else ! #if defined(SVR4) || defined(SYSV386) # include #endif #if defined(SYSV) && defined(SYSV386) # include #endif # include #endif /* hpux */ #include #undef NULL #include #include "dixstruct.h" --- 83,123 ---- # include # endif #else ! #if defined(SYSV386) || defined(USE_FALLBACK_DEFINESELF) # include #endif #if defined(SYSV) && defined(SYSV386) # include + # ifdef ISC + # include + # include + # endif /* ISC */ #endif + #ifdef ESIX + # include + #else + #if !defined(AMOEBA) && !defined(_MINIX) # include + #endif + #endif #endif /* hpux */ + #ifdef SVR4 + #include + #include + #endif + + #ifdef ESIX + #include + #else + #ifdef AMOEBA + #include + #else + #ifndef _MINIX #include + #endif + #endif /* AMOEBA */ + #endif /* ESIX */ #undef NULL #include #include "dixstruct.h" *************** *** 75,80 **** --- 135,197 ---- #ifdef hpux #define getpeername(fd, from, fromlen) hpux_getpeername(fd, from, fromlen) #endif + #if defined(SYSV386) && defined(SYSV) + #define getpeername(fd, from, fromlen) sysv386_getpeername(fd, from, fromlen) + #endif + + #if defined(SVR4) || defined(ISC) + /* ifioctl() for SVR4 from Ian Donaldson */ + static int + ifioctl (fd, cmd, arg) + int fd; + int cmd; + char *arg; + { + struct strioctl ioc; + int ret; + + bzero((char *) &ioc, sizeof(ioc)); + ioc.ic_cmd = cmd; + ioc.ic_timout = 0; + if (cmd == SIOCGIFCONF) + { + ioc.ic_len = ((struct ifconf *) arg)->ifc_len; + ioc.ic_dp = ((struct ifconf *) arg)->ifc_buf; + #ifdef ISC + /* SIOCGIFCONF is somewhat brain damaged on ISC. The argument + * buffer must contain the ifconf structure as header. Ifc_req + * is also not a pointer but a one element array of ifreq + * structures. On return this array is extended by enough + * ifreq fields to hold all interfaces. The return buffer length + * is placed in the buffer header. + */ + ((struct ifconf *) ioc.ic_dp)->ifc_len = + ioc.ic_len - sizeof(struct ifconf); + #endif + } + else + { + ioc.ic_len = sizeof(struct ifreq); + ioc.ic_dp = arg; + } + ret = ioctl(fd, I_STR, (char *) &ioc); + if (ret >= 0 && cmd == SIOCGIFCONF) + #ifdef SVR4 + ((struct ifconf *) arg)->ifc_len = ioc.ic_len; + #endif + #ifdef ISC + { + ((struct ifconf *) arg)->ifc_len = + ((struct ifconf *)ioc.ic_dp)->ifc_len; + ((struct ifconf *) arg)->ifc_buf = + (caddr_t)((struct ifconf *)ioc.ic_dp)->ifc_req; + } + #endif + return(ret); + } + #else /* SVR4 || ISC */ + #define ifioctl ioctl + #endif /* SVR4 || ISC */ static int ConvertAddr(), CheckAddr(); static Bool NewHost(); *************** *** 120,133 **** LocalHostEnabled = FALSE; } ! #if defined(SVR4) || defined (SYSV386) || (defined (hpux) && ! defined (HAS_IFREQ)) /* Define this host for access control. Find all the hosts the OS knows about * for this fd and add them to the selfhosts list. ! * hpux, SVR4, and SYSV386 do not have SIOCGIFCONF ioctl; */ DefineSelf (fd) int fd; { register int n; int len; caddr_t addr; --- 237,264 ---- LocalHostEnabled = FALSE; } ! /* ! * Amoeba doesn't need DefineSelf, since all TCP/IP connections made to ! * the server always originate from remote clients. ! */ ! #ifndef AMOEBA ! #if defined (SYSV386) || defined (linux) || (defined (hpux) && ! defined (HAS_IFREQ)) /* Define this host for access control. Find all the hosts the OS knows about * for this fd and add them to the selfhosts list. ! * hpux, and some SYSV386 do not have SIOCGIFCONF ioctl; */ + /* SVR4, ISC, linux use this if SIOCGIFCONF fails */ + #ifdef USE_FALLBACK_DEFINESELF + static + FallbackDefineSelf(fd) + #else DefineSelf (fd) + #endif int fd; { + #if !defined(TCPCONN) && !defined(UNIXCONN) + return -1; + #else register int n; int len; caddr_t addr; *************** *** 176,186 **** --- 307,350 ---- selfhosts = host; } } + #ifdef XDMCP + /* + * If this isn't an Internet Address, don't register it. + */ + if (family == FamilyInternet) + { + /* + * ignore 'localhost' entries as they're not useful + * on the other end of the wire + */ + if (len != 4 || + addr[0] != 127 || addr[1] != 0 || + addr[2] != 0 || addr[3] != 1) + { + struct sockaddr_in broad_addr; + + XdmcpRegisterConnection (family, (char *)addr, len); + broad_addr = *inetaddr; /* is this our main addr? */ + broad_addr.sin_addr.s_addr = htonl (INADDR_BROADCAST); + XdmcpRegisterBroadcastAddress (&broad_addr); + } + } + #endif } } + #endif /* !TCPCONN && !UNIXCONN */ } + #endif + #if (!defined(SYSV386) && !(defined (hpux) && ! defined (HAS_IFREQ))) || defined(USE_FALLBACK_DEFINESELF) + #ifndef _MINIX + + #ifdef AF_LINK + #define ifr_size(p) ((p).sa_len > sizeof(p) ? (p).sa_len : sizeof(p)) #else + #define ifr_size(p) (sizeof(p)) + #endif + /* Define this host for access control. Find all the hosts the OS knows about * for this fd and add them to the selfhosts list. */ *************** *** 187,193 **** DefineSelf (fd) int fd; { ! char buf[2048]; struct ifconf ifc; register int n; int len; --- 351,357 ---- DefineSelf (fd) int fd; { ! char buf[2048], *cp, *cplim; struct ifconf ifc; register int n; int len; *************** *** 227,238 **** #endif ifc.ifc_len = sizeof (buf); ifc.ifc_buf = buf; ! if (ioctl (fd, (int) SIOCGIFCONF, (pointer) &ifc) < 0) Error ("Getting interface configuration"); ! for (ifr = ifc.ifc_req, n = ifc.ifc_len / sizeof (struct ifreq); --n >= 0; ! ifr++) { ! len = sizeof(ifr->ifr_addr); #ifdef DNETCONN /* * DECnet was handled up above. --- 391,413 ---- #endif ifc.ifc_len = sizeof (buf); ifc.ifc_buf = buf; ! if (ifioctl (fd, (int) SIOCGIFCONF, (pointer) &ifc) < 0) ! #ifdef USE_FALLBACK_DEFINESELF ! return FallbackDefineSelf(); ! #else Error ("Getting interface configuration"); ! #endif ! #ifndef ISC ! #define IFC_IFC_REQ ifc.ifc_req ! #else ! #define IFC_IFC_REQ (struct ifreq *)ifc.ifc_buf ! #endif ! cplim = (char *)IFC_IFC_REQ + ifc.ifc_len; ! for (cp = (char *)IFC_IFC_REQ; cp < cplim; ! cp += sizeof (ifr->ifr_name) + ifr_size(ifr->ifr_addr)) { ! ifr = (struct ifreq*)cp; ! len = ifr_size(ifr->ifr_addr); #ifdef DNETCONN /* * DECnet was handled up above. *************** *** 286,298 **** struct ifreq broad_req; broad_req = *ifr; ! if (ioctl (fd, SIOCGIFFLAGS, (char *) &broad_req) != -1 && (broad_req.ifr_flags & IFF_BROADCAST) && (broad_req.ifr_flags & IFF_UP) ) { broad_req = *ifr; ! if (ioctl (fd, SIOCGIFBRDADDR, &broad_req) != -1) broad_addr = broad_req.ifr_addr; else continue; --- 461,473 ---- struct ifreq broad_req; broad_req = *ifr; ! if (ifioctl (fd, SIOCGIFFLAGS, (char *) &broad_req) != -1 && (broad_req.ifr_flags & IFF_BROADCAST) && (broad_req.ifr_flags & IFF_UP) ) { broad_req = *ifr; ! if (ifioctl (fd, SIOCGIFBRDADDR, &broad_req) != -1) broad_addr = broad_req.ifr_addr; else continue; *************** *** 306,312 **** --- 481,536 ---- #endif } } + #else /* _MINIX */ + /* Define this host for access control. + */ + DefineSelf (fd) + int fd; + { + int len; + int r; + pointer addr; + nwio_tcpconf_t tcpconf; + HOST *host; + + /* Assume we only have tcp connections. */ + r= ioctl(fd, NWIOGTCPCONF, &tcpconf); + if (r == -1) + { + Error("Unable to get local address from tcp fd"); + return; + } + addr= (pointer)&tcpconf.nwtc_locaddr; + len= sizeof(tcpconf.nwtc_locaddr); + for (host = selfhosts; host && !addrEqual (0, addr, len, host); + host = host->next) + { + /* Do nothing */ ; + } + if (host) + return; + MakeHost(host,len) + if (host) + { + host->family = 0; + host->len = len; + acopy(addr, host->addr, len); + host->next = selfhosts; + selfhosts = host; + } + #ifdef XDMCP + { + ipaddr_t broad_addr; + + XdmcpRegisterConnection (FamilyInternet, (char *)addr, len); + broad_addr= htonl(0xffffffff); + MNX_XdmcpRegisterBroadcastAddress (broad_addr); + } + #endif + } + #endif /* _MINIX */ #endif /* hpux && !HAS_IFREQ */ + #endif /* AMOEBA */ #ifdef XDMCP void *************** *** 354,364 **** char fname[32]; FILE *fd; char *ptr; union { struct sockaddr sa; ! #ifdef TCPCONN struct sockaddr_in in; ! #endif /* TCPCONN */ #ifdef DNETCONN struct sockaddr_dn dn; #endif --- 578,589 ---- char fname[32]; FILE *fd; char *ptr; + #ifndef AMOEBA union { struct sockaddr sa; ! #if defined(TCPCONN) && !defined(_MINIX) struct sockaddr_in in; ! #endif /* TCPCONN && !_MINIX */ #ifdef DNETCONN struct sockaddr_dn dn; #endif *************** *** 367,372 **** --- 592,598 ---- struct nodeent *np; struct dn_naddr dnaddr, *dnaddrp, *dnet_addr(); #endif + #endif /* AMOEBA */ int family; int len; pointer addr; *************** *** 421,434 **** } else #endif /* SECURE_RPC */ ! #ifdef TCPCONN { /* host name */ if (hp = gethostbyname (hostname)) { saddr.sa.sa_family = hp->h_addrtype; len = sizeof(saddr.sa); if ((family = ConvertAddr (&saddr.sa, &len, &addr)) != -1) { #ifdef h_addr /* new 4.3bsd version of gethostent */ char **list; --- 647,669 ---- } else #endif /* SECURE_RPC */ ! #if defined(TCPCONN) || defined(AMTCPCONN) { /* host name */ if (hp = gethostbyname (hostname)) { + #ifndef AMOEBA + #ifndef _MINIX saddr.sa.sa_family = hp->h_addrtype; + #else /* _MINIX */ + saddr.sa.sa_u.sa_family = hp->h_addrtype; + #endif /* !_MINIX */ len = sizeof(saddr.sa); if ((family = ConvertAddr (&saddr.sa, &len, &addr)) != -1) + #else + len = sizeof(ipaddr_t); + if (hp->h_addrtype == AF_INET) + #endif { #ifdef h_addr /* new 4.3bsd version of gethostent */ char **list; *************** *** 442,448 **** } } } ! #endif /* TCPCONN */ } fclose (fd); } --- 677,683 ---- } } } ! #endif /* TCPCONN || AMTCPCONN */ } fclose (fd); } *************** *** 453,467 **** --- 688,733 ---- ClientPtr client; { int alen, family; + #ifndef AMOEBA struct sockaddr from; + #else + ipaddr_t from; + #endif + #if defined(_MINIX) || defined(AMOEBA) + nwio_tcpconf_t tcpconf; + #endif pointer addr; register HOST *host; if (!client || defeatAccessControl) return TRUE; + #ifndef AMOEBA + #ifndef _MINIX alen = sizeof (from); if (!getpeername (((OsCommPtr)client->osPrivate)->fd, &from, &alen)) { + #else /* _MINIX */ + if (ioctl(((OsCommPtr)client->osPrivate)->fd, NWIOGTCPCONF, + &tcpconf) != -1) + { + from.sa_u.sa_in.sin_family= AF_INET; + from.sa_u.sa_in.sin_addr= tcpconf.nwtc_remaddr; + from.sa_u.sa_in.sin_port= tcpconf.nwtc_remport; + alen= sizeof(from); + #endif /* !_MINIX */ + #else /* AMOEBA */ + /* + * Amoeba clients are always authorized. + * We might deal with access rights though (XXX) + */ + if (((OsCommPtr)client->osPrivate)->family == FamilyAmoeba) + return TRUE; + if (((OsCommPtr)client->osPrivate)->family == FamilyInternet && + tcp_ioc_getconf(&((OsCommPtr)client->osPrivate)->conn.tcp.cap, &tcpconf) == STD_OK) + { + alen = sizeof (ipaddr_t); + from = tcpconf.nwtc_remaddr; + #endif /* AMOEBA */ family = ConvertAddr (&from, &alen, &addr); if (family == -1) return FALSE; *************** *** 674,687 **** --- 940,968 ---- switch (family) { + #ifndef AMOEBA #ifdef TCPCONN case FamilyInternet: + #ifndef _MINIX if (length == sizeof (struct in_addr)) + #else + if (length == sizeof (ipaddr_t)) + #endif len = length; else len = -1; break; #endif + #else /* AMOEBA */ + #ifdef AMTCPCONN + case FamilyInternet: + if (length == sizeof (ipaddr_t)) + len = length; + else + len = -1; + break; + #endif /* AMTCPCONN */ + #endif /* AMOEBA */ #ifdef DNETCONN case FamilyDECnet: { *************** *** 707,713 **** --- 988,998 ---- * Returns 1 if host is invalid, 0 if we've found it. */ InvalidHost (saddr, len) + #ifdef AMOEBA + register ipaddr_t *saddr; + #else register struct sockaddr *saddr; + #endif int len; { int family; *************** *** 750,762 **** --- 1035,1056 ---- static int ConvertAddr (saddr, len, addr) + #ifdef AMOEBA + register ipaddr_t *saddr; + #else register struct sockaddr *saddr; + #endif int *len; pointer *addr; { + #ifndef AMOEBA if (*len == 0) return (FamilyLocal); + #ifndef _MINIX switch (saddr->sa_family) + #else /* _MINIX */ + switch (saddr->sa_u.sa_family) + #endif /* !_MINIX */ { case AF_UNSPEC: #ifdef UNIXCONN *************** *** 765,772 **** --- 1059,1071 ---- return FamilyLocal; #ifdef TCPCONN case AF_INET: + #ifndef _MINIX *len = sizeof (struct in_addr); *addr = (pointer) &(((struct sockaddr_in *) saddr)->sin_addr); + #else /* _MINIX */ + *len = sizeof (ipaddr_t); + *addr = (pointer) &(saddr->sa_u.sa_in.sin_addr); + #endif /* !_MINIX */ return FamilyInternet; #endif #ifdef DNETCONN *************** *** 788,793 **** --- 1087,1098 ---- default: return -1; } + #else /* AMOEBA */ + if (*len == 0) return -1; + *len = sizeof (ipaddr_t); + *addr = (pointer) saddr; + return FamilyInternet; + #endif /* AMOEBA */ } int diff -c mit/server/os/connection.c:1.1.1.3 mit/server/os/connection.c:2.2 *** mit/server/os/connection.c:1.1.1.3 Sat Mar 12 00:35:17 1994 --- mit/server/os/connection.c Sat Mar 12 00:35:17 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/os/connection.c,v 2.2 1993/09/22 15:49:44 dawes Exp $ */ /* $XConsortium: connection.c,v 1.146 92/06/11 10:38:45 rws Exp $ */ /***************************************************************** * Stuff to create connections --- OS dependent *************** *** 41,50 **** --- 42,59 ---- #include "X.h" #include "Xproto.h" + #ifndef _MINIX #include + #endif #include #include "Xos.h" /* for strings, file, time */ + #if !defined(AMOEBA) && !defined(_MINIX) + #ifdef ESIX + #include + #else #include + #endif + #endif #include #include *************** *** 54,64 **** --- 63,78 ---- #include #endif + #ifdef SVR4 + #include + #endif + #ifdef AIXV3 #include #endif #ifdef TCPCONN + #ifndef _MINIX # include # ifndef hpux # ifdef apollo *************** *** 69,74 **** --- 83,96 ---- # include # endif # endif + #else /* _MINIX */ + #include + #include + #include + #include + #include + #include + #endif /* _MINIX */ #endif #ifdef UNIXCONN *************** *** 81,87 **** --- 103,111 ---- #endif #include + #if !defined(AMOEBA) && !defined(_MINIX) #include + #endif #include "osstruct.h" #include "osdep.h" #include "opaque.h" *************** *** 91,96 **** --- 115,124 ---- #include #endif /* DNETCONN */ + #ifndef SCO + #define _OSWriteV writev + #endif /* SCO */ + #ifdef SIGNALRETURNSINT #define SIGVAL int #else *************** *** 110,118 **** --- 138,180 ---- #endif #endif + #ifdef SERVER_LOCALCONN + #include + #include + #include + #ifndef UNIXCONN + #include + #endif + #ifdef SVR4 + static int NstrFd = -1; + #endif + static int ptsFd = -1; + static int spxFd = -1; + static int xsFd = -1; + static long AllStreams[mskcnt]; /* keep up, whos on a STREAMS pipe */ + /* + * Why not use the same path as for UNIXCONN ?? + * Diskless workstations may have a common /tmp directory. This may cause much + * trouble. Since every workstation MUST have it's own /dev, so lets use this + * directory. + */ + #define X_STREAMS_DIR "/dev/X" + #define X_STREAMS_PATH "/dev/X/server." + #ifdef SVR4 + # define X_NSTREAMS_PATH "/dev/X/Nserver." + #endif + #define X_XSIGHT_PATH "/dev/X" + #if defined(SVR4_ACP) && defined(UNIXCONN) + # define X_ISC_DIR "/tmp/.ISC-unix" + # define X_ISC_PATH "/tmp/.ISC-unix/X" + #endif + #endif /* SERVER_LOCALCONN */ + extern char *display; /* The display number */ + #ifndef AMOEBA int lastfdesc; /* maximum file descriptor */ + #ifndef _MINIX long WellKnownConnections; /* Listener mask */ long EnabledDevices[mskcnt]; /* mask for input devices that are on */ long AllSockets[mskcnt]; /* select on this */ *************** *** 121,128 **** long ClientsWithInput[mskcnt]; /* clients with FULL requests in buffer */ long ClientsWriteBlocked[mskcnt];/* clients who cannot receive output */ long OutputPending[mskcnt]; /* clients with reply/event data ready to go */ - long MaxClients = MAXSOCKS ; long NConnBitArrays = mskcnt; Bool NewOutputPending; /* not yet attempted to write some new output */ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ --- 183,191 ---- long ClientsWithInput[mskcnt]; /* clients with FULL requests in buffer */ long ClientsWriteBlocked[mskcnt];/* clients who cannot receive output */ long OutputPending[mskcnt]; /* clients with reply/event data ready to go */ long NConnBitArrays = mskcnt; + #endif + long MaxClients = MAXSOCKS ; Bool NewOutputPending; /* not yet attempted to write some new output */ Bool AnyClientsWriteBlocked; /* true if some client blocked on write */ *************** *** 132,149 **** --- 195,240 ---- static Bool debug_conns = FALSE; + #ifndef _MINIX static int SavedAllClients[mskcnt]; static int SavedAllSockets[mskcnt]; static int SavedClientsWithInput[mskcnt]; + #endif /* _MINIX */ int GrabInProgress = 0; int ConnectionTranslation[MAXSOCKS]; + #endif /* !AMOEBA */ + + #ifdef _MINIX + asio_fd_set_t InprogressFdSet; /* fds that have an operation in progress */ + asio_fd_set_t ListenFdSet; /* fds that accept new connections */ + asio_fd_set_t CompletedFdSet; /* fds that completed some I/O but have not + * been able to process this information + * synchronously (or completely) */ + asio_fd_set_t ClientFdSet; /* fds that belong to clients */ + asio_fd_set_t IgnoreFdSet; /* Ignore these clients if they have completed + * I/O */ + asio_fd_set_t GrabFdSet; /* This is the client who has the grab, + * if any */ + + static int TcpListenFd= -1; /* initialy there is no tcp fd. */ + Bool AnyClientsWithInput= FALSE; + + struct NewConnection + { + int nc_result; /* What was the result */ + int nc_errno; /* and the error */ + } NewTcpConnection; + #endif + extern ClientPtr NextAvailableClient(); extern SIGVAL AutoResetServer(); extern SIGVAL GiveUp(); extern XID CheckAuthorization(); + #ifndef AMOEBA static void CloseDownFileDescriptor(), ErrorConnMax(); + #endif extern void FreeOsBuffers(), ResetOsBuffers(); #ifdef XDMCP *************** *** 151,156 **** --- 242,248 ---- #endif #ifdef TCPCONN + #ifndef _MINIX static int open_tcp_socket () { *************** *** 157,162 **** --- 249,257 ---- struct sockaddr_in insock; int request; int retry; + #ifdef SVR4 + #undef SO_DONTLINGER + #endif #ifndef SO_DONTLINGER #ifdef SO_LINGER static int linger[2] = { 0, 0 }; *************** *** 225,230 **** --- 320,435 ---- } return request; } + #else /* _MINIX */ + + Bool EstablishNewConnections(); + + static int + MNX_open_tcp_socket (extra_fd) + int *extra_fd; + { + int fd, r, flags, retry; + char *tcp_dev, *check; + int display_no; + nwio_tcpconf_t tcpconf; + nwio_tcpcl_t tcpcl; + + /* Allow the X server to run on a different IP device with the + * TCP_DEVICE environment variable, otherwise we take the default. + */ + tcp_dev= getenv("TCP_DEVICE"); + if (tcp_dev == NULL) + tcp_dev= TCP_DEVICE; + + fd= open(tcp_dev, O_RDWR); + if (fd == -1) + { + Error ("Creating TCP socket"); + return -1; + } + if (extra_fd) + { + *extra_fd= fd; + + fd= open(tcp_dev, O_RDWR); + if (fd == -1) + { + Error ("Creating TCP socket"); + close(*extra_fd); + return -1; + } + } + + /* Bind the socket */ + display_no= strtol(display, &check, 0); + if (check[0] != '\0') + { + Error("Unable to parse display number"); + return -1; + } + tcpconf.nwtc_flags= NWTC_SHARED | NWTC_LP_SET | NWTC_UNSET_RA | + NWTC_UNSET_RP; + tcpconf.nwtc_locport= htons(X_TCP_PORT + display_no); + r= ioctl(fd, NWIOSTCPCONF, &tcpconf); + if (r == -1) + { + Error ("Binding TCP socket"); + close (fd); + return -1; + } + + /* Mark the filedescriptor as asynchronous */ + flags= fcntl(fd, F_GETFL); + if (flags == -1) + { + Error("Unable to get the flags of a tcp fd"); + close(fd); + return -1; + } + r= fcntl(fd, F_SETFD, flags | FD_ASYNCHIO); + if (r == -1) + { + Error("Unable to enable asynchronous I/O on a tcp fd"); + close(fd); + return -1; + } + + /* Now try to listen, possible return values are: + * EINPROGRESS: the default, we can return the fd + * EAGAIN: all entry in the connection table are inuse, + * we wait a few seconds. + * 0: some client arrived, we enqueue + * EstablishNewConnections + */ + for (retry= 0; retry<10; retry++) + { + tcpcl.nwtcl_flags= 0; + r= ioctl(fd, NWIOTCPLISTEN, &tcpcl); + if (r == -1 && errno == EINPROGRESS) + return fd; /* Normal case */ + else if (r == -1 && errno == EAGAIN) + { + sleep(1); + continue; + } + else + { + NewTcpConnection.nc_result= r; + NewTcpConnection.nc_errno= errno; + + /* Let EstablishNewConnections deal with this + * situation + */ + QueueWorkProc(EstablishNewConnections, NULL, + (pointer)&NewTcpConnection); + return fd; + } + } + Error ("Binding TCP socket"); + close (fd); + return -1; + } + #endif /* _MINIX */ #endif /* TCPCONN */ #ifdef UNIXCONN *************** *** 290,295 **** --- 495,875 ---- } #endif /*UNIXCONN */ + #ifdef SERVER_LOCALCONN + + #if !defined(SVR4) || defined(SVR4_ACP) + static int + connect_spipe(fd1, fd2) + int fd1, fd2; + { + long temp; + struct strfdinsert sbuf; + + sbuf.databuf.maxlen = -1; + sbuf.databuf.len = -1; + sbuf.databuf.buf = NULL; + sbuf.ctlbuf.maxlen = sizeof(long); + sbuf.ctlbuf.len = sizeof(long); + sbuf.ctlbuf.buf = (caddr_t)&temp; + sbuf.offset = 0; + sbuf.fildes = fd2; + sbuf.flags = 0; + if (ioctl(fd1, I_FDINSERT, &sbuf) == -1) return (-1); + + return (0); + } + + static int + named_spipe(fd, path) + int fd; + char *path; + { + int oldUmask, ret; + struct stat sbuf; + + oldUmask = umask(0); + + (void) fstat(fd, &sbuf); + ret = mknod(path, 0020666, sbuf.st_rdev); + + umask(oldUmask); + + return (ret < 0 ? -1 : fd); + } + + static int + open_isc_local () + { + int fd = -1,fds = -1; + long temp; + struct strfdinsert buf; + char path[64]; + + #if defined(SVR4_ACP) && defined(UNIXCONN) + /* + * ISC local connections go the same place as Unix-domain sockets (brain + * death of the highest magnitude. To allow this to function, we put + * the ISC streams pipe elsewhere. This will require that a binary edit + * be done on ISC binaries under SVR4, but life is tough some times. + */ + mkdir (X_ISC_DIR, 0777); + chmod (X_ISC_DIR, 0777); + + strcpy (path, X_ISC_PATH); + #else /* SVR4_ACP && UNIXCONN */ + mkdir (X_UNIX_DIR, 0777); + chmod (X_UNIX_DIR, 0777); + + strcpy (path, X_UNIX_PATH); + #endif /* SVR4_ACP && UNIXCONN */ + + strcat (path, display); + + if(unlink(path) < 0 && errno != ENOENT) { + ErrorF ("XFree86: ISC listener pipe in use (%s)\n", path); + return(-1); + } + + if ((fds = open("/dev/spx", O_RDWR)) >= 0 && + (fd = open("/dev/spx", O_RDWR)) >= 0 ) + + if (connect_spipe(fds, fd) != -1 && + named_spipe(fds, path) != -1) + + return(fd); + else + Error("XFree86: Can't set up ISC listener pipes"); + + #ifndef SVR4 + /* + * At this point, most SVR4 versions will fail on this, so leave out the + * warning + */ + else + Error("XFree86: Cannot open \"/dev/spx\" for ISC listener"); + #endif + + (void) close(fds); + (void) close(fd); + return(-1); + } + + + static int + accept_isc_local() + { + struct strrecvfd buf; + + while (ioctl(spxFd, I_RECVFD, &buf) < 0) + if (errno != EAGAIN) { + Error("XFree86: Can't read fildes from ISC client"); + return(-1); + } + + BITSET(AllStreams, buf.fd); + return(buf.fd); + } + + static int + open_xsight_local() + { + int fds = -1,fdr = -1; + char pathS[64], pathR[64]; + + sprintf(pathS, "%s%sS",X_XSIGHT_PATH, display); + sprintf(pathR, "%s%sR",X_XSIGHT_PATH, display); + + if((unlink(pathS) < 0 && errno != ENOENT) || + (unlink(pathR) < 0 && errno != ENOENT)) + { + ErrorF ("XFree86: SCO listener pipe in use (%s)\n",pathR); + return(-1); + } + + if ((fds = open("/dev/spx", O_RDWR)) >= 0 && + (fdr = open("/dev/spx", O_RDWR)) >= 0 ) + + if (connect_spipe(fds, fdr) != -1 && + named_spipe(fds, pathS) != -1 && + named_spipe(fdr, pathR) != -1) + + return(fds); + else + Error("XFree86: Can't set up SCO listener pipes"); + + #ifndef SVR4 + /* + * At this point, most SVR4 versions will fail on this, so leave out the + * warning + */ + else + Error("XFree86: Cannot open \"/dev/spx\" for SCO listener"); + #endif + + (void) close(fds); + (void) close(fdr); + return(-1); + } + + + static int + accept_xsight_local() + { + char c; + int fd; + long temp; + struct strfdinsert buf; + + if (read(xsFd, &c, 1) < 0) { + Error("XFree86: Can't read from SCO client"); + return(-1); + } + + if ((fd = open("/dev/spx", O_RDWR)) < 0) { + Error("XFree86: Can't open \"/dev/spx\" for SCO client connection"); + return(-1); + } + + if (connect_spipe(xsFd, fd) < 0) { + Error("XFree86: Can't connect pipes for SCO client connection"); + (void) close(fd); + return(-1); + } + + BITSET(AllStreams, fd); + return(fd); + } + #endif /* SVR4 */ + + static int + open_att_local () + { + char *slave; + int fd; + char path[64]; + + mkdir (X_STREAMS_DIR, 0777); + chmod (X_STREAMS_DIR, 0777); + + strcpy (path, X_STREAMS_PATH); + strcat (path, display); + + if((unlink(path) < 0 && errno != ENOENT)) { + ErrorF ("XFree86: USL listener pipe in use (%s)\n", path); + return(-1); + } + + if( (fd = open("/dev/ptmx", O_RDWR)) < 0 ) { + Error ("XFree86: Cannot open \"/dev/ptmx\" for USL listener"); + return(-1); + } + + grantpt(fd); + unlockpt(fd); + slave = (char *) ptsname(fd); + if (link(slave, path) < 0 || chmod(path, 0666) < 0) { + Error("XFree86: Can't set up local USL listener"); + return(-1); + } + + if (open(path, O_RDWR) < 0) { + ErrorF("XFree86: Can't open %s for USL listener\n", path); + close(fd); + return(-1); + } + + return(fd); + } + + #ifdef SVR4 + static int + open_att_svr4_local () + { + int fd[2], tfd; + char path[64]; + + mkdir (X_STREAMS_DIR, 0777); + chmod (X_STREAMS_DIR, 0777); + + strcpy (path, X_NSTREAMS_PATH); + strcat (path, display); + + if ((unlink(path) < 0 && errno != ENOENT)) { + ErrorF ("XFree86: SVR4 named listener pipe in use (%s)\n", path); + return(-1); + } + + if ((tfd = creat(path, (mode_t)0666)) < 0) { + ErrorF("XFree86: Can't create named-streams path (%s)\n", path); + return(-1); + } + close(tfd); + if (chmod(path, (mode_t)0666) < 0) { + ErrorF("XFree86: Can't change mode on %s\n", path); + return(-1); + } + + if (pipe(fd) != 0) { + Error("XFree86: SVR4 named listener pipe creation failed\n"); + return(-1); + } + + if (ioctl(fd[0], I_PUSH, "connld") != 0) { + Error("XFree86: ioctl(I_PUSH) failed for SVR4 named listener pipe\n"); + return(-1); + } + + if (fattach(fd[0], path) != 0) { + ErrorF("SVR4: fattach on %s failed for SVR4 named listener pipe\n", path); + return(-1); + } + + return(fd[1]); + } + #endif /* SVR4 */ + + static int + accept_att_local() + { + int newconn; + int read_in; + char length; + char path[64]; + + /* + * first get device-name + */ + if( (read_in = read(ptsFd, &length, 1)) <= 0 ) { + Error("XFree86: Can't read slave name length from USL client connection"); + return(-1); + } + + if( (read_in = read(ptsFd, path, length)) <= 0 ) { + Error("XFree86: Can't read slave name from USL client connection"); + return(-1); + } + + path[ length ] = '\0'; + + if( (newconn = open(path,O_RDWR)) < 0 ) { + Error("XFree86: Can't open slave for USL client connection"); + return(-1); + } + + (void) write(newconn, "1", 1); /* send an acknowledge to the client */ + + BITSET(AllStreams, newconn); + return(newconn); + } + + #ifdef SVR4 + static int + accept_att_svr4_local() + { + struct strrecvfd str; + + if (ioctl(NstrFd, I_RECVFD, &str) < 0) { + ErrorF("XFree86: I_RECVFD failed on SVR4 named client connection\n"); + return(-1); + } + BITSET(AllStreams, str.fd); + return(str.fd); + } + #endif /* SVR4 */ + #endif /* SERVER_LOCALCONN */ + + #ifdef SYSV386 + int + sysv386_getpeername(fd, from, fromlen) + int fd; + struct sockaddr *from; + int *fromlen; + { + #ifdef SERVER_LOCALCONN + /* + * check up whether our fd is really a streams pipe ( /dev/pts??? ) + */ + if (GETBIT(AllStreams, fd)) + { + from->sa_family = AF_UNSPEC; + *fromlen = 0; + return 0; + } + #endif /* SERVER_LOCALCONN */ + #if defined(TCPCONN) || defined(DNETCONN) || defined(UNIXCONN) + return getpeername(fd, from, fromlen); + #endif + } + + int + sysv386_accept (fd, from, fromlen) + int fd; + struct sockaddr *from; + int *fromlen; + { + #ifdef SERVER_LOCALCONN + if (fd == ptsFd) return accept_att_local(); + #ifdef SVR4 + if (fd == NstrFd) return accept_att_svr4_local(); + #endif /* SVR4 */ + #if !defined(SVR4) || defined(SVR4_ACP) + if (fd == spxFd) return accept_isc_local(); + if (fd == xsFd) return accept_xsight_local(); + #endif /* !SVR4 || SVR4_ACP) */ + #endif /* SERVER_LOCALCONN */ + /* + * else we are handling the normal accept case + */ + #if defined(TCPCONN) || defined(DNETCONN) || defined(UNIXCONN) + return accept (fd, from, fromlen); + #endif + } + + #define getpeername sysv386_getpeername + #define accept sysv386_accept + + #endif /* SYSV386 */ + #ifdef hpux /* * hpux returns EOPNOTSUPP when using getpeername on a unix-domain *************** *** 353,358 **** --- 933,942 ---- } #endif /* DNETCONN */ + #define NOROOM "Maximum number of clients reached" + + #ifndef AMOEBA + /***************** * CreateWellKnownSockets * At initialization, create the sockets to listen on for new clients. *************** *** 362,368 **** --- 946,963 ---- CreateWellKnownSockets() { int request, i; + #ifdef SVR4 + struct rlimit Rlimit; + #endif + #if _MINIX + int extra_fd; + #endif + #if defined(SERVER_LOCK) + Lock_Server(); + #endif /* SERVER_LOCK */ + + #ifndef _MINIX CLEARBITS(AllSockets); CLEARBITS(AllClients); CLEARBITS(LastSelectMask); *************** *** 370,379 **** for (i=0; i MAXSOCKS) --- 965,992 ---- for (i=0; i MAXSOCKS) *************** *** 384,389 **** --- 997,1021 ---- } WellKnownConnections = 0; + #ifdef SERVER_LOCALCONN + CLEARBITS(AllStreams); + if ((ptsFd = open_att_local ()) != -1) { + WellKnownConnections |= (1L << ptsFd); + } + #ifdef SVR4 + if ((NstrFd = open_att_svr4_local ()) != -1) { + WellKnownConnections |= (1L << NstrFd); + } + #endif /* SVR4 */ + #if !defined(SVR4) || defined(SVR4_ACP) + if ((spxFd = open_isc_local ()) != -1) { + WellKnownConnections |= (1L << spxFd); + } + if ((xsFd = open_xsight_local ()) != -1) { + WellKnownConnections |= (1L << xsFd); + } + #endif /* !SVR4 || SVR4_ACP */ + #endif /* SERVER_LOCALCONN */ #ifdef TCPCONN if ((request = open_tcp_socket ()) != -1) { WellKnownConnections |= (1L << request); *************** *** 393,398 **** --- 1025,1034 ---- { FatalError ("Cannot establish tcp listening socket"); } + else + { + ErrorF ("Cannot establish tcp listening socket"); + } #endif /* TCPCONN */ #ifdef DNETCONN if ((request = open_dnet_socket ()) != -1) { *************** *** 403,408 **** --- 1039,1048 ---- { FatalError ("Cannot establish dnet listening socket"); } + else + { + ErrorF ("Cannot establish dnet listening socket"); + } #endif /* DNETCONN */ #ifdef UNIXCONN if ((request = open_unix_socket ()) != -1) { *************** *** 413,426 **** --- 1053,1115 ---- { FatalError ("Cannot establish unix listening socket"); } + else + { + ErrorF ("Cannot establish unix listening socket"); + } #endif /* UNIXCONN */ if (WellKnownConnections == 0) FatalError ("Cannot establish any listening sockets"); + #else /* _MINIX */ + { + int no_listeners= 0; + + for (i=0; i MAXSOCKS) + { + lastfdesc = MAXSOCKS; + if (debug_conns) + ErrorF( "GOT TO END OF SOCKETS %d\n", MAXSOCKS); + } + + ASIO_FD_ZERO(&ListenFdSet); + ASIO_FD_ZERO(&InprogressFdSet); + ASIO_FD_ZERO(&CompletedFdSet); + ASIO_FD_ZERO(&ClientFdSet); + ASIO_FD_ZERO(&IgnoreFdSet); + ASIO_FD_ZERO(&GrabFdSet); + #ifdef TCPCONN + TcpListenFd = MNX_open_tcp_socket (&extra_fd); + if (TcpListenFd != -1) + { + if (TcpListenFd < 0 || TcpListenFd > lastfdesc) + FatalError("invaling tcp fd: %d\n", TcpListenFd); + ASIO_FD_SET(TcpListenFd, ASIO_IOCTL, &ListenFdSet); + ASIO_FD_SET(TcpListenFd, ASIO_IOCTL, &InprogressFdSet); + DefineSelf (extra_fd); + close(extra_fd); + no_listeners++; + } + else if (!PartialNetwork) + { + FatalError ("Cannot establish tcp listening socket"); + } + #endif /* TCPCONN */ + if (no_listeners == 0) + FatalError ("Cannot establish any listening sockets"); + } + #endif /* _MINIX */ signal (SIGPIPE, SIG_IGN); signal (SIGHUP, AutoResetServer); signal (SIGINT, GiveUp); signal (SIGTERM, GiveUp); + #ifndef _MINIX AllSockets[0] = WellKnownConnections; + #endif ResetHosts(display); /* * Magic: If SIGUSR1 was set to SIG_IGN when *************** *** 476,481 **** --- 1165,1173 ---- } } #endif /* UNIXCONN */ + #ifdef SERVER_LOCALCONN + CLEARBITS(AllStreams); + #endif /* SERVER_LOCALCONN */ ResetAuthorization (); ResetHosts(display); /* *************** *** 513,518 **** --- 1205,1211 ---- * *****************************************************************/ + #ifndef _MINIX char * ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string) ClientPtr client; *************** *** 638,644 **** } #endif /* TCP_NODELAY */ /* ultrix reads hang on Unix sockets, hpux reads fail, AIX fails too */ ! #if defined(O_NONBLOCK) && (!defined(ultrix) && !defined(hpux) && !defined(AIXV3)) (void) fcntl (newconn, F_SETFL, O_NONBLOCK); #else #ifdef FIOSNBIO --- 1331,1337 ---- } #endif /* TCP_NODELAY */ /* ultrix reads hang on Unix sockets, hpux reads fail, AIX fails too */ ! #if defined(O_NONBLOCK) && (!defined(SCO) && !defined(ultrix) && !defined(hpux) && !defined(AIXV3)) (void) fcntl (newconn, F_SETFL, O_NONBLOCK); #else #ifdef FIOSNBIO *************** *** 693,700 **** } return TRUE; } ! ! #define NOROOM "Maximum number of clients reached" /************ * ErrorConnMax --- 1386,1392 ---- } return TRUE; } ! #endif /* _MINIX */ /************ * ErrorConnMax *************** *** 711,718 **** --- 1403,1413 ---- char byteOrder = 0; int whichbyte = 1; struct timeval waittime; + #ifndef _MINIX long mask[mskcnt]; + #endif /* !_MINIX */ + #ifndef _MINIX /* if these seems like a lot of trouble to go to, it probably is */ waittime.tv_sec = BOTIMEOUT / MILLI_PER_SECOND; waittime.tv_usec = (BOTIMEOUT % MILLI_PER_SECOND) * *************** *** 719,727 **** (1000000 / MILLI_PER_SECOND); CLEARBITS(mask); BITSET(mask, fd); ! (void)select(fd + 1, (int *) mask, (int *) NULL, (int *) NULL, &waittime); /* try to read the byte-order of the connection */ (void)read(fd, &byteOrder, 1); if ((byteOrder == 'l') || (byteOrder == 'B')) { csp.success = xFalse; --- 1414,1434 ---- (1000000 / MILLI_PER_SECOND); CLEARBITS(mask); BITSET(mask, fd); ! (void)select(fd + 1, (fd_set *) mask, (fd_set *) NULL, (fd_set *) NULL, ! &waittime); /* try to read the byte-order of the connection */ (void)read(fd, &byteOrder, 1); + #else + /* Try to read the byte-order of the connection. + * We sleep to avoid a call fwait. + */ + sleep(1); + if (read(fd, &byteOrder, 1) == -1) + { + /* Out of luck */ + return; + } + #endif if ((byteOrder == 'l') || (byteOrder == 'B')) { csp.success = xFalse; *************** *** 736,741 **** --- 1443,1449 ---- swaps(&csp.minorVersion, whichbyte); swaps(&csp.length, whichbyte); } + #ifndef _MINIX iov[0].iov_len = sz_xConnSetupPrefix; iov[0].iov_base = (char *) &csp; iov[1].iov_len = csp.lengthReason; *************** *** 742,748 **** iov[1].iov_base = NOROOM; iov[2].iov_len = (4 - (csp.lengthReason & 3)) & 3; iov[2].iov_base = pad; ! (void)writev(fd, iov, 3); } } --- 1450,1462 ---- iov[1].iov_base = NOROOM; iov[2].iov_len = (4 - (csp.lengthReason & 3)) & 3; iov[2].iov_base = pad; ! (void)_OSWriteV(fd, iov, 3); ! #else ! /* Assume that the underlying devices buffer a bit */ ! write(fd, (char *)&csp, sz_xConnSetupPrefix); ! write(fd, NOROOM, csp.lengthReason); ! write(fd, pad, (4 - (csp.lengthReason & 3)) & 3); ! #endif } } *************** *** 751,756 **** --- 1465,1472 ---- * Remove this file descriptor and it's I/O buffers, etc. ************/ + #ifndef _MINIX + static void CloseDownFileDescriptor(oc) register OsCommPtr oc; *************** *** 761,766 **** --- 1477,1485 ---- FreeOsBuffers(oc); BITCLEAR(AllSockets, connection); BITCLEAR(AllClients, connection); + #ifdef SERVER_LOCALCONN + BITCLEAR(AllStreams, connection); + #endif BITCLEAR(ClientsWithInput, connection); if (GrabInProgress) { *************** *** 806,813 **** curclient = curoff + (i << 5); CLEARBITS(tmask); BITSET(tmask, curclient); ! r = select (curclient + 1, (int *)tmask, (int *)NULL, (int *)NULL, ! ¬ime); if (r < 0) CloseDownClient(clients[ConnectionTranslation[curclient]]); mask &= ~(1 << curoff); --- 1525,1532 ---- curclient = curoff + (i << 5); CLEARBITS(tmask); BITSET(tmask, curclient); ! r = select (curclient + 1, (fd_set *)tmask, (fd_set *)NULL, ! (fd_set *)NULL, ¬ime); if (r < 0) CloseDownClient(clients[ConnectionTranslation[curclient]]); mask &= ~(1 << curoff); *************** *** 815,821 **** } } - /***************** * CloseDownConnection * Delete client from AllClients and free resources --- 1534,1539 ---- *************** *** 974,979 **** --- 1692,2678 ---- } } + #else /* _MINIX */ + + char * + ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string) + ClientPtr client; + char *auth_proto, *auth_string; + unsigned short proto_n, string_n; + { + register OsCommPtr priv; + XID auth_id; + int len; + int r; + struct sockaddr addr; + nwio_tcpconf_t tcpconf; + + auth_id = CheckAuthorization (proto_n, auth_proto, + string_n, auth_string); + + priv = (OsCommPtr)client->osPrivate; + + /* Assume we only have tcp connections. */ + r= ioctl(priv->fd, NWIOGTCPCONF, &tcpconf); + if (r == -1) + { + Error("Unable to get remote address from tcp fd"); + return ; + } + addr.sa_u.sa_in.sin_family= AF_INET; + addr.sa_u.sa_in.sin_addr= tcpconf.nwtc_remaddr; + addr.sa_u.sa_in.sin_port= tcpconf.nwtc_remport; + len= sizeof(addr); + + if (auth_id == (XID) ~0L && + !InvalidHost (&addr, len)) + { + ErrorF("(warning) Authorization succeeded\n"); + auth_id = (XID) 0; + } + + if (auth_id == (XID) ~0L) + return "Client is not authorized to connect to Server"; + + priv->auth_id = auth_id; + priv->conn_time = 0; + + #ifdef XDMCP + /* indicate to Xdmcp protocol that we've opened new client */ + XdmcpOpenDisplay(priv->fd); + #endif /* XDMCP */ + + return((char *)NULL); + } + + void CheckListeners(); + + Bool + EstablishNewConnections(clientUnused, closure) + ClientPtr clientUnused; + pointer closure; + { + struct NewConnection *newConnP; + register int newconn; /* fd of new client */ + long connect_time; + register ClientPtr client; + register OsCommPtr oc; + int i; + + newConnP= (struct NewConnection *)closure; + + newconn= -1; + + /* Let's take some transport protocol specific actions */ + if (newConnP == &NewTcpConnection) + { + if (TcpListenFd < 0 || TcpListenFd > lastfdesc) + FatalError("strange value in TcpListenFd\n"); + if (!ASIO_FD_ISSET(TcpListenFd, ASIO_IOCTL, &ListenFdSet) || + !ASIO_FD_ISSET(TcpListenFd, ASIO_IOCTL, &InprogressFdSet)) + FatalError("TcpListenFd not in progress\n"); + ASIO_FD_CLR(TcpListenFd, ASIO_IOCTL, &ListenFdSet); + ASIO_FD_CLR(TcpListenFd, ASIO_IOCTL, &InprogressFdSet); + newconn= TcpListenFd; + TcpListenFd= -1; + } + + if (newconn == -1) + FatalError("Unable to locate transport protocol for NewConnection\n"); + + connect_time = GetTimeInMillis(); + /* kill off stragglers */ + for (i=1; iosPrivate); + if (oc && (oc->conn_time != 0) && + (connect_time - oc->conn_time) >= TimeOutValue) + CloseDownClient(client); + } + } + + /* Let's check if we can start some listeners that stopped */ + CheckListeners(); + + oc = (OsCommPtr)xalloc(sizeof(OsCommRec)); + if (!oc) + { + ErrorConnMax(newconn); + close(newconn); + return TRUE; + } + /* Make sure that the client get called the first time */ + ASIO_FD_SET(newconn, ASIO_READ, &CompletedFdSet); + AnyClientsWithInput= TRUE; + + oc->fd = newconn; + oc->input = (ConnectionInputPtr)NULL; + oc->inputFake = (ConnectionInputPtr)NULL; + oc->output = (ConnectionOutputPtr)NULL; + oc->outputNext = (ConnectionOutputPtr)NULL; + oc->conn_time = connect_time; + if ((newconn < lastfdesc) && + (client = NextAvailableClient((pointer)oc))) + { + ConnectionTranslation[newconn] = client->index; + } + else + { + ErrorConnMax(newconn); + CloseDownFileDescriptor(oc); + } + return TRUE; + } + + static void + CloseDownFileDescriptor(oc) + register OsCommPtr oc; + { + int connection = oc->fd; + int i; + + close(connection); + FreeOsBuffers(oc); + + for (i= 0; i< ASIO_NR; i++) + { + ASIO_FD_CLR(connection, i, &InprogressFdSet); + ASIO_FD_CLR(connection, i, &CompletedFdSet); + ASIO_FD_CLR(connection, i, &ClientFdSet); + ASIO_FD_CLR(connection, i, &IgnoreFdSet); + ASIO_FD_CLR(connection, i, &GrabFdSet); + } + xfree(oc); + } + + CloseDownConnection(client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr)client->osPrivate; + + if (oc->output && oc->output->count) + FlushClient(client, oc, (char *)NULL, 0); + ConnectionTranslation[oc->fd] = 0; + #ifdef XDMCP + XdmcpCloseDisplay(oc->fd); + #endif + CloseDownFileDescriptor(oc); + client->osPrivate = (pointer)NULL; + } + + AddEnabledDevice(fd) + int fd; + { + ASIO_FD_SET(fd, ASIO_READ, &InprogressFdSet); + } + + RemoveEnabledDevice(fd) + int fd; + { + ASIO_FD_CLR(fd, ASIO_READ, &InprogressFdSet); + } + + OnlyListenToOneClient(client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr)client->osPrivate; + int connection = oc->fd; + + if (! GrabInProgress) + { + ASIO_FD_ZERO(&GrabFdSet); + ASIO_FD_SET(connection, ASIO_READ, &GrabFdSet); + GrabInProgress = TRUE; + } + } + + ListenToAllClients() + { + if (GrabInProgress) + { + GrabInProgress = 0; + AnyClientsWithInput= TRUE; + } + } + + IgnoreClient (client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr) client->osPrivate; + int connection = oc->fd; + + ASIO_FD_SET(connection, ASIO_READ, &IgnoreFdSet); + } + + AttendClient (client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr) client->osPrivate; + int connection = oc->fd; + + ASIO_FD_CLR(connection, ASIO_READ, &IgnoreFdSet); + AnyClientsWithInput= TRUE; + } + + void + EnqueueNewConnection(fd, operation, result, error) + int fd; + int operation; + int result; + int error; + { + /* Let's see which transport protocol got a new connection */ + if (!ASIO_FD_ISSET(fd, operation, &ListenFdSet)) + FatalError("result not in ListenFdSet\n"); + + if (fd == TcpListenFd) + { + /* New tcp connection */ + NewTcpConnection.nc_result= result; + NewTcpConnection.nc_errno= error; + + /* Let EstablishNewConnections deal with this + * situation + */ + QueueWorkProc(EstablishNewConnections, NULL, + (pointer)&NewTcpConnection); + return; + } + + FatalError("Unable to find transport protocol for new connection\n"); + } + + void + CheckListeners() + { + /* Check if all devices have listeners hanging around */ + #ifdef TCPCONN + if (TcpListenFd == -1) + { + TcpListenFd = MNX_open_tcp_socket (NULL); + if (TcpListenFd != -1) + { + if (TcpListenFd < 0 || TcpListenFd > lastfdesc) + FatalError("invalid tcp fd: %d\n", TcpListenFd); + ASIO_FD_SET(TcpListenFd, ASIO_IOCTL, &ListenFdSet); + ASIO_FD_SET(TcpListenFd, ASIO_IOCTL, &InprogressFdSet); + } + } + #endif /* TCPCONN */ + } + #endif /* _MINIX */ + + #else /* AMOEBA */ + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + /* + * Size of reply buffer + */ + #define REPLY_BUFSIZE 30000 + + #ifdef XDEBUG + Bool amDebug; /* amoeba debug toggle */ + #define dbprintf(list) if (amDebug) { ErrorF list; } + #else + #define dbprintf(list) /* nothing */ + #endif /* XDEBUG */ + + capability X; /* X capability */ + char *XServerHostName; /* X server host name */ + char *XTcpServerName; /* TCP/IP server name */ + long MaxClients = MAXTASKS; + ClientPtr newClient = NULL; /* new connections */ + ClientPtr Clients[MAXTASKS]; /* clients with input */ + int maxClient; /* Highest numbered client */ + int totalClients; /* all connected applications */ + ClientPtr grabClient = NULL; /* for grabs */ + + mutex NewConnsLock; /* prevent concurrent updates */ + int nNewConns; /* # of new clients */ + OsCommPtr NewConns[MAXTASKS]; /* new client connections */ + + static void AmoebaConnectorThread(); + static void AmoebaTCPConnectorThread(); + + void + CreateWellKnownSockets() + { + char host[100]; + char *getenv(); + void DeviceReader(); + errstat err; + capability pubX; + static int threadsStarted = FALSE; + + /* + * Each time the server is reset this routine is called to + * setup the new well known sockets. For Amoeba we'll just + * keep using the old threads that are already running. + */ + if (!threadsStarted) { + threadsStarted = TRUE; + /* + * Create a new capability for this X server + */ + if (XServerHostName == NULL) + XServerHostName = getenv("XHOST"); + if (XServerHostName == NULL) + FatalError("XHOST not set, or server host name not given\n"); + sprintf(host, "%s/%s:%s", DEF_XSVRDIR, XServerHostName, display); + + uniqport(&X.cap_port); + priv2pub(&X.cap_port, &pubX.cap_port); + (void) name_delete(host); + if ((err = name_append(host, &pubX)) != 0) { + (void) ErrorF("Cannot create capability %s: %s\n", + host, err_why(err)); + exit(1); + } + + /* + * Initialize new connections lock + */ + mu_init(&NewConnsLock); + + /* + * This critical region prevents the subthread from proceeding until + * main has finished initializing. The matching sema_down() is in + * WaitFor.c. + */ + sema_init(&init_sema, 0); + + /* + * Also, initialize main thread locking + */ + InitMainThread(); + + /* + * Initialize and start IOP reader thread + */ + InitializeIOPServerReader(); + + /* + * Start native Amoeba service threads + */ + if (thread_newthread(AmoebaConnectorThread, CONNECTOR_STACK, 0, 0) <= 0) + FatalError("Cannot start Amoeba connector thread\n"); + if (thread_newthread(AmoebaConnectorThread, CONNECTOR_STACK, 0, 0) <= 0) + FatalError("Cannot start Amoeba connector thread\n"); + + /* + * Start TCP/IP service threads + */ + if (XTcpServerName) { + if (thread_newthread(AmoebaTCPConnectorThread, + CONNECTOR_STACK, 0, 0) <= 0) + FatalError("Cannot start TCP connector thread\n"); + if (thread_newthread(AmoebaTCPConnectorThread, + CONNECTOR_STACK, 0, 0) <= 0) + FatalError("Cannot start TCP connector thread\n"); + } + } + + ResetHosts(display); + + #ifdef XDMCP + XdmcpInit (); + #endif + } + + void + ResetWellKnownSockets () + { + ResetAuthorization (); + ResetHosts(display); + + /* + * restart XDMCP + */ + #ifdef XDMCP + XdmcpReset (); + #endif + } + + char * + ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string) + ClientPtr client; + char *auth_proto, *auth_string; + unsigned short proto_n, string_n; + { + register OsCommPtr priv; + XID auth_id; + + auth_id = CheckAuthorization (proto_n, auth_proto, + string_n, auth_string); + + priv = (OsCommPtr)client->osPrivate; + /* + * Access control only works for X connections over a TCP/IP stream. + * The Amoeba philosophy is, when you have the capability you are + * allowed to talk with the server. + */ + if (auth_id == (XID) ~0L) { + nwio_tcpconf_t tcpconf; + + if (priv->family == FamilyInternet && + tcp_ioc_getconf(&priv->conn.tcp.cap, &tcpconf) == STD_OK && + !InvalidHost(&tcpconf.nwtc_remaddr, sizeof(ipaddr_t))) + auth_id = (XID) 0; + if (priv->family == FamilyAmoeba) + auth_id = (XID) 0; + } + + if (auth_id == (XID) ~0L) + return "Client is not authorized to connect to Server"; + + priv->auth_id = auth_id; + priv->conn_time = 0; + + #ifdef XDMCP + /* indicate to Xdmcp protocol that we've opened new client */ + XdmcpOpenDisplay(priv->fd); + #endif /* XDMCP */ + /* At this point, if the client is authorized to change the access control + * list, we should getpeername() information, and add the client to + * the selfhosts list. It's not really the host machine, but the + * true purpose of the selfhosts list is to see who may change the + * access control list. + */ + return((char *)NULL); + } + + /*ARGSUSED*/ + Bool + EstablishNewConnections(clientUnused, closure) + ClientPtr clientUnused; + pointer closure; + { + register ClientPtr newClient; + register OsCommPtr oc; + register int i; + struct vc *vc; + int index; + + mu_lock(&NewConnsLock); + for(index = 0; index < nNewConns; index++) { + oc = NewConns[index]; + + /* + * Find a new slot + */ + if (totalClients >= MAXTASKS) { + ErrorF("Too many X-clients are being served already\n"); + am_close(oc, VC_BOTH|VC_ASYNC); + xfree((char *)oc); + continue; + } + totalClients++; + for (i = 0; i < maxClient+1; i++) + if (Clients[i] == 0) break; + if (i == maxClient) maxClient++; + + /* + * Fill in client's connection number + */ + oc->number = i; + + /* + * Now stuff the new client in the array where + * WaitForSomething will find it and hand it up. + */ + newClient = NextAvailableClient((pointer)oc); + Clients[i] = newClient; + } + nNewConns = 0; + mu_unlock(&NewConnsLock); + return TRUE; + } + + #define NOROOM "Maximum number of clients reached" + + OnlyListenToOneClient(client) + ClientPtr client; + { + if (grabClient != NULL && grabClient != client) { + ErrorF("Uncancelled OnlyListenToOneClient()?\n"); + grabClient = NULL; + } else + grabClient = client; + } + + CloseDownConnection(client) + ClientPtr client; + { + register OsCommPtr oc; + + dbprintf(("Connection closed\n")); + oc = (OsCommPtr)client->osPrivate; + Clients[oc->number] = NULL; + if (oc->number == maxClient) maxClient--; + am_close(oc, VC_BOTH|VC_ASYNC); + if (oc->buffer) xfree(oc->buffer); + xfree(oc); + client->osPrivate = (pointer) NULL; + } + + ListenToAllClients() + { + grabClient = NULL; + } + + IgnoreClient (client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr)client->osPrivate; + oc->status |= IGNORE; + } + + AttendClient (client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr)client->osPrivate; + oc->status &= ~IGNORE; + if (am_avail(oc, VC_IN)) { + WakeUpMainThread(); + } + } + + /* These two are dummies -- and are never called at run-time */ + AddEnabledDevice(fd) + int fd; + { + return; + } + + RemoveEnabledDevice(fd) + int fd; + { + return; + } + + /* + * Wakeup main thread if necessary + */ + static void + UnblockMain(oc) + register OsCommPtr oc; + { + if ((oc->status & IGNORE) == 0) { + WakeUpMainThread(); + } + } + + static char * + OsCommFamily(family) + int family; + { + switch (family) { + case FamilyAmoeba: + return "AMOEBA"; + case FamilyInternet: + return "TCP/IP"; + } + return "UNKNOWN"; + } + + static char * + OsCommStatus(status) + int status; + { + static char buf[100]; + + buf[0] = '\0'; + if (status == 0) + sprintf(buf, "NONE"); + if (status & CONN_KILLED) + sprintf(buf, "%s KILLED", buf); + if (status & REQ_PUSHBACK) + sprintf(buf, "%s PUSHBACK", buf); + if (status & IGNORE) + sprintf(buf, "%s IGNORE", buf); + return buf; + } + + /* + * Return status information about the open connections + */ + errstat + ConnectionStatus(hdr, buf, size) + header *hdr; + char *buf; + int size; + { + OsCommPtr oc; + int i; + char *begin, *end; + char *bprintf(); + + begin = buf; + end = buf + size; + + /* all active clients */ + if (maxClient > 0) { + begin = bprintf(begin, end, "Active clients:\n"); + for (i = 0; i < maxClient; i++) { + if (Clients[i] && (oc = (OsCommPtr)Clients[i]->osPrivate)) { + begin = bprintf(begin, end, "%d: Family %s, Status %s\n", + i, OsCommFamily(oc->family), OsCommStatus(oc->status)); + } + } + } + + /* all new (awaiting) clients */ + mu_lock(&NewConnsLock); + if (nNewConns > 0) { + begin = bprintf(begin, end, "New clients:\n"); + for (i = 0; i < nNewConns; i++) { + oc = NewConns[i]; + begin = bprintf(begin, end, "%d: Family %s, Status %s\n", + i, OsCommFamily(oc->family), OsCommStatus(oc->status)); + } + } + mu_unlock(&NewConnsLock); + + if (begin == NULL) { + hdr->h_size = 0; + return STD_SYSERR; + } else { + hdr->h_size = begin - buf; + return STD_OK; + } + + } + + /* + * Establishing a new connection is done in two phases. This thread does the + * first part. It filters out bad connect requests. A new rendevous port is + * sent to the client and the main loop is informed if there is a legal + * request. The sleep synchronizes with the main loop so that the paperwork + * is finished for the current connect request before the thread is ready to + * accept another connect. + */ + static void + AmoebaConnectorThread() + { + header req, rep; + port client_ports[2]; + port server_ports[2]; + short s; + OsCommPtr oc; + char *repb; + extern CreateNewClient(); + + WaitForInitialization(); + dbprintf(("AmoebaConnectorThread() running ...\n")); + if ((repb = (char *)malloc(REPLY_BUFSIZE)) == NULL) + FatalError("Amoeba connector thread: malloc failed"); + for (;;) { + do { + req.h_port = X.cap_port; + s = getreq(&req, NILBUF, 0); + } while (ERR_CONVERT(s) == RPC_ABORTED); + if (ERR_STATUS(s)) + FatalError("Amoeba connector thread: getreq failed"); + /* TODO: check privilege fields here */ + + dbprintf(("AmoebaConnectorThread() accepting a request\n")); + + switch (req.h_command) { + + case STD_INFO: + rep.h_status = STD_OK; + sprintf(repb, "X11R5 server on %s", XServerHostName); + rep.h_size = strlen(repb); + putrep(&rep, repb, rep.h_size); + break; + + case STD_STATUS: + rep.h_status = ConnectionStatus(&rep, repb, REPLY_BUFSIZE); + putrep(&rep, repb, rep.h_size); + break; + + case AX_SHUTDOWN: + GiveUp(); + rep.h_status = STD_OK; + putrep(&rep, NILBUF, 0); + break; + + case AX_REINIT: + AutoResetServer(); + rep.h_status = STD_OK; + putrep(&rep, NILBUF, 0); + break; + + case AX_CONNECT: + /* + * All is well. Open a virtual circuit and read the prefix + */ + if (totalClients >= MAXTASKS) { + ErrorF("Connection refused: %s\n", NOROOM); + goto NoSpace; + } + + /* + * Fill operating system's communication structure + */ + oc = (OsCommPtr)xalloc(sizeof(OsCommRec)); + if (oc == (OsCommPtr)NULL) { + ErrorF("Connection refused: No memory for connection data\n"); + goto NoSpace; + } + oc->number = -1; + oc->buffer = NULL; + oc->size = 0; + oc->status = 0; + oc->family = FamilyAmoeba; + oc->conn_time = 0L; + + /* + * Now some priv2pub magic vc_create must be called with a put + * port as first parameter and a get port as 2nd parameter. + * Since we are a server we send the opposite to the client; ie. + * a get port and a put port respectively. + */ + uniqport(&client_ports[0]); + uniqport(&server_ports[1]); + priv2pub(&client_ports[0], &server_ports[0]); + priv2pub(&server_ports[1], &client_ports[1]); + oc->conn.vc = vc_create(&server_ports[0], &server_ports[1], + MAXBUFSIZE, MAXBUFSIZE); + if (oc->conn.vc == (struct vc *)NULL) { + NoSpace: + rep.h_status = AX_FULLHOUSE; + putrep(&rep, NILBUF, 0); + } else { + rep.h_status = AX_OK; + putrep(&rep, (bufptr)client_ports, 2*sizeof(port)); + dbprintf(("Amoeba connection accepted\n")); + + /* + * Store for the main loop to finish creation + */ + vc_warn(oc->conn.vc, VC_IN, UnblockMain, (int) oc); + mu_lock(&NewConnsLock); + NewConns[nNewConns++] = oc; + mu_unlock(&NewConnsLock); + WakeUpMainThread(); + } + break; + + default: + rep.h_status = STD_COMBAD; + putrep(&rep, NILBUF, 0); + break; + } + } + } + + static void + TcpIpReaderSignalCatcher(sig, us, extra) + signum sig; + thread_ustate *us; + char *extra; + { + register OsCommPtr oc = (OsCommPtr) extra; + + dbprintf(("TcpIpReaderSignalCatcher(%d), number %d\n", sig, oc->number)); + if (oc->conn.tcp.signal != sig) { + ErrorF("TCP/IP Reader: Connection %s got unexpected signal %d\n", + oc->number, sig); + } + oc->conn.tcp.signal = -1; + thread_exit(); + } + + /* + * TCP/IP reader thread + */ + static void + TcpIpReaderThread(argptr, argsize) + void *argptr; + int argsize; + { + register OsCommPtr oc; + + if (argsize != sizeof(OsCommPtr)) + FatalError("Internal error: TcpIpReaderThread incorrectly called\n"); + oc = *((OsCommPtr *) argptr); + (void)sig_catch(oc->conn.tcp.signal, TcpIpReaderSignalCatcher, (char*)oc); + while (TRUE) { + char buffer[MAXBUFSIZE]; + bufsize size; + + size = tcpip_read(&oc->conn.tcp.cap, buffer, sizeof(buffer)); + dbprintf(("TcpIpReaderThread() read %d bytes\n", size)); + if (ERR_STATUS(size)) { + ErrorF("TCP/IP read failed (%s)\n", tcpip_why(ERR_CONVERT(size))); + oc->status |= CONN_KILLED; + oc->conn.tcp.signal = -1; + thread_exit(); + } + if (size == 0 || cb_puts(oc->conn.tcp.cb, buffer, size)) { + if (size != 0) + ErrorF("TCP/IP short write to circular buffer\n"); + oc->status |= CONN_KILLED; + oc->conn.tcp.signal = -1; + thread_exit(); + } + UnblockMain(oc); + } + } + + /* + * To prevent the X-server from generating lots of error messages, + * in case the server is gone or when its full. + */ + #define LOOP_OPEN 1 + #define LOOP_SETCONF 2 + #define LOOP_LISTEN 4 + + /* + * The TCP/IP connector thread listens to a well known port (6000 + + * display number) for connection request. When such a request arrives + * it allocates a communication structure and a reader thread. This + * thread prevents the main loop from blocking when there's no data. + */ + static void + AmoebaTCPConnectorThread() + { + capability svrcap, chancap; + nwio_tcpconf_t tcpconf; + nwio_tcpcl_t tcpconnopt; + char name[BUFSIZ]; + OsCommPtr oc, *param; + errstat err; + int result; + int looping = 0; + + strncpy(name, XTcpServerName, BUFSIZ); + if ((err = name_lookup(name, &svrcap)) != STD_OK) { + sprintf(name, "%s/%s", TCP_SVR_NAME, XTcpServerName); + if ((err = name_lookup(name, &svrcap)) != STD_OK) + FatalError("Lookup %s failed: %s\n", XTcpServerName, err_why(err)); + } + + WaitForInitialization(); + dbprintf(("AmoebaTCPConnectorThread() running ...\n")); + + for (;;) { + /* + * Listen to TCP/IP port X_TCP_PORT + display for connections. + * Some interesting actions have to be taken to keep this connection + * alive and kicking :-) + */ + if ((err = tcpip_open(&svrcap, &chancap)) != STD_OK) { + /* the server probably disappeared, just wait for it to return */ + if (looping & LOOP_OPEN) { + ErrorF("TCP/IP open failed: %s\n", tcpip_why(err)); + looping |= LOOP_OPEN; + } + sleep(60); + (void) name_lookup(name, &svrcap); + continue; + } + looping &= ~LOOP_OPEN; + + tcpconf.nwtc_locport = htons(X_TCP_PORT + atoi(display)); + tcpconf.nwtc_flags = NWTC_EXCL | NWTC_LP_SET | NWTC_UNSET_RA | + NWTC_UNSET_RP; + if ((err = tcp_ioc_setconf(&chancap, &tcpconf)) != STD_OK) { + /* couldn't configure, probably server space problem */ + if (looping & LOOP_SETCONF) { + ErrorF("TCP/IP setconf failed: %s\n", tcpip_why(err)); + looping |= LOOP_SETCONF; + } + std_destroy(&chancap); + sleep(60); + continue; + } + looping &= ~LOOP_SETCONF; + + tcpconnopt.nwtcl_flags = 0; + if ((err = tcp_ioc_listen(&chancap, &tcpconnopt)) != STD_OK) { + /* couldn't listen, definitely a server memory problem */ + if (looping & LOOP_LISTEN) { + ErrorF("TCP/IP listen failed: %s\n", tcpip_why(err)); + looping |= LOOP_LISTEN; + } + std_destroy(&chancap); + sleep(60); + continue; + } + looping &= ~LOOP_LISTEN; + + if ((err = tcpip_keepalive_cap(&chancap)) != STD_OK) { + ErrorF("TCP/IP keep alive failed: %s\n", tcpip_why(err)); + std_destroy(&chancap); + continue; + } + + /* + * Fill operating system's communication structure + */ + oc = (OsCommPtr)xalloc(sizeof(OsCommRec)); + if (oc == (OsCommPtr)NULL) { + ErrorF("Connection refused: No memory for connection data\n"); + goto NoSpace; + } + oc->number = -1; + oc->buffer = NULL; + oc->size = 0; + oc->status = 0; + oc->family = FamilyInternet; + oc->conn_time = 0L; + oc->conn.tcp.cap = chancap; + if ((oc->conn.tcp.cb = cb_alloc(MAXBUFSIZE)) == NULL) { + ErrorF("Connection refused: No memory for circular buffer\n"); + xfree((char *)oc); + goto NoSpace; + } + + /* + * Start TCP/IP reader thread + */ + oc->conn.tcp.signal = sig_uniq(); + param = (OsCommPtr *) malloc(sizeof(OsCommPtr)); + *param = oc; /* stupid convention */ + result = thread_newthread(TcpIpReaderThread, + MAXBUFSIZE + CONNECTOR_STACK, (char *)param, sizeof(OsCommPtr)); + if (result == 0) { + ErrorF("Cannot start reader thread\n"); + cb_close(oc->conn.tcp.cb); + cb_free(oc->conn.tcp.cb); + xfree((char *)oc); + NoSpace: + std_destroy(&chancap); + continue; + } + + /* + * Store for the main loop to finish creation + */ + mu_lock(&NewConnsLock); + NewConns[nNewConns++] = oc; + mu_unlock(&NewConnsLock); + WakeUpMainThread(); + } + } + #endif /* AMOEBA */ + #ifdef AIXV3 static int grabbingClient; *************** *** 1026,1028 **** --- 2725,2769 ---- } #endif + + + #if defined(SYSV) && defined(SYSV386) && !defined(STREAMSCONN) + #ifdef SCO + + /* + * SCO does not have writev so we emulate + */ + + #include + + int _OSWriteV(fd, iov, iovcnt) + int fd; + struct iovec *iov; + int iovcnt; + { + int i, len, total; + char *base; + + errno = 0; + for (i = 0, total = 0; i < iovcnt; i++, iov++) { + len = iov->iov_len; + base = iov->iov_base; + while (len > 0) { + register int nbytes; + + nbytes = write(fd, base, len); + if (nbytes < 0 && total == 0) + return(-1); + if (nbytes <= 0) + return(total); + errno = 0; + len -= nbytes; + total += nbytes; + base += nbytes; + } + } + return(total); + } + + #endif /* SCO */ + #endif /* SYSV && SYSV386 && !STREAMSCONN */ diff -c mit/server/os/io.c:1.1.1.1 mit/server/os/io.c:1.7 *** mit/server/os/io.c:1.1.1.1 Sat Mar 12 00:35:21 1994 --- mit/server/os/io.c Sat Mar 12 00:35:21 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/os/io.c,v 1.7 1993/05/04 15:14:11 dawes Exp $ */ /* $XConsortium: io.c,v 1.68 91/03/29 09:34:07 rws Exp $ */ /***************************************************************** * i/o functions *************** *** 34,41 **** --- 35,44 ---- #include "Xos.h" #include "Xmd.h" #include + #if !defined(AMOEBA) && !defined(_MINIX) #include #include + #endif #include "X.h" #include "Xproto.h" #include "os.h" *************** *** 44,49 **** --- 47,57 ---- #include "dixstruct.h" #include "misc.h" + #ifndef SCO + #define _OSWriteV writev + #endif /* SCO */ + + #if !defined(AMOEBA) && !defined(_MINIX) /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX * systems are broken and return EWOULDBLOCK when they should return EAGAIN */ *************** *** 61,71 **** --- 69,81 ---- extern long ClientsWithInput[]; extern long ClientsWriteBlocked[]; extern long OutputPending[]; + #endif /* AMOEBA || _MINIX */ extern int ConnectionTranslation[]; extern Bool NewOutputPending; extern Bool AnyClientsWriteBlocked; static Bool CriticalOutputPending; static int timesThisConnection = 0; + #ifndef AMOEBA static ConnectionInputPtr FreeInputs = (ConnectionInputPtr)NULL; static ConnectionOutputPtr FreeOutputs = (ConnectionOutputPtr)NULL; static OsCommPtr AvailableInput = (OsCommPtr)NULL; *************** *** 72,77 **** --- 82,88 ---- static ConnectionInputPtr AllocateInputBuffer(); static ConnectionOutputPtr AllocateOutputBuffer(); + #endif /* AMOEBA */ extern int errno; *************** *** 105,116 **** --- 116,139 ---- #define YieldControl() \ { isItTimeToYield = TRUE; \ timesThisConnection = 0; } + #ifndef _MINIX #define YieldControlNoInput() \ { YieldControl(); \ BITCLEAR(ClientsWithInput, fd); } + #else + #define YieldControlNoInput() \ + { YieldControl(); \ + ASIO_FD_CLR(fd, ASIO_READ, &CompletedFdSet); } + #endif #define YieldControlDeath() \ { timesThisConnection = 0; } + + /* lookup table for adding padding bytes to data that is read from + or written to the X connection. */ + static int padlength[4] = {0, 3, 2, 1}; + + #if !defined(AMOEBA) && !defined(_MINIX) int ReadRequestFromClient(client) ClientPtr client; *************** *** 194,204 **** --- 217,229 ---- oci->size - oci->bufcnt); if (result <= 0) { + #if !defined(SYSV386) || !defined(SVR4) if ((result < 0) && ETEST(errno)) { YieldControlNoInput(); return 0; } + #endif YieldControlDeath(); return -1; } *************** *** 367,376 **** YieldControlNoInput(); } - /* lookup table for adding padding bytes to data that is read from - or written to the X socket. */ - static int padlength[4] = {0, 3, 2, 1}; - /******************** * FlushClient() * If the client isn't keeping up with us, then we try to continue --- 392,397 ---- *************** *** 441,447 **** InsertIOV (padBuffer, padsize) errno = 0; ! if ((len = writev(connection, iov, i)) >= 0) { written += len; notWritten -= len; --- 462,468 ---- InsertIOV (padBuffer, padsize) errno = 0; ! if ((len = _OSWriteV(connection, iov, i)) >= 0) { written += len; notWritten -= len; *************** *** 454,459 **** --- 475,483 ---- #ifdef EMSGSIZE /* check for another brain-damaged OS bug */ || ((errno == EMSGSIZE) && (todo == 1)) #endif + #ifdef SERVER_LOCALCONN /* STREAMS ... */ + || ((errno == ERANGE) && (todo == 1)) + #endif ) { /* If we've arrived here, then the client is stuffed to the gills *************** *** 513,518 **** --- 537,548 ---- todo >>= 1; } #endif + #ifdef SERVER_LOCALCONN /* STREAMS ... */ + else if (errno == ERANGE) + { + todo >>= 1; + } + #endif else { close(connection); *************** *** 598,603 **** --- 628,634 ---- } } + #endif /* !AMOEBA && !_MINIX */ void FlushIfCriticalOutputPending() *************** *** 623,628 **** --- 654,660 ---- * this routine as int. *****************/ + #if !defined(AMOEBA) && !defined(_MINIX) int WriteToClient (who, count, buf) ClientPtr who; *************** *** 668,674 **** --- 700,708 ---- return(count); } + #endif /* !AMOEBA && !_MINIX */ + #ifndef AMOEBA static ConnectionInputPtr AllocateInputBuffer() { *************** *** 716,723 **** --- 750,776 ---- register ConnectionInputPtr oci; register ConnectionOutputPtr oco; + #ifndef _MINIX if (AvailableInput == oc) AvailableInput = (OsCommPtr)NULL; + #else + if (oci = oc->inputFake) + { + if (FreeInputs) + { + xfree(oci->buffer); + xfree(oci); + } + else + { + FreeInputs = oci; + oci->next = (ConnectionInputPtr)NULL; + oci->bufptr = oci->buffer; + oci->bufcnt = 0; + oci->lenLastReq = 0; + } + } + #endif if (oci = oc->input) { if (FreeInputs) *************** *** 748,753 **** --- 801,822 ---- oco->count = 0; } } + #ifdef _MINIX + if (oco = oc->outputNext) + { + if (FreeOutputs) + { + xfree(oco->buf); + xfree(oco); + } + else + { + FreeOutputs = oco; + oco->next = (ConnectionOutputPtr)NULL; + oco->count = 0; + } + } + #endif } void *************** *** 769,771 **** --- 838,1749 ---- xfree(oco); } } + #endif /* AMOEBA */ + + /* + * The rest of this file contains the Amoeba and Minix implementations. + */ + + #ifdef AMOEBA + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + /* + * Philip's TCP/IP server silently assumes a + * maximum buffer size of 30000 bytes. + */ + #define TCPIP_BUFSIZE 16384 + + int + ReadRequestFromClient(client) + ClientPtr client; + { + register OsCommPtr oc = (OsCommPtr)client->osPrivate; + register xReq *request; + register int havenow, needed; + register char *p; + int stat, n, rv; + + oc->status &= ~REQ_PUSHBACK; + if (oc->size == 0) { + if (oc->buffer) { + Xfree(oc->buffer); + oc->buffer = NULL; + } + if ((rv = am_avail(oc, VC_IN)) >= (SIZEOF(xReq))) { + /* + * Enough available to read first portion of + * the request. + */ + oc->buffer = (char *) xalloc(SIZEOF(xReq)); + if (oc->buffer == NULL) { + ErrorF("ReadRequestFromClient: out of memory\n"); + return -1; + } + oc->size = SIZEOF(xReq); + n = am_read(oc, oc->buffer, SIZEOF(xReq)); + if (n != SIZEOF(xReq)) { + ErrorF("ReadRequestFromClient: got %d wanted %d\n", + n, SIZEOF(xReq)); + return -1; + } + } else if (rv < 0) { + ErrorF("ReadRequestFromClient: read failed (connection %d)\n", + oc->number); + oc->status |= CONN_KILLED; + return -1; + } else { + isItTimeToYield = TRUE; + return 0; + } + } + + /* + * See if we have enough in the local buffer, + * plus what is still in the virtual circuit. + */ + if ((stat = am_avail(oc, VC_IN)) < 0) { /* oc closed */ + ErrorF("ReadRequestFromClient: read failed (connection %d)\n", + oc->number); + oc->status |= CONN_KILLED; + return -1; + } + + havenow = oc->size + stat; + request = (xReq *)oc->buffer; + if (havenow < SIZEOF(xReq)) { + NotAllHereYet: + /* not a whole message yet; return */ + isItTimeToYield = TRUE; + return 0; + } + + /* + * Everything is ok, see how much we need to read + */ + if (request != 0) + needed = request_length(request, client); + else + needed = -1; + if (needed <= 0) + needed = sizeof(xReq); + if (needed > havenow) { + if (havenow > oc->size) { + if ((oc->buffer = (char *)xrealloc(oc->buffer, havenow)) == 0) { + ErrorF("ReadRequestFromClient: out of memory\n"); + return -1; + } + n = am_read(oc, oc->buffer + oc->size, havenow - oc->size); + if (n != havenow-oc->size) { + ErrorF("ReadRequestFromClient: got %d wanted %d\n", + n, havenow-oc->size); + return -1; + } + oc->size = havenow; + } + goto NotAllHereYet; + } + if (needed > oc->size) { + if ((oc->buffer = (char *)Xrealloc(oc->buffer, needed)) == 0) { + ErrorF("ReadRequestFromClient: out of memory\n"); + return -1; + } + request = (xReq *)oc->buffer; + n = am_read(oc, oc->buffer + oc->size, needed - oc->size); + if (n != needed-oc->size) { + ErrorF("ReadRequestFromClient: got %d wanted %d\n", + n, needed-oc->size); + return -1; + } + } + oc->size = 0; + if (++timesThisConnection >= MAX_TIMES_PER || isItTimeToYield) { + isItTimeToYield = TRUE; + timesThisConnection = 0; + } + client->requestBuffer = (pointer)oc->buffer; + return needed; + } + + Bool + InsertFakeRequest(client, data, count) + ClientPtr client; + char *data; + int count; + { + register OsCommPtr oc = (OsCommPtr)client->osPrivate; + + oc->status |= REQ_PUSHBACK; + WakeUpMainThread(); + if (oc->size) { + ErrorF("Warning: InsertFakeRequest(%d): %d already\n", count, oc->size); + oc->buffer = (char *)xrealloc(oc->buffer, oc->size+count); + if (oc->buffer == NULL) { + ErrorF("InsertFakeClient: out of memory\n"); + oc->size = 0; + oc->buffer = 0; + return FALSE; + } + } else { + oc->buffer = (char *)xalloc(count); + if (oc->buffer == NULL) { + ErrorF("InsertFakeRequest: out of memory\n"); + oc->size = 0; + oc->buffer = 0; + return FALSE; + } + } + bcopy(data, oc->buffer + oc->size, count); + oc->size += count; + return TRUE; + } + + ResetCurrentRequest(client) + ClientPtr client; + { + register OsCommPtr oc = (OsCommPtr)client->osPrivate; + register xReq *request; + + oc->status |= REQ_PUSHBACK; + WakeUpMainThread(); + if (oc->size) { + ErrorF("ResetCurrentRequest: partial request\n"); + return; + } + if (oc->buffer == NULL) { + ErrorF("ResetCurrentRequest: no request\n"); + return; + } + request = (xReq *)oc->buffer; + oc->size = request_length(request, client); + } + + int + FlushClient(who, oc, extraBuf, extraCount) + ClientPtr who; + OsCommPtr oc; + char *extraBuf; + int extraCount; + { + return 0; + } + + void + FlushAllOutput() + { + } + + int + WriteToClient (who, count, buf) + ClientPtr who; + char *buf; + int count; + { + register OsCommPtr oc = (OsCommPtr)who->osPrivate; + int padBytes; + + if (count == 0) return 0; + if (count < 0) { + ErrorF("WriteToClient: count %d < 0?\n", count); + return 0; /* silly request */ + } + + padBytes = padlength[count & 3]; + if ((count = am_write(oc, buf, count)) < 0) + oc->status |= CONN_KILLED; + if (count > 0 && count & 3) { + if (am_write(oc, "\0\0\0\0", padlength[count & 3]) < 0) + oc->status |= CONN_KILLED; + } + return count; + } + + int + am_avail(oc, which) + OsCommPtr oc; + int which; + { + if (oc->family == FamilyAmoeba) + return vc_avail(oc->conn.vc, which); + if (oc->family == FamilyInternet) + return cb_full(oc->conn.tcp.cb); + return -1; + } + + int + am_read(oc, buffer, size) + OsCommPtr oc; + char *buffer; + int size; + { + if (oc->family == FamilyAmoeba) + return vc_readall(oc->conn.vc, buffer, size); + if (oc->family == FamilyInternet) + return cb_gets(oc->conn.tcp.cb, buffer, size, size); + return -1; + } + + int + am_write(oc, buffer, size) + OsCommPtr oc; + char *buffer; + int size; + { + if (oc->family == FamilyAmoeba) + return vc_write(oc->conn.vc, buffer, size); + if (oc->family == FamilyInternet) { + bufsize bsize; + int count, wrcnt; + + for (count = 0; size > 0; ) { + wrcnt = size > TCPIP_BUFSIZE ? TCPIP_BUFSIZE : size; + bsize = tcpip_write(&oc->conn.tcp.cap, buffer, wrcnt); + if (ERR_STATUS(bsize)) { + ErrorF("TCP/IP write failed: %s\n", + tcpip_why(ERR_CONVERT(bsize))); + return -1; + } + if (bsize != wrcnt) { + ErrorF("TCP/IP write failed (expected %d, wrote %d)\n", + (int)bsize, wrcnt); + return -1; + } + buffer += bsize; + size -= bsize; + count += bsize; + } + + return size; + } + return -1; + } + + void + am_close(oc, which) + OsCommPtr oc; + int which; + { + if (amDebug) ErrorF("am_close() %s, %d\n", + oc->family == FamilyAmoeba ? "Amoeba" : "TCP/IP", oc->number); + + if (oc->family == FamilyAmoeba) + vc_close(oc->conn.vc, which); + if (oc->family == FamilyInternet) { + if (oc->conn.tcp.signal != -1) + sig_raise(oc->conn.tcp.signal); + std_destroy(&oc->conn.tcp.cap); + cb_close(oc->conn.tcp.cb); + cb_free(oc->conn.tcp.cb); + oc->conn.tcp.cb = NULL; + } + } + #endif /* AMOEBA */ + + #ifdef _MINIX + extern asio_fd_set_t InprogressFdSet; + extern asio_fd_set_t ListenFdSet; + extern asio_fd_set_t ClientFdSet; + extern asio_fd_set_t CompletedFdSet; + extern asio_fd_set_t IgnoreFdSet; + extern asio_fd_set_t GrabFdSet; + + extern Bool AnyClientsWithInput; + extern int lastfdesc; /* maximum file descriptor */ + extern int GrabInProgress; + + int + ReadRequestFromClient(client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr)client->osPrivate; + register ConnectionInputPtr oci, oci_r; + int fd = oc->fd; + register int gotnow, gotnow_r, needed; + int result; + register xReq *request; + + if (GrabInProgress && !ASIO_FD_ISSET(fd, ASIO_READ, &GrabFdSet)) + { + YieldControl(); + return 0; + } + if (ASIO_FD_ISSET(fd, ASIO_READ, &IgnoreFdSet)) + { + YieldControl(); + return 0; + } + + ASIO_FD_CLR(fd, ASIO_READ, &CompletedFdSet); + oci= oc->inputFake; + if (oci) + { + oci->bufptr += oci->lenLastReq; + oci->lenLastReq= 0; + } + oci= oc->input; + if (oci) + { + oci->bufptr += oci->lenLastReq; + oci->lenLastReq= 0; + } + for(;;) + { + /* Let's check Fake requests first */ + + oci= oc->inputFake; + if (oci) + { + gotnow = oci->bufcnt + oci->buffer - oci->bufptr; + if (gotnow == 0) + { + /* End of fake request */ + xfree(oci->buffer); + xfree(oci); + oc->inputFake= NULL; + + continue; + } + + /* Let's move the data down, if necessary */ + if (oci->bufptr != oci->buffer) + { + bcopy(oci->bufptr, oci->buffer, gotnow); + oci->bufptr= oci->buffer; + } + + if (gotnow < sizeof(xReq)) + FatalError("Fake request is too small\n"); + request = (xReq *)oci->bufptr; + needed= request_length(request, client); + if (needed < sizeof(xReq)) + needed= sizeof(xReq); + else if (needed > MAXBUFSIZE) + FatalError("Fake request is too large\n"); + if (needed > oci->size) + { + char *ibuf; + + ibuf = (char *)xrealloc(oci->buffer, needed); + if (!ibuf) + { + YieldControlDeath(); + ErrorF("ReadRequestFromClient: cannot reallocate buffer\n"); + return -1; + } + oci->size = needed; + oci->buffer = ibuf; + oci->bufptr = ibuf; + } + if (gotnow >= needed) + { + if (++timesThisConnection >= MAX_TIMES_PER) + YieldControl(); + ASIO_FD_SET(fd, ASIO_READ, &CompletedFdSet); + AnyClientsWithInput= TRUE; + + client->requestBuffer = (pointer)oci->bufptr; + oci->lenLastReq= needed; + ErrorF("ReadRequestFromClient: gotnow = %d; needed = %d\n", + gotnow, needed); + return needed; + } + + /* Do we have something in the input buffer, we can use? */ + oci_r= oc->input; + if (oci_r == NULL) + { + /* No input buffer, we can make the fake buffer the input + * buffer */ + if (ASIO_FD_ISSET(fd, ASIO_READ, &InprogressFdSet)) + FatalError("no input buffer but in progress\n"); + oc->input= oci; + oc->inputFake= NULL; + continue; + } + gotnow_r = oci_r->bufcnt + oci_r->buffer - oci_r->bufptr; + if (gotnow_r == 0) + { + /* No input buffer, do we have a read in progress? */ + if (ASIO_FD_ISSET(fd, ASIO_READ, &InprogressFdSet)) + { + YieldControlNoInput(); + ErrorF("ReadRequestFromClient: no read in progress\n"); + return 0; + } + + xfree(oci_r->buffer); + xfree(oci_r); + oc->input= oci; + oc->inputFake= NULL; + continue; + } + if (gotnow_r > needed-gotnow) + gotnow_r= needed-gotnow; + bcopy(oci_r->bufptr, oci->buffer+gotnow, gotnow_r); + oci_r->bufptr += gotnow_r; + continue; + } + + /* No fake input */ + oci= oc->input; + if (!oci) + { + if (oci = FreeInputs) + { + FreeInputs = oci->next; + } + else if (!(oci = AllocateInputBuffer())) + { + YieldControlDeath(); + ErrorF("ReadRequestFromClient: cannot allocate buffer\n"); + return -1; + } + oc->input = oci; + } + + request = (xReq *)oci->bufptr; + gotnow = oci->bufcnt + oci->buffer - oci->bufptr; + if ((gotnow < sizeof(xReq)) || + (gotnow < (needed = request_length(request, client)))) + { + if ((gotnow < sizeof(xReq)) || (needed < sizeof(xReq))) + needed = sizeof(xReq); + else if (needed > MAXBUFSIZE) + { + YieldControlDeath(); + ErrorF("ReadRequestFromClient: request too big(%d)\n", needed); + return -1; + } + + /* Let's check for a read in progress */ + if (ASIO_FD_ISSET(fd, ASIO_READ, &InprogressFdSet)) + { + YieldControlNoInput(); + return 0; + } + if ((gotnow == 0) || + ((oci->bufptr - oci->buffer + needed) > oci->size)) + { + if ((gotnow > 0) && (oci->bufptr != oci->buffer)) + bcopy(oci->bufptr, oci->buffer, gotnow); + if (needed > oci->size) + { + char *ibuf; + + ibuf = (char *)xrealloc(oci->buffer, needed); + if (!ibuf) + { + YieldControlDeath(); + return -1; + } + oci->size = needed; + oci->buffer = ibuf; + } + oci->bufptr = oci->buffer; + oci->bufcnt = gotnow; + } + result = read(fd, oci->buffer + oci->bufcnt, + oci->size - oci->bufcnt); + if (result <= 0) + { + if ((result < 0) && errno == EINPROGRESS) + { + ASIO_FD_SET(fd, ASIO_READ, &InprogressFdSet); + ASIO_FD_SET(fd, ASIO_READ, &ClientFdSet); + YieldControlNoInput(); + return 0; + } + YieldControlDeath(); + ErrorF("ReadRequestFromClient: read failed\n"); + ErrorF("result = %d; errno = %d; size-bufcnt = %d\n", + result, errno, oci->size - oci->bufcnt); + return -1; + } + oci->bufcnt += result; + gotnow += result; + + /* free up some space after huge requests */ + if ((oci->size > BUFWATERMARK) && + (oci->bufcnt < BUFSIZE) && (needed < BUFSIZE)) + { + char *ibuf; + + ibuf = (char *)xrealloc(oci->buffer, BUFSIZE); + if (ibuf) + { + oci->size = BUFSIZE; + oci->buffer = ibuf; + oci->bufptr = ibuf + oci->bufcnt - gotnow; + } + } + continue; + } + else + break; + } + + if (needed < sizeof(xReq)) + needed = sizeof(xReq); + + if (++timesThisConnection >= MAX_TIMES_PER) + YieldControl(); + + client->requestBuffer = (pointer)oci->bufptr; + oci->lenLastReq= needed; + ASIO_FD_SET(fd, ASIO_READ, &CompletedFdSet); + ASIO_FD_SET(fd, ASIO_READ, &ClientFdSet); + AnyClientsWithInput= TRUE; + return needed; + } + + Bool + InsertFakeRequest(client, data, count) + ClientPtr client; + char *data; + int count; + { + OsCommPtr oc = (OsCommPtr)client->osPrivate; + register ConnectionInputPtr oci; + int fd = oc->fd; + register int gotnow, moveup; + + oci= oc->input; + if (oci) + { + oci->bufptr += oci->lenLastReq; + oci->lenLastReq = 0; + } + oci= oc->inputFake; + if (!oci) + { + if (oci = FreeInputs) + FreeInputs = oci->next; + else if (!(oci = AllocateInputBuffer())) + return FALSE; + oc->inputFake = oci; + } + oci->bufptr += oci->lenLastReq; + oci->lenLastReq = 0; + gotnow = oci->bufcnt + oci->buffer - oci->bufptr; + if ((gotnow + count) > oci->size) + { + char *ibuf; + + ibuf = (char *)xrealloc(oci->buffer, gotnow + count); + if (!ibuf) + return(FALSE); + oci->size = gotnow + count; + oci->buffer = ibuf; + oci->bufptr = ibuf + oci->bufcnt - gotnow; + } + moveup = count - (oci->bufptr - oci->buffer); + if (moveup > 0) + { + if (gotnow > 0) + bcopy(oci->bufptr, oci->bufptr + moveup, gotnow); + oci->bufptr += moveup; + oci->bufcnt += moveup; + } + bcopy(data, oci->bufptr - count, count); + oci->bufptr -= count; + ASIO_FD_SET(fd, ASIO_READ, &CompletedFdSet); + AnyClientsWithInput= TRUE; + return(TRUE); + } + + ResetCurrentRequest(client) + ClientPtr client; + { + OsCommPtr oc = (OsCommPtr)client->osPrivate; + register ConnectionInputPtr oci; + int fd = oc->fd; + + oci= oc->inputFake; + if (oci) + oci->lenLastReq = 0; + oci= oc->input; + if (oci) + oci->lenLastReq = 0; + ASIO_FD_SET(fd, ASIO_READ, &CompletedFdSet); + AnyClientsWithInput= TRUE; + YieldControl(); + } + + int + FlushClient(who, oc, extraBuf, extraCount) + ClientPtr who; + OsCommPtr oc; + char *extraBuf; + int extraCount; /* do not modify... returned below */ + { + register ConnectionOutputPtr oco; + int fd = oc->fd; + long padsize; + char padBuffer[3]; + int newsize, r; + + ASIO_FD_CLR(fd, ASIO_WRITE, &CompletedFdSet); + padsize = padlength[extraCount & 3]; + + /* Insert new data in outputNext */ + if (extraCount + padsize != 0) + { + oco= oc->outputNext; + if (!oco) + { + if (oco = FreeOutputs) + { + FreeOutputs = oco->next; + } + else if (!(oco = AllocateOutputBuffer())) + { + close(oc->fd); + CheckListeners(); + MarkClientException(who); + return -1; + } + oc->outputNext = oco; + } + newsize= oco->count + extraCount + padsize; + if (newsize > oco->size) + { + unsigned char *obuf; + + obuf= (unsigned char *)xrealloc(oco->buf, newsize + BUFSIZE); + if (obuf == NULL) + { + close(oc->fd); + CheckListeners(); + MarkClientException(who); + oco->count = 0; + return -1; + } + oco->buf= obuf; + oco->size= newsize + BUFSIZE; + } + bcopy(extraBuf, oco->buf + oco->count, extraCount); + oco->count += extraCount; + bcopy(padBuffer, oco->buf + oco->count, padsize); + oco->count += padsize; + } + + for (;;) + { + /* If we have a write in progress we can quit imediately */ + if (ASIO_FD_ISSET(fd, ASIO_WRITE, &InprogressFdSet)) + return extraCount; + + oco= oc->output; + if (oco == NULL) + { + /* If we have no output buffer, but do have an outputNext, + * move outputNext to output and retry */ + + if (oc->outputNext) + { + oc->output= oc->outputNext; + oc->outputNext= NULL; + continue; + } + + /* We are done */ + return extraCount; + } + + /* If the write buffer exists but is empty we can remove that buffer */ + if (oco->count == 0) + { + if (oco->size > BUFWATERMARK) + { + xfree(oco->buf); + xfree(oco); + } + else + { + oco->next = FreeOutputs; + FreeOutputs = oco; + } + oc->output = (ConnectionOutputPtr)NULL; + continue; + } + + /* We have some work to do */ + r= write(fd, (char *)oco->buf, oco->count); + if (r > 0) + { + if (r == oco->count) + { + /* The normal case we assume */ + oco->count= 0; + continue; + } + oco->count -= r; + bcopy(oco->buf+r, oco->buf, oco->count); + continue; + } + if (r == -1 && errno == EINPROGRESS) + { + ASIO_FD_SET(fd, ASIO_WRITE, &InprogressFdSet); + ASIO_FD_SET(fd, ASIO_WRITE, &ClientFdSet); + continue; + } + + /* Now we got an error */ + close(fd); + CheckListeners(); + MarkClientException(who); + oco->count = 0; + return(-1); + } + } + + void + FlushAllOutput() + { + int i, index; + register ClientPtr client; + OsCommPtr oc; + + if (! NewOutputPending) + return; + + /* + * It may be that some client still has critical output pending, + * but he is not yet ready to receive it anyway, so we will + * simply wait for the select to tell us when he's ready to receive. + */ + CriticalOutputPending = FALSE; + NewOutputPending = FALSE; + + for (i = 0; i <= lastfdesc; i++) + { + if (ASIO_FD_ISSET(i, ASIO_WRITE, &CompletedFdSet) && + ASIO_FD_ISSET(i, ASIO_WRITE, &ClientFdSet)) + { + ASIO_FD_CLR(i, ASIO_WRITE, &CompletedFdSet); + if ((index = ConnectionTranslation[i]) == 0) + continue; + client = clients[index]; + if (client->clientGone) + continue; + oc = (OsCommPtr)client->osPrivate; + if (ASIO_FD_ISSET(i, ASIO_READ, &CompletedFdSet)) + { + ASIO_FD_SET(i, ASIO_WRITE, &CompletedFdSet); + NewOutputPending = TRUE; + } + else + (void)FlushClient(client, oc, (char *)NULL, 0); + } + } + } + + WriteToClient (who, count, buf) + ClientPtr who; + int count; + char *buf; + { + OsCommPtr oc = (OsCommPtr)who->osPrivate; + register ConnectionOutputPtr oco; + int padBytes; + + if (!count) + return(0); + + oco= oc->output; + if (!oco) + { + if (oco = FreeOutputs) + { + FreeOutputs = oco->next; + } + else if (!(oco = AllocateOutputBuffer())) + { + close(oc->fd); + CheckListeners(); + MarkClientException(who); + return -1; + } + oc->output = oco; + } + if (oc->outputNext) + oco= oc->outputNext; + + padBytes = padlength[count & 3]; + + if (oco->count + count + padBytes > oco->size) + { + CriticalOutputPending = FALSE; + NewOutputPending = FALSE; + return FlushClient(who, oc, buf, count); + } + + NewOutputPending = TRUE; + ASIO_FD_SET(oc->fd, ASIO_WRITE, &CompletedFdSet); + ASIO_FD_SET(oc->fd, ASIO_WRITE, &ClientFdSet); + bcopy(buf, (char *)oco->buf + oco->count, count); + oco->count += count + padBytes; + + return(count); + } + + void + UpdateClientIOStatus(fd, operation, result, error) + int fd; + int operation; + int result; + int error; + { + int client_no; + ClientPtr client; + OsCommPtr oc; + ConnectionInputPtr oci; + ConnectionOutputPtr oco; + + ASIO_FD_CLR(fd, operation, &InprogressFdSet); + client_no= ConnectionTranslation[fd]; + client= clients[client_no]; + oc= (OsCommPtr)client->osPrivate; + + switch (operation) { + case ASIO_READ: + AnyClientsWithInput= TRUE; + ASIO_FD_SET(fd, ASIO_READ, &CompletedFdSet); + if (result == -1) + { + /* Assume the error will happen again on the next read */ + ErrorF("(warning) read error: %s\n", strerror(error)); + return; + } + oci= oc->input; + oci->bufcnt += result; + break; + case ASIO_WRITE: + if (result == -1) + { + /* Assume the error will happen again on the next write */ + ErrorF("(warning) write error: %s\n", strerror(error)); + return; + } + oco= oc->output; + oco->count -= result; + if (oco->count != 0) + bcopy(oco->buf+result, oco->buf, oco->count); + FlushClient(client, oc, NULL, 0); + break; + default: + FatalError("UpdateClientIOStatus: oper %d not implemented\n", + operation); + } + } + #endif /* _MINIX */ diff -c /dev/null mit/server/os/iopreader.c:1.1 *** /dev/null Sat Mar 12 00:35:22 1994 --- mit/server/os/iopreader.c Sat Mar 12 00:35:22 1994 *************** *** 0 **** --- 1,161 ---- + #ifdef AMOEBA + /* + * iopreader.c + * + * $XFree86: mit/server/os/iopreader.c,v 1.1 1993/03/20 04:31:22 dawes Exp $ + * + */ + #include + #include + #include + #include + #include + #include + + #include "osdep.h" + + #define MAXEVENTQUEUE 32 + + capability iopcap; + + static mutex lock; + static semaphore empty, filled; + + static IOPEvent event_queue[MAXEVENTQUEUE]; + static int event_qin, event_qout; + + void IOPCleanUp(); + static void IOPServerReader(); + + /* + * Initialize the IOP server + */ + void + InitializeIOPServerReader() + { + char host[100]; + errstat err; + + /* + * Initialize event queue + */ + event_qin = event_qout = 0; + sema_init(&empty, MAXEVENTQUEUE); + sema_init(&filled, 0); + mu_init(&lock); + + /* + * Get IOP capability, and enable the server + */ + if (XServerHostName == NULL) + FatalError("No hostname, no screen\n"); + sprintf(host, "%s/%s/%s", HOST_DIR, XServerHostName, DEF_IOPSVRNAME); + if ((err = name_lookup(host, &iopcap)) != STD_OK) + FatalError("Cannot find IOP server %s: %s\n", host, err_why(err)); + + /* + * Enable IOP server + */ + if ((err = iop_enable(&iopcap)) != STD_OK) + FatalError("iop_enable failed (%s)\n", err_why(err)); + + /* + * Start IOP reader thread + */ + atexit(IOPCleanUp); + if (thread_newthread(IOPServerReader, DEVREADER_STACK, 0, 0) <= 0) + FatalError("Cannot start IOP reader thread\n"); + } + + /* + * IOP clean up, actuall disable the IOP server. Its the IOP's own choice + * what do do (perhaps restore the screen?). + */ + void + IOPCleanUp() + { + errstat err; + + if ((err = iop_disable(&iopcap)) != STD_OK) + ErrorF("iop_disable failed (%s)\n", err_why(err)); + } + + /* + * This threads polls the IOP server for events. Once an event (or a + * number of events) are read, they are queued up using a traditional + * producer/consumer approach. + */ + static void + IOPServerReader() + { + IOPEvent queue[MAXEVENTQUEUE-1]; + int nevents, i; + errstat err; + + WaitForInitialization(); + + #ifdef XDEBUG + if (amDebug) ErrorF("IOPServerReader() running ...\n"); + #endif + + for (;;) { + do { + nevents = MAXEVENTQUEUE - 1; + err = iop_getevents(&iopcap, queue, &nevents); + if (err != STD_OK) { + if (err != RPC_FAILURE) { + ErrorF("iop_getevents failed (%s)\n", err_why(err)); + } + nevents = 0; + } + } while (nevents <= 0); + + /* store event(s) in the global event queue */ + sema_mdown(&empty, nevents); + mu_lock(&lock); + for (i = 0; i < nevents; i++) { + event_queue[event_qin] = queue[i]; + event_qin = (event_qin + 1) % MAXEVENTQUEUE; + } + mu_unlock(&lock); + sema_mup(&filled, nevents); + WakeUpMainThread(); + } + } + + /* + * Return the number of IOP events waiting + */ + int + AmoebaEventsAvailable() + { + return sema_level(&filled); + } + + /* + * Get the IOP events from the queue. ``size'' is the maximum the + * requestor cares to handle, the actual size read is returned as + * result. + */ + int + AmoebaGetEvents(queue, size) + IOPEvent *queue; + int size; + { + int nevents, i; + + if (sema_level(&filled) <= 0) return 0; + if ((nevents = sema_level(&filled)) > size) + nevents = size; + sema_mdown(&filled, nevents); + mu_lock(&lock); + for (i = 0; i < nevents; i++) { + queue[i] = event_queue[event_qout]; + event_qout = (event_qout + 1) % MAXEVENTQUEUE; + } + mu_unlock(&lock); + sema_mup(&empty, nevents); + return nevents; + } + #endif /* AMOEBA */ + diff -c mit/server/os/oscolor.c:1.1.1.1 mit/server/os/oscolor.c:2.4 *** mit/server/os/oscolor.c:1.1.1.1 Sat Mar 12 00:35:23 1994 --- mit/server/os/oscolor.c Sat Mar 12 00:35:23 1994 *************** *** 21,36 **** SOFTWARE. ******************************************************************/ /* $XConsortium: oscolor.c,v 1.20 91/06/30 15:58:30 rws Exp $ */ #ifdef NDBM #include #else ! #ifdef SVR4 #include #else #include #endif #endif #include "rgb.h" #include "os.h" #include "opaque.h" --- 21,53 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/os/oscolor.c,v 2.4 1994/02/10 21:27:30 dawes Exp $ */ /* $XConsortium: oscolor.c,v 1.20 91/06/30 15:58:30 rws Exp $ */ + + + #ifndef USE_RGB_TXT + + #ifdef AMOEBA + #include + #else #ifdef NDBM + #include + #if (BSD >= 199103) + #include + #endif + #ifdef SDBM + #include + #else #include + #endif #else ! #if defined(SVR4) || defined(ISC) #include #else #include #endif #endif + #endif /* AMOEBA */ #include "rgb.h" #include "os.h" #include "opaque.h" *************** *** 112,114 **** --- 129,286 ---- return(0); } + + #else /* USE_RGB_TXT */ + + + /* + * Sorry, but I can't stand it anymore !!! Why using a libdbm thing, indstead + * of reading the plain rgb.txt and create the database online while starting + * the server ?? As result we would have fewer disk accesses ... + */ + + #include + #include "os.h" + #include "opaque.h" + + #define HASHSIZE 511 + + typedef struct _dbEntry * dbEntryPtr; + typedef struct _dbEntry { + dbEntryPtr link; + unsigned short red; + unsigned short green; + unsigned short blue; + char name[1]; /* some compilers complain if [0] */ + } dbEntry; + + + extern void CopyISOLatin1Lowered(); + + static dbEntryPtr hashTab[HASHSIZE]; + + + static dbEntryPtr + lookup(name, len, create) + char *name; + int len; + Bool create; + { + unsigned int h = 0, g; + dbEntryPtr entry, *prev; + char *str = name; + + if (!(name = (char*)ALLOCATE_LOCAL(len +1))) return NULL; + CopyISOLatin1Lowered(name, str, len); + name[len] = '\0'; + + for(str = name; *str; str++) { + h = (h << 4) + *str; + if ((g = h) & 0xf0000000) h ^= (g >> 24); + h &= g; + } + h %= HASHSIZE; + + if ( entry = hashTab[h] ) + { + for( ; entry; prev = (dbEntryPtr*)entry, entry = entry->link ) + if (! strcmp(name, entry->name) ) break; + } + else + prev = &(hashTab[h]); + + if (!entry && create && (entry = (dbEntryPtr)Xalloc(sizeof(dbEntry) +len))) + { + *prev = entry; + entry->link = NULL; + strcpy( entry->name, name ); + } + + DEALLOCATE_LOCAL(name); + + return entry; + } + + + Bool + OsInitColors() + { + FILE *rgb; + char *path; + char line[BUFSIZ]; + char name[BUFSIZ]; + int red, green, blue, lineno = 0; + dbEntryPtr entry; + + static Bool was_here = FALSE; + + if (!was_here) + { + path = (char*)ALLOCATE_LOCAL(strlen(rgbPath) +5); + strcpy(path, rgbPath); + strcat(path, ".txt"); + + if (!(rgb = fopen(path, "r"))) + { + ErrorF( "Couldn't open RGB_DB '%s'\n", rgbPath ); + DEALLOCATE_LOCAL(path); + return FALSE; + } + + while(fgets(line, sizeof(line), rgb)) + { + lineno++; + if (sscanf(line,"%d %d %d %[^\n]\n", &red, &green, &blue, name) == 4) + { + if (red >= 0 && red <= 0xff && + green >= 0 && green <= 0xff && + blue >= 0 && blue <= 0xff) + { + if (entry = lookup(name, strlen(name), TRUE)) + { + entry->red = (red * 65535) / 255; + entry->green = (green * 65535) / 255; + entry->blue = (blue * 65535) / 255; + } + } + else + ErrorF("Value for \"%s\" out of range: %s:%d\n", + name, path, lineno); + } + else if (*line && *line != '#') + ErrorF("Syntax Error: %s:%d\n", path, lineno); + } + + fclose(rgb); + DEALLOCATE_LOCAL(path); + + was_here = TRUE; + } + + return TRUE; + } + + + + Bool + OsLookupColor(screen, name, len, pred, pgreen, pblue) + int screen; + char *name; + unsigned len; + unsigned short *pred, *pgreen, *pblue; + + { + dbEntryPtr entry; + + if (entry = lookup(name, len, FALSE)) + { + *pred = entry->red; + *pgreen = entry->green; + *pblue = entry->blue; + return TRUE; + } + + return FALSE; + } + + #endif /* USE_RGB_TXT */ diff -c mit/server/os/osdep.h:1.1.1.1 mit/server/os/osdep.h:1.6 *** mit/server/os/osdep.h:1.1.1.1 Sat Mar 12 00:35:24 1994 --- mit/server/os/osdep.h Sat Mar 12 00:35:24 1994 *************** *** 21,32 **** --- 21,53 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/os/osdep.h,v 1.6 1993/05/24 12:47:35 dawes Exp $ */ /* $XConsortium: osdep.h,v 1.27 91/07/23 19:04:22 rws Exp $ */ + #ifdef AMOEBA + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #include "X.h" + #include "misc.h" + #include "dixstruct.h" + #endif /* AMOEBA */ + #define BOTIMEOUT 200 /* in milliseconds */ #define BUFSIZE 4096 #define BUFWATERMARK 8192 + #ifndef MAXBUFSIZE #define MAXBUFSIZE (1 << 18) + #endif #ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE *************** *** 46,56 **** --- 67,103 ---- #ifdef NOFILE #define OPEN_MAX NOFILE #else + #if defined(_POSIX_OPEN_MAX) && !defined(SCO) + #define OPEN_MAX _POSIX_OPEN_MAX + #else #define OPEN_MAX NOFILES_MAX #endif #endif #endif #endif + #endif + + #ifdef AMOEBA + /* + * Some fundamental constants + */ + #define CONNECTOR_STACK 4000 /* stack for connector task */ + #define DEVREADER_STACK 4000 /* stack for device reader */ + #define CREATOR_STACK 4000 /* stack for connection creator */ + #define MAXTASKS 100 /* Maximum # clients */ + + /* + * OsComm status bits + */ + #define CONN_KILLED 01 /* Connection being closed */ + #define REQ_PUSHBACK 02 /* Request pushed back */ + #define IGNORE 04 /* True if client ignored */ + #endif /* AMOEBA */ + + /* + * Just to prevent confusion, I ifdef-ed it out + */ + #ifndef AMOEBA #if OPEN_MAX <= 128 #define MAXSOCKS (OPEN_MAX - 1) *************** *** 62,67 **** --- 109,116 ---- #define NULL 0 #endif + #ifndef _MINIX + #define mskcnt ((MAXSOCKS + 31) / 32) /* size of bit array */ #if (mskcnt==1) *************** *** 166,171 **** --- 215,222 ---- */ #endif + #endif /* !_MINIX */ + typedef struct _connectionInput { struct _connectionInput *next; char *buffer; /* contains current client input */ *************** *** 182,191 **** --- 233,282 ---- int count; } ConnectionOutput, *ConnectionOutputPtr; + #endif /* AMOEBA */ + + #ifdef AMOEBA + typedef struct _amTcpIpComm { + capability cap; /* connection capability */ + struct circbuf *cb; /* input buffer */ + signum signal; /* signal to kill reader thread */ + } AmTcpIpCommRec; + #endif + typedef struct _osComm { + #ifndef AMOEBA int fd; ConnectionInputPtr input; ConnectionOutputPtr output; + #ifdef _MINIX + ConnectionInputPtr inputFake; + ConnectionOutputPtr outputNext; + #endif + #else + int family; /* connection family */ + int number; /* connection number */ + char status; /* connection status */ + int size; /* input buffer size */ + char *buffer; /* input buffer */ + union { + struct vc *vc; /* virtual circuit */ + AmTcpIpCommRec tcp; /* TCP/IP connection info */ + } conn; + #endif XID auth_id; /* authorization id */ long conn_time; /* timestamp if not established, else 0 */ } OsCommRec, *OsCommPtr; + + #ifdef AMOEBA + #ifdef XDEBUG + extern Bool amDebug; /* amoeba debug toggle */ + #endif /* XDEBUG */ + extern char *XServerHostName; /* X server host name */ + extern char *XTcpServerName; /* TCP/IP server name */ + extern ClientPtr grabClient; /* for grabs */ + extern ClientPtr Clients[MAXTASKS]; /* All clients */ + extern int maxClient; /* Highest client# */ + extern int nNewConns; /* # of new clients */ + + extern semaphore init_sema; /* Initialize semaphore */ + #endif /* AMOEBA */ diff -c mit/server/os/osinit.c:1.1.1.3 mit/server/os/osinit.c:2.2 *** mit/server/os/osinit.c:1.1.1.3 Sat Mar 12 00:35:25 1994 --- mit/server/os/osinit.c Sat Mar 12 00:35:25 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/os/osinit.c,v 2.2 1994/02/10 21:27:32 dawes Exp $ */ /* $XConsortium: osinit.c,v 1.40 91/11/29 15:21:07 rws Exp $ */ #include "X.h" #include "os.h" *************** *** 37,43 **** #endif #endif ! #ifndef SYSV #include #endif --- 38,44 ---- #endif #endif ! #if !defined(SYSV) && !defined(AMOEBA) && !defined(_MINIX) #include #endif *************** *** 58,63 **** --- 59,65 ---- OsInit() { + #ifndef AMOEBA static Bool been_here = FALSE; char fname[PATH_MAX]; *************** *** 66,73 **** --- 68,77 ---- #endif if (!been_here) { + #if !defined(SCO) && !(BSD >= 199103) fclose(stdin); fclose(stdout); + #endif /* hack test to decide where to log errors */ if (write (2, fname, 0)) { *************** *** 84,90 **** dup2 (fileno (err), 2); fclose (err); } ! #if defined(SYSV) || defined(SVR4) { static char buf[BUFSIZ]; setvbuf (stderr, buf, _IOLBF, BUFSIZ); --- 88,94 ---- dup2 (fileno (err), 2); fclose (err); } ! #if defined(SYSV) || defined(SVR4) || defined(AMOEBA) || defined(_MINIX) { static char buf[BUFSIZ]; setvbuf (stderr, buf, _IOLBF, BUFSIZ); *************** *** 153,158 **** --- 157,166 ---- #endif been_here = TRUE; } + #endif /* AMOEBA */ + /* For XFree86 this is delayed until the Xconfig file has been read */ + #ifndef XFREE86 OsInitColors(); + #endif } diff -c mit/server/os/utils.c:1.1.1.2 mit/server/os/utils.c:2.3 *** mit/server/os/utils.c:1.1.1.2 Sat Mar 12 00:35:26 1994 --- mit/server/os/utils.c Sat Mar 12 00:35:26 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/os/utils.c,v 2.3 1993/09/22 15:49:47 dawes Exp $ */ /* $XConsortium: utils.c,v 1.109 92/02/24 19:03:14 keith Exp $ */ #include "Xos.h" #include *************** *** 29,38 **** #include "input.h" #include "opaque.h" #include ! #ifndef SYSV #include #endif #ifdef SIGNALRETURNSINT #define SIGVAL int #else --- 30,45 ---- #include "input.h" #include "opaque.h" #include ! #if !defined(SYSV) && !defined(AMOEBA) && !defined(_MINIX) #include #endif + #ifdef AMOEBA + #include "osdep.h" + #include + #include + #endif + #ifdef SIGNALRETURNSINT #define SIGVAL int #else *************** *** 47,53 **** --- 54,62 ---- extern int defaultBackingStore; extern Bool disableBackingStore; extern Bool disableSaveUnders; + #ifndef AMOEBA extern Bool PartialNetwork; + #endif #ifndef NOLOGOHACK extern int logoScreenSaver; #endif *************** *** 68,76 **** Bool CoreDump; void ddxUseMsg(); ! #ifndef SVR4 extern char *sbrk(); #endif --- 77,89 ---- Bool CoreDump; + #ifdef AMOEBA + static mutex print_lock; + #endif + void ddxUseMsg(); ! #if !defined(SVR4) && !defined(linux) && !defined(AMOEBA) && !defined(_MINIX) extern char *sbrk(); #endif *************** *** 98,103 **** --- 111,270 ---- char *dev_tty_from_init = NULL; /* since we need to parse it anyway */ + #ifdef SERVER_LOCK + /* + * Explicit support for a server lock file like the ones used for UUCP. + * For architectures with virtual terminals that can run more than one + * server at a time. This keeps the servers from stomping on each other + * if the user forgets to give them different display numbers. + */ + #define LOCK_PATH "/tmp/.X" + #define LOCK_TMPPATH "/tmp/.tX" + #define LOCK_SUFFIX "-lock" + + #ifdef _MINIX + #include /* For PATH_MAX */ + #endif + + #ifndef PATH_MAX + #include + #ifndef PATH_MAX + #ifdef MAXPATHLEN + #define PATH_MAX MAXPATHLEN + #else + #define PATH_MAX 1024 + #endif + #endif + #endif + + #include + extern int errno; + + static Bool StillLocking = FALSE; + + /* + * Lock_Server -- + * Check if the server lock file exists. If so, check if the PID + * contained inside is valid. If so, then die. Otherwise, create + * the lock file containing the PID. + */ + void + Lock_Server() + { + #ifndef AMOEBA + char tmp[PATH_MAX], lock[PATH_MAX], pid_str[12]; + int lfd, i, haslock, l_pid, t; + + /* + * Path names + */ + (void) sprintf(tmp, "%s%s%s", LOCK_TMPPATH, display, LOCK_SUFFIX); + (void) sprintf(lock, "%s%s%s", LOCK_PATH, display, LOCK_SUFFIX); + + /* + * Create a temporary file containing our PID. Attempt three times + * to create the file. + */ + StillLocking = TRUE; + i = 0; + do { + i++; + lfd = creat(tmp, 0444); + if (lfd < 0) + sleep(2); + else + break; + } while (i < 3); + if (lfd < 0) + FatalError("Could not create lock file in %s\n", tmp); + (void) sprintf(pid_str, "%10d\n", getpid()); + (void) write(lfd, pid_str, 11); + (void) close(lfd); + (void) chmod(tmp, 0444); + + /* + * OK. Now the tmp file exists. Try three times to move it in place + * for the lock. + */ + i = 0; + haslock = 0; + while ((!haslock) && (i++ < 3)) { + haslock = (link(tmp,lock) == 0); + if (haslock) { + /* + * We're done. + */ + break; + } + else { + /* + * Read the pid from the existing file + */ + lfd = open(lock, O_RDONLY); + if (lfd < 0) { + unlink(tmp); + FatalError("Can't read lock file %s\n", lock); + } + pid_str[0] = '\0'; + if (read(lfd, pid_str, 11) != 11) { + /* + * Bogus lock file. + */ + unlink(lock); + close(lfd); + continue; + } + pid_str[11] = '\0'; + sscanf(pid_str, "%d", &l_pid); + close(lfd); + + /* + * Now try to kill the PID to see if it exists. + */ + errno = 0; + t = kill(l_pid, 0); + if ((t< 0) && (errno == ESRCH)) { + /* + * Stale lock file. + */ + unlink(lock); + continue; + } + else if (((t < 0) && (errno == EPERM)) || (t == 0)) { + /* + * Process is still active. + */ + unlink(tmp); + FatalError("Server is already active for display %s\n%s %s\n%s\n", + display, "\tIf this server is no longer running, remove", + lock, "\tand start again."); + } + } + } + unlink(tmp); + if (!haslock) + FatalError("Could not create server lock file: %s\n", lock); + StillLocking = FALSE; + #endif /* !AMOEBA */ + } + + /* + * Unlock_Server -- + * Remove the server lock file. + */ + void Unlock_Server() + { + #ifndef AMOEBA + char buf[PATH_MAX]; + + if (StillLocking) + return; + (void)sprintf(buf, "%s%s%s", LOCK_PATH, display, LOCK_SUFFIX); + (void) unlink(buf); + #endif + } + #endif /* SERVER_LOCK */ + /* Force connections to close on SIGHUP from init */ SIGVAL *************** *** 109,117 **** chdir ("/tmp"); exit (0); #endif ! #ifdef SYSV signal (SIGHUP, AutoResetServer); #endif } /* Force connections to close and then exit on SIGTERM, SIGINT */ --- 276,287 ---- chdir ("/tmp"); exit (0); #endif ! #if defined(SYSV) || defined (SVR4) || defined(linux) || defined(_MINIX) signal (SIGHUP, AutoResetServer); #endif + #ifdef AMOEBA + WakeUpMainThread(); + #endif } /* Force connections to close and then exit on SIGTERM, SIGINT */ *************** *** 119,126 **** --- 289,310 ---- SIGVAL GiveUp() { + + #if defined(SYSV) || defined(SVR4) || defined(linux) || defined(_MINIX) + /* + * Don't let any additional occurrances of these signals cause + * premature termination (xdm seems to send two SIGTERMs). + * DHD Dec 1991 + */ + signal(SIGTERM,SIG_IGN); + signal(SIGINT,SIG_IGN); + #endif + dispatchException |= DE_TERMINATE; isItTimeToYield = TRUE; + #ifdef AMOEBA + WakeUpMainThread(); + #endif } *************** *** 132,138 **** --- 316,327 ---- AbortDDX(); fflush(stderr); if (CoreDump) + { + #ifdef AMOEBA + IOPCleanUp(); + #endif abort(); + } exit (1); } *************** *** 140,146 **** --- 329,341 ---- Error(str) char *str; { + #ifdef AMOEBA + mu_lock(&print_lock); + #endif perror(str); + #ifdef AMOEBA + mu_unlock(&print_lock); + #endif } #if defined (UTEK) || defined (UTEKV) || defined(sgi) *************** *** 150,155 **** --- 345,351 ---- * inside the driver. SGI has their own GetTimeInMillis. */ #else + #ifndef AMOEBA long GetTimeInMillis() { *************** *** 158,163 **** --- 354,366 ---- gettimeofday(&tp, 0); return(tp.tv_sec * 1000) + (tp.tv_usec / 1000); } + #else + long + GetTimeInMillis() + { + return sys_milli(); + } + #endif /* AMOEBA */ #endif AdjustWaitForDelay (waitTime, newdelay) *************** *** 188,194 **** --- 391,401 ---- void UseMsg() { #if !defined(AIXrt) && !defined(AIX386) + #ifndef AMOEBA ErrorF("use: X [:] [option]\n"); + #else + ErrorF("use: X [[]:] [option]\n"); + #endif /* AMOEBA */ ErrorF("-a # mouse acceleration (pixels)\n"); ErrorF("-ac disable access control restrictions\n"); #ifdef MEMBUG *************** *** 222,227 **** --- 429,443 ---- ErrorF("nologo disable logo in screen saver\n"); #endif ErrorF("-p # screen-saver pattern duration (minutes)\n"); + #ifndef AMOEBA + #ifdef PART_NET + ErrorF("-pn partial networking enabled [default]\n"); + ErrorF("-nopn partial networking disabled\n"); + #else + ErrorF("-pn partial networking enabled\n"); + ErrorF("-nopn partial networking disabled [default]\n"); + #endif + #endif ErrorF("-r turns off auto-repeat\n"); ErrorF("r turns on auto-repeat \n"); ErrorF("-s # screen-saver timeout (minutes)\n"); *************** *** 236,241 **** --- 452,460 ---- #ifdef XDMCP XdmcpUseMsg(); #endif + #ifdef AMOEBA + ErrorF("-tcp capability specify TCP/IP server capability\n"); + #endif #endif /* !AIXrt && ! AIX386 */ ddxUseMsg(); } *************** *** 253,258 **** --- 472,481 ---- { int i, skip; + #ifdef AMOEBA + mu_init(&print_lock); + #endif + #ifdef MEMBUG #ifndef AIXV3 if (!minfree) *************** *** 263,268 **** --- 486,496 ---- #endif #endif defaultKeyboardControl.autoRepeat = TRUE; + #ifndef AMOEBA + #ifdef PART_NET + PartialNetwork = TRUE; + #endif + #endif #ifdef AIXV3 OpenDebug(); *************** *** 280,285 **** --- 508,523 ---- display = argv[i]; display++; } + #ifdef AMOEBA + else if (strchr(argv[i], ':') != NULL) { + register char *p; + XServerHostName = argv[i]; + if ((p = strchr(argv[i], ':')) != NULL) { + *p++ = '\0'; + display = p; + } + } + #endif /* AMOEBA */ else if ( strcmp( argv[i], "-a") == 0) { if(++i < argc) *************** *** 431,438 **** --- 669,680 ---- else UseMsg(); } + #ifndef AMOEBA else if ( strcmp( argv[i], "-pn") == 0) PartialNetwork = TRUE; + else if ( strcmp( argv[i], "-nopn") == 0) + PartialNetwork = FALSE; + #endif else if ( strcmp( argv[i], "r") == 0) defaultKeyboardControl.autoRepeat = TRUE; else if ( strcmp( argv[i], "-r") == 0) *************** *** 521,526 **** --- 763,783 ---- SyncOn++; } #endif + #ifdef AMOEBA + #ifdef XDEBUG + else if ( strcmp( argv[i], "-amdebug") == 0) + { + amDebug++; + } + #endif /* XDEBUG */ + else if ( strcmp( argv[i], "-tcp") == 0) + { + if(++i < argc) + XTcpServerName = argv[i]; + else + UseMsg(); + } + #endif /* AMOEBA */ else { UseMsg(); *************** *** 850,855 **** --- 1107,1197 ---- DumpMemoryInUse (MarkedTime); } #endif + #else /* SPECIAL_MALLOC */ + #ifdef CAHILL_MALLOC + #include + + unsigned long * + debug_Xalloc (file, line, amount) + char *file; + int line; + unsigned long amount; + { + register pointer ptr; + + if ((long)amount <= 0) + return (unsigned long *)NULL; + /* aligned extra on long word boundary */ + amount = (amount + 3) & ~3; + if (ptr = (pointer)debug_malloc(file, line, amount)) + return (unsigned long *)ptr; + if (Must_have_memory) + FatalError("Out of memory"); + return (unsigned long *)NULL; + } + + /***************** + * Xcalloc + *****************/ + + unsigned long * + debug_Xcalloc (file, line, amount) + char *file; + int line; + unsigned long amount; + { + unsigned long *ret; + + ret = debug_Xalloc (file, line, amount); + if (ret) + bzero ((char *) ret, (int) amount); + return ret; + } + + /***************** + * Xrealloc + *****************/ + + unsigned long * + debug_Xrealloc (file, line, ptr, amount) + char *file; + int line; + register pointer ptr; + unsigned long amount; + { + if ((long)amount <= 0) + { + if (ptr && !amount) + debug_free(file, line, ptr); + return (unsigned long *)NULL; + } + amount = (amount + 3) & ~3; + if (ptr) + ptr = (pointer)debug_realloc(file, line, (char *)ptr, amount); + else + ptr = (pointer)debug_malloc(file, line, amount); + if (ptr) + return (unsigned long *)ptr; + if (Must_have_memory) + FatalError("Out of memory"); + return (unsigned long *)NULL; + } + + /***************** + * Xfree + * calls free + *****************/ + + void + debug_Xfree(file, line, ptr) + char *file; + int line; + register pointer ptr; + { + if (ptr) + debug_free(file, line, (char *)ptr); + } + #endif #endif /* SPECIAL_MALLOC */ /*VARARGS1*/ *************** *** 878,884 **** --- 1220,1232 ---- if (SyncOn) sync(); #else + #ifdef AMOEBA + mu_lock(&print_lock); + #endif fprintf( stderr, f, s0, s1, s2, s3, s4, s5, s6, s7, s8, s9); + #ifdef AMOEBA + mu_unlock(&print_lock); + #endif #endif } diff -c mit/server/os/xdmcp.c:1.1.1.2 mit/server/os/xdmcp.c:2.1 *** mit/server/os/xdmcp.c:1.1.1.2 Sat Mar 12 00:35:27 1994 --- mit/server/os/xdmcp.c Sat Mar 12 00:35:28 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/os/xdmcp.c,v 2.1 1993/09/27 12:29:46 dawes Exp $ */ /* $XConsortium: xdmcp.c,v 1.22 92/05/19 17:22:10 keith Exp $ */ /* * Copyright 1989 Network Computing Devices, Inc., Mountain View, California. *************** *** 14,24 **** --- 15,45 ---- * */ + #ifdef XDMCP + #include "Xos.h" + #ifndef _MINIX #include + #ifndef AMOEBA #include #include #include + #else + #include + #endif + #endif /* _MINIX */ + #if _MINIX + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #endif #include #include "X.h" #include "Xmd.h" *************** *** 28,34 **** #include "dixstruct.h" #include "opaque.h" - #ifdef XDMCP #undef REQUEST #include "Xdmcp.h" --- 49,54 ---- *************** *** 60,66 **** --- 80,90 ---- static get_manager_by_name(), get_xdmcp_sock(); + #ifndef _MINIX static receive_packet(), send_packet(); + #else + static MNX_receive_packet(), send_packet(); + #endif static timeout(), restart(); static recv_willing_msg(); *************** *** 74,80 **** --- 98,108 ---- static send_keepalive_msg(); static XdmcpFatal(), XdmcpWarning(); + #ifndef _MINIX static void XdmcpBlockHandler(), XdmcpWakeupHandler(); + #else /* _MINIX */ + static void MNX_XdmcpBlockHandler(), MNX_XdmcpWakeupHandler(); + #endif /* !_MINIX */ static short xdm_udp_port = XDM_UDP_PORT; static Bool OneSession = FALSE; *************** *** 161,166 **** --- 189,195 ---- static struct sockaddr_in BroadcastAddresses[MAX_BROADCAST]; static int NumBroadcastAddresses; + #ifndef _MINIX XdmcpRegisterBroadcastAddress (addr) struct sockaddr_in *addr; { *************** *** 173,178 **** --- 202,221 ---- bcast->sin_port = htons (xdm_udp_port); bcast->sin_addr = addr->sin_addr; } + #else /* _MINIX */ + MNX_XdmcpRegisterBroadcastAddress (addr) + ipaddr_t addr; + { + struct sockaddr_in *bcast; + if (NumBroadcastAddresses >= MAX_BROADCAST) + return; + bcast = &BroadcastAddresses[NumBroadcastAddresses++]; + bzero (bcast, sizeof (struct sockaddr_in)); + bcast->sin_family = AF_INET; + bcast->sin_port = htons (xdm_udp_port); + bcast->sin_addr = addr; + } + #endif /* !_MINIX */ /* * Each authentication type is registered here; Validator *************** *** 394,401 **** XdmcpRegisterAuthorizations(); XdmcpRegisterDisplayClass (defaultDisplayClass, strlen (defaultDisplayClass)); AccessUsingXdmcp(); ! RegisterBlockAndWakeupHandlers (XdmcpBlockHandler, XdmcpWakeupHandler, ! (pointer) 0); timeOutRtx = 0; DisplayNumber = (CARD16) atoi(display); get_xdmcp_sock(); --- 437,449 ---- XdmcpRegisterAuthorizations(); XdmcpRegisterDisplayClass (defaultDisplayClass, strlen (defaultDisplayClass)); AccessUsingXdmcp(); ! #ifndef _MINIX ! RegisterBlockAndWakeupHandlers (XdmcpBlockHandler, XdmcpWakeupHandler, ! (pointer) 0); ! #else /* _MINIX */ ! RegisterBlockAndWakeupHandlers (MNX_XdmcpBlockHandler, ! MNX_XdmcpWakeupHandler, (pointer) 0); ! #endif /* !_MINIX */ timeOutRtx = 0; DisplayNumber = (CARD16) atoi(display); get_xdmcp_sock(); *************** *** 409,416 **** state = XDM_INIT_STATE; if (state != XDM_OFF) { ! RegisterBlockAndWakeupHandlers (XdmcpBlockHandler, XdmcpWakeupHandler, ! (pointer) 0); timeOutRtx = 0; send_packet(); } --- 457,469 ---- state = XDM_INIT_STATE; if (state != XDM_OFF) { ! #ifndef _MINIX ! RegisterBlockAndWakeupHandlers (XdmcpBlockHandler, XdmcpWakeupHandler, ! (pointer) 0); ! #else /* _MINIX */ ! RegisterBlockAndWakeupHandlers (MNX_XdmcpBlockHandler, ! MNX_XdmcpWakeupHandler, (pointer) 0); ! #endif /* !_MINIX */ timeOutRtx = 0; send_packet(); } *************** *** 454,459 **** --- 507,513 ---- * dynamically while starting up */ + #ifndef _MINIX /*ARGSUSED*/ static void XdmcpBlockHandler(data, wt, LastSelectMask) *************** *** 488,493 **** --- 542,610 ---- } } } + #else /* _MINIX */ + + static int read_inprogress= FALSE; + static int read_completed= FALSE; + static int read_result; + static char read_buffer[XDM_MAX_MSGLEN+sizeof(udp_io_hdr_t)]; + static size_t read_buffer_size= sizeof(read_buffer); + /*ARGSUSED*/ + static void + MNX_XdmcpBlockHandler(data, wt, fdset) + pointer data; /* unused */ + struct timeval wt[2]; + struct asio_fd_set *fdset; + { + long millisToGo, wtMillis; + struct timeval waittime; + int r; + + if (state == XDM_OFF) + return; + if (!read_inprogress) + { + r= read(xdmcpSocket, read_buffer, read_buffer_size); + if (r == -1 && errno == EINPROGRESS) + { + read_inprogress= TRUE; + read_completed= FALSE; + ASIO_FD_SET(xdmcpSocket, ASIO_READ, fdset); + } + else if (r > 0) + { + read_completed= TRUE; + read_result= r; + wt[0]= wt[1]; /* Don't wait */ + return; + } + else + { + ErrorF("(warning got read error (%d, %s)\n", r, + strerror(errno)); + read_completed= FALSE; + } + } + else + ASIO_FD_SET(xdmcpSocket, ASIO_READ, fdset); + millisToGo = timeOutTime - GetTimeInMillis() + 1; + if (millisToGo < 0) + millisToGo = 0; + waittime= wt[1]; + waittime.tv_sec += millisToGo / 1000; + waittime.tv_usec += (millisToGo % 1000) * 1000; + if (waittime.tv_usec >= 1000000) + { + waittime.tv_usec -= 1000000; + waittime.tv_sec++; + } + if (waittime.tv_sec < wt[0].tv_sec || + (waittime.tv_sec == wt[0].tv_sec && waittime.tv_usec < wt[0].tv_usec)) + { + wt[0]= waittime; + } + } + #endif /* !_MINIX */ /* * called after select returns; this routine will *************** *** 495,500 **** --- 612,618 ---- * process them appropriately */ + #ifndef _MINIX /*ARGSUSED*/ static void XdmcpWakeupHandler(data, i, LastSelectMask) *************** *** 535,540 **** --- 653,715 ---- timeout(); } } + #else /* _MINIX */ + static void + MNX_XdmcpWakeupHandler(data, i, fw) + pointer data; /* unused */ + int i; + struct fwait *fw; + { + if (state == XDM_OFF) + return; + if (fw && fw->fw_fd == xdmcpSocket) + { + assert(fw->fw_operation == ASIO_READ); + fw->fw_fd= -1; + assert(read_inprogress); + read_inprogress= FALSE; + assert(!read_completed); + if (fw->fw_result <= 0) + { + ErrorF("(warning got read error (%d, %s)\n", fw->fw_fd, + strerror(fw->fw_errno)); + } + else + { + read_result= fw->fw_result; + read_completed= TRUE; + } + } + if (read_completed) + { + read_completed= FALSE; + MNX_receive_packet(read_buffer, read_result); + } + if (fw != NULL) + { + extern asio_fd_set_t ClientFdSet; /* HACK XXX */ + if (state == XDM_AWAIT_USER_INPUT) + restart(); + else if (state == XDM_RUN_SESSION) + keepaliveDormancy = defaultKeepaliveDormancy; + if (memchr((char *)&ClientFdSet, '\0', sizeof(ClientFdSet)) != NULL && + state == XDM_RUN_SESSION) + { + timeOutTime = GetTimeInMillis() + keepaliveDormancy * 1000; + } + } + else if (timeOutTime && GetTimeInMillis() >= timeOutTime) + { + if (state == XDM_RUN_SESSION) + { + state = XDM_KEEPALIVE; + send_packet(); + } + else + timeout(); + } + } + #endif /* !_MINIX */ /* * This routine should be called from the routine that drives the *************** *** 574,579 **** --- 749,755 ---- ARRAY8 UnwillingMessage = { (CARD8) 14, (CARD8 *) "Host unwilling" }; + #ifndef _MINIX static receive_packet() { *************** *** 618,623 **** --- 794,848 ---- break; } } + #else /* _MINIX */ + static + MNX_receive_packet(buf, size) + char *buf; + int size; + { + struct sockaddr_in from; + int fromlen = sizeof(struct sockaddr_in); + XdmcpHeader header; + + /* read message off socket */ + if (!MNX_XdmcpFill (xdmcpSocket, &buffer, (struct sockaddr *) &from, + &fromlen, buf, size)) + return; + + /* reset retransmission backoff */ + timeOutRtx = 0; + + if (!XdmcpReadHeader (&buffer, &header)) + return; + + if (header.version != XDM_PROTOCOL_VERSION) + return; + + switch (header.opcode) { + case WILLING: + recv_willing_msg(&from, fromlen, header.length); + break; + case UNWILLING: + XdmcpFatal("Manager unwilling", &UnwillingMessage); + break; + case ACCEPT: + recv_accept_msg(header.length); + break; + case DECLINE: + recv_decline_msg(header.length); + break; + case REFUSE: + recv_refuse_msg(header.length); + break; + case FAILED: + recv_failed_msg(header.length); + break; + case ALIVE: + recv_alive_msg(header.length); + break; + } + } + #endif /* !_MINIX */ /* * send the appropriate message given the current state *************** *** 627,632 **** --- 852,858 ---- send_packet() { int rtx; + switch (state) { case XDM_QUERY: case XDM_BROADCAST: *************** *** 751,759 **** --- 977,1023 ---- static get_xdmcp_sock() { + #ifndef _MINIX int soopts = 1; if ((xdmcpSocket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + #else + char *udp_device; + int r, s_errno; + nwio_udpopt_t udpopt; + + udp_device= getenv("UDP_DEVICE"); + if (udp_device == NULL) + udp_device= UDP_DEVICE; + xdmcpSocket= open(udp_device, O_RDWR); + if (xdmcpSocket != -1) + { + udpopt.nwuo_flags= NWUO_COPY | NWUO_LP_SEL | NWUO_EN_LOC | + NWUO_DI_BROAD | NWUO_RP_ANY | NWUO_RA_ANY | NWUO_RWDATALL | + NWUO_DI_IPOPT; + r= ioctl(xdmcpSocket, NWIOSUDPOPT, &udpopt); + if (r == -1) + { + s_errno= errno; + close(xdmcpSocket); + xdmcpSocket= -1; + errno= s_errno; + } + ioctl(xdmcpSocket, NWIOGUDPOPT, &udpopt); + ErrorF("0x%x, 0x%x, 0x%x, 0x%x, 0x%x\n", + udpopt.nwuo_flags, + udpopt.nwuo_locport, + udpopt.nwuo_remport, + udpopt.nwuo_locaddr, + udpopt.nwuo_remaddr); + } + if (xdmcpSocket != -1) + { + fcntl(xdmcpSocket, F_SETFD, fcntl(xdmcpSocket, F_GETFD) | + FD_ASYNCHIO); + } + if (xdmcpSocket == -1) + #endif XdmcpWarning("UDP socket creation failed"); #ifdef SO_BROADCAST else if (setsockopt(xdmcpSocket, SOL_SOCKET, SO_BROADCAST, &soopts, *************** *** 1120,1126 **** --- 1384,1394 ---- ErrorF("Xserver: unknown host: %s\n", argv[i]); exit(1); } + #ifndef _MINIX if (hep->h_length == sizeof (struct in_addr)) + #else + if (hep->h_length == sizeof (ipaddr_t)) + #endif { bcopy(hep->h_addr, &ManagerAddress.sin_addr, hep->h_length); ManagerAddress.sin_family = AF_INET; diff -c mit/server/ddx/cfb/Imakefile:1.1.1.1 mit/server/ddx/cfb/Imakefile:2.2 *** mit/server/ddx/cfb/Imakefile:1.1.1.1 Sat Mar 12 00:35:32 1994 --- mit/server/ddx/cfb/Imakefile Sat Mar 12 00:35:32 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/server/ddx/cfb/Imakefile,v 2.2 1993/09/22 15:36:38 dawes Exp $ XCOMM $XConsortium: Imakefile,v 5.31 91/07/16 22:51:52 gildea Exp $ #include *************** *** 57,62 **** --- 58,69 ---- NormalLibraryTarget(cfb,$(OBJS)) LintLibraryTarget(cfb,$(SRCS)) + InstallLinkKitLibrary(cfb,$(LINKKITDIR)/lib) + InstallLinkKitNonExecFile(cfb.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(cfb8bit.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(cfbmskbits.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(cfbrrop.h,$(LINKKITDIR)/include) + NormalLintTarget($(SRCS)) #if HasSaberC *************** *** 90,96 **** ObjectFromSpecialSource(cfbseg,cfbline,-DPOLYSEGMENT) ObjectFromSpecialSource(cfbglrop8,cfbglblt8,-DGLYPHROP) ! SpecialObjectRule(cfbglblt8.o,$(NOTDEF),$(STIPPLEDEF)) ObjectFromSpecialSource(cfbfillarcC,cfbfillarc,-DRROP=GXcopy) ObjectFromSpecialSource(cfbfillarcG,cfbfillarc,-DRROP=GXset) --- 97,103 ---- ObjectFromSpecialSource(cfbseg,cfbline,-DPOLYSEGMENT) ObjectFromSpecialSource(cfbglrop8,cfbglblt8,-DGLYPHROP) ! SpecialObjectRule(cfbglblt8.o,cfbglblt8.c,$(STIPPLEDEF)) ObjectFromSpecialSource(cfbfillarcC,cfbfillarc,-DRROP=GXcopy) ObjectFromSpecialSource(cfbfillarcG,cfbfillarc,-DRROP=GXset) diff -c mit/server/ddx/cfb/cfbgetsp.c:1.1.1.1 mit/server/ddx/cfb/cfbgetsp.c:2.0 *** mit/server/ddx/cfb/cfbgetsp.c:1.1.1.1 Sat Mar 12 00:35:33 1994 --- mit/server/ddx/cfb/cfbgetsp.c Sat Mar 12 00:35:33 1994 *************** *** 22,27 **** --- 22,29 ---- ******************************************************************/ + /* $XFree86: mit/server/ddx/cfb/cfbgetsp.c,v 2.0 1993/07/22 12:46:11 dawes Exp $ */ + #include "X.h" #include "Xmd.h" #include "servermd.h" *************** *** 76,82 **** } ! cfbGetLongWidthAndPointer (pDrawable, widthSrc, psrcBase) #if PPW == 4 if ((nspans == 1) && (*pwidth == 1)) --- 78,84 ---- } ! cfbGetByteWidthAndPointer (pDrawable, widthSrc, (unsigned char *)psrcBase) #if PPW == 4 if ((nspans == 1) && (*pwidth == 1)) diff -c mit/server/ddx/cfb/cfbimage.c:1.1.1.1 mit/server/ddx/cfb/cfbimage.c:2.0 *** mit/server/ddx/cfb/cfbimage.c:1.1.1.1 Sat Mar 12 00:35:33 1994 --- mit/server/ddx/cfb/cfbimage.c Sat Mar 12 00:35:33 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/cfb/cfbimage.c,v 2.0 1993/07/24 07:13:25 dawes Exp $ */ /* $XConsortium: cfbimage.c,v 1.7 91/07/18 23:36:48 keith Exp $ */ #include "X.h" *************** *** 61,66 **** --- 62,69 ---- FakePixmap.drawable.y = 0; FakePixmap.drawable.width = w+leftPad; FakePixmap.drawable.height = h; + FakePixmap.slot = -1; + FakePixmap.cacheId = 0; FakePixmap.devKind = PixmapBytePad(FakePixmap.drawable.width, depth); FakePixmap.refcnt = 1; FakePixmap.devPrivate.ptr = (pointer)pImage; *************** *** 140,145 **** --- 143,150 ---- FakePixmap.drawable.y = 0; FakePixmap.drawable.width = w; FakePixmap.drawable.height = h; + FakePixmap.slot = -1; + FakePixmap.cacheId = 0; FakePixmap.devKind = PixmapBytePad(w, pDrawable->depth); FakePixmap.refcnt = 1; FakePixmap.devPrivate.ptr = (pointer)pdstLine; *************** *** 169,174 **** --- 174,181 ---- FakePixmap.drawable.y = 0; FakePixmap.drawable.width = w; FakePixmap.drawable.height = h; + FakePixmap.slot = -1; + FakePixmap.cacheId = 0; FakePixmap.devKind = PixmapBytePad(w, 1); FakePixmap.refcnt = 1; FakePixmap.devPrivate.ptr = (pointer)pdstLine; diff -c mit/server/ddx/cfb/cfbline.c:1.1.1.1 mit/server/ddx/cfb/cfbline.c:2.1 *** mit/server/ddx/cfb/cfbline.c:1.1.1.1 Sat Mar 12 00:35:34 1994 --- mit/server/ddx/cfb/cfbline.c Sat Mar 12 00:35:34 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/cfb/cfbline.c,v 2.1 1993/09/21 16:09:15 dawes Exp $ */ /* $XConsortium: cfbline.c,v 1.19 91/08/13 18:48:42 keith Exp $ */ #include "X.h" *************** *** 133,138 **** --- 134,140 ---- int axis; /* major axis */ /* a bunch of temporaries */ + int fix; int tmp; register int y1, y2; register int x1, x2; *************** *** 310,319 **** --- 312,323 ---- else /* sloped line */ { signdx = 1; + fix = -1; if ((adx = x2 - x1) < 0) { adx = -adx; signdx = -1; + fix = 0; } signdy = 1; if ((ady = y2 - y1) < 0) *************** *** 361,367 **** cfbBresS (alu, and, xor, addrl, nlwidth, signdx, signdy, axis, x1, y1, ! e, e1, e2, len); break; } else if (oc1 & oc2) --- 365,371 ---- cfbBresS (alu, and, xor, addrl, nlwidth, signdx, signdy, axis, x1, y1, ! e + fix, e1, e2, len); break; } else if (oc1 & oc2) *************** *** 430,436 **** (alu, and, xor, addrl, nlwidth, signdx, signdy, axis, pt1Copy.x, pt1Copy.y, ! err, e1, e2, len); } } pbox++; --- 434,440 ---- (alu, and, xor, addrl, nlwidth, signdx, signdy, axis, pt1Copy.x, pt1Copy.y, ! err + fix, e1, e2, len); } } pbox++; diff -c mit/server/ddx/cfb/cfbpixmap.c:1.1.1.1 mit/server/ddx/cfb/cfbpixmap.c:2.2 *** mit/server/ddx/cfb/cfbpixmap.c:1.1.1.1 Sat Mar 12 00:35:35 1994 --- mit/server/ddx/cfb/cfbpixmap.c Sat Mar 12 00:35:35 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/ddx/cfb/cfbpixmap.c,v 2.2 1993/09/09 05:59:44 dawes Exp $ */ /* $XConsortium: cfbpixmap.c,v 5.7 91/07/18 23:36:46 keith Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, *************** *** 35,40 **** --- 36,42 ---- #include "cfb.h" #include "mi.h" + #include "micache.h" extern void mfbXRotatePixmap(), mfbYRotatePixmap(); *************** *** 140,145 **** --- 142,149 ---- pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; + pPixmap->slot = -1; + pPixmap->cacheId = 0; pPixmap->devKind = size; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1); *************** *** 152,157 **** --- 156,162 ---- { if(--pPixmap->refcnt) return TRUE; + (*miCacheFreeSlot)(pPixmap); xfree(pPixmap); return TRUE; } *************** *** 170,175 **** --- 175,182 ---- pDst->drawable = pSrc->drawable; pDst->drawable.id = 0; pDst->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pDst->slot = -1; + pDst->cacheId = 0; pDst->devKind = pSrc->devKind; pDst->refcnt = 1; pDst->devPrivate.ptr = (pointer)(pDst + 1); *************** *** 402,407 **** --- 409,416 ---- pdstPix->drawable.depth = psrcPix->drawable.depth; pdstPix->drawable.bitsPerPixel = psrcPix->drawable.bitsPerPixel; pdstPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pdstPix->slot = -1; + pdstPix->cacheId = 0; } else { diff -c mit/server/ddx/cfb/cfbrrop.h:1.1.1.1 mit/server/ddx/cfb/cfbrrop.h:2.0 *** mit/server/ddx/cfb/cfbrrop.h:1.1.1.1 Sat Mar 12 00:35:36 1994 --- mit/server/ddx/cfb/cfbrrop.h Sat Mar 12 00:35:36 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/server/ddx/cfb/cfbrrop.h,v 2.0 1993/12/10 14:33:58 dawes Exp $ * $XConsortium: cfbrrop.h,v 1.6 91/04/10 11:42:06 keith Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 128,134 **** } #endif ! #if __STDC__ && !defined(UNIXCPP) #define RROP_NAME_CAT(prefix,suffix) prefix##suffix #else #define RROP_NAME_CAT(prefix,suffix) prefix/**/suffix --- 129,135 ---- } #endif ! #if (__STDC__ && !defined(UNIXCPP)) || (defined (SOLX86) && defined (__STDC__) && !defined (__GNUC__)) #define RROP_NAME_CAT(prefix,suffix) prefix##suffix #else #define RROP_NAME_CAT(prefix,suffix) prefix/**/suffix diff -c mit/server/ddx/mfb/Imakefile:1.1.1.1 mit/server/ddx/mfb/Imakefile:2.1 *** mit/server/ddx/mfb/Imakefile:1.1.1.1 Sat Mar 12 00:35:40 1994 --- mit/server/ddx/mfb/Imakefile Sat Mar 12 00:35:40 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/server/ddx/mfb/Imakefile,v 2.1 1993/09/22 15:41:04 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.32 91/07/16 22:51:36 gildea Exp $ #include *************** *** 37,42 **** --- 38,50 ---- NormalLibraryTarget(mfb,$(OBJS)) LintLibraryTarget(mfb,$(SRCS1)) NormalLintTarget($(LINTDEFS) $(SRCS1)) + + InstallLinkKitLibrary(mfb,$(LINKKITDIR)/lib) + InstallLinkKitNonExecFile(fastblt.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(mfb.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(mfbcustom.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(mfbmap.h,$(LINKKITDIR)/include) + InstallLinkKitNonExecFile(mergerop.h,$(LINKKITDIR)/include) ObjectFromSpecialSource(mfbseg,mfbline,-DPOLYSEGMENT) diff -c mit/server/ddx/mfb/maskbits.c:1.1.1.1 mit/server/ddx/mfb/maskbits.c:1.3 *** mit/server/ddx/mfb/maskbits.c:1.1.1.1 Sat Mar 12 00:35:41 1994 --- mit/server/ddx/mfb/maskbits.c Sat Mar 12 00:35:41 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/ddx/mfb/maskbits.c,v 1.3 1993/03/27 09:00:28 dawes Exp $ */ /* $XConsortium: maskbits.c,v 1.11 91/07/09 17:05:36 rws Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** *************** *** 23,28 **** --- 24,30 ---- SOFTWARE. ******************************************************************/ + #include "mfb.h" #include "maskbits.h" #include "servermd.h" diff -c mit/server/ddx/mfb/maskbits.h:1.1.1.1 mit/server/ddx/mfb/maskbits.h:2.0 *** mit/server/ddx/mfb/maskbits.h:1.1.1.1 Sat Mar 12 00:35:42 1994 --- mit/server/ddx/mfb/maskbits.h Sat Mar 12 00:35:42 1994 *************** *** 22,27 **** --- 22,28 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/maskbits.h,v 2.0 1993/11/24 12:32:34 dawes Exp $ */ /* $XConsortium: maskbits.h,v 1.26 91/07/09 19:44:24 keith Exp $ */ #include "X.h" #include "Xmd.h" *************** *** 200,205 **** --- 201,207 ---- #if (BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER) #define LONG2CHARS(x) (x) + #define LONG2CHARS_F(x) (x) #else /* * the unsigned case below is for compilers like *************** *** 209,222 **** | ( ( ( x ) & 0x0000FF00 ) << 0x08 ) \ | ( ( ( x ) & 0x00FF0000 ) >> 0x08 ) \ | ( ( ( x ) & (unsigned long)0xFF000000 ) >> 0x18 ) ) #endif #ifdef STRICT_ANSI_SHIFT ! #define SHL(x,y) ((y) >= 32 ? 0 : LONG2CHARS(LONG2CHARS(x) << (y))) ! #define SHR(x,y) ((y) >= 32 ? 0 : LONG2CHARS(LONG2CHARS(x) >> (y))) #else ! #define SHL(x,y) LONG2CHARS(LONG2CHARS(x) << (y)) ! #define SHR(x,y) LONG2CHARS(LONG2CHARS(x) >> (y)) #endif #if (BITMAP_BIT_ORDER == MSBFirst) /* pc/rt, 680x0 */ --- 211,234 ---- | ( ( ( x ) & 0x0000FF00 ) << 0x08 ) \ | ( ( ( x ) & 0x00FF0000 ) >> 0x08 ) \ | ( ( ( x ) & (unsigned long)0xFF000000 ) >> 0x18 ) ) + #if defined(__GNUC__) && defined(i386) + #define LONG2CHARS_F(x) \ + ({ unsigned long __x = (x); \ + __asm ("xchgb %%al,%%ah; ror $16,%%eax; xchgb %%al,%%ah" \ + : "=a" (__x) : "0" (__x)); \ + __x; \ + }) + #else + #define LONG2CHARS_F(x) LONG2CHARS(x) + #endif /* not __GNUC__ && i386 */ #endif #ifdef STRICT_ANSI_SHIFT ! #define SHL(x,y) ((y) >= 32 ? 0 : LONG2CHARS_F(LONG2CHARS_F(x) << (y))) ! #define SHR(x,y) ((y) >= 32 ? 0 : LONG2CHARS_F(LONG2CHARS_F(x) >> (y))) #else ! #define SHL(x,y) LONG2CHARS_F(LONG2CHARS_F(x) << (y)) ! #define SHR(x,y) LONG2CHARS_F(LONG2CHARS_F(x) >> (y)) #endif #if (BITMAP_BIT_ORDER == MSBFirst) /* pc/rt, 680x0 */ *************** *** 270,281 **** #define FASTGETBITS(psrc,x,w,dst) \ __asm ("extzv %1,%2,%3,%0" \ : "=g" (dst) \ ! : "g" (x), "g" (w), "m" (*(char *)(psrc))) #define getbits(psrc,x,w,dst) FASTGETBITS(psrc,x,w,dst) #define FASTPUTBITS(src, x, w, pdst) \ __asm ("insv %3,%1,%2,%0" \ ! : "=m" (*(char *)(pdst)) \ : "g" (x), "g" (w), "g" (src)) #define putbits(src, x, w, pdst) FASTPUTBITS(src, x, w, pdst) #endif /* vax */ --- 282,293 ---- #define FASTGETBITS(psrc,x,w,dst) \ __asm ("extzv %1,%2,%3,%0" \ : "=g" (dst) \ ! : "g" (x), "g" (w), "m" (*(char *)MAPR(psrc))) #define getbits(psrc,x,w,dst) FASTGETBITS(psrc,x,w,dst) #define FASTPUTBITS(src, x, w, pdst) \ __asm ("insv %3,%1,%2,%0" \ ! : "=m" (*(char *)MAPW(pdst)) \ : "g" (x), "g" (w), "g" (src)) #define putbits(src, x, w, pdst) FASTPUTBITS(src, x, w, pdst) #endif /* vax */ *************** *** 282,288 **** #ifdef mc68020 #define FASTGETBITS(psrc, x, w, dst) \ __asm ("bfextu %3{%1:%2},%0" \ ! : "=d" (dst) : "di" (x), "di" (w), "o" (*(char *)(psrc))) #define getbits(psrc,x,w,dst) \ { \ --- 294,300 ---- #ifdef mc68020 #define FASTGETBITS(psrc, x, w, dst) \ __asm ("bfextu %3{%1:%2},%0" \ ! : "=d" (dst) : "di" (x), "di" (w), "o" (*(char *)MAPR(psrc))) #define getbits(psrc,x,w,dst) \ { \ *************** *** 292,299 **** #define FASTPUTBITS(src, x, w, pdst) \ __asm ("bfins %3,%0{%1:%2}" \ ! : "=o" (*(char *)(pdst)) \ ! : "di" (x), "di" (w), "d" (src), "0" (*(char *) (pdst))) #define putbits(src, x, w, pdst) FASTPUTBITS(SHR((src),32-(w)), x, w, pdst) --- 304,311 ---- #define FASTPUTBITS(src, x, w, pdst) \ __asm ("bfins %3,%0{%1:%2}" \ ! : "=o" (*(char *)MAPW(pdst)) \ ! : "di" (x), "di" (w), "d" (src), "0" (*(char *)MAPW(pdst))) #define putbits(src, x, w, pdst) FASTPUTBITS(SHR((src),32-(w)), x, w, pdst) *************** *** 330,342 **** { \ register int tmpmask; \ maskpartialbits((x), (w), tmpmask); \ ! *(pdst) = (*(pdst) & ~tmpmask) | \ (SCRRIGHT(src, x) & tmpmask); \ } \ else \ { \ ! *(pdst) = (*(pdst) & endtab[x]) | (SCRRIGHT((src), x)); \ ! (pdst)[1] = ((pdst)[1] & starttab[n]) | \ (SCRLEFT(src, 32-(x)) & endtab[n]); \ } \ } --- 342,354 ---- { \ register int tmpmask; \ maskpartialbits((x), (w), tmpmask); \ ! *MAPW(pdst) = ((*MAPR(pdst)) & ~tmpmask) | \ (SCRRIGHT(src, x) & tmpmask); \ } \ else \ { \ ! *MAPW(pdst) = ((*MAPR(pdst)) & endtab[x]) | (SCRRIGHT((src), x)); \ ! *MAPW(&((pdst)[1])) = ((*MAPR(&((pdst)[1]))) & starttab[n]) | \ (SCRLEFT(src, 32-(x)) & endtab[n]); \ } \ } *************** *** 359,367 **** #ifndef getbits #define getbits(psrc, x, w, dst) \ { \ ! dst = SCRLEFT(*(psrc), (x)); \ if ( ((x) + (w)) > 32) \ ! dst |= (SCRRIGHT(*((psrc)+1), 32-(x))); \ } #endif --- 371,379 ---- #ifndef getbits #define getbits(psrc, x, w, dst) \ { \ ! dst = SCRLEFT(*MAPR(psrc), (x)); \ if ( ((x) + (w)) > 32) \ ! dst |= (SCRRIGHT(*MAPR((psrc)+1), 32-(x))); \ } #endif *************** *** 374,380 **** register int n = (x)+(w)-32; \ \ t1 = SCRRIGHT((src), (x)); \ ! DoRop(t2, rop, t1, *(pdst)); \ \ if (n <= 0) \ { \ --- 386,392 ---- register int n = (x)+(w)-32; \ \ t1 = SCRRIGHT((src), (x)); \ ! DoRop(t2, rop, t1, *MAPR(pdst)); \ \ if (n <= 0) \ { \ *************** *** 381,395 **** register int tmpmask; \ \ maskpartialbits((x), (w), tmpmask); \ ! *(pdst) = (*(pdst) & ~tmpmask) | (t2 & tmpmask); \ } \ else \ { \ int m = 32-(x); \ ! *(pdst) = (*(pdst) & endtab[x]) | (t2 & starttab[x]); \ t1 = SCRLEFT((src), m); \ ! DoRop(t2, rop, t1, (pdst)[1]); \ ! (pdst)[1] = ((pdst)[1] & starttab[n]) | (t2 & endtab[n]); \ } \ } --- 393,409 ---- register int tmpmask; \ \ maskpartialbits((x), (w), tmpmask); \ ! *MAPW(pdst) = ((*MAPR(pdst)) & ~tmpmask) | (t2 & tmpmask); \ } \ else \ { \ int m = 32-(x); \ ! *MAPW(pdst) = ((*MAPR(pdst)) & endtab[x]) | (t2 & starttab[x]); \ t1 = SCRLEFT((src), m); \ ! CHECKRWONEXT(pdst); \ ! DoRop(t2, rop, t1, *MAPR(&((pdst)[1]))); \ ! *MAPW(&((pdst)[1])) = ((*MAPR(&((pdst)[1]))) & starttab[n]) | (t2 & endtab[n]); \ ! CHECKRWU(pdst); \ } \ } *************** *** 448,454 **** register int n = (x)+(w)-32; \ \ t1 = SCRRIGHT((src), (x)); \ ! t2 = DoRRop(rop, t1, *(pdst)); \ \ if (n <= 0) \ { \ --- 462,468 ---- register int n = (x)+(w)-32; \ \ t1 = SCRRIGHT((src), (x)); \ ! t2 = DoRRop(rop, t1, *MAPR(pdst)); \ \ if (n <= 0) \ { \ *************** *** 455,475 **** register int tmpmask; \ \ maskpartialbits((x), (w), tmpmask); \ ! *(pdst) = (*(pdst) & ~tmpmask) | (t2 & tmpmask); \ } \ else \ { \ int m = 32-(x); \ ! *(pdst) = (*(pdst) & endtab[x]) | (t2 & starttab[x]); \ t1 = SCRLEFT((src), m); \ ! t2 = DoRRop(rop, t1, (pdst)[1]); \ ! (pdst)[1] = ((pdst)[1] & starttab[n]) | (t2 & endtab[n]); \ } \ } #endif #if GETLEFTBITS_ALIGNMENT == 1 ! #define getleftbits(psrc, w, dst) dst = *((unsigned int *) psrc) #endif /* GETLEFTBITS_ALIGNMENT == 1 */ #if GETLEFTBITS_ALIGNMENT == 2 --- 469,491 ---- register int tmpmask; \ \ maskpartialbits((x), (w), tmpmask); \ ! *MAPW(pdst) = ((*MAPR(pdst)) & ~tmpmask) | (t2 & tmpmask); \ } \ else \ { \ int m = 32-(x); \ ! *MAPW(pdst) = ((*MAPR(pdst)) & endtab[x]) | (t2 & starttab[x]); \ t1 = SCRLEFT((src), m); \ ! CHECKRWONEXT(pdst); \ ! t2 = DoRRop(rop, t1, *MAPR(&((pdst)[1]))); \ ! *MAPW(&((pdst)[1])) = ((*MAPR(&((pdst)[1]))) & starttab[n]) | (t2 & endtab[n]); \ ! CHECKRWU(pdst); \ } \ } #endif #if GETLEFTBITS_ALIGNMENT == 1 ! #define getleftbits(psrc, w, dst) dst = *((unsigned int *)MAPR(psrc)) #endif /* GETLEFTBITS_ALIGNMENT == 1 */ #if GETLEFTBITS_ALIGNMENT == 2 *************** *** 587,597 **** register int _flag = 32 - (sbindex); \ register unsigned int _src; \ \ ! _src = SCRLEFT (*(psrc), (sbindex)); \ if ((width) > _flag) \ ! _src |= SCRRIGHT (*((psrc) + 1), _flag); \ \ ! *(pdst) = (*(pdst) & starttab[(width)]) | (_src & endtab[(width)]); \ } --- 603,613 ---- register int _flag = 32 - (sbindex); \ register unsigned int _src; \ \ ! _src = SCRLEFT (*MAPR(psrc), (sbindex)); \ if ((width) > _flag) \ ! _src |= SCRRIGHT (*MAPR((psrc) + 1), _flag); \ \ ! *MAPW(pdst) = ((*MAPR(pdst)) & starttab[(width)]) | (_src & endtab[(width)]); \ } *************** *** 600,611 **** register int _flag = 32 - (sbindex); \ register unsigned int _src; \ \ ! _src = SCRLEFT (*(psrc), (sbindex)); \ if ((width) > _flag) \ ! _src |= SCRRIGHT (*((psrc) + 1), _flag); \ ! DoRop(_src, rop, _src, *(pdst)); \ \ ! *(pdst) = (*(pdst) & starttab[(width)]) | (_src & endtab[(width)]); \ } #define getandputrrop0(psrc, sbindex, width, pdst, rop) \ --- 616,627 ---- register int _flag = 32 - (sbindex); \ register unsigned int _src; \ \ ! _src = SCRLEFT (*MAPR(psrc), (sbindex)); \ if ((width) > _flag) \ ! _src |= SCRRIGHT (*MAPR((psrc) + 1), _flag); \ ! DoRop(_src, rop, _src, *MAPR(pdst)); \ \ ! *MAPW(pdst) = ((*MAPR(pdst)) & starttab[(width)]) | (_src & endtab[(width)]); \ } #define getandputrrop0(psrc, sbindex, width, pdst, rop) \ *************** *** 613,624 **** int _flag = 32 - (sbindex); \ register unsigned int _src; \ \ ! _src = SCRLEFT (*(psrc), (sbindex)); \ if ((width) > _flag) \ ! _src |= SCRRIGHT (*((psrc) + 1), _flag); \ ! _src = DoRRop(rop, _src, *(pdst)); \ \ ! *(pdst) = (*(pdst) & starttab[(width)]) | (_src & endtab[(width)]); \ } #endif /* FASTGETBITS && FASTPUTBITS */ --- 629,640 ---- int _flag = 32 - (sbindex); \ register unsigned int _src; \ \ ! _src = SCRLEFT (*MAPR(psrc), (sbindex)); \ if ((width) > _flag) \ ! _src |= SCRRIGHT (*MAPR((psrc) + 1), _flag); \ ! _src = DoRRop(rop, _src, *MAPR(pdst)); \ \ ! *MAPW(pdst) = ((*MAPR(pdst)) & starttab[(width)]) | (_src & endtab[(width)]); \ } #endif /* FASTGETBITS && FASTPUTBITS */ diff -c mit/server/ddx/mfb/mergerop.h:1.1.1.1 mit/server/ddx/mfb/mergerop.h:2.0 *** mit/server/ddx/mfb/mergerop.h:1.1.1.1 Sat Mar 12 00:35:43 1994 --- mit/server/ddx/mfb/mergerop.h Sat Mar 12 00:35:43 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/server/ddx/mfb/mergerop.h,v 2.0 1993/12/10 14:34:07 dawes Exp $ * $XConsortium: mergerop.h,v 1.7 91/07/18 22:54:58 keith Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 176,182 **** #define MROP_PREBUILT_MASK(src,dst,mask) MROP_MASK(src,dst,mask) #endif ! #if __STDC__ && !defined(UNIXCPP) #define MROP_NAME_CAT(prefix,suffix) prefix##suffix #else #define MROP_NAME_CAT(prefix,suffix) prefix/**/suffix --- 177,183 ---- #define MROP_PREBUILT_MASK(src,dst,mask) MROP_MASK(src,dst,mask) #endif ! #if (__STDC__ && !defined(UNIXCPP)) || (defined (SOLX86) && defined (__STDC__) && !defined (__GNUC__)) #define MROP_NAME_CAT(prefix,suffix) prefix##suffix #else #define MROP_NAME_CAT(prefix,suffix) prefix/**/suffix diff -c mit/server/ddx/mfb/mfb.h:1.1.1.1 mit/server/ddx/mfb/mfb.h:1.3 *** mit/server/ddx/mfb/mfb.h:1.1.1.1 Sat Mar 12 00:35:43 1994 --- mit/server/ddx/mfb/mfb.h Sat Mar 12 00:35:43 1994 *************** *** 22,31 **** --- 22,35 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfb.h,v 1.3 1993/03/27 09:00:33 dawes Exp $ */ /* $XConsortium: mfb.h,v 5.15 91/04/10 11:43:42 keith Exp $ */ /* Monochrome Frame Buffer definitions written by drewry, september 1986 */ + #include "misc.h" + #include "mfbcustom.h" + #include "mfbmap.h" #include "pixmap.h" #include "region.h" #include "gc.h" diff -c mit/server/ddx/mfb/mfbblt.c:1.1.1.1 mit/server/ddx/mfb/mfbblt.c:1.7 *** mit/server/ddx/mfb/mfbblt.c:1.1.1.1 Sat Mar 12 00:35:44 1994 --- mit/server/ddx/mfb/mfbblt.c Sat Mar 12 00:35:44 1994 *************** *** 18,25 **** --- 18,27 ---- Author: Keith Packard */ + /* $XFree86: mit/server/ddx/mfb/mfbblt.c,v 1.7 1993/03/27 09:00:35 dawes Exp $ */ /* $XConsortium: mfbblt.c,v 1.5 91/01/27 13:02:19 keith Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xmd.h" #include "Xproto.h" *************** *** 109,114 **** --- 111,118 ---- widthDst = (int)(((PixmapPtr)pDst)->devKind) >> 2; } + BANK_FLAG_BOTH(psrcBase, pdstBase) + /* XXX we have to err on the side of safety when both are windows, * because we don't know if IncludeInferiors is being used. */ *************** *** 260,272 **** { psrc = psrcLine; pdst = pdstLine; pdstLine += widthDst; psrcLine += widthSrc; if (startmask) { ! *pdst = MROP_MASK(*psrc, *pdst, startmask); ! psrc++; ! pdst++; } nl = nlMiddle; --- 264,281 ---- { psrc = psrcLine; pdst = pdstLine; + SETW(pdst); + SETR(psrc); pdstLine += widthDst; psrcLine += widthSrc; if (startmask) { ! bits = *MAPR(psrc); ! PUSHR(); ! *MAPW(pdst) = MROP_MASK(bits, *MAPR(pdst), startmask); ! pdst++; CHECKWO(pdst); ! POPR(); ! psrc++; CHECKRO(psrc); } nl = nlMiddle; *************** *** 276,283 **** psrc += nl & (UNROLL-1); pdst += nl & (UNROLL-1); ! #define BodyOdd(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); ! #define BodyEven(n) pdst[-n] = MROP_SOLID (psrc[-n], pdst[-n]); #define LoopReset \ pdst += UNROLL; \ --- 285,292 ---- psrc += nl & (UNROLL-1); pdst += nl & (UNROLL-1); ! #define BodyOdd(n) *MAPW(&(pdst[-n])) = MROP_SOLID (*MAPR(&(psrc[-n])), *MAPR(&(pdst[-n]))); ! #define BodyEven(n) *MAPW(&(pdst[-n])) = MROP_SOLID (*MAPR(&(psrc[-n])), *MAPR(&(pdst[-n]))); #define LoopReset \ pdst += UNROLL; \ *************** *** 285,291 **** #else ! #define BodyOdd(n) *pdst = MROP_SOLID (*psrc, *pdst); pdst++; psrc++; #define BodyEven(n) BodyOdd(n) #define LoopReset ; --- 294,300 ---- #else ! #define BodyOdd(n) *MAPW(pdst) = MROP_SOLID (*MAPR(psrc), *MAPR(pdst)); pdst++; psrc++ #define BodyEven(n) BodyOdd(n) #define LoopReset ; *************** *** 306,328 **** while ((nl -= 6) >= 0) { asm ("moveml %1+,#0x0c0f;moveml#0x0c0f,%0" ! : "=m" (*(char *)pdst) ! : "m" (*(char *)psrc) : "d0", "d1", "d2", "d3", "a2", "a3"); pdst += 6; } nl += 6; ! while (nl--) ! *pdst++ = *psrc++; #endif DuffL(nl, label1, ! *pdst = MROP_SOLID (*psrc, *pdst); ! pdst++; psrc++;) #endif if (endmask) ! *pdst = MROP_MASK(*psrc, *pdst, endmask); } } #ifndef DO_UNALIGNED_BITBLT --- 315,347 ---- while ((nl -= 6) >= 0) { asm ("moveml %1+,#0x0c0f;moveml#0x0c0f,%0" ! : "=m" (*(char *)MAPW(pdst)) ! : "m" (*(char *)MAPR(psrc)) : "d0", "d1", "d2", "d3", "a2", "a3"); pdst += 6; } nl += 6; ! while (nl--) { ! *MAPW(pdst) = *MAPR(psrc); pdst++; psrc++; ! } #endif DuffL(nl, label1, ! bits = *MAPR(psrc); ! PUSHR(); ! *MAPW(pdst) = MROP_SOLID (bits, *MAPR(pdst)); ! pdst++; CHECKWO(pdst); ! POPR(); ! psrc++; CHECKRO(psrc)) #endif if (endmask) ! { ! bits = *MAPR(psrc); ! PUSHR(); ! *MAPW(pdst) = MROP_MASK(bits, *MAPR(pdst), endmask); ! POPR(); ! } } } #ifndef DO_UNALIGNED_BITBLT *************** *** 342,359 **** { psrc = psrcLine; pdst = pdstLine; pdstLine += widthDst; psrcLine += widthSrc; bits = 0; ! if (xoffSrc > xoffDst) ! bits = *psrc++; if (startmask) { bits1 = BitLeft(bits,leftShift); ! bits = *psrc++; bits1 |= BitRight(bits,rightShift); ! *pdst = MROP_MASK(bits1, *pdst, startmask); ! pdst++; } nl = nlMiddle; --- 361,383 ---- { psrc = psrcLine; pdst = pdstLine; + SETW(pdst); + SETR(psrc); pdstLine += widthDst; psrcLine += widthSrc; bits = 0; ! if (xoffSrc > xoffDst) { ! bits = *MAPR(psrc); psrc++; CHECKRO(psrc); ! } if (startmask) { bits1 = BitLeft(bits,leftShift); ! bits = *MAPR(psrc); psrc++; CHECKRO(psrc); bits1 |= BitRight(bits,rightShift); ! PUSHR(); ! *MAPW(pdst) = MROP_MASK(bits1, *MAPR(pdst), startmask); ! pdst++; CHECKWO(pdst); ! POPR(); } nl = nlMiddle; *************** *** 366,377 **** pdst += nl & (UNROLL-1); #define BodyOdd(n) \ ! bits = psrc[-n]; \ ! pdst[-n] = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), pdst[-n]); #define BodyEven(n) \ ! bits1 = psrc[-n]; \ ! pdst[-n] = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), pdst[-n]); #define LoopReset \ pdst += UNROLL; \ --- 390,401 ---- pdst += nl & (UNROLL-1); #define BodyOdd(n) \ ! bits = *MAPR(&(psrc[-n])); \ ! *MAPW(&(pdst[-n])) = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *MAPR(&(pdst[-n]))); #define BodyEven(n) \ ! bits1 = *MAPR(&(psrc[-n])); \ ! *MAPW(&(pdst[-n])) = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *MAPR(&(pdst[-n]))); #define LoopReset \ pdst += UNROLL; \ *************** *** 380,392 **** #else #define BodyOdd(n) \ ! bits = *psrc++; \ ! *pdst = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *pdst); \ pdst++; #define BodyEven(n) \ ! bits1 = *psrc++; \ ! *pdst = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *pdst); \ pdst++; #define LoopReset ; --- 404,416 ---- #else #define BodyOdd(n) \ ! bits = *MAPR(psrc); psrc++; \ ! *MAPW(pdst) = MROP_SOLID(BitLeft(bits1, leftShift) | BitRight(bits, rightShift), *MAPR(pdst)); \ pdst++; #define BodyEven(n) \ ! bits1 = *MAPR(psrc); psrc++; \ ! *MAPW(pdst) = MROP_SOLID(BitLeft(bits, leftShift) | BitRight(bits1, rightShift), *MAPR(pdst)); \ pdst++; #define LoopReset ; *************** *** 402,410 **** #else DuffL (nl,label2, bits1 = BitLeft(bits, leftShift); ! bits = *psrc++; ! *pdst = MROP_SOLID (bits1 | BitRight(bits, rightShift), *pdst); ! pdst++; ) #endif --- 426,437 ---- #else DuffL (nl,label2, bits1 = BitLeft(bits, leftShift); ! bits = *MAPR(psrc); psrc++; CHECKRO(psrc); ! PUSHR(); ! *MAPW(pdst) = MROP_SOLID (bits1 | BitRight(bits, ! rightShift), *MAPR(pdst)); ! pdst++; CHECKWO(pdst); ! POPR(); ) #endif *************** *** 413,422 **** bits1 = BitLeft(bits, leftShift); if (BitLeft(endmask, rightShift)) { ! bits = *psrc; bits1 |= BitRight(bits, rightShift); } ! *pdst = MROP_MASK (bits1, *pdst, endmask); } } } --- 440,451 ---- bits1 = BitLeft(bits, leftShift); if (BitLeft(endmask, rightShift)) { ! bits = *MAPR(psrc); bits1 |= BitRight(bits, rightShift); } ! PUSHR(); ! *MAPW(pdst) = MROP_MASK (bits1, *MAPR(pdst), endmask); ! POPR(); } } } *************** *** 440,452 **** { psrc = psrcLine; pdst = pdstLine; pdstLine += widthDst; psrcLine += widthSrc; if (endmask) { ! pdst--; ! psrc--; ! *pdst = MROP_MASK (*psrc, *pdst, endmask); } nl = nlMiddle; --- 469,486 ---- { psrc = psrcLine; pdst = pdstLine; + SETW(pdst); + SETR(psrc); pdstLine += widthDst; psrcLine += widthSrc; if (endmask) { ! psrc--; CHECKRU(psrc); ! bits = *MAPR(psrc); ! PUSHR(); ! pdst--; CHECKRWU(pdst); ! *MAPW(pdst) = MROP_MASK (bits, *MAPR(pdst), endmask); ! POPR(); } nl = nlMiddle; *************** *** 455,461 **** psrc -= nl & (UNROLL - 1); pdst -= nl & (UNROLL - 1); ! #define BodyOdd(n) pdst[n-1] = MROP_SOLID (psrc[n-1], pdst[n-1]); #define BodyEven(n) BodyOdd(n) --- 489,495 ---- psrc -= nl & (UNROLL - 1); pdst -= nl & (UNROLL - 1); ! #define BodyOdd(n) *MAPW(&(pdst[n-1])) = MROP_SOLID (*MAPR(&(psrc[n-1])), *MAPR(&(pdst[n-1]))); #define BodyEven(n) BodyOdd(n) *************** *** 465,471 **** #else ! #define BodyOdd(n) --pdst; --psrc; *pdst = MROP_SOLID(*psrc, *pdst); #define BodyEven(n) BodyOdd(n) #define LoopReset ; --- 499,505 ---- #else ! #define BodyOdd(n) --pdst; --psrc; *MAPW(pdst) = MROP_SOLID(*MAPR(psrc), *MAPR(pdst)); #define BodyEven(n) BodyOdd(n) #define LoopReset ; *************** *** 478,491 **** #else DuffL(nl,label3, ! --pdst; --psrc; *pdst = MROP_SOLID (*psrc, *pdst);) #endif if (startmask) { ! --pdst; ! --psrc; ! *pdst = MROP_MASK(*psrc, *pdst, startmask); } } } --- 512,533 ---- #else DuffL(nl,label3, ! --psrc; CHECKRU(psrc); ! bits = *MAPR(psrc); ! PUSHR(); ! --pdst; CHECKRWU(pdst); ! *MAPW(pdst) = MROP_SOLID (bits, *MAPR(pdst)); ! POPR();) #endif if (startmask) { ! --psrc; CHECKRU(psrc); ! bits = *MAPR(psrc); ! PUSHR(); ! --pdst; CHECKRWU(pdst); ! *MAPW(pdst) = MROP_MASK(bits, *MAPR(pdst), startmask); ! POPR(); } } } *************** *** 506,523 **** { psrc = psrcLine; pdst = pdstLine; pdstLine += widthDst; psrcLine += widthSrc; bits = 0; ! if (xoffDst > xoffSrc) ! bits = *--psrc; if (endmask) { bits1 = BitRight(bits, rightShift); ! bits = *--psrc; bits1 |= BitLeft(bits, leftShift); ! pdst--; ! *pdst = MROP_MASK(bits1, *pdst, endmask); } nl = nlMiddle; --- 548,570 ---- { psrc = psrcLine; pdst = pdstLine; + SETW(pdst); + SETR(psrc); pdstLine += widthDst; psrcLine += widthSrc; bits = 0; ! if (xoffDst > xoffSrc) { ! --psrc; CHECKRU(psrc); bits = *MAPR(psrc); ! } if (endmask) { bits1 = BitRight(bits, rightShift); ! -- psrc; CHECKRU(psrc); bits = *MAPR(psrc); bits1 |= BitLeft(bits, leftShift); ! PUSHR(); ! pdst--; CHECKRWU(pdst); ! *MAPW(pdst) = MROP_MASK(bits1, *MAPR(pdst), endmask); ! POPR(); } nl = nlMiddle; *************** *** 528,539 **** pdst -= nl & (UNROLL - 1); #define BodyOdd(n) \ ! bits = psrc[n-1]; \ ! pdst[n-1] = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),pdst[n-1]); #define BodyEven(n) \ ! bits1 = psrc[n-1]; \ ! pdst[n-1] = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),pdst[n-1]); #define LoopReset \ pdst -= UNROLL; \ --- 575,586 ---- pdst -= nl & (UNROLL - 1); #define BodyOdd(n) \ ! bits = *MAPR(&(psrc[n-1])); \ ! *MAPW(&(pdst[n-1])) = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),*MAPR(&(pdst[n-1]))); #define BodyEven(n) \ ! bits1 = *MAPR(&(psrc[n-1])); \ ! *MAPW(&(pdst[n-1])) = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),*MAPR(&(pdst[n-1]))); #define LoopReset \ pdst -= UNROLL; \ *************** *** 542,553 **** #else #define BodyOdd(n) \ ! bits = *--psrc; --pdst; \ ! *pdst = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),*pdst); #define BodyEven(n) \ ! bits1 = *--psrc; --pdst; \ ! *pdst = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),*pdst); #define LoopReset ; --- 589,600 ---- #else #define BodyOdd(n) \ ! --psrc; bits = *MAPR(psrc); \ ! --pdst; *MAPW(pdst) = MROP_SOLID(BitRight(bits1, rightShift) | BitLeft(bits, leftShift),*MAPR(pdst)); #define BodyEven(n) \ ! --psrc; bits1 = *MAPR(psrc); \ ! --pdst; *MAPW(pdst) = MROP_SOLID(BitRight(bits, rightShift) | BitLeft(bits1, leftShift),*MAPR(pdst)); #define LoopReset ; *************** *** 562,570 **** #else DuffL (nl, label4, bits1 = BitRight(bits, rightShift); ! bits = *--psrc; ! --pdst; ! *pdst = MROP_SOLID(bits1 | BitLeft(bits, leftShift),*pdst); ) #endif --- 609,619 ---- #else DuffL (nl, label4, bits1 = BitRight(bits, rightShift); ! --psrc; CHECKRU(psrc); bits = *MAPR(psrc); ! PUSHR(); ! --pdst; CHECKRWU(pdst); ! *MAPW(pdst) = MROP_SOLID(bits1 | BitLeft(bits, leftShift),*MAPR(pdst)); ! POPR(); ) #endif *************** *** 573,583 **** bits1 = BitRight(bits, rightShift); if (BitRight (startmask, leftShift)) { ! bits = *--psrc; bits1 |= BitLeft(bits, leftShift); } ! --pdst; ! *pdst = MROP_MASK(bits1, *pdst, startmask); } } } --- 622,634 ---- bits1 = BitRight(bits, rightShift); if (BitRight (startmask, leftShift)) { ! --psrc; CHECKRU(psrc); bits = *MAPR(psrc); bits1 |= BitLeft(bits, leftShift); } ! PUSHR(); ! --pdst; CHECKRWU(pdst); ! *MAPW(pdst) = MROP_MASK(bits1, *MAPR(pdst), startmask); ! POPR(); } } } diff -c mit/server/ddx/mfb/mfbbres.c:1.1.1.1 mit/server/ddx/mfb/mfbbres.c:1.4 *** mit/server/ddx/mfb/mfbbres.c:1.1.1.1 Sat Mar 12 00:35:45 1994 --- mit/server/ddx/mfb/mfbbres.c Sat Mar 12 00:35:45 1994 *************** *** 22,28 **** --- 22,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbbres.c,v 1.4 1993/03/27 09:00:37 dawes Exp $ */ /* $XConsortium: mfbbres.c,v 1.15 89/09/14 16:26:53 rws Exp $ */ + #define BANKING_MODS #include "X.h" #include "misc.h" #include "mfb.h" *************** *** 54,68 **** register int e3 = e2-e1; unsigned int tmp; /* point to longword containing first point */ addrb = (unsigned char *)(addrl + (y1 * nlwidth) + (x1 >> 5)); yinc = signdy * nlwidth * 4; /* 4 == sizeof(int) */ e = e-e1; /* to make looping easier */ bit = mask[x1 & 31]; - if (!len) - return; if (rop == RROP_BLACK) { if (axis == X_AXIS) --- 56,82 ---- register int e3 = e2-e1; unsigned int tmp; + #ifdef BANKED_MFB + unsigned char Oflag, Uflag; + #endif + if (!len) + return; + + BANK_FLAG(addrl); + /* point to longword containing first point */ addrb = (unsigned char *)(addrl + (y1 * nlwidth) + (x1 >> 5)); + SETRW(addrb); yinc = signdy * nlwidth * 4; /* 4 == sizeof(int) */ + #ifdef BANKED_MFB + Oflag = (vgaWriteFlag && (yinc > 0)); + Uflag = (vgaWriteFlag && (yinc < 0)); + #endif + e = e-e1; /* to make looping easier */ bit = mask[x1 & 31]; if (rop == RROP_BLACK) { if (axis == X_AXIS) *************** *** 69,75 **** { if (signdx > 0) { ! tmp = *(unsigned long*)addrb; for (;;) { tmp &= ~bit; --- 83,89 ---- { if (signdx > 0) { ! tmp = *MAPR(addrb); for (;;) { tmp &= ~bit; *************** *** 79,107 **** e += e1; if (e >= 0) { ! *(unsigned long *) addrb = tmp; ! addrb += yinc; e += e3; if (!bit) { bit = leftbit; ! addrb += 4; } ! tmp = *(unsigned long *) addrb; } else if (!bit) { ! *(unsigned long *) addrb = tmp; bit = leftbit; ! addrb += 4; ! tmp = *(unsigned long *) addrb; } } ! *(unsigned long *) addrb = tmp; } else { ! tmp = *(unsigned long *)addrb; for (;;) { tmp &= ~bit; --- 93,121 ---- e += e1; if (e >= 0) { ! *MAPW(addrb) = tmp; ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; if (!bit) { bit = leftbit; ! addrb += 4; CHECKRWO(addrb); } ! tmp = *MAPR(addrb); } else if (!bit) { ! *MAPW(addrb) = tmp; bit = leftbit; ! addrb += 4; CHECKRWO(addrb); ! tmp = *MAPR(addrb); } } ! *MAPW(addrb) = tmp; } else { ! tmp = *MAPR(addrb); for (;;) { tmp &= ~bit; *************** *** 111,135 **** bit = SCRLEFT(bit,1); if (e >= 0) { ! *(unsigned long *) addrb = tmp; ! addrb += yinc; e += e3; if (!bit) { bit = rightbit; ! addrb -= 4; } ! tmp = *(unsigned long *) addrb; } else if (!bit) { ! *(unsigned long *) addrb = tmp; bit = rightbit; ! addrb -= 4; ! tmp = *(unsigned long *) addrb; } } ! *(unsigned long *) addrb = tmp; } } /* if X_AXIS */ else --- 125,149 ---- bit = SCRLEFT(bit,1); if (e >= 0) { ! *MAPW(addrb) = tmp; ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; if (!bit) { bit = rightbit; ! addrb -= 4; CHECKRWU(addrb); } ! tmp = *MAPR(addrb); } else if (!bit) { ! *MAPW(addrb) = tmp; bit = rightbit; ! addrb -= 4; CHECKRWU(addrb); ! tmp = *MAPR(addrb); } } ! *MAPW(addrb) = tmp; } } /* if X_AXIS */ else *************** *** 138,152 **** { while(len--) { ! *(unsigned long *)addrb &= ~bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; } e += e3; } ! addrb += yinc; } } else --- 152,166 ---- { while(len--) { ! *MAPRW(addrb) &= ~bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; CHECKRWO(addrb); } e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); } } else *************** *** 153,167 **** { while(len--) { ! *(unsigned long *)addrb &= ~bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; } e += e3; } ! addrb += yinc; } } } /* else Y_AXIS */ --- 167,181 ---- { while(len--) { ! *MAPRW(addrb) &= ~bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; CHECKRWU(addrb);} e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); } } } /* else Y_AXIS */ *************** *** 172,178 **** { if (signdx > 0) { ! tmp = *(unsigned long *)addrb; for (;;) { tmp |= bit; --- 186,192 ---- { if (signdx > 0) { ! tmp = *MAPR(addrb); for (;;) { tmp |= bit; *************** *** 182,210 **** bit = SCRRIGHT(bit,1); if (e >= 0) { ! *(unsigned long *) addrb = tmp; ! addrb += yinc; e += e3; if (!bit) { bit = leftbit; ! addrb += 4; } ! tmp = *(unsigned long *) addrb; } else if (!bit) { ! *(unsigned long *) addrb = tmp; bit = leftbit; ! addrb += 4; ! tmp = *(unsigned long *) addrb; } } ! *(unsigned long *) addrb = tmp; } else { ! tmp = *(unsigned long *) addrb; for (;;) { tmp |= bit; --- 196,224 ---- bit = SCRRIGHT(bit,1); if (e >= 0) { ! *MAPW(addrb) = tmp; ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; if (!bit) { bit = leftbit; ! addrb += 4; CHECKRWO(addrb); } ! tmp = *MAPR(addrb); } else if (!bit) { ! *MAPW(addrb) = tmp; bit = leftbit; ! addrb += 4; CHECKRWO(addrb); ! tmp = *MAPR(addrb); } } ! *MAPW(addrb) = tmp; } else { ! tmp = *MAPR(addrb); for (;;) { tmp |= bit; *************** *** 214,238 **** bit = SCRLEFT(bit,1); if (e >= 0) { ! *(unsigned long *) addrb = tmp; ! addrb += yinc; e += e3; if (!bit) { bit = rightbit; ! addrb -= 4; } ! tmp = *(unsigned long *) addrb; } else if (!bit) { ! *(unsigned long *) addrb = tmp; bit = rightbit; ! addrb -= 4; ! tmp = *(unsigned long *) addrb; } } ! *(unsigned long *) addrb = tmp; } } /* if X_AXIS */ else --- 228,252 ---- bit = SCRLEFT(bit,1); if (e >= 0) { ! *MAPW(addrb) = tmp; ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; if (!bit) { bit = rightbit; ! addrb -= 4; CHECKRWU(addrb); } ! tmp = *MAPR(addrb); } else if (!bit) { ! *MAPW(addrb) = tmp; bit = rightbit; ! addrb -= 4; CHECKRWU(addrb); ! tmp = *MAPR(addrb); } } ! *MAPW(addrb) = tmp; } } /* if X_AXIS */ else *************** *** 241,255 **** { while(len--) { ! *(unsigned long *)addrb |= bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; } e += e3; } ! addrb += yinc; } } else --- 255,269 ---- { while(len--) { ! *MAPRW(addrb) |= bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; CHECKRWO(addrb); } e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); } } else *************** *** 256,270 **** { while(len--) { ! *(unsigned long *)addrb |= bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; } e += e3; } ! addrb += yinc; } } } /* else Y_AXIS */ --- 270,284 ---- { while(len--) { ! *MAPRW(addrb) |= bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; CHECKRWU(addrb);} e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); } } } /* else Y_AXIS */ *************** *** 277,291 **** { while(len--) { ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; e += e3; } bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; } } } else --- 291,305 ---- { while(len--) { ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; } bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; CHECKRWO(addrb); } } } else *************** *** 292,306 **** { while(len--) { ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; e += e3; } bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; } } } } /* if X_AXIS */ --- 306,320 ---- { while(len--) { ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; } bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; CHECKRWU(addrb); } } } } /* if X_AXIS */ *************** *** 310,324 **** { while(len--) { ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; } e += e3; } ! addrb += yinc; } } else --- 324,338 ---- { while(len--) { ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; CHECKRWO(addrb); } e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); } } else *************** *** 325,339 **** { while(len--) { ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; } e += e3; } ! addrb += yinc; } } } /* else Y_AXIS */ --- 339,353 ---- { while(len--) { ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; CHECKRWU(addrb);} e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); } } } /* else Y_AXIS */ diff -c mit/server/ddx/mfb/mfbbresd.c:1.1.1.1 mit/server/ddx/mfb/mfbbresd.c:1.4 *** mit/server/ddx/mfb/mfbbresd.c:1.1.1.1 Sat Mar 12 00:35:45 1994 --- mit/server/ddx/mfb/mfbbresd.c Sat Mar 12 00:35:45 1994 *************** *** 21,27 **** --- 21,29 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbbresd.c,v 1.4 1993/03/27 09:00:38 dawes Exp $ */ /* $XConsortium: mfbbresd.c,v 1.3 89/11/08 17:12:27 keith Exp $ */ + #define BANKING_MODS #include "X.h" #include "misc.h" #include "mfb.h" *************** *** 69,75 **** --- 71,82 ---- int dashOffset; int dashRemaining; int rop; + #ifdef BANKED_MFB + unsigned char Oflag, Uflag; + #endif + BANK_FLAG(addrl); + dashOffset = *pdashOffset; dashIndex = *pdashIndex; dashRemaining = pDash[dashIndex] - dashOffset; *************** *** 81,87 **** --- 88,99 ---- /* point to longword containing first point */ addrb = (unsigned char *)(addrl + (y1 * nlwidth) + (x1 >> 5)); + SETRW(addrb); yinc = signdy * nlwidth * 4; /* 4 == sizeof(int) */ + #ifdef BANKED_MFB + Oflag = vgaWriteFlag && (yinc > 0); + Uflag = vgaWriteFlag && (yinc < 0); + #endif e = e-e1; /* to make looping easier */ bit = mask[x1 & 31]; if (axis == X_AXIS) *************** *** 91,109 **** while(len--) { if (rop == RROP_BLACK) ! *(unsigned long *)addrb &= ~bit; else if (rop == RROP_WHITE) ! *(unsigned long *)addrb |= bit; else if (rop == RROP_INVERT) ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; e += e3; } bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; } StepDash } } --- 103,121 ---- while(len--) { if (rop == RROP_BLACK) ! *MAPRW(addrb) &= ~bit; else if (rop == RROP_WHITE) ! *MAPRW(addrb) |= bit; else if (rop == RROP_INVERT) ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; } bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; CHECKRWO(addrb); } StepDash } } *************** *** 112,130 **** while(len--) { if (rop == RROP_BLACK) ! *(unsigned long *)addrb &= ~bit; else if (rop == RROP_WHITE) ! *(unsigned long *)addrb |= bit; else if (rop == RROP_INVERT) ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; e += e3; } bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; } StepDash } } --- 124,142 ---- while(len--) { if (rop == RROP_BLACK) ! *MAPRW(addrb) &= ~bit; else if (rop == RROP_WHITE) ! *MAPRW(addrb) |= bit; else if (rop == RROP_INVERT) ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); e += e3; } bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; CHECKRWU(addrb); } StepDash } } *************** *** 136,154 **** while(len--) { if (rop == RROP_BLACK) ! *(unsigned long *)addrb &= ~bit; else if (rop == RROP_WHITE) ! *(unsigned long *)addrb |= bit; else if (rop == RROP_INVERT) ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; } e += e3; } ! addrb += yinc; StepDash } } --- 148,166 ---- while(len--) { if (rop == RROP_BLACK) ! *MAPRW(addrb) &= ~bit; else if (rop == RROP_WHITE) ! *MAPRW(addrb) |= bit; else if (rop == RROP_INVERT) ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { bit = SCRRIGHT(bit,1); ! if (!bit) { bit = leftbit;addrb += 4; CHECKRWO(addrb); } e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); StepDash } } *************** *** 157,175 **** while(len--) { if (rop == RROP_BLACK) ! *(unsigned long *)addrb &= ~bit; else if (rop == RROP_WHITE) ! *(unsigned long *)addrb |= bit; else if (rop == RROP_INVERT) ! *(unsigned long *)addrb ^= bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; } e += e3; } ! addrb += yinc; StepDash } } --- 169,187 ---- while(len--) { if (rop == RROP_BLACK) ! *MAPRW(addrb) &= ~bit; else if (rop == RROP_WHITE) ! *MAPRW(addrb) |= bit; else if (rop == RROP_INVERT) ! *MAPRW(addrb) ^= bit; e += e1; if (e >= 0) { bit = SCRLEFT(bit,1); ! if (!bit) { bit = rightbit;addrb -= 4; CHECKRWU(addrb); } e += e3; } ! addrb += yinc; CHECKRWD(Oflag, Uflag, addrb); StepDash } } diff -c mit/server/ddx/mfb/mfbclip.c:1.1.1.1 mit/server/ddx/mfb/mfbclip.c:1.3 *** mit/server/ddx/mfb/mfbclip.c:1.1.1.1 Sat Mar 12 00:35:46 1994 --- mit/server/ddx/mfb/mfbclip.c Sat Mar 12 00:35:46 1994 *************** *** 21,28 **** --- 21,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbclip.c,v 1.3 1993/03/27 09:00:40 dawes Exp $ */ /* $XConsortium: mfbclip.c,v 5.2 89/11/30 14:21:50 keith Exp $ */ #include "X.h" + #include "mfb.h" #include "miscstruct.h" #include "pixmapstr.h" #include "scrnintstr.h" diff -c mit/server/ddx/mfb/mfbcmap.c:1.1.1.1 mit/server/ddx/mfb/mfbcmap.c:1.2 *** mit/server/ddx/mfb/mfbcmap.c:1.1.1.1 Sat Mar 12 00:35:46 1994 --- mit/server/ddx/mfb/mfbcmap.c Sat Mar 12 00:35:46 1994 *************** *** 23,28 **** --- 23,29 ---- ******************************************************************/ /* $XConsortium: mfbcmap.c,v 5.3 89/07/19 15:48:00 rws Exp $ */ #include "X.h" + #include "mfb.h" #include "scrnintstr.h" #include "colormapst.h" #include "resource.h" diff -c /dev/null mit/server/ddx/mfb/mfbcustom.h:1.5 *** /dev/null Sat Mar 12 00:35:46 1994 --- mit/server/ddx/mfb/mfbcustom.h Sat Mar 12 00:35:46 1994 *************** *** 0 **** --- 1,38 ---- + /* $XFree86: mit/server/ddx/mfb/mfbcustom.h,v 1.5 1993/03/27 09:00:41 dawes Exp $ */ + + /* + * This file customizes the monochrome frame bufer library. + * This will be the same old mfb as we know from mit distribution. + */ + + #define MAPRW(p) ((unsigned int*)(p)) + #define MAPR(p) MAPRW(p) + #define MAPW(p) MAPRW(p) + + /* Some dummy defines for bank-related stuff */ + #define CHECKSCREEN(x) FALSE + #define SETRWF(f,x) /**/ + #define CHECKRWOF(f,x) /**/ + #define CHECKRWUF(f,x) /**/ + #define BANK_FLAG(a) /**/ + #define BANK_FLAG_BOTH(a,b) /**/ + #define SETR(a) /**/ + #define SETW(a) /**/ + #define SETRW(a) /**/ + #define CHECKRO(a) /**/ + #define CHECKWO(a) /**/ + #define CHECKRWO(a) /**/ + #define CHECKRU(a) /**/ + #define CHECKWU(a) /**/ + #define CHECKRWU(a) /**/ + #define NEXTR(a) /**/ + #define NEXTW(a) /**/ + #define PREVR(a) /**/ + #define PREVW(a) /**/ + #define SAVE_BANK() /**/ + #define RESTORE_BANK() /**/ + #define PUSHR() /**/ + #define POPR() /**/ + #define CHECKRWONEXT(a) /**/ + #define CHECKRWD(a,b,c) /**/ + diff -c mit/server/ddx/mfb/mfbfillarc.c:1.1.1.1 mit/server/ddx/mfb/mfbfillarc.c:1.4 *** mit/server/ddx/mfb/mfbfillarc.c:1.1.1.1 Sat Mar 12 00:35:47 1994 --- mit/server/ddx/mfb/mfbfillarc.c Sat Mar 12 00:35:47 1994 *************** *** 15,22 **** --- 15,24 ---- ********************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbfillarc.c,v 1.4 1993/03/27 09:00:43 dawes Exp $ */ /* $XConsortium: mfbfillarc.c,v 5.7 90/10/06 13:58:08 rws Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xprotostr.h" #include "miscstruct.h" *************** *** 58,63 **** --- 60,68 ---- addrlt = (int *)(((PixmapPtr)pDraw)->devPrivate.ptr); nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; } + + BANK_FLAG(addrlt) + miFillArcSetup(arc, &info); MIFILLARCSETUP(); xorg += pDraw->x; *************** *** 74,97 **** continue; xpos = xorg - x; addrl = addrlt + (xpos >> 5); if (((xpos & 0x1f) + slw) < 32) { maskpartialbits(xpos, slw, startmask); if (rop == RROP_BLACK) ! *addrl &= ~startmask; else if (rop == RROP_WHITE) ! *addrl |= startmask; else ! *addrl ^= startmask; if (miFillArcLower(slw)) { addrl = addrlb + (xpos >> 5); if (rop == RROP_BLACK) ! *addrl &= ~startmask; else if (rop == RROP_WHITE) ! *addrl |= startmask; else ! *addrl ^= startmask; } continue; } --- 79,104 ---- continue; xpos = xorg - x; addrl = addrlt + (xpos >> 5); + SETRW(addrl); if (((xpos & 0x1f) + slw) < 32) { maskpartialbits(xpos, slw, startmask); if (rop == RROP_BLACK) ! *MAPRW(addrl) &= ~startmask; else if (rop == RROP_WHITE) ! *MAPRW(addrl) |= startmask; else ! *MAPRW(addrl) ^= startmask; if (miFillArcLower(slw)) { addrl = addrlb + (xpos >> 5); + SETRW(addrl); if (rop == RROP_BLACK) ! *MAPRW(addrl) &= ~startmask; else if (rop == RROP_WHITE) ! *MAPRW(addrl) |= startmask; else ! *MAPRW(addrl) ^= startmask; } continue; } *************** *** 98,159 **** maskbits(xpos, slw, startmask, endmask, nlmiddle); if (startmask) { ! if (rop == RROP_BLACK) ! *addrl++ &= ~startmask; ! else if (rop == RROP_WHITE) ! *addrl++ |= startmask; ! else ! *addrl++ ^= startmask; } n = nlmiddle; if (rop == RROP_BLACK) ! while (n--) ! *addrl++ = 0; else if (rop == RROP_WHITE) ! while (n--) ! *addrl++ = ~0; else ! while (n--) ! *addrl++ ^= ~0; if (endmask) { if (rop == RROP_BLACK) ! *addrl &= ~endmask; else if (rop == RROP_WHITE) ! *addrl |= endmask; else ! *addrl ^= endmask; } if (!miFillArcLower(slw)) continue; addrl = addrlb + (xpos >> 5); if (startmask) { ! if (rop == RROP_BLACK) ! *addrl++ &= ~startmask; ! else if (rop == RROP_WHITE) ! *addrl++ |= startmask; ! else ! *addrl++ ^= startmask; } n = nlmiddle; if (rop == RROP_BLACK) ! while (n--) ! *addrl++ = 0; else if (rop == RROP_WHITE) ! while (n--) ! *addrl++ = ~0; else ! while (n--) ! *addrl++ ^= ~0; if (endmask) { if (rop == RROP_BLACK) ! *addrl &= ~endmask; else if (rop == RROP_WHITE) ! *addrl |= endmask; else ! *addrl ^= endmask; } } } --- 105,175 ---- maskbits(xpos, slw, startmask, endmask, nlmiddle); if (startmask) { ! if (rop == RROP_BLACK) { ! *MAPRW(addrl) &= ~startmask; addrl++; CHECKRWO(addrl); ! } else if (rop == RROP_WHITE) { ! *MAPRW(addrl) |= startmask; addrl++; CHECKRWO(addrl); ! } else { ! *MAPRW(addrl) ^= startmask; addrl++; CHECKRWO(addrl); ! } } n = nlmiddle; if (rop == RROP_BLACK) ! while (n--) { ! *MAPW(addrl) = 0; addrl++; CHECKRWO(addrl); ! } else if (rop == RROP_WHITE) ! while (n--) { ! *MAPW(addrl) = ~0; addrl++; CHECKRWO(addrl); ! } else ! while (n--) { ! *MAPRW(addrl) ^= ~0; addrl++; CHECKRWO(addrl); ! } if (endmask) { if (rop == RROP_BLACK) ! *MAPRW(addrl) &= ~endmask; else if (rop == RROP_WHITE) ! *MAPRW(addrl) |= endmask; else ! *MAPRW(addrl) ^= endmask; } if (!miFillArcLower(slw)) continue; addrl = addrlb + (xpos >> 5); + SETRW(addrl); if (startmask) { ! if (rop == RROP_BLACK) { ! *MAPRW(addrl) &= ~startmask; addrl++; CHECKRWO(addrl); ! } else if (rop == RROP_WHITE) { ! *MAPRW(addrl) |= startmask; addrl++; CHECKRWO(addrl); ! } else { ! *MAPRW(addrl) ^= startmask; addrl++; CHECKRWO(addrl); ! } } n = nlmiddle; if (rop == RROP_BLACK) ! while (n--) { ! *MAPW(addrl) = 0; addrl++; CHECKRWO(addrl); ! } else if (rop == RROP_WHITE) ! while (n--) { ! *MAPW(addrl) = ~0; addrl++; CHECKRWO(addrl); ! } else ! while (n--) { ! *MAPRW(addrl) ^= ~0; addrl++; CHECKRWO(addrl); ! } if (endmask) { if (rop == RROP_BLACK) ! *MAPRW(addrl) &= ~endmask; else if (rop == RROP_WHITE) ! *MAPRW(addrl) |= endmask; else ! *MAPRW(addrl) ^= endmask; } } } *************** *** 163,177 **** { \ width = xr - xl + 1; \ addrl = addr + (xl >> 5); \ if (((xl & 0x1f) + width) < 32) \ { \ maskpartialbits(xl, width, startmask); \ if (rop == RROP_BLACK) \ ! *addrl &= ~startmask; \ else if (rop == RROP_WHITE) \ ! *addrl |= startmask; \ else \ ! *addrl ^= startmask; \ } \ else \ { \ --- 179,194 ---- { \ width = xr - xl + 1; \ addrl = addr + (xl >> 5); \ + SETRW(addrl); \ if (((xl & 0x1f) + width) < 32) \ { \ maskpartialbits(xl, width, startmask); \ if (rop == RROP_BLACK) \ ! *MAPRW(addrl) &= ~startmask; \ else if (rop == RROP_WHITE) \ ! *MAPRW(addrl) |= startmask; \ else \ ! *MAPRW(addrl) ^= startmask; \ } \ else \ { \ *************** *** 178,208 **** maskbits(xl, width, startmask, endmask, nlmiddle); \ if (startmask) \ { \ ! if (rop == RROP_BLACK) \ ! *addrl++ &= ~startmask; \ ! else if (rop == RROP_WHITE) \ ! *addrl++ |= startmask; \ ! else \ ! *addrl++ ^= startmask; \ } \ n = nlmiddle; \ if (rop == RROP_BLACK) \ ! while (n--) \ ! *addrl++ = 0; \ else if (rop == RROP_WHITE) \ ! while (n--) \ ! *addrl++ = ~0; \ else \ ! while (n--) \ ! *addrl++ ^= ~0; \ if (endmask) \ { \ if (rop == RROP_BLACK) \ ! *addrl &= ~endmask; \ else if (rop == RROP_WHITE) \ ! *addrl |= endmask; \ else \ ! *addrl ^= endmask; \ } \ } \ } --- 195,229 ---- maskbits(xl, width, startmask, endmask, nlmiddle); \ if (startmask) \ { \ ! if (rop == RROP_BLACK) { \ ! *MAPRW(addrl) &= ~startmask; addrl++; CHECKRWO(addrl);\ ! } else if (rop == RROP_WHITE) { \ ! *MAPRW(addrl) |= startmask; addrl++; CHECKRWO(addrl);\ ! } else { \ ! *MAPRW(addrl) ^= startmask; addrl++; CHECKRWO(addrl);\ ! } \ } \ n = nlmiddle; \ if (rop == RROP_BLACK) \ ! while (n--) { \ ! *MAPW(addrl) = 0; addrl++; CHECKRWO(addrl);\ ! } \ else if (rop == RROP_WHITE) \ ! while (n--) { \ ! *MAPW(addrl) = ~0; addrl++; CHECKRWO(addrl);\ ! } \ else \ ! while (n--) { \ ! *MAPRW(addrl) ^= ~0; addrl++; CHECKRWO(addrl);\ ! } \ if (endmask) \ { \ if (rop == RROP_BLACK) \ ! *MAPRW(addrl) &= ~endmask; \ else if (rop == RROP_WHITE) \ ! *MAPRW(addrl) |= endmask; \ else \ ! *MAPRW(addrl) ^= endmask; \ } \ } \ } *************** *** 251,256 **** --- 272,280 ---- addrlt = (int *)(((PixmapPtr)pDraw)->devPrivate.ptr); nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; } + + BANK_FLAG(addrlt) + miFillArcSetup(arc, &info); miFillArcSliceSetup(arc, &slice, pGC); MIFILLARCSETUP(); diff -c mit/server/ddx/mfb/mfbfillsp.c:1.1.1.1 mit/server/ddx/mfb/mfbfillsp.c:1.6 *** mit/server/ddx/mfb/mfbfillsp.c:1.1.1.1 Sat Mar 12 00:35:48 1994 --- mit/server/ddx/mfb/mfbfillsp.c Sat Mar 12 00:35:48 1994 *************** *** 22,28 **** --- 22,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbfillsp.c,v 1.6 1993/03/27 09:00:45 dawes Exp $ */ /* $XConsortium: mfbfillsp.c,v 5.7 90/05/15 18:38:15 keith Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xmd.h" #include "gcstruct.h" *************** *** 37,42 **** --- 39,49 ---- #include "servermd.h" + #if (BITMAP_SCANLINE_UNIT < 32) + #undef BITMAP_SCANLINE_UNIT + #define BITMAP_SCANLINE_UNIT 32 + #endif + /* scanline filling for monochrome frame buffer written by drewry, oct 1986 *************** *** 109,117 **** --- 116,127 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + while (n--) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); if (*pwidth) { *************** *** 119,134 **** { /* all bits inside same longword */ maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl &= ~startmask; } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) ! *addrl++ &= ~startmask; ! Duff (nlmiddle, *addrl++ = 0x0); if (endmask) ! *addrl &= ~endmask; } } pwidth++; --- 129,145 ---- { /* all bits inside same longword */ maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPRW(addrl) &= ~startmask; } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) { ! *MAPRW(addrl) &= ~startmask; addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, *MAPW(addrl) = 0x0; addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) &= ~endmask; } } pwidth++; *************** *** 192,200 **** --- 203,214 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + while (n--) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); if (*pwidth) { *************** *** 202,217 **** { /* all bits inside same longword */ maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl |= startmask; } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) ! *addrl++ |= startmask; ! Duff (nlmiddle, *addrl++ = 0xffffffff); if (endmask) ! *addrl |= endmask; } } pwidth++; --- 216,233 ---- { /* all bits inside same longword */ maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPRW(addrl) |= startmask; } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) { ! *MAPRW(addrl) |= startmask; addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, ! *MAPW(addrl) = 0xffffffff; addrl++;CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) |= endmask; } } pwidth++; *************** *** 275,283 **** --- 291,302 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + while (n--) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); if (*pwidth) { *************** *** 285,300 **** { /* all bits inside same longword */ maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl ^= startmask; } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) ! *addrl++ ^= startmask; ! Duff (nlmiddle, *addrl++ ^= 0xffffffff); if (endmask) ! *addrl ^= endmask; } } pwidth++; --- 304,321 ---- { /* all bits inside same longword */ maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPRW(addrl) ^= startmask; } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) { ! *MAPRW(addrl) ^= startmask; addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, ! *MAPRW(addrl) ^= 0xffffffff; addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) ^= endmask; } } pwidth++; *************** *** 362,367 **** --- 383,390 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + pStipple = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->pRotatedPixmap; tileHeight = pStipple->drawable.height; psrc = (int *)(pStipple->devPrivate.ptr); *************** *** 369,374 **** --- 392,398 ---- while (n--) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); src = psrc[ppt->y % tileHeight]; /* all bits inside same longword */ *************** *** 375,390 **** if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl |= (src & startmask); } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) ! *addrl++ |= (src & startmask); ! Duff (nlmiddle, *addrl++ |= src); if (endmask) ! *addrl |= (src & endmask); } pwidth++; ppt++; --- 399,415 ---- if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPRW(addrl) |= (src & startmask); } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) { ! *MAPRW(addrl) |= (src & startmask); addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, *MAPRW(addrl) |= src; addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) |= (src & endmask); } pwidth++; ppt++; *************** *** 451,456 **** --- 476,483 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + pStipple = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->pRotatedPixmap; tileHeight = pStipple->drawable.height; psrc = (int *)(pStipple->devPrivate.ptr); *************** *** 458,463 **** --- 485,491 ---- while (n--) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); src = psrc[ppt->y % tileHeight]; /* all bits inside same longword */ *************** *** 464,479 **** if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl &= ~(src & startmask); } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) ! *addrl++ &= ~(src & startmask); ! Duff (nlmiddle, *addrl++ &= ~src); if (endmask) ! *addrl &= ~(src & endmask); } pwidth++; ppt++; --- 492,508 ---- if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPRW(addrl) &= ~(src & startmask); } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) { ! *MAPRW(addrl) &= ~(src & startmask); addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, *MAPRW(addrl) &= ~src; addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) &= ~(src & endmask); } pwidth++; ppt++; *************** *** 540,545 **** --- 569,576 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + pStipple = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->pRotatedPixmap; tileHeight = pStipple->drawable.height; psrc = (int *)(pStipple->devPrivate.ptr); *************** *** 547,552 **** --- 578,584 ---- while (n--) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); src = psrc[ppt->y % tileHeight]; /* all bits inside same longword */ *************** *** 553,568 **** if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl ^= (src & startmask); } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) ! *addrl++ ^= (src & startmask); ! Duff(nlmiddle, *addrl++ ^= src); if (endmask) ! *addrl ^= (src & endmask); } pwidth++; ppt++; --- 585,601 ---- if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPRW(addrl) ^= (src & startmask); } else { maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); ! if (startmask) { ! *MAPRW(addrl) ^= (src & startmask); addrl++; CHECKRWO(addrl); ! } ! Duff(nlmiddle, *MAPRW(addrl) ^= src; addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) ^= (src & endmask); } pwidth++; ppt++; *************** *** 579,590 **** if (*pwidth) \ { \ addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); \ src = psrc[ppt->y % tileHeight]; \ if ( ((ppt->x & 0x1f) + *pwidth) < 32) \ { \ maskpartialbits(ppt->x, *pwidth, startmask); \ ! *addrl = (*addrl & ~startmask) | \ ! (ROP(src, *addrl) & startmask); \ } \ else \ { \ --- 612,624 ---- if (*pwidth) \ { \ addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); \ + SETRW(addrl); \ src = psrc[ppt->y % tileHeight]; \ if ( ((ppt->x & 0x1f) + *pwidth) < 32) \ { \ maskpartialbits(ppt->x, *pwidth, startmask); \ ! *MAPW(addrl) = (*MAPR(addrl) & ~startmask) | \ ! (ROP(src, *MAPR(addrl)) & startmask); \ } \ else \ { \ *************** *** 591,608 **** maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); \ if (startmask) \ { \ ! *addrl = (*addrl & ~startmask) | \ ! (ROP(src, *addrl) & startmask); \ ! addrl++; \ } \ while (nlmiddle--) \ { \ ! *addrl = ROP(src, *addrl); \ ! addrl++; \ } \ if (endmask) \ ! *addrl = (*addrl & ~endmask) | \ ! (ROP(src, *addrl) & endmask); \ } \ } \ pwidth++; \ --- 625,642 ---- maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); \ if (startmask) \ { \ ! *MAPW(addrl) = (*MAPR(addrl) & ~startmask) | \ ! (ROP(src, *MAPR(addrl)) & startmask); \ ! addrl++; CHECKRWO(addrl); \ } \ while (nlmiddle--) \ { \ ! *MAPW(addrl) = ROP(src, *MAPR(addrl)); \ ! addrl++; CHECKRWO(addrl); \ } \ if (endmask) \ ! *MAPW(addrl) = (*MAPR(addrl) & ~endmask) | \ ! (ROP(src, *MAPR(addrl)) & endmask); \ } \ } \ pwidth++; \ *************** *** 670,675 **** --- 704,711 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + pTile = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->pRotatedPixmap; tileHeight = pTile->drawable.height; psrc = (int *)(pTile->devPrivate.ptr); *************** *** 693,703 **** if (*pwidth) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); src = psrc[ppt->y % tileHeight] ^ flip; if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl = DoMaskCopyRop (src, *addrl, startmask); } else { --- 729,740 ---- if (*pwidth) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); src = psrc[ppt->y % tileHeight] ^ flip; if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPW(addrl) = DoMaskCopyRop (src, *MAPR(addrl), startmask); } else { *************** *** 704,719 **** maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); if (startmask) { ! *addrl = DoMaskCopyRop (src, *addrl, startmask); ! addrl++; } while (nlmiddle--) { ! *addrl = src; ! addrl++; } if (endmask) ! *addrl = DoMaskCopyRop (src, *addrl, endmask); } } pwidth++; --- 741,756 ---- maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); if (startmask) { ! *MAPW(addrl) = DoMaskCopyRop (src, *MAPR(addrl), startmask); ! addrl++; CHECKRWO(addrl); } while (nlmiddle--) { ! *MAPW(addrl) = src; ! addrl++; CHECKRWO(addrl); } if (endmask) ! *MAPW(addrl) = DoMaskCopyRop (src, *MAPR(addrl), endmask); } } pwidth++; *************** *** 731,741 **** if (*pwidth) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); src = psrc[ppt->y % tileHeight]; if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *addrl = DoMaskMergeRop (src, *addrl, startmask); } else { --- 768,779 ---- if (*pwidth) { addrl = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(addrl); src = psrc[ppt->y % tileHeight]; if ( ((ppt->x & 0x1f) + *pwidth) < 32) { maskpartialbits(ppt->x, *pwidth, startmask); ! *MAPW(addrl) = DoMaskMergeRop (src, *MAPR(addrl), startmask); } else { *************** *** 742,757 **** maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); if (startmask) { ! *addrl = DoMaskMergeRop (src, *addrl, startmask); ! addrl++; } while (nlmiddle--) { ! *addrl = DoMergeRop (src, *addrl); ! addrl++; } if (endmask) ! *addrl = DoMaskMergeRop (src, *addrl, endmask); } } pwidth++; --- 780,795 ---- maskbits(ppt->x, *pwidth, startmask, endmask, nlmiddle); if (startmask) { ! *MAPW(addrl) = DoMaskMergeRop (src, *MAPR(addrl), startmask); ! addrl++; CHECKRWO(addrl); } while (nlmiddle--) { ! *MAPW(addrl) = DoMergeRop (src, *MAPR(addrl)); ! addrl++; CHECKRWO(addrl); } if (endmask) ! *MAPW(addrl) = DoMaskMergeRop (src, *MAPR(addrl), endmask); } } pwidth++; *************** *** 841,846 **** --- 879,886 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; *************** *** 856,861 **** --- 896,902 ---- { iline = (ppt->y - ySrc) % tileHeight; pdst = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(pdst); psrcT = (unsigned int *) pTile->devPrivate.ptr + (iline * tlwidth); x = ppt->x; *************** *** 878,884 **** endinc = rem / BITMAP_SCANLINE_UNIT; getandputrop((psrc+endinc), (rem&0x1f), (x & 0x1f), w, pdst, rop); if((x & 0x1f) + w >= 0x20) ! pdst++; } else if(((x & 0x1f) + w) < 32) { --- 919,925 ---- endinc = rem / BITMAP_SCANLINE_UNIT; getandputrop((psrc+endinc), (rem&0x1f), (x & 0x1f), w, pdst, rop); if((x & 0x1f) + w >= 0x20) ! pdst++; CHECKRWO(pdst); } else if(((x & 0x1f) + w) < 32) { *************** *** 906,912 **** if(startmask) { putbitsrop(*psrc, (x & 0x1f), nstart, pdst, rop); ! pdst++; if(srcStartOver) psrc++; } --- 947,953 ---- if(startmask) { putbitsrop(*psrc, (x & 0x1f), nstart, pdst, rop); ! pdst++; CHECKRWO(pdst); if(srcStartOver) psrc++; } *************** *** 914,920 **** while(nlMiddle--) { getandputrop0(psrc, nstart, 32, pdst, rop); ! pdst++; psrc++; } if(endmask) --- 955,961 ---- while(nlMiddle--) { getandputrop0(psrc, nstart, 32, pdst, rop); ! pdst++; CHECKRWO(pdst); psrc++; } if(endmask) *************** *** 999,1004 **** --- 1040,1047 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrlBase) + tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; *************** *** 1013,1018 **** --- 1056,1062 ---- { iline = (ppt->y - ySrc) % tileHeight; pdst = addrlBase + (ppt->y * nlwidth) + (ppt->x >> 5); + SETRW(pdst); psrcT = (int *) pTile->devPrivate.ptr + (iline * tlwidth); x = ppt->x; *************** *** 1036,1042 **** getandputrrop((psrc + endinc), (rem & 0x1f), (x & 0x1f), w, pdst, rop) if((x & 0x1f) + w >= 0x20) ! pdst++; } else if(((x & 0x1f) + w) < 32) --- 1080,1086 ---- getandputrrop((psrc + endinc), (rem & 0x1f), (x & 0x1f), w, pdst, rop) if((x & 0x1f) + w >= 0x20) ! pdst++; CHECKRWO(pdst); } else if(((x & 0x1f) + w) < 32) *************** *** 1065,1071 **** if(startmask) { putbitsrrop(*psrc, (x & 0x1f), nstart, pdst, rop); ! pdst++; if(srcStartOver) psrc++; } --- 1109,1115 ---- if(startmask) { putbitsrrop(*psrc, (x & 0x1f), nstart, pdst, rop); ! pdst++; CHECKRWO(pdst); if(srcStartOver) psrc++; } *************** *** 1073,1079 **** while(nlMiddle--) { getandputrrop0(psrc, nstart, 32, pdst, rop); ! pdst++; psrc++; } if(endmask) --- 1117,1123 ---- while(nlMiddle--) { getandputrrop0(psrc, nstart, 32, pdst, rop); ! pdst++; CHECKRWO(pdst); psrc++; } if(endmask) diff -c mit/server/ddx/mfb/mfbgc.c:1.1.1.1 mit/server/ddx/mfb/mfbgc.c:2.0 *** mit/server/ddx/mfb/mfbgc.c:1.1.1.1 Sat Mar 12 00:35:49 1994 --- mit/server/ddx/mfb/mfbgc.c Sat Mar 12 00:35:49 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbgc.c,v 2.0 1993/07/24 07:13:39 dawes Exp $ */ /* $XConsortium: mfbgc.c,v 5.25 91/05/26 09:22:58 rws Exp $ */ #include "X.h" #include "Xmd.h" *************** *** 35,40 **** --- 36,42 ---- #include "region.h" #include "mistruct.h" + #include "micache.h" #include "maskbits.h" *************** *** 496,501 **** --- 498,505 ---- int new_rotate, new_rrop, new_line, new_text, new_fill; DDXPointRec oldOrg; /* origin of thing GC was last used with */ + if (pDrawable->type == DRAWABLE_PIXMAP) + (*miCacheFreeSlot)(pDrawable); oldOrg = pGC->lastWinOrg; pGC->lastWinOrg.x = pDrawable->x; diff -c mit/server/ddx/mfb/mfbgetsp.c:1.1.1.1 mit/server/ddx/mfb/mfbgetsp.c:1.4 *** mit/server/ddx/mfb/mfbgetsp.c:1.1.1.1 Sat Mar 12 00:35:49 1994 --- mit/server/ddx/mfb/mfbgetsp.c Sat Mar 12 00:35:49 1994 *************** *** 22,28 **** --- 22,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbgetsp.c,v 1.4 1993/03/27 09:00:47 dawes Exp $ */ /* $XConsortium: mfbgetsp.c,v 5.5 89/09/14 16:26:46 rws Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xmd.h" *************** *** 82,92 **** --- 84,97 ---- } pdst = pdstStart; + BANK_FLAG(psrcBase); + while(ppt < pptLast) { xEnd = min(ppt->x + *pwidth, widthSrc << 3); pwidth++; psrc = psrcBase + (ppt->y * (widthSrc >> 2)) + (ppt->x >> 5); + SETRW(psrc); w = xEnd - ppt->x; srcBit = ppt->x & 0x1f; *************** *** 110,132 **** { getandputbits0(psrc, srcBit, nstart, pdst); if(srcStartOver) ! psrc++; } nl = nlMiddle; #ifdef FASTPUTBITS ! Duff(nl, putbits(*psrc, nstart, 32, pdst); psrc++; pdst++;); #else while (nl--) { ! tmpSrc = *psrc; putbits(tmpSrc, nstart, 32, pdst); ! psrc++; pdst++; } #endif if (endmask) { ! putbits(*psrc, nstart, nend, pdst); if(nstart + nend > 32) pdst++; } --- 115,139 ---- { getandputbits0(psrc, srcBit, nstart, pdst); if(srcStartOver) ! { ! psrc++; CHECKRWO(psrc); ! } } nl = nlMiddle; #ifdef FASTPUTBITS ! Duff(nl, putbits(*MAPR(psrc), nstart, 32, pdst); psrc++; CHECKRWO(psrc); pdst++;); #else while (nl--) { ! tmpSrc = *MAPR(psrc); putbits(tmpSrc, nstart, 32, pdst); ! psrc++; CHECKRWO(psrc); pdst++; } #endif if (endmask) { ! putbits(*MAPR(psrc), nstart, nend, pdst); if(nstart + nend > 32) pdst++; } diff -c mit/server/ddx/mfb/mfbhrzvert.c:1.1.1.1 mit/server/ddx/mfb/mfbhrzvert.c:1.4 *** mit/server/ddx/mfb/mfbhrzvert.c:1.1.1.1 Sat Mar 12 00:35:50 1994 --- mit/server/ddx/mfb/mfbhrzvert.c Sat Mar 12 00:35:50 1994 *************** *** 22,28 **** --- 22,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbhrzvert.c,v 1.4 1993/03/27 09:00:48 dawes Exp $ */ /* $XConsortium: mfbhrzvert.c,v 1.11 89/09/13 18:58:09 rws Exp $ */ + #define BANKING_MODS #include "X.h" #include "gc.h" *************** *** 59,65 **** --- 61,70 ---- len = -len; } + BANK_FLAG(addrl) + addrl = addrl + (y1 * nlwidth) + (x1 >> 5); + SETRW(addrl); /* all bits inside same longword */ if ( ((x1 & 0x1f) + len) < 32) *************** *** 67,81 **** maskpartialbits(x1, len, startmask); if (rop == RROP_BLACK) { ! *addrl &= ~startmask; } else if (rop == RROP_WHITE) { ! *addrl |= startmask; } else if (rop == RROP_INVERT) { ! *addrl ^= startmask; } } else --- 72,86 ---- maskpartialbits(x1, len, startmask); if (rop == RROP_BLACK) { ! *MAPRW(addrl) &= ~startmask; } else if (rop == RROP_WHITE) { ! *MAPRW(addrl) |= startmask; } else if (rop == RROP_INVERT) { ! *MAPRW(addrl) ^= startmask; } } else *************** *** 83,109 **** maskbits(x1, len, startmask, endmask, nlmiddle); if (rop == RROP_BLACK) { ! if (startmask) ! *addrl++ &= ~startmask; ! Duff (nlmiddle, *addrl++ = 0x0); if (endmask) ! *addrl &= ~endmask; } else if (rop == RROP_WHITE) { ! if (startmask) ! *addrl++ |= startmask; ! Duff (nlmiddle, *addrl++ = 0xffffffff); if (endmask) ! *addrl |= endmask; } else if (rop == RROP_INVERT) { ! if (startmask) ! *addrl++ ^= startmask; ! Duff (nlmiddle, *addrl++ ^= 0xffffffff); if (endmask) ! *addrl ^= endmask; } } } --- 88,119 ---- maskbits(x1, len, startmask, endmask, nlmiddle); if (rop == RROP_BLACK) { ! if (startmask) { ! *MAPRW(addrl) &= ~startmask; addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, *MAPW(addrl) = 0x0; addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) &= ~endmask; } else if (rop == RROP_WHITE) { ! if (startmask) { ! *MAPRW(addrl) |= startmask; addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, *MAPW(addrl) = 0xffffffff; ! addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) |= endmask; } else if (rop == RROP_INVERT) { ! if (startmask) { ! *MAPRW(addrl) ^= startmask; addrl++; CHECKRWO(addrl); ! } ! Duff (nlmiddle, *MAPRW(addrl) ^= 0xffffffff; ! addrl++; CHECKRWO(addrl)); if (endmask) ! *MAPRW(addrl) ^= endmask; } } } *************** *** 123,129 **** --- 133,142 ---- { register int bitmask; + BANK_FLAG(addrl) + addrl = addrl + (y1 * nlwidth) + (x1 >> 5); + SETRW(addrl); if (len < 0) { *************** *** 134,150 **** if (rop == RROP_BLACK) { bitmask = rmask[x1&0x1f]; ! Duff(len, *addrl &= bitmask; addrl += nlwidth ); } else if (rop == RROP_WHITE) { bitmask = mask[x1&0x1f]; ! Duff(len, *addrl |= bitmask; addrl += nlwidth ); } else if (rop == RROP_INVERT) { bitmask = mask[x1&0x1f]; ! Duff(len, *addrl ^= bitmask; addrl += nlwidth ); } } --- 147,163 ---- if (rop == RROP_BLACK) { bitmask = rmask[x1&0x1f]; ! Duff(len, *MAPRW(addrl) &= bitmask; addrl += nlwidth; CHECKRWO(addrl) ); } else if (rop == RROP_WHITE) { bitmask = mask[x1&0x1f]; ! Duff(len, *MAPRW(addrl) |= bitmask; addrl += nlwidth; CHECKRWO(addrl) ); } else if (rop == RROP_INVERT) { bitmask = mask[x1&0x1f]; ! Duff(len, *MAPRW(addrl) ^= bitmask; addrl += nlwidth; CHECKRWO(addrl) ); } } diff -c mit/server/ddx/mfb/mfbimage.c:1.1.1.1 mit/server/ddx/mfb/mfbimage.c:1.3 *** mit/server/ddx/mfb/mfbimage.c:1.1.1.1 Sat Mar 12 00:35:50 1994 --- mit/server/ddx/mfb/mfbimage.c Sat Mar 12 00:35:50 1994 *************** *** 21,27 **** --- 21,29 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbimage.c,v 1.3 1993/03/27 09:00:50 dawes Exp $ */ /* $XConsortium: mfbimage.c,v 5.3 89/09/14 16:26:42 rws Exp $ */ + #include "X.h" diff -c mit/server/ddx/mfb/mfbimggblt.c:1.1.1.1 mit/server/ddx/mfb/mfbimggblt.c:1.4 *** mit/server/ddx/mfb/mfbimggblt.c:1.1.1.1 Sat Mar 12 00:35:51 1994 --- mit/server/ddx/mfb/mfbimggblt.c Sat Mar 12 00:35:51 1994 *************** *** 22,28 **** --- 22,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbimggblt.c,v 1.4 1993/03/27 09:00:52 dawes Exp $ */ /* $XConsortium: mfbimggblt.c,v 5.6 91/05/26 09:21:19 rws Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xmd.h" #include "Xproto.h" *************** *** 139,144 **** --- 141,148 ---- widthDst = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(pdstBase) + QueryGlyphExtents(pGC->font, ppci, (unsigned long)nglyph, &info); backrect.x = x; *************** *** 220,225 **** --- 224,230 ---- xoff += 32; pdst--; } + SETRW(pdst); if ((xoff + w) <= 32) { *************** *** 228,236 **** while (h--) { getleftbits(pglyph, w, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; } } else --- 233,241 ---- while (h--) { getleftbits(pglyph, w, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } else *************** *** 241,250 **** while (h--) { getleftbits(pglyph, w, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! *(pdst+1) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; } } /* glyph crosses longwords boundary */ --- 246,256 ---- while (h--) { getleftbits(pglyph, w, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! CHECKRWONEXT(pdst); ! *MAPRW(&(pdst[1])) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } /* glyph crosses longwords boundary */ *************** *** 390,395 **** --- 396,402 ---- xoff += 32; pdst--; } + SETRW(pdst); if ((xoff + w) <= 32) { *************** *** 397,405 **** while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; } } else --- 404,412 ---- while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } else *************** *** 409,418 **** while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! *(pdst+1) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; } } } /* for each glyph */ --- 416,426 ---- while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! CHECKRWONEXT(pdst); ! *MAPRW(&(pdst[1])) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } } /* for each glyph */ diff -c mit/server/ddx/mfb/mfbline.c:1.1.1.1 mit/server/ddx/mfb/mfbline.c:1.4 *** mit/server/ddx/mfb/mfbline.c:1.1.1.1 Sat Mar 12 00:35:51 1994 --- mit/server/ddx/mfb/mfbline.c Sat Mar 12 00:35:51 1994 *************** *** 21,27 **** --- 21,29 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbline.c,v 1.4 1993/03/27 09:00:54 dawes Exp $ */ /* $XConsortium: mfbline.c,v 5.12 91/08/13 18:49:01 keith Exp $ */ + #define BANKING_MODS #include "X.h" #include "gcstruct.h" *************** *** 164,169 **** --- 166,173 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrl) + xorg = pDrawable->x; yorg = pDrawable->y; #ifdef POLYSEGMENT *************** *** 478,494 **** (x2 < pbox->x2) && (y2 < pbox->y2)) { ! addrl += _incr; switch(alu) { case RROP_BLACK: ! *addrl &= _mask; break; case RROP_WHITE: ! *addrl |= _mask; break; case RROP_INVERT: ! *addrl ^= _mask; break; } break; --- 482,499 ---- (x2 < pbox->x2) && (y2 < pbox->y2)) { ! int *addrtmp = (addrl += _incr); ! SETRW(addrtmp); switch(alu) { case RROP_BLACK: ! *MAPRW(addrtmp) &= _mask; break; case RROP_WHITE: ! *MAPRW(addrtmp) |= _mask; break; case RROP_INVERT: ! *MAPRW(addrtmp) ^= _mask; break; } break; *************** *** 574,579 **** --- 579,586 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrl) + /* compute initial dash values */ pDash = (unsigned char *) pGC->dash; *************** *** 797,802 **** --- 804,810 ---- { unsigned long _mask; int rop; + int *tmpaddr; rop = fgrop; if (dashIndex & 1) *************** *** 806,817 **** else _mask = mask[x2 & 0x1f]; addrl += (y2 * nlwidth) + (x2 >> 5); if (rop == RROP_BLACK) ! *addrl &= _mask; else if (rop == RROP_WHITE) ! *addrl |= _mask; else ! *addrl ^= _mask; break; } else --- 814,827 ---- else _mask = mask[x2 & 0x1f]; addrl += (y2 * nlwidth) + (x2 >> 5); + tmpaddr = addrl; + SETRW(tmpaddr); if (rop == RROP_BLACK) ! *MAPRW(tmpaddr) &= _mask; else if (rop == RROP_WHITE) ! *MAPRW(tmpaddr) |= _mask; else ! *MAPRW(tmpaddr) ^= _mask; break; } else diff -c /dev/null mit/server/ddx/mfb/mfbmap.h:2.0 *** /dev/null Sat Mar 12 00:35:52 1994 --- mit/server/ddx/mfb/mfbmap.h Sat Mar 12 00:35:52 1994 *************** *** 0 **** --- 1,116 ---- + /* $XFree86: mit/server/ddx/mfb/mfbmap.h,v 2.0 1993/12/10 14:34:08 dawes Exp $ */ + + #if (__STDC__ && !defined(UNIXCPP)) || (defined (SOLX86) && defined (__STDC__) && !defined (__GNUC__)) + #define CATNAME(prefix,subname) prefix##subname + #else + #define CATNAME(prefix,subname) prefix/**/subname + #endif + + #ifdef CUSTOMNAME + + #define InverseAlu CUSTOMNAME(_InverseAlu) + #define starttab CUSTOMNAME(_starttab) + #define endtab CUSTOMNAME(_endtab) + #define partmasks CUSTOMNAME(_partmasks) + #define mask CUSTOMNAME(_mask) + #define rmask CUSTOMNAME(_rmask) + #define mergeRopBits CUSTOMNAME(_mergeRopBits) + #define mfbBSFuncRec CUSTOMNAME(_mfbBSFuncRec) + #define mfbWindowPrivateIndex CUSTOMNAME(_mfbWindowPrivateIndex) + #define mfbGCPrivateIndex CUSTOMNAME(_mfbGCPrivateIndex) + #define mfbValidateGC CUSTOMNAME(_mfbValidateGC) + #define mfbChangeGC CUSTOMNAME(_mfbChangeGC) + #define mfbCopyGC CUSTOMNAME(_mfbCopyGC) + #define mfbDestroyGC CUSTOMNAME(_mfbDestroyGC) + #define mfbChangeClip CUSTOMNAME(_mfbChangeClip) + #define mfbDestroyClip CUSTOMNAME(_mfbDestroyClip) + #define mfbCopyClip CUSTOMNAME(_mfbCopyClip) + #define mfbCreateGC CUSTOMNAME(_mfbCreateGC) + #define mfbReduceRop CUSTOMNAME(_mfbReduceRop) + #define mfbCreateWindow CUSTOMNAME(_mfbCreateWindow) + #define mfbDestroyWindow CUSTOMNAME(_mfbDestroyWindow) + #define mfbMapWindow CUSTOMNAME(_mfbMapWindow) + #define mfbPositionWindow CUSTOMNAME(_mfbPositionWindow) + #define mfbUnmapWindow CUSTOMNAME(_mfbUnmapWindow) + #define mfbCopyWindow CUSTOMNAME(_mfbCopyWindow) + #define mfbChangeWindowAttributes CUSTOMNAME(_mfbChangeWindowAttributes) + #define mfbRealizeFont CUSTOMNAME(_mfbRealizeFont) + #define mfbUnrealizeFont CUSTOMNAME(_mfbUnrealizeFont) + #define mfbPolyFillRect CUSTOMNAME(_mfbPolyFillRect) + #define mfbPaintWindow CUSTOMNAME(_mfbPaintWindow) + #define mfbCreatePixmap CUSTOMNAME(_mfbCreatePixmap) + #define mfbDestroyPixmap CUSTOMNAME(_mfbDestroyPixmap) + #define mfbCopyPixmap CUSTOMNAME(_mfbCopyPixmap) + #define mfbPadPixmap CUSTOMNAME(_mfbPadPixmap) + #define mfbXRotatePixmap CUSTOMNAME(_mfbXRotatePixmap) + #define mfbYRotatePixmap CUSTOMNAME(_mfbYRotatePixmap) + #define mfbCopyRotatePixmap CUSTOMNAME(_mfbCopyRotatePixmap) + #define mfbPutImage CUSTOMNAME(_mfbPutImage) + #define mfbGetImage CUSTOMNAME(_mfbGetImage) + #define mfbLineSS CUSTOMNAME(_mfbLineSS) + #define mfbClipLine CUSTOMNAME(_mfbClipLine) + #define mfbLineSD CUSTOMNAME(_mfbLineSD) + #define mfbBresS CUSTOMNAME(_mfbBresS) + #define mfbHorzS CUSTOMNAME(_mfbHorzS) + #define mfbVertS CUSTOMNAME(_mfbVertS) + #define mfbBresD CUSTOMNAME(_mfbBresD) + #define mfbSegmentSS CUSTOMNAME(_mfbSegmentSS) + #define mfbSegmentSD CUSTOMNAME(_mfbSegmentSD) + #define mfbSolidPP CUSTOMNAME(_mfbSolidPP) + #define mfbPushPixels CUSTOMNAME(_mfbPushPixels) + #define mfbZeroPolyArcSS CUSTOMNAME(_mfbZeroPolyArcSS) + #define mfbPolyFillArcSolid CUSTOMNAME(_mfbPolyFillArcSolid) + #define mfbBlackSolidFS CUSTOMNAME(_mfbBlackSolidFS) + #define mfbWhiteSolidFS CUSTOMNAME(_mfbWhiteSolidFS) + #define mfbInvertSolidFS CUSTOMNAME(_mfbInvertSolidFS) + #define mfbWhiteStippleFS CUSTOMNAME(_mfbWhiteStippleFS) + #define mfbBlackStippleFS CUSTOMNAME(_mfbBlackStippleFS) + #define mfbInvertStippleFS CUSTOMNAME(_mfbInvertStippleFS) + #define mfbTileFS CUSTOMNAME(_mfbTileFS) + #define mfbUnnaturalTileFS CUSTOMNAME(_mfbUnnaturalTileFS) + #define mfbUnnaturalStippleFS CUSTOMNAME(_mfbUnnaturalStippleFS) + #define mfbSetScanline CUSTOMNAME(_mfbSetScanline) + #define mfbSetSpans CUSTOMNAME(_mfbSetSpans) + #define mfbAllocatePrivates CUSTOMNAME(_mfbAllocatePrivates) + #define mfbScreenInit CUSTOMNAME(_mfbScreenInit) + #define mfbCloseScreen CUSTOMNAME(_mfbCloseScreen) + #define mfbPixmapToRegion CUSTOMNAME(_mfbPixmapToRegion) + #define mfbDoBitblt CUSTOMNAME(_mfbDoBitblt) + #define mfbCopyArea CUSTOMNAME(_mfbCopyArea) + #define mfbRegisterCopyPlaneProc CUSTOMNAME(_mfbRegisterCopyPlaneProc) + #define mfbCopyPlane CUSTOMNAME(_mfbCopyPlane) + #define mfbGetSpans CUSTOMNAME(_mfbGetSpans) + #define mfbPolyPoint CUSTOMNAME(_mfbPolyPoint) + #define mfbDoBitbltCopy CUSTOMNAME(_mfbDoBitbltCopy) + #define mfbDoBitbltXor CUSTOMNAME(_mfbDoBitbltXor) + #define mfbDoBitbltCopyInverted CUSTOMNAME(_mfbDoBitbltCopyInverted) + #define mfbDoBitbltOr CUSTOMNAME(_mfbDoBitbltOr) + #define mfbDoBitbltGeneral CUSTOMNAME(_mfbDoBitbltGeneral) + #define mfbPolyGlyphBltWhite CUSTOMNAME(_mfbPolyGlyphBltWhite) + #define mfbPolyGlyphBltBlack CUSTOMNAME(_mfbPolyGlyphBltBlack) + #define mfbPolyGlyphBltInvert CUSTOMNAME(_mfbPolyGlyphBltInvert) + #define mfbImageGlyphBltWhite CUSTOMNAME(_mfbImageGlyphBltWhite) + #define mfbImageGlyphBltBlack CUSTOMNAME(_mfbImageGlyphBltBlack) + #define mfbListInstalledColormaps CUSTOMNAME(_mfbListInstalledColormaps) + #define mfbInstallColormap CUSTOMNAME(_mfbInstallColormap) + #define mfbUninstallColormap CUSTOMNAME(_mfbUninstallColormap) + #define mfbResolveColor CUSTOMNAME(_mfbResolveColor) + #define mfbCreateColormap CUSTOMNAME(_mfbCreateColormap) + #define mfbDestroyColormap CUSTOMNAME(_mfbDestroyColormap) + #define mfbCreateDefColormap CUSTOMNAME(_mfbCreateDefColormap) + #define mfbSolidWhiteArea CUSTOMNAME(_mfbSolidWhiteArea) + #define mfbStippleWhiteArea CUSTOMNAME(_mfbStippleWhiteArea) + #define mfbSolidBlackArea CUSTOMNAME(_mfbSolidBlackArea) + #define mfbStippleBlackArea CUSTOMNAME(_mfbStippleBlackArea) + #define mfbSolidInvertArea CUSTOMNAME(_mfbSolidInvertArea) + #define mfbStippleInvertArea CUSTOMNAME(_mfbStippleInvertArea) + #define mfbTileArea32Copy CUSTOMNAME(_mfbTileArea32Copy) + #define mfbTileArea32General CUSTOMNAME(_mfbTileArea32General) + #define mfbTileArea32 CUSTOMNAME(_mfbTileArea32) + #define mfbTEGlyphBltWhite CUSTOMNAME(_mfbTEGlyphBltWhite) + #define mfbTEGlyphBltBlack CUSTOMNAME(_mfbTEGlyphBltBlack) + #define mfbQueryBestSize CUSTOMNAME(_mfbQueryBestSize) + #define mfbSaveAreas CUSTOMNAME(_mfbSaveAreas) + #define mfbRestoreAreas CUSTOMNAME(_mfbRestoreAreas) + + #endif diff -c mit/server/ddx/mfb/mfbpixmap.c:1.1.1.1 mit/server/ddx/mfb/mfbpixmap.c:2.0 *** mit/server/ddx/mfb/mfbpixmap.c:1.1.1.1 Sat Mar 12 00:35:52 1994 --- mit/server/ddx/mfb/mfbpixmap.c Sat Mar 12 00:35:52 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbpixmap.c,v 2.0 1993/07/24 07:13:42 dawes Exp $ */ /* $XConsortium: mfbpixmap.c,v 5.5 89/07/28 11:59:59 rws Exp $ */ /* pixmap management *************** *** 30,41 **** */ #include "Xmd.h" - #include "pixmapstr.h" - #include "maskbits.h" - #include "mfb.h" #include "mi.h" #include "servermd.h" PixmapPtr --- 31,42 ---- */ #include "Xmd.h" #include "mfb.h" #include "mi.h" + #include "pixmapstr.h" + #include "maskbits.h" + #include "servermd.h" PixmapPtr *************** *** 66,71 **** --- 67,74 ---- pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; + pPixmap->slot = -1; + pPixmap->cacheId = 0; pPixmap->devKind = size; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1); *************** *** 97,102 **** --- 100,107 ---- pDst->drawable = pSrc->drawable; pDst->drawable.id = 0; pDst->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pDst->slot = -1; + pDst->cacheId = 0; pDst->devKind = pSrc->devKind; pDst->refcnt = 1; pDst->devPrivate.ptr = (pointer)(pDst + 1); *************** *** 245,250 **** --- 250,257 ---- psrcPix->drawable.height * psrcPix->devKind); pdstPix->drawable.width = psrcPix->drawable.width; pdstPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pdstPix->slot = -1; + pdstPix->cacheId = 0; } else { diff -c mit/server/ddx/mfb/mfbplygblt.c:1.1.1.1 mit/server/ddx/mfb/mfbplygblt.c:1.4 *** mit/server/ddx/mfb/mfbplygblt.c:1.1.1.1 Sat Mar 12 00:35:53 1994 --- mit/server/ddx/mfb/mfbplygblt.c Sat Mar 12 00:35:53 1994 *************** *** 21,28 **** --- 21,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbplygblt.c,v 1.4 1993/03/27 09:00:56 dawes Exp $ */ /* $XConsortium: mfbplygblt.c,v 5.4 91/01/27 13:02:11 keith Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xmd.h" #include "Xproto.h" *************** *** 135,140 **** --- 137,144 ---- widthDst = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(pdstBase) + x += xorg; y += yorg; *************** *** 178,183 **** --- 182,188 ---- xoff += 32; pdst--; } + SETRW(pdst); if ((xoff + w) <= 32) { *************** *** 186,194 **** while (h--) { getleftbits(pglyph, w, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; } } else --- 191,199 ---- while (h--) { getleftbits(pglyph, w, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } else *************** *** 199,208 **** while (h--) { getleftbits(pglyph, w, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! *(pdst+1) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; } } /* glyph crosses longwords boundary */ --- 204,214 ---- while (h--) { getleftbits(pglyph, w, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! CHECKRWONEXT(pdst); ! *MAPRW(&(pdst[1])) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } /* glyph crosses longwords boundary */ *************** *** 341,346 **** --- 347,353 ---- xoff += 32; pdst--; } + SETRW(pdst); if ((xoff + w) <= 32) { *************** *** 348,356 **** while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; } } else --- 355,363 ---- while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } else *************** *** 360,369 **** while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *pdst OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! *(pdst+1) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; } } } /* for each glyph */ --- 367,377 ---- while (h--) { getshiftedleftbits(pglyph, glyphCol, getWidth, tmpSrc); ! *MAPRW(pdst) OPEQ (SCRRIGHT(tmpSrc, xoff) & startmask); ! CHECKRWONEXT(pdst); ! *MAPRW(&(pdst[1])) OPEQ (SCRLEFT(tmpSrc, nFirst) & endmask); pglyph += widthGlyph; ! pdst += widthDst; CHECKRWO(pdst); } } } /* for each glyph */ diff -c mit/server/ddx/mfb/mfbpntarea.c:1.1.1.1 mit/server/ddx/mfb/mfbpntarea.c:1.5 *** mit/server/ddx/mfb/mfbpntarea.c:1.1.1.1 Sat Mar 12 00:35:53 1994 --- mit/server/ddx/mfb/mfbpntarea.c Sat Mar 12 00:35:53 1994 *************** *** 22,28 **** --- 22,32 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbpntarea.c,v 1.5 1993/03/27 09:00:58 dawes Exp $ */ /* $XConsortium: mfbpntarea.c,v 5.2 89/11/24 18:06:43 rws Exp $ */ + + #define BANKING_MODS + #include "X.h" #include "windowstr.h" *************** *** 90,95 **** --- 94,100 ---- nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; } + BANK_FLAG(pbits) while (nbox--) { *************** *** 97,107 **** h = pbox->y2 - pbox->y1; p = pbits + (pbox->y1 * nlwidth) + (pbox->x1 >> 5); if ( ((pbox->x1 & 0x1f) + w) < 32) { maskpartialbits(pbox->x1, w, startmask); nlwExtra = nlwidth; ! Duff(h, *p OPEQ startmask; p += nlwExtra); } else { --- 102,113 ---- h = pbox->y2 - pbox->y1; p = pbits + (pbox->y1 * nlwidth) + (pbox->x1 >> 5); + SETRW(p); if ( ((pbox->x1 & 0x1f) + w) < 32) { maskpartialbits(pbox->x1, w, startmask); nlwExtra = nlwidth; ! Duff(h, *MAPRW(p) OPEQ startmask; p += nlwExtra; CHECKRWO(p)); } else { *************** *** 114,124 **** while (h--) { nlw = nlwMiddle; ! *p OPEQ startmask; ! p++; ! Duff(nlw, *p++ EQWHOLEWORD); ! *p OPEQ endmask; ! p += nlwExtra; } } else if (startmask && !endmask) --- 120,130 ---- while (h--) { nlw = nlwMiddle; ! *MAPRW(p) OPEQ startmask; ! p++; CHECKRWO(p); ! Duff(nlw, *MAPRW(p) EQWHOLEWORD; p++; CHECKRWO(p)); ! *MAPRW(p) OPEQ endmask; ! p += nlwExtra; CHECKRWO(p); } } else if (startmask && !endmask) *************** *** 127,136 **** while (h--) { nlw = nlwMiddle; ! *p OPEQ startmask; ! p++; ! Duff(nlw, *p++ EQWHOLEWORD); ! p += nlwExtra; } } else if (!startmask && endmask) --- 133,142 ---- while (h--) { nlw = nlwMiddle; ! *MAPRW(p) OPEQ startmask; ! p++; CHECKRWO(p); ! Duff(nlw, *MAPRW(p) EQWHOLEWORD; p++; CHECKRWO(p)); ! p += nlwExtra; CHECKRWO(p); } } else if (!startmask && endmask) *************** *** 138,146 **** while (h--) { nlw = nlwMiddle; ! Duff(nlw, *p++ EQWHOLEWORD); ! *p OPEQ endmask; ! p += nlwExtra; } } else /* no ragged bits at either end */ --- 144,152 ---- while (h--) { nlw = nlwMiddle; ! Duff(nlw, *MAPRW(p) EQWHOLEWORD; p++; CHECKRWO(p)); ! *MAPRW(p) OPEQ endmask; ! p += nlwExtra; CHECKRWO(p); } } else /* no ragged bits at either end */ *************** *** 148,155 **** while (h--) { nlw = nlwMiddle; ! Duff(nlw, *p++ EQWHOLEWORD); ! p += nlwExtra; } } } --- 154,161 ---- while (h--) { nlw = nlwMiddle; ! Duff(nlw, *MAPRW(p) EQWHOLEWORD; p++; CHECKRWO(p)); ! p += nlwExtra; CHECKRWO(p); } } } *************** *** 214,219 **** --- 220,227 ---- nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; } + BANK_FLAG(pbits) + tileHeight = pstipple->drawable.height; psrc = (unsigned int *)(pstipple->devPrivate.ptr); *************** *** 224,229 **** --- 232,238 ---- iy = pbox->y1 % tileHeight; p = pbits + (pbox->y1 * nlwidth) + (pbox->x1 >> 5); + SETRW(p); if ( ((pbox->x1 & 0x1f) + w) < 32) { maskpartialbits(pbox->x1, w, startmask); *************** *** 232,239 **** { srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; ! *p OPEQ (srcpix & startmask); ! p += nlwExtra; } } else --- 241,248 ---- { srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; ! *MAPRW(p) OPEQ (srcpix & startmask); ! p += nlwExtra; CHECKRWO(p); } } else *************** *** 249,259 **** srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! *p OPEQ (srcpix & startmask); ! p++; ! Duff (nlw, *p++ OPEQ srcpix); ! *p OPEQ (srcpix & endmask); ! p += nlwExtra; } } else if (startmask && !endmask) --- 258,268 ---- srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! *MAPRW(p) OPEQ (srcpix & startmask); ! p++; CHECKRWO(p); ! Duff (nlw, *MAPRW(p) OPEQ srcpix; p++; CHECKRWO(p)); ! *MAPRW(p) OPEQ (srcpix & endmask); ! p += nlwExtra; CHECKRWO(p); } } else if (startmask && !endmask) *************** *** 264,273 **** srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! *p OPEQ (srcpix & startmask); ! p++; ! Duff(nlw, *p++ OPEQ srcpix); ! p += nlwExtra; } } else if (!startmask && endmask) --- 273,282 ---- srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! *MAPRW(p) OPEQ (srcpix & startmask); ! p++; CHECKRWO(p); ! Duff(nlw, *MAPRW(p) OPEQ srcpix; p++; CHECKRWO(p)); ! p += nlwExtra; CHECKRWO(p); } } else if (!startmask && endmask) *************** *** 277,285 **** srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! Duff(nlw, *p++ OPEQ srcpix); ! *p OPEQ (srcpix & endmask); ! p += nlwExtra; } } else /* no ragged bits at either end */ --- 286,294 ---- srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! Duff(nlw, *MAPRW(p) OPEQ srcpix; p++; CHECKRWO(p)); ! *MAPRW(p) OPEQ (srcpix & endmask); ! p += nlwExtra; CHECKRWO(p); } } else /* no ragged bits at either end */ *************** *** 289,296 **** srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! Duff(nlw, *p++ OPEQ srcpix); ! p += nlwExtra; } } } --- 298,305 ---- srcpix = psrc[iy]; iy = ++iy < tileHeight ? iy : 0; nlw = nlwMiddle; ! Duff(nlw, *MAPRW(p) OPEQ srcpix; p++; CHECKRWO(p)); ! p += nlwExtra; CHECKRWO(p); } } } diff -c mit/server/ddx/mfb/mfbpolypnt.c:1.1.1.1 mit/server/ddx/mfb/mfbpolypnt.c:1.4 *** mit/server/ddx/mfb/mfbpolypnt.c:1.1.1.1 Sat Mar 12 00:35:54 1994 --- mit/server/ddx/mfb/mfbpolypnt.c Sat Mar 12 00:35:54 1994 *************** *** 22,29 **** --- 22,31 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbpolypnt.c,v 1.4 1993/03/27 09:01:00 dawes Exp $ */ /* $XConsortium: mfbpolypnt.c,v 5.3 89/09/11 10:12:05 rws Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xprotostr.h" #include "pixmapstr.h" *************** *** 78,83 **** --- 80,87 ---- nlwidth = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(addrl) + if ((mode == CoordModePrevious) && (npt > 1)) { for (ppt = pptInit + 1, nptTmp = npt - 1; --nptTmp >= 0; ppt++) *************** *** 91,96 **** --- 95,101 ---- pbox = REGION_RECTS(pGCPriv->pCompositeClip); for (; --nbox >= 0; pbox++) { + int *tmpaddr; if (rop == RROP_BLACK) { for (ppt = pptInit, nptTmp = npt; --nptTmp >= 0; ppt++) *************** *** 99,105 **** y = ppt->y + pDrawable->y; if ((x >= pbox->x1) && (x < pbox->x2) && (y >= pbox->y1) && (y < pbox->y2)) ! *(addrl + (y * nlwidth) + (x >> 5)) &= rmask[x & 0x1f]; } } else if (rop == RROP_WHITE) --- 104,114 ---- y = ppt->y + pDrawable->y; if ((x >= pbox->x1) && (x < pbox->x2) && (y >= pbox->y1) && (y < pbox->y2)) ! { ! tmpaddr = addrl + (y * nlwidth) + (x >> 5); ! SETRW(tmpaddr); ! *MAPRW(tmpaddr) &= rmask[x & 0x1f]; ! } } } else if (rop == RROP_WHITE) *************** *** 110,116 **** y = ppt->y + pDrawable->y; if ((x >= pbox->x1) && (x < pbox->x2) && (y >= pbox->y1) && (y < pbox->y2)) ! *(addrl + (y * nlwidth) + (x >> 5)) |= mask[x & 0x1f]; } } else if (rop == RROP_INVERT) --- 119,129 ---- y = ppt->y + pDrawable->y; if ((x >= pbox->x1) && (x < pbox->x2) && (y >= pbox->y1) && (y < pbox->y2)) ! { ! tmpaddr = addrl + (y * nlwidth) + (x >> 5); ! SETRW(tmpaddr); ! *MAPRW(tmpaddr) |= mask[x & 0x1f]; ! } } } else if (rop == RROP_INVERT) *************** *** 121,127 **** y = ppt->y + pDrawable->y; if ((x >= pbox->x1) && (x < pbox->x2) && (y >= pbox->y1) && (y < pbox->y2)) ! *(addrl + (y * nlwidth) + (x >> 5)) ^= mask[x & 0x1f]; } } } --- 134,144 ---- y = ppt->y + pDrawable->y; if ((x >= pbox->x1) && (x < pbox->x2) && (y >= pbox->y1) && (y < pbox->y2)) ! { ! tmpaddr = addrl + (y * nlwidth) + (x >> 5); ! SETRW(tmpaddr); ! *MAPRW(tmpaddr) ^= mask[x & 0x1f]; ! } } } } diff -c mit/server/ddx/mfb/mfbpushpxl.c:1.1.1.1 mit/server/ddx/mfb/mfbpushpxl.c:1.2 *** mit/server/ddx/mfb/mfbpushpxl.c:1.1.1.1 Sat Mar 12 00:35:54 1994 --- mit/server/ddx/mfb/mfbpushpxl.c Sat Mar 12 00:35:54 1994 *************** *** 24,29 **** --- 24,30 ---- /* $XConsortium: mfbpushpxl.c,v 5.2 89/09/14 16:26:57 rws Exp $ */ #include "X.h" + #include "mfb.h" #include "gcstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" *************** *** 30,36 **** #include "miscstruct.h" #include "maskbits.h" #include "regionstr.h" - #include "mfb.h" /* mfbSolidPP is courtesy of xhacks@csri.toronto.edu --- 31,36 ---- diff -c mit/server/ddx/mfb/mfbscrclse.c:1.1.1.1 mit/server/ddx/mfb/mfbscrclse.c:1.3 *** mit/server/ddx/mfb/mfbscrclse.c:1.1.1.1 Sat Mar 12 00:35:55 1994 --- mit/server/ddx/mfb/mfbscrclse.c Sat Mar 12 00:35:55 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/ddx/mfb/mfbscrclse.c,v 1.3 1993/03/27 09:01:01 dawes Exp $ */ /* $XConsortium: mfbscrclse.c,v 1.7 89/07/18 20:05:04 rws Exp $ */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, *************** *** 24,29 **** --- 25,31 ---- ******************************************************************/ #include "scrnintstr.h" + #include "mfb.h" /*ARGSUSED*/ Bool diff -c mit/server/ddx/mfb/mfbsetsp.c:1.1.1.1 mit/server/ddx/mfb/mfbsetsp.c:2.0 *** mit/server/ddx/mfb/mfbsetsp.c:1.1.1.1 Sat Mar 12 00:35:55 1994 --- mit/server/ddx/mfb/mfbsetsp.c Sat Mar 12 00:35:55 1994 *************** *** 22,29 **** --- 22,31 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbsetsp.c,v 2.0 1993/09/09 05:59:54 dawes Exp $ */ /* $XConsortium: mfbsetsp.c,v 5.3 89/09/13 18:58:28 rws Exp $ */ + #define BANKING_MODS #include "X.h" #include "Xmd.h" *************** *** 66,72 **** --- 68,77 ---- int offSrc; int startmask, endmask, nlMiddle, nl; + BANK_FLAG(pdstBase) + pdst = pdstBase + (y * widthDst) + (xStart >> 5); + SETRW(pdst); psrc += (xStart - xOrigin) >> 5; offSrc = (xStart - xOrigin) & 0x1f; w = xEnd - xStart; *************** *** 91,97 **** if (startmask) { getandputrop(psrc, offSrc, dstBit, nstart, pdst, alu) ! pdst++; offSrc += nstart; if (offSrc > 31) { --- 96,102 ---- if (startmask) { getandputrop(psrc, offSrc, dstBit, nstart, pdst, alu) ! pdst++; CHECKRWO(pdst); offSrc += nstart; if (offSrc > 31) { *************** *** 103,110 **** while (nl--) { getbits(psrc, offSrc, 32, tmpSrc); ! DoRop(*pdst, alu, tmpSrc, *pdst); ! pdst++; psrc++; } if (endmask) --- 108,115 ---- while (nl--) { getbits(psrc, offSrc, 32, tmpSrc); ! DoRop(*MAPR(pdst), alu, tmpSrc, *MAPR(pdst)); ! pdst++; CHECKRWO(pdst); psrc++; } if (endmask) *************** *** 142,148 **** int xStart, xEnd; int yMax; ! alu = pGC->alu; prgnDst = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->pCompositeClip; pptLast = ppt + nspans; --- 147,153 ---- int xStart, xEnd; int yMax; ! alu = pGC->planemask & 0x00000001 ? pGC->alu : GXclear; prgnDst = ((mfbPrivGC *)(pGC->devPrivates[mfbGCPrivateIndex].ptr))->pCompositeClip; pptLast = ppt + nspans; diff -c mit/server/ddx/mfb/mfbtegblt.c:1.1.1.1 mit/server/ddx/mfb/mfbtegblt.c:1.6 *** mit/server/ddx/mfb/mfbtegblt.c:1.1.1.1 Sat Mar 12 00:35:56 1994 --- mit/server/ddx/mfb/mfbtegblt.c Sat Mar 12 00:35:56 1994 *************** *** 1,4 **** --- 1,5 ---- /* $XConsortium: mfbtegblt.c,v 5.7 91/05/26 09:02:16 rws Exp $ */ + /* $XFree86: mit/server/ddx/mfb/mfbtegblt.c,v 1.6 1993/03/27 09:01:05 dawes Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, *************** *** 23,28 **** --- 24,30 ---- SOFTWARE. ******************************************************************/ + #define BANKING_MODS #include "X.h" #include "Xmd.h" #include "Xproto.h" *************** *** 81,90 **** --- 83,105 ---- SCRRIGHT (*char3++ << ShiftAmnt, xoff3) | \ SCRRIGHT (*char4++ << ShiftAmnt, xoff4); #else + /* + * Note that SCRRIGHT evaluates its first argument 4 times when + * BITMAP_BIT_ORDER != IMAGE_BYTE_ORDER + * DHD 10/92 + */ + #if BITMAP_BIT_ORDER == IMAGE_BYTE_ORDER #define GetBits4 c = *char1++ | \ SCRRIGHT (*char2++, xoff2) | \ SCRRIGHT (*char3++, xoff3) | \ SCRRIGHT (*char4++, xoff4); + #else + #define GetBits4 c = *char1++ | \ + SCRRIGHT (*char2, xoff2) | \ + SCRRIGHT (*char3, xoff3) | \ + SCRRIGHT (*char4, xoff4); \ + char2++; char3++; char4++; + #endif #endif *************** *** 161,166 **** --- 176,183 ---- widthDst = (int)(((PixmapPtr)pDrawable)->devKind) >> 2; } + BANK_FLAG(pdstBase) + xpos = x + pDrawable->x; ypos = y + pDrawable->y; *************** *** 227,232 **** --- 244,250 ---- hTmp = h; dst = pdstBase + (xpos >> 5); + SETRW(dst); #ifndef FASTCHARS if (xoff1 + widthGlyphs <= 32) *************** *** 242,250 **** # endif FASTPUTBITS(OP(c), xoff1, widthGlyphs, dst); #else ! *(dst) = (*dst) & ~startmask | OP(SCRRIGHT(c, xoff1)) & startmask; #endif ! dst += widthDst; } #ifndef FASTCHARS } --- 260,268 ---- # endif FASTPUTBITS(OP(c), xoff1, widthGlyphs, dst); #else ! *MAPW(dst) = (*MAPR(dst)) & ~startmask | OP(SCRRIGHT(c, xoff1)) & startmask; #endif ! dst += widthDst; CHECKRWO(dst); } #ifndef FASTCHARS } *************** *** 255,265 **** while (hTmp--) { GetBits4 ! dst[0] = dst[0] & ~startmask | OP(SCRRIGHT(c,xoff1)) & startmask; ! dst[1] = dst[1] & ~endmask | OP(SCRLEFT(c,nfirst)) & endmask; ! dst += widthDst; } } #endif --- 273,284 ---- while (hTmp--) { GetBits4 ! *MAPW(&(dst[0])) = (*MAPR(&(dst[0]))) & ~startmask | OP(SCRRIGHT(c,xoff1)) & startmask; ! CHECKRWONEXT(dst); ! *MAPW(&(dst[1])) = (*MAPR(&(dst[1]))) & ~endmask | OP(SCRLEFT(c,nfirst)) & endmask; ! dst += widthDst; CHECKRWO(dst); } } #endif *************** *** 273,278 **** --- 292,298 ---- char1 = (glyphPointer) FONTGLYPHBITS(pglyphBase,(*ppci++)); hTmp = h; dst = pdstBase + (xpos >> 5); + SETRW(dst); #ifndef FASTCHARS if (xoff1 + widthGlyph <= 32) *************** *** 294,302 **** FASTPUTBITS (OP(c),xoff1,widthGlyph,dst); #else GetBits1 ! (*dst) = (*dst) & ~startmask | OP(SCRRIGHT(c, xoff1)) & startmask; #endif ! dst += widthDst; } #ifndef FASTCHARS } --- 314,322 ---- FASTPUTBITS (OP(c),xoff1,widthGlyph,dst); #else GetBits1 ! *MAPW(dst) = (*MAPR(dst)) & ~startmask | OP(SCRRIGHT(c, xoff1)) & startmask; #endif ! dst += widthDst; CHECKRWO(dst); } #ifndef FASTCHARS } *************** *** 307,317 **** while (hTmp--) { GetBits1 ! dst[0] = dst[0] & ~startmask | OP(SCRRIGHT(c,xoff1)) & startmask; ! dst[1] = dst[1] & ~endmask | OP(SCRLEFT(c,nfirst)) & endmask; ! dst += widthDst; } } #endif --- 327,338 ---- while (hTmp--) { GetBits1 ! *MAPW(&(dst[0])) = (*MAPR(&(dst[0]))) & ~startmask | OP(SCRRIGHT(c,xoff1)) & startmask; ! CHECKRWONEXT(dst); ! *MAPW(&(dst[1])) = (*MAPR(&(dst[1]))) & ~endmask | OP(SCRLEFT(c,nfirst)) & endmask; ! dst += widthDst; CHECKRWO(dst); } } #endif diff -c mit/server/ddx/mfb/mfbtile.c:1.1.1.1 mit/server/ddx/mfb/mfbtile.c:1.4 *** mit/server/ddx/mfb/mfbtile.c:1.1.1.1 Sat Mar 12 00:35:56 1994 --- mit/server/ddx/mfb/mfbtile.c Sat Mar 12 00:35:56 1994 *************** *** 22,28 **** --- 22,30 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbtile.c,v 1.4 1993/03/27 09:01:06 dawes Exp $ */ /* $XConsortium: mfbtile.c,v 5.3 90/05/15 18:38:21 keith Exp $ */ + #define BANKING_MODS #include "X.h" #include "windowstr.h" *************** *** 88,93 **** --- 90,97 ---- nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; } + BANK_FLAG(pbits) + MROP_INITIALIZE(alu,~0) tileHeight = ptile->drawable.height; *************** *** 99,104 **** --- 103,109 ---- h = pbox->y2 - pbox->y1; iy = pbox->y1 % tileHeight; p = pbits + (pbox->y1 * nlwidth) + (pbox->x1 >> 5); + SETRW(p); if ( ((pbox->x1 & 0x1f) + w) < 32) { *************** *** 110,117 **** iy++; if (iy == tileHeight) iy = 0; ! *p = MROP_MASK(srcpix,*p,startmask); ! p += nlwExtra; } } else --- 115,122 ---- iy++; if (iy == tileHeight) iy = 0; ! *MAPW(p) = MROP_MASK(srcpix,*MAPR(p),startmask); ! p += nlwExtra; CHECKRWO(p); } } else *************** *** 129,144 **** if (iy == tileHeight) iy = 0; nlw = nlwMiddle; ! *p = MROP_MASK (srcpix,*p,startmask); ! p++; while (nlw--) { ! *p = MROP_SOLID(srcpix,*p); ! p++; } ! *p = MROP_MASK(srcpix,*p,endmask); ! p += nlwExtra; } } else if (startmask && !endmask) --- 134,149 ---- if (iy == tileHeight) iy = 0; nlw = nlwMiddle; ! *MAPW(p) = MROP_MASK (srcpix,*MAPR(p),startmask); ! p++; CHECKRWO(p); while (nlw--) { ! *MAPW(p) = MROP_SOLID(srcpix,*MAPR(p)); ! p++; CHECKRWO(p); } ! *MAPW(p) = MROP_MASK(srcpix,*MAPR(p),endmask); ! p += nlwExtra; CHECKRWO(p); } } else if (startmask && !endmask) *************** *** 151,164 **** if (iy == tileHeight) iy = 0; nlw = nlwMiddle; ! *p = MROP_MASK(srcpix,*p,startmask); ! p++; while (nlw--) { ! *p = MROP_SOLID(srcpix,*p); ! p++; } ! p += nlwExtra; } } else if (!startmask && endmask) --- 156,169 ---- if (iy == tileHeight) iy = 0; nlw = nlwMiddle; ! *MAPW(p) = MROP_MASK(srcpix,*MAPR(p),startmask); ! p++; CHECKRWO(p); while (nlw--) { ! *MAPW(p) = MROP_SOLID(srcpix,*MAPR(p)); ! p++; CHECKRWO(p); } ! p += nlwExtra; CHECKRWO(p); } } else if (!startmask && endmask) *************** *** 172,183 **** nlw = nlwMiddle; while (nlw--) { ! *p = MROP_SOLID(srcpix,*p); ! p++; } ! *p = MROP_MASK(srcpix,*p,endmask); ! p += nlwExtra; } } else /* no ragged bits at either end */ --- 177,188 ---- nlw = nlwMiddle; while (nlw--) { ! *MAPW(p) = MROP_SOLID(srcpix,*MAPR(p)); ! p++; CHECKRWO(p); } ! *MAPW(p) = MROP_MASK(srcpix,*MAPR(p),endmask); ! p += nlwExtra; CHECKRWO(p); } } else /* no ragged bits at either end */ *************** *** 191,200 **** nlw = nlwMiddle; while (nlw--) { ! *p = MROP_SOLID (srcpix,*p); ! p++; } ! p += nlwExtra; } } } --- 196,205 ---- nlw = nlwMiddle; while (nlw--) { ! *MAPW(p) = MROP_SOLID (srcpix,*MAPR(p)); ! p++; CHECKRWO(p); } ! p += nlwExtra; CHECKRWO(p); } } } diff -c mit/server/ddx/mfb/mfbzerarc.c:1.1.1.1 mit/server/ddx/mfb/mfbzerarc.c:1.6 *** mit/server/ddx/mfb/mfbzerarc.c:1.1.1.1 Sat Mar 12 00:35:57 1994 --- mit/server/ddx/mfb/mfbzerarc.c Sat Mar 12 00:35:57 1994 *************** *** 15,20 **** --- 15,21 ---- ********************************************************/ + /* $XFree86: mit/server/ddx/mfb/mfbzerarc.c,v 1.6 1993/03/27 09:01:09 dawes Exp $ */ /* $XConsortium: mfbzerarc.c,v 5.10 89/09/20 18:55:33 rws Exp $ */ /* Derived from: *************** *** 23,28 **** --- 24,30 ---- * The Computer Journal, November 1967, Volume 10, Number 3, pp. 282-289 */ + #define BANKING_MODS #include "X.h" #include "Xprotostr.h" #include "miscstruct.h" *************** *** 34,56 **** #include "mizerarc.h" extern void miPolyArc(), miZeroPolyArc(); #if (BITMAP_BIT_ORDER == MSBFirst) #define LEFTMOST ((unsigned int) 0x80000000) #else #define LEFTMOST ((unsigned int) 1) #endif #define PixelateWhite(addr,off) \ ! (addr)[(off)>>5] |= SCRRIGHT (LEFTMOST, ((off) & 0x1f)) #define PixelateBlack(addr,off) \ ! (addr)[(off)>>5] &= ~(SCRRIGHT (LEFTMOST, ((off) & 0x1f))) #define Pixelate(base,off) \ { \ paddr = base + ((off)>>5); \ pmask = SCRRIGHT(LEFTMOST, (off) & 0x1f); \ ! *paddr = (*paddr & ~pmask) | (pixel & pmask); \ } #define DoPix(bit,base,off) if (mask & bit) Pixelate(base,off); --- 36,88 ---- #include "mizerarc.h" extern void miPolyArc(), miZeroPolyArc(); + /* + * Note, LEFTMOST must be the bit leftmost in the actual screen + * representation. This depends on both BITMAP_BIT_ORDER and + * IMAGE_BYTE_ORDER + * DHD 10/92 + */ #if (BITMAP_BIT_ORDER == MSBFirst) + #if (IMAGE_BYTE_ORDER == MSBFirst) #define LEFTMOST ((unsigned int) 0x80000000) #else + #define LEFTMOST ((unsigned int) 0x80) + #endif + #else + #if (IMAGE_BYTE_ORDER == LSBFirst) #define LEFTMOST ((unsigned int) 1) + #else + #define LEFTMOST ((unsigned int) 0x1000000) #endif + #endif + #ifdef BANKED_MFB + #define PixelateWhite(addr,off) \ + { \ + register int *tmpaddr = &((addr)[(off)>>5]); \ + SETRW(tmpaddr); \ + *MAPRW(tmpaddr) |= SCRRIGHT (LEFTMOST, ((off) & 0x1f)); \ + } + #define PixelateBlack(addr,off) \ + { \ + register int *tmpaddr = &((addr)[(off)>>5]); \ + SETRW(tmpaddr); \ + *MAPRW(tmpaddr) &= ~(SCRRIGHT (LEFTMOST, ((off) & 0x1f))); \ + } + #else #define PixelateWhite(addr,off) \ ! *MAPRW(&((addr)[(off)>>5])) |= SCRRIGHT (LEFTMOST, ((off) & 0x1f)) #define PixelateBlack(addr,off) \ ! *MAPRW(&((addr)[(off)>>5])) &= ~(SCRRIGHT (LEFTMOST, ((off) & 0x1f))) ! #endif #define Pixelate(base,off) \ { \ paddr = base + ((off)>>5); \ pmask = SCRRIGHT(LEFTMOST, (off) & 0x1f); \ ! SETRW(paddr); \ ! *MAPW(paddr) = (*MAPR(paddr) & ~pmask) | (pixel & pmask); \ } #define DoPix(bit,base,off) if (mask & bit) Pixelate(base,off); *************** *** 90,95 **** --- 122,130 ---- addrl = (int *)(((PixmapPtr)pDraw)->devPrivate.ptr); nlwidth = (int)(((PixmapPtr)pDraw)->devKind) >> 2; } + + BANK_FLAG(addrl) + do360 = miZeroArcSetup(arc, &info, TRUE); yorgl = addrl + ((info.yorg + pDraw->y) * nlwidth); yorgol = addrl + ((info.yorgo + pDraw->y) * nlwidth); diff -c mit/server/ddx/mi/Imakefile:1.1.1.1 mit/server/ddx/mi/Imakefile:2.2 *** mit/server/ddx/mi/Imakefile:1.1.1.1 Sat Mar 12 00:36:01 1994 --- mit/server/ddx/mi/Imakefile Sat Mar 12 00:36:01 1994 *************** *** 1,6 **** --- 1,11 ---- + XCOMM $XFree86: mit/server/ddx/mi/Imakefile,v 2.2 1993/09/22 15:41:22 dawes Exp $ XCOMM $XConsortium: Imakefile,v 5.16 91/07/23 15:19:39 keith Exp $ #include + #ifdef XFree86Version + SRC2 = mibitblt_m.c + #endif + SRCS = mivaltree.c mipolyseg.c mipolyrect.c \ mipoly.c mipolycon.c mipolygen.c mipolyutil.c \ mifillrct.c miwideline.c mispans.c \ *************** *** 9,15 **** mipolytext.c mibitblt.c mipolypnt.c mipushpxl.c\ miexpose.c miglblt.c mizerline.c mifpolycon.c \ midash.c mibstore.c miinitext.c mieq.c \ ! mipointer.c misprite.c midispcur.c miscrinit.c miclipn.c OBJS = mivaltree.o mipolyseg.o mipolyrect.o \ mipoly.o mipolycon.o mipolygen.o mipolyutil.o \ --- 14,27 ---- mipolytext.c mibitblt.c mipolypnt.c mipushpxl.c\ miexpose.c miglblt.c mizerline.c mifpolycon.c \ midash.c mibstore.c miinitext.c mieq.c \ ! mipointer.c misprite.c midispcur.c miscrinit.c miclipn.c $(SRC2) ! ! #ifndef XFree86Version ! OBJ2 = mibitblt.o ! #else ! OBJ3 = mibitblt.o ! OBJ4 = mibitblt_m.o ! #endif OBJS = mivaltree.o mipolyseg.o mipolyrect.o \ mipoly.o mipolycon.o mipolygen.o mipolyutil.o \ *************** *** 16,25 **** mifillrct.o miwideline.o mispans.o \ miarc.o mizerarc.o mifillarc.o \ miwindow.o micursor.o miregion.o \ ! mipolytext.o mibitblt.o mipolypnt.o mipushpxl.o\ miexpose.o miglblt.o mizerline.o mifpolycon.o \ midash.o mibstore.o miinitext.o mieq.o \ ! mipointer.o misprite.o midispcur.o miscrinit.o miclipn.o INCLUDES = -I. -I../../include -I$(INCLUDESRC) -I$(FONTSRC)/include LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln --- 28,38 ---- mifillrct.o miwideline.o mispans.o \ miarc.o mizerarc.o mifillarc.o \ miwindow.o micursor.o miregion.o \ ! mipolytext.o mipolypnt.o mipushpxl.o\ miexpose.o miglblt.o mizerline.o mifpolycon.o \ midash.o mibstore.o miinitext.o mieq.o \ ! mipointer.o misprite.o midispcur.o miscrinit.o miclipn.o $(OBJ2) ! INCLUDES = -I. -I../../include -I$(INCLUDESRC) -I$(FONTSRC)/include LINTLIBS = ../../dix/llib-ldix.ln ../../os/llib-los.ln *************** *** 29,37 **** LintLibraryTarget(mi,$(SRCS)) NormalLintTarget($(SRCS)) ! all:: cbrt.o ! SpecialObjectRule(miinitext.o, $(ICONFIGFILES), NullParameter) #if HasSaberC saber_src: --- 42,63 ---- LintLibraryTarget(mi,$(SRCS)) NormalLintTarget($(SRCS)) ! all:: cbrt.o $(OBJ3) $(OBJ4) ! #ifdef XFree86Version ! ObjectFromSpecialSource(mibitblt_m,mibitblt,MonoDefines) ! #endif ! ! SpecialObjectRule(miinitext.o, miinitext.c $(ICONFIGFILES), NullParameter) ! ! InstallLinkKitLibrary(mi,$(LINKKITDIR)/lib) ! InstallLinkKitNonExecFile(mibitblt.o,$(LINKKITDIR)/lib) ! InstallLinkKitNonExecFile(mibitblt_m.o,$(LINKKITDIR)/lib) ! InstallLinkKitNonExecFile(mibstore.h,$(LINKKITDIR)/include) ! ! #if defined(i386SVR3Architecture) || defined(LinuxArchitecture) || Amoeba || Minix ! InstallLinkKitNonExecFile(cbrt.o,$(LINKKITDIR)/lib) ! #endif #if HasSaberC saber_src: diff -c mit/server/ddx/mi/cbrt.c:1.1.1.1 mit/server/ddx/mi/cbrt.c:2.0 *** mit/server/ddx/mi/cbrt.c:1.1.1.1 Sat Mar 12 00:36:01 1994 --- mit/server/ddx/mi/cbrt.c Sat Mar 12 00:36:01 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/ddx/mi/cbrt.c,v 2.0 1994/03/06 06:42:53 dawes Exp $ */ /* $XConsortium: cbrt.c,v 1.0 90/09/29 10:24:02 rws Exp $ */ /* simple cbrt, in case your math library doesn't have a good one */ *************** *** 8,12 **** cbrt(x) double x; { ! return pow(x, 1.0/3.0); } --- 9,16 ---- cbrt(x) double x; { ! if (x > 0.0) ! return pow(x, 1.0/3.0); ! else ! return -pow(-x, 1.0/3.0); } diff -c mit/server/ddx/mi/miarc.c:1.1.1.2 mit/server/ddx/mi/miarc.c:2.0 *** mit/server/ddx/mi/miarc.c:1.1.1.2 Sat Mar 12 00:36:02 1994 --- mit/server/ddx/mi/miarc.c Sat Mar 12 00:36:02 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mi/miarc.c,v 2.0 1993/07/26 14:35:21 dawes Exp $ */ /* $XConsortium: miarc.c,v 5.41 92/05/17 10:50:34 rws Exp $ */ /* Author: Keith Packard */ *************** *** 37,44 **** #include "mifillarc.h" #include "Xfuncproto.h" ! #if defined(SVR4) && __STDC__ ! extern double hypot(double, double); #endif static double miDsin(), miDcos(), miDasin(), miDatan2(); double cbrt( --- 38,49 ---- #include "mifillarc.h" #include "Xfuncproto.h" ! #if (defined(SVR4) && __STDC__) || defined(AMOEBA) || defined(_MINIX) ! extern double hypot( ! #if NeedFunctionPrototypes ! double, double ! #endif ! ); #endif static double miDsin(), miDcos(), miDasin(), miDatan2(); double cbrt( *************** *** 145,152 **** #undef max #undef min ! #if defined (__GNUC__) && defined (__STDC__) && !defined (__STRICT_ANSI__) #define USE_INLINE #endif #ifdef USE_INLINE --- 150,160 ---- #undef max #undef min ! #if defined (__GNUC__) && defined (__STDC__) #define USE_INLINE + #if defined(__STRICT_ANSI__) + # define inline __inline__ + #endif #endif #ifdef USE_INLINE diff -c mit/server/ddx/mi/mibitblt.c:1.1.1.1 mit/server/ddx/mi/mibitblt.c:2.0 *** mit/server/ddx/mi/mibitblt.c:1.1.1.1 Sat Mar 12 00:36:03 1994 --- mit/server/ddx/mi/mibitblt.c Sat Mar 12 00:36:03 1994 *************** *** 21,26 **** --- 21,27 ---- SOFTWARE. ******************************************************************/ + /* $XFree86: mit/server/ddx/mi/mibitblt.c,v 2.0 1993/09/09 06:00:28 dawes Exp $ */ /* $XConsortium: mibitblt.c,v 5.14 91/04/07 17:09:36 keith Exp $ */ /* Author: Todd Newman (aided and abetted by Mr. Drewry) */ *************** *** 610,615 **** --- 611,620 ---- depth = pDraw->depth; if(format == ZPixmap) { + linelength = PixmapBytePad(w, depth); + srcx = sx + pDraw->x; + srcy = sy + pDraw->y; + if ( (((1<pScreen); *************** *** 616,627 **** if (!pGC) return; pPixmap = (*pDraw->pScreen->CreatePixmap) ! (pDraw->pScreen, w, h, depth); if (!pPixmap) { FreeScratchGC(pGC); return; } gcv[0] = GXcopy; gcv[1] = planeMask; DoChangeGC(pGC, GCPlaneMask | GCFunction, gcv, 0); --- 621,633 ---- if (!pGC) return; pPixmap = (*pDraw->pScreen->CreatePixmap) ! (pDraw->pScreen, w, 1, depth); if (!pPixmap) { FreeScratchGC(pGC); return; } + bzero((char *)(pPixmap->devPrivate.ptr), linelength); gcv[0] = GXcopy; gcv[1] = planeMask; DoChangeGC(pGC, GCPlaneMask | GCFunction, gcv, 0); *************** *** 628,636 **** ValidateGC((DrawablePtr)pPixmap, pGC); } - linelength = PixmapBytePad(w, depth); - srcx = sx + pDraw->x; - srcy = sy + pDraw->y; for(i = 0; i < h; i++) { pt.x = srcx; --- 634,639 ---- diff -c mit/server/ddx/mi/mibstore.c:1.1.1.1 mit/server/ddx/mi/mibstore.c:2.0 *** mit/server/ddx/mi/mibstore.c:1.1.1.1 Sat Mar 12 00:36:04 1994 --- mit/server/ddx/mi/mibstore.c Sat Mar 12 00:36:05 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/server/ddx/mi/mibstore.c,v 2.0 1993/09/21 15:17:25 dawes Exp $ */ /* $XConsortium: mibstore.c,v 5.50 91/07/10 19:06:50 keith Exp $ */ /*********************************************************** Copyright 1987 by the Regents of the University of California *************** *** 3754,3757 **** --- 3755,3759 ---- } break; } + (* pGC->pScreen->RegionDestroy)(tempRgn); /* hasty */ } diff -c /dev/null mit/server/ddx/mi/micache.h:2.0 *** /dev/null Sat Mar 12 00:36:06 1994 --- mit/server/ddx/mi/micache.h Sat Mar 12 00:36:06 1994 *************** *** 0 **** --- 1,18 ---- + /*- + * micache.h -- + * Header file for users of the MI Pixmap cache scheme + * + */ + + /* $XFree86: mit/server/ddx/mi/micache.h,v 2.0 1993/07/24 07:13:58 dawes Exp $ */ + + #ifndef _MICACHE_H + #define _MICACHE_H + + /* + * Functionpointer for the Pixmap cache of the accelerated servers + */ + + extern void (* miCacheFreeSlot)(); + + #endif /* _MICACHE_H */ diff -c mit/server/ddx/mi/miscrinit.c:1.1.1.1 mit/server/ddx/mi/miscrinit.c:2.0 *** mit/server/ddx/mi/miscrinit.c:1.1.1.1 Sat Mar 12 00:36:06 1994 --- mit/server/ddx/mi/miscrinit.c Sat Mar 12 00:36:06 1994 *************** *** 14,19 **** --- 14,20 ---- */ + /* $XFree86: mit/server/ddx/mi/miscrinit.c,v 2.0 1993/07/24 07:13:59 dawes Exp $ */ /* $XConsortium: miscrinit.c,v 5.2 91/05/14 11:17:40 rws Exp $ */ #include "X.h" *************** *** 24,29 **** --- 25,36 ---- #include "pixmapstr.h" #include "mibstore.h" #include "dix.h" + + /* + * Functionpointer for the Pixmap cache of the accelerated servers + */ + + void (* miCacheFreeSlot)() = NoopDDA; /*ARGSUSED*/ static Bool diff -c mit/server/ddx/mi/miwidearc.c:1.1.1.1 mit/server/ddx/mi/miwidearc.c:1.2 *** mit/server/ddx/mi/miwidearc.c:1.1.1.1 Sat Mar 12 00:36:07 1994 --- mit/server/ddx/mi/miwidearc.c Sat Mar 12 00:36:07 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/server/ddx/mi/miwidearc.c,v 1.2 1993/03/20 03:49:23 dawes Exp $ * $XConsortium: miwidearc.c,v 1.6 91/08/23 12:14:41 gildea Exp $ * * Copyright 1990 Massachusetts Institute of Technology *************** *** 35,43 **** #include "mifillarc.h" #include "miwideline.h" ! #if (defined(SVR4) || defined(SYSV) && defined(SYSV386)) && __STDC__ ! extern double hypot(double, double); #endif typedef struct _dpoint { double x, y; --- 36,49 ---- #include "mifillarc.h" #include "miwideline.h" ! #if ((defined(SVR4) || defined(SYSV) && defined(SYSV386)) && __STDC__) || defined(AMOEBA) || defined(_MINIX) ! extern double hypot( ! #if NeedFunctionPrototypes ! double, double #endif + ); + #endif + typedef struct _dpoint { double x, y; diff -c mit/server/ddx/mi/miwideline.c:1.1.1.3 mit/server/ddx/mi/miwideline.c:1.2 *** mit/server/ddx/mi/miwideline.c:1.1.1.3 Sat Mar 12 00:36:08 1994 --- mit/server/ddx/mi/miwideline.c Sat Mar 12 00:36:08 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/server/ddx/mi/miwideline.c,v 1.2 1993/03/20 03:49:26 dawes Exp $ * $XConsortium: miwideline.c,v 1.45 91/11/20 15:33:19 keith Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 29,36 **** #include "miscstruct.h" #include "miwideline.h" ! #if (defined(SVR4) || defined(SYSV) && defined(SYSV386)) && __STDC__ ! extern double hypot(double, double); #endif #ifdef ICEILTEMPDECL --- 30,41 ---- #include "miscstruct.h" #include "miwideline.h" ! #if ((defined(SVR4) || defined(SYSV) && defined(SYSV386)) && __STDC__) || defined(AMOEBA) || defined(_MINIX) ! extern double hypot( ! #if NeedFunctionPrototypes ! double, double ! #endif ! ); #endif #ifdef ICEILTEMPDECL diff -c mit/Imakefile:1.1.1.1 mit/Imakefile:2.0 *** mit/Imakefile:1.1.1.1 Sat Mar 12 00:36:09 1994 --- mit/Imakefile Sat Mar 12 00:36:09 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/Imakefile,v 2.0 1993/12/17 10:56:22 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.105 91/07/27 14:13:23 rws Exp $ #define IHaveSubdirs #define PassCDebugFlags *************** *** 9,17 **** #if BuildServer SERVERDIRSTOMAKE = server rgb #endif SUBDIRS = config include lib extensions fonts $(SERVERDIRSTOMAKE) \ ! clients demos util man LNINSTALLDIRS = $(LIBSRC) $(EXTENSIONSRC) MakeSubdirs($(SUBDIRS)) --- 10,26 ---- #if BuildServer SERVERDIRSTOMAKE = server rgb #endif + + #if !BuildServersOnly + CLIENTDIRS = clients + DEMODIRS = demos + MANDIRS = man + #endif + SUBDIRS = config include lib extensions fonts $(SERVERDIRSTOMAKE) \ ! $(CLIENTDIRS) $(DEMODIRS) util $(MANDIRS) LNINSTALLDIRS = $(LIBSRC) $(EXTENSIONSRC) + MakeSubdirs($(SUBDIRS)) diff -c /dev/null mit/config/Cross.rules:1.2 *** /dev/null Sat Mar 12 00:36:14 1994 --- mit/config/Cross.rules Sat Mar 12 00:36:14 1994 *************** *** 0 **** --- 1,321 ---- + XCOMM ------------------------------------------------------------------------- + XCOMM Cross.rules: override a number default defines from Imake.rules + XCOMM to make it possible to cross compile the X11 tree. + XCOMM $XFree86: mit/config/Cross.rules,v 1.2 1993/03/25 14:16:59 dawes Exp $ + + #ifndef NormalProgramTarget + #define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\ + program: objects deplibs @@\ + RemoveTargetProgram($@) @@\ + $(LD) $(ALDFLAGS) $(HEAD) -o $@ objects $(LDOPTIONS) locallibs $(LDLIBS) syslibs $(EXTRA_LOAD_FLAGS) @@\ + @@\ + clean:: @@\ + $(RM) program + #endif /* NormalProgramTarget */ + + + #ifndef ComplexProgramTarget + #define ComplexProgramTarget(program) @@\ + PROGRAM = program @@\ + @@\ + AllTarget(program) @@\ + @@\ + program: $(OBJS) $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + $(LD) $(ALDFLAGS) $(HEAD) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\ + @@\ + SaberProgramTarget(program,$(SRCS),$(OBJS),$(LOCAL_LIBRARIES),NullParameter) @@\ + @@\ + InstallProgram(program,$(BINDIR)) @@\ + InstallManPage(program,$(MANDIR)) @@\ + DependTarget() @@\ + LintTarget() @@\ + @@\ + clean:: @@\ + $(RM) $(PROGRAM) + #endif /* ComplexProgramTarget */ + + /* ComplexCrossProgramTarget - generate rules for compiling and linking the + * program specified by $(OBJS) and $(SRCS), installing the program and its + * man page, and generating dependencies. It should only be used in + * Imakefiles that describe a single program. + */ + #ifndef ComplexCrossProgramTarget + #define ComplexCrossProgramTarget(program) @@\ + STD_INCLUDES= @@\ + EXTRA_LOAD_FLAGS= @@\ + PROGRAM = program @@\ + @@\ + AllTarget(program) @@\ + @@\ + program: $(OBJS) $(DEPLIBS) @@\ + RemoveTargetProgram($@) @@\ + $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\ + @@\ + SaberProgramTarget(program,$(SRCS),$(OBJS),$(LOCAL_LIBRARIES), /**/) @@\ + @@\ + DependTarget() @@\ + LintTarget() @@\ + @@\ + clean:: @@\ + $(RM) $(PROGRAM) + #endif /* ComplexProgramTarget */ + + + #ifndef ComplexProgramTarget_1 + #define ComplexProgramTarget_1(program,locallib,syslib) @@\ + OBJS = $(OBJS1) $(OBJS2) $(OBJS3) @@\ + SRCS = $(SRCS1) $(SRCS2) $(SRCS3) @@\ + @@\ + AllTarget($(PROGRAMS)) @@\ + @@\ + program: $(OBJS1) $(DEPLIBS1) @@\ + RemoveTargetProgram($@) @@\ + $(LD) $(ALDFLAGS) $(HEAD) -o $@ $(LDOPTIONS) $(OBJS1) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\ + @@\ + InstallProgram(program,$(BINDIR)) @@\ + InstallManPage(program,$(MANDIR)) @@\ + @@\ + SaberProgramTarget(program,$(SRCS1),$(OBJS1),locallib,syslib) @@\ + @@\ + DependTarget() @@\ + LintTarget() @@\ + @@\ + clean:: @@\ + $(RM) $(PROGRAMS) + #endif /* ComplexProgramTarget_1 */ + + + #ifndef ComplexProgramTarget_2 + #define ComplexProgramTarget_2(program,locallib,syslib) @@\ + program: $(OBJS2) $(DEPLIBS2) @@\ + RemoveTargetProgram($@) @@\ + $(LD) $(ALDFLAGS) $(HEAD) -o $@ $(LDOPTIONS) $(OBJS2) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\ + @@\ + SaberProgramTarget(program,$(SRCS2),$(OBJS2),locallib,syslib) @@\ + @@\ + InstallProgram(program,$(BINDIR)) @@\ + InstallManPage(program,$(MANDIR)) + #endif /* ComplexProgramTarget_2 */ + + + #ifndef ComplexProgramTarget_3 + #define ComplexProgramTarget_3(program,locallib,syslib) @@\ + program: $(OBJS3) $(DEPLIBS3) @@\ + RemoveTargetProgram($@) @@\ + $(LD) $(ALDFLAGS) $(HEAD) -o $@ $(LDOPTIONS) $(OBJS3) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\ + @@\ + SaberProgramTarget(program,$(SRCS3),$(OBJS3),locallib,syslib) @@\ + @@\ + InstallProgram(program,$(BINDIR)) @@\ + InstallManPage(program,$(MANDIR)) + #endif /* ComplexProgramTarget_3 */ + + + /* ServerTarget - generate rules to compile, link, and relink an X server + * for Amoeba or Minix + */ + #if !defined(ServerTarget) && (defined(Amoeba) || defined(Minix)) + #define ServerTarget(server,subdirs,objects,libs,syslibs) @@\ + server: subdirs objects libs @@\ + -@if [ -f server ]; then echo " $(MV) server server.bak"; \ @@\ + $(MV) server server.bak; else exit 0; fi @@\ + $(LD) $(ALDFLAGS) $(HEAD) -o server objects libs $(EXTRA_LIBRARIES) syslibs $(OS_LIBRARIES) $(EXTRA_LOAD_FLAGS) @@\ + @@\ + Concat(load,server): @@\ + -@if [ -f server ]; then echo " $(MV) server server.bak"; \ @@\ + $(MV) server server.bak; else exit 0; fi @@\ + $(LD) $(ALDFLAGS) $(HEAD) -o server objects libs $(EXTRA_LIBRARIES) syslibs $(OS_LIBRARIES) $(EXTRA_LOAD_FLAGS) + #endif /* ServerTarget */ + + /* + * A few dummy Installation rules. + */ + + #ifndef InstallLibrary + #define InstallLibrary(libname,dest) @@\ + install:: Concat(lib,libname.a) @@\ + @echo '** Cannot Install Library ' Concat(lib,libname.a) + #endif /* InstallLibrary */ + + #ifndef MergeIntoInstalledLibrary + #define MergeIntoInstalledLibrary(tolib,fromlib) @@\ + install:: fromlib @@\ + @echo '** Cannot merge ' fromlib into tolib + #endif /* MergeIntoInstalledLibrary */ + + #ifndef InstallLibraryAlias + #define InstallLibraryAlias(libname,alias,dest) @@\ + install:: @@\ + @echo '** Install lib alias yourself' libname alias dest + #endif /* InstallLibraryAlias */ + + #ifndef InstallLintLibrary + #define InstallLintLibrary(libname,dest) @@\ + install.ln:: Concat(llib-l,libname.ln) @@\ + @echo '** Please install lintlib yourself' Concat(llib-l,libname.ln) + #endif /* InstallLintLibrary */ + + #ifndef InstallManPageLong + #define InstallManPageLong(file,destdir,dest) @@\ + install.man:: file.man @@\ + @echo '** Install man page yourself' file.man + #endif /* InstallManPageLong */ + + + #if Amoeba + /* Rest of the files is Amoeba specific. It overrides the installation rules + * to cross-install the Amoeba binaries. + */ + + #ifndef InstallManPageAliases + #define InstallManPageAliases(file,destdir,aliases) @@\ + install.man:: @@\ + @(TMP=/tmp/tmp.$$$$; \ @@\ + $(RM) $${TMP}; \ @@\ + echo .so `basename destdir`/file.$(MANSUFFIX) > $${TMP}; \ @@\ + for i in aliases; do (set -x; \ @@\ + $(TOB) $${TMP} $(DESTDIR)destdir/$$i.$(MANSUFFIX)); \ @@\ + done; \ @@\ + $(RM) $${TMP}) + #endif /* InstallManPageAliases */ + + + /* + * InstallNamedNonExec - generate rules to install a data file + */ + #ifndef InstallNamedNonExec + #define InstallNamedNonExec(srcname,dstname,dest) @@\ + install:: srcname @@\ + $(MKXDIRHIER) $(DESTDIR)dest @@\ + $(TOB) srcname $(DESTDIR)dest/dstname + #endif /* InstallNamedNonExec */ + + + /* + * InstallNonExecFile - generate rules to install a data file + */ + #ifndef InstallNonExecFile + #define InstallNonExecFile(file,dest) @@\ + install:: file @@\ + $(MKXDIRHIER) dest @@\ + $(TOB) file dest/file + #endif /* InstallNonExecFile */ + + + /* + * InstallNonExec - generate rules to install a data file, but does not + * try to create the destination directory (deprecated) + */ + #ifndef InstallNonExec + #define InstallNonExec(file,dest) @@\ + install:: file @@\ + $(TOB) file dest/file + #endif /* InstallNonExec */ + + + /* + * InstallProgramWithFlags - generate rules to install an executable program + * using given install flags. + */ + #ifndef InstallProgramWithFlags + #define InstallProgramWithFlags(program,dest,flags) @@\ + install:: program @@\ + $(MKXDIRHIER) dest/program @@\ + $(AINSTALL) $(AINSTALLFLAGS) program dest/program/pd.$(ARCH) + #endif /* InstallProgramWithFlags */ + + + /* + * InstallScript - install a shell script. + */ + #ifndef InstallScript + #define InstallScript(program,dest) @@\ + install:: program.script @@\ + $(TOB) program.script dest/program + #endif /* InstallScript */ + + + /* + * InstallNamedScript - install a named shell script. + */ + #ifndef InstallNamedScript + #define InstallNamedScript(srcname,dstname,dest) @@\ + install:: srcname @@\ + $(TOB) srcname dest/dstname + #endif /* InstallNamedScript */ + + + /* + * InstallNamedProg - install a program with renaming and no stripping. + */ + #ifndef InstallNamedProg + #define InstallNamedProg(srcname,dstname,dest) @@\ + install:: srcname @@\ + $(MKXDIRHIER) $(DESTDIR)dest/dstname @@\ + $(AINSTALL) $(AINSTALLFLAGS) srcname $(DESTDIR)dest/dstname/pd.$(ARCH) + #endif /* InstallNamedProg */ + + /* + * InstallMultipleDestFlags - generate rules to install multiple files at + * once during a particular step in the build using a specific set of install + * flags. + */ + #ifndef InstallMultipleDestFlags + #define InstallMultipleDestFlags(step,list,dest,flags) @@\ + step:: list @@\ + $(MKXDIRHIER) $(DESTDIR)dest @@\ + @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in list; do \ @@\ + (set -x; $(TOB) $$i dest/$$i); \ @@\ + done + #endif /* InstallMultipleDestFlags */ + + + /* + ** InstallMultipleProg: same, but for prorgams. + */ + #ifndef InstallMultipleProg + #define InstallMultipleProg(list,dest) @@\ + install:: list @@\ + @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ + for i in list; do \ @@\ + (set -x; \ @@\ + $(MKXDIRHIER) $(DESTDIR)dest/$$i; \ @@\ + $(AINSTALL) $(AINSTALLFLAGS) $$i dest/$$i/pd.$(ARCH));\ @@\ + done + #endif /* InstallMultipleProg */ + + + /* + * InstallAppDefaults - generate rules to install appliation default files + * if the InstallAppDefFiles configuration parameter is set. + */ + #ifndef InstallAppDefaults + #if InstallAppDefFiles + #define InstallAppDefaults(class) @@\ + install:: class.ad @@\ + $(MKXDIRHIER) $(XAPPLOADDIR) @@\ + $(TOB) class.ad $(DESTDIR)$(XAPPLOADDIR)/class + #else + #define InstallAppDefaults(class) + #endif /* InstallAppDefFiles */ + #endif /* InstallAppDefaults */ + + /* + * InstallAppDefaultsLong - generate rules to install appliation default files + * if the InstallAppDefFiles configuration parameter is set. + */ + #ifndef InstallAppDefaultsLong + #if InstallAppDefFiles + #define InstallAppDefaultsLong(file,class) @@\ + install:: file.ad @@\ + $(MKXDIRHIER) $(DESTDIR)$(XAPPLOADDIR) @@\ + $(TOB) file.ad $(DESTDIR)$(XAPPLOADDIR)/class + #else + #define InstallAppDefaultsLong(file,class) + #endif /* InstallAppDefFiles */ + #endif /* InstallAppDefaultsLong */ + + #endif /* Amoeba */ + diff -c mit/config/Imake.rules:1.1.1.2 mit/config/Imake.rules:2.1 *** mit/config/Imake.rules:1.1.1.2 Sat Mar 12 00:36:14 1994 --- mit/config/Imake.rules Sat Mar 12 00:36:15 1994 *************** *** 1,5 **** --- 1,6 ---- XCOMM ------------------------------------------------------------------------- XCOMM Imake rules for building libraries, programs, scripts, and data files + XCOMM $XFree86: mit/config/Imake.rules,v 2.1 1993/09/29 11:06:00 dawes Exp $ XCOMM rules: $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $ /* *************** *** 139,144 **** --- 140,149 ---- * */ + #ifdef CrossCompiling + #include "Cross.rules" + #endif + #define NullParameter /* if [ -d ] or [ ! -d ] causes make to fail, define this as - */ *************** *** 339,350 **** server: subdirs objects libs @@\ -@if [ -f server ]; then set -x; \ @@\ $(MV) server server.bak; else exit 0; fi @@\ ! $(CC) $(CDEBUGFLAGS) $(CCOPTIONS) -o server objects libs $(EXTRA_LIBRARIES) syslibs $(EXTRA_LOAD_FLAGS) @@\ @@\ Concat(load,server): @@\ -@if [ -f server ]; then set -x; \ @@\ $(MV) server server.bak; else exit 0; fi @@\ ! $(CC) $(CDEBUGFLAGS) $(CCOPTIONS) -o server objects libs $(EXTRA_LIBRARIES) syslibs $(EXTRA_LOAD_FLAGS) #endif /* ServerTarget */ --- 344,355 ---- server: subdirs objects libs @@\ -@if [ -f server ]; then set -x; \ @@\ $(MV) server server.bak; else exit 0; fi @@\ ! $(CC) $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) -o server objects libs $(EXTRA_LIBRARIES) syslibs $(EXTRA_LOAD_FLAGS) @@\ @@\ Concat(load,server): @@\ -@if [ -f server ]; then set -x; \ @@\ $(MV) server server.bak; else exit 0; fi @@\ ! $(CC) $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) -o server objects libs $(EXTRA_LIBRARIES) syslibs $(EXTRA_LOAD_FLAGS) #endif /* ServerTarget */ *************** *** 439,444 **** --- 444,485 ---- /* + * InstallGenManPageLong - More general rules for installing manual pages -- + * doesn't assume MANSUFFIX. + */ + #ifndef InstallGenManPageLong + #define InstallGenManPageLong(file,destdir,dest,suffix) @@\ + install.man:: file.man @@\ + MakeDir($(DESTDIR)destdir) @@\ + $(INSTALL) -c $(INSTMANFLAGS) file.man $(DESTDIR)destdir/dest.suffix + #endif /* InstallGenManPageLong */ + + + /* + * InstallGenManPage - general equivalent of InstallManPage + */ + #ifndef InstallGenManPage + #define InstallGenManPage(file,destdir,suffix) @@\ + InstallGenManPageLong(file,destdir,file,suffix) + #endif /* InstallGenManPage */ + + + /* + * InstallGenManPageAliases - general equivalent of InstallManPageAliases + */ + #ifndef InstallGenManPageAliases + #define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\ + install.man:: @@\ + @(TMP=/tmp/tmp.$$$$; \ @@\ + $(RM) $${TMP}; \ @@\ + echo .so `basename destdir`/file.suffix > $${TMP}; \ @@\ + for i in aliases; do (set -x; \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/$$i.suffix; \ @@\ + done; \ @@\ + $(RM) $${TMP}) + #endif /* InstallGenManPageAliases */ + + /* * InstallNamedNonExec - generate rules to install a data file */ #ifndef InstallNamedNonExec *************** *** 780,787 **** * LibObjCompile - compile fragment for shared/profiled/debugged objects */ #ifndef LibObjCompile ! #define LibObjCompile(dir,options) $(RM) $@ dir/$@ @@\ ! $(CC) -c $(CCOPTIONS) $(ALLDEFINES) options $*.c @@\ $(MV) $@ dir/$@ #endif --- 821,828 ---- * LibObjCompile - compile fragment for shared/profiled/debugged objects */ #ifndef LibObjCompile ! #define LibObjCompile(dir,options) $(RM) $@ dir/$@ @@\ ! $(CC) -c $(ANSICCOPTIONS) $(CCOPTIONS) $(ALLDEFINES) options $*.c @@\ $(MV) $@ dir/$@ #endif *************** *** 1162,1167 **** --- 1203,1269 ---- /* + * InstallLinkKitLibrary - rule for installing link kit libraries (X386 only) + */ + #ifndef InstallLinkKitLibrary + #define InstallLinkKitLibrary(lib,dir) + #endif /* InstallLinkKitLibrary */ + + + /* + * InstallLinkKitNonExecFile - rule for installing link kit files (X386 only) + */ + #ifndef InstallLinkKitNonExecFile + #define InstallLinkKitNonExecFile(file,dir) + #endif /* InstallLinkKitNonExecFile */ + + + /* + * InstallLinkKitSubdirs - generate rules to recursively install server Link + * Kit (only used for X386) + */ + #ifndef InstallLinkKitSubdirs + #define InstallLinkKitSubdirs(dirs) + #endif /* InstallLinkKitSubdirs */ + + /* + * ConfigTargetLong + */ + #ifndef ConfigTargetLong + #define ConfigTargetLong(target,dep,script,args,extra) @@\ + all:: Configure @@\ + @@\ + Configure:: target.o @@\ + @@\ + target.c: script dep @@\ + $(MAKE) $(MFLAGS) extra Concat(Build,target) @@\ + @@\ + Concat(Build,target): @@\ + $(RM) target.c @@\ + $(SHELL) script args @@\ + @@\ + clean:: @@\ + $(RM) target.c + #endif + + /* + * ConfigTarget - rule for generating a config file + */ + #ifndef ConfigTarget + #define ConfigTarget(target,dep,script,args) ConfigTargetLong(target,dep,script,args,/**/) + #endif /* ConfigTarget */ + + + /* + * InstallLinkKitSubdirs - generate rules to recursively install server Link + * Kit (only used for X386) + */ + #ifndef InstallLinkKitSubdirs + #define InstallLinkKitSubdirs(dirs) + #endif /* InstallLinkKitSubdirs */ + + + /* * IncludesSubdirs - generate rules to recursively put include files in build */ #ifndef IncludesSubdirs *************** *** 1366,1372 **** step:: @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; @@\ DirFailPrefix@for i in dirs; do if [ -d $(DESTDIR)$$i ]; then \ @@\ ! set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi \ @@\ done #endif /* MakeDirectories */ --- 1468,1474 ---- step:: @@\ @case '${MFLAGS}' in *[i]*) set +e;; esac; @@\ DirFailPrefix@for i in dirs; do if [ -d $(DESTDIR)$$i ]; then \ @@\ ! set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi; \ @@\ done #endif /* MakeDirectories */ *************** *** 1409,1415 **** @@\ install:: fonts.dir @@\ MakeDir($(DESTDIR)dest) @@\ ! $(INSTALL) -c $(INSTDATFLAGS) fonts.dir $(DESTDIR)dest #endif /* InstallFontObjs */ --- 1511,1518 ---- @@\ install:: fonts.dir @@\ MakeDir($(DESTDIR)dest) @@\ ! $(MKFONTDIR) $(DESTDIR)dest ! /* $(INSTALL) -c $(INSTDATFLAGS) fonts.dir $(DESTDIR)dest */ #endif /* InstallFontObjs */ *************** *** 1451,1457 **** #define InstallFontScale(dest) @@\ install:: fonts.scale @@\ MakeDir($(DESTDIR)dest) @@\ ! $(INSTALL) -c $(INSTDATFLAGS) fonts.scale $(DESTDIR)dest #endif /* InstallFontScale */ /* --- 1554,1561 ---- #define InstallFontScale(dest) @@\ install:: fonts.scale @@\ MakeDir($(DESTDIR)dest) @@\ ! $(INSTALL) -c $(INSTDATFLAGS) fonts.scale $(DESTDIR)dest @@\ ! $(MKFONTDIR) $(DESTDIR)dest #endif /* InstallFontScale */ /* *************** *** 1467,1473 **** FontBaseObj(basename): FontSrc(basename) @@\ $(FONTC) $(FONTCFLAGS) $? -o $@ #endif ! #endif /* CompressedFontTarget */ /* * CompressedFontTarget --- 1571,1577 ---- FontBaseObj(basename): FontSrc(basename) @@\ $(FONTC) $(FONTCFLAGS) $? -o $@ #endif ! #endif /* UnCompressedFontTarget */ /* * CompressedFontTarget *************** *** 1478,1484 **** $(FONTC) $(FONTCFLAGS) $? | $(COMPRESS) > $@ #endif /* CompressedFontTarget */ ! #ifdef CompressAllFonts #define FontTarget(basename) CompressedFontTarget(basename) #define FontObj(basename) FontBaseObj(basename).Z #else --- 1582,1588 ---- $(FONTC) $(FONTCFLAGS) $? | $(COMPRESS) > $@ #endif /* CompressedFontTarget */ ! #if CompressAllFonts #define FontTarget(basename) CompressedFontTarget(basename) #define FontObj(basename) FontBaseObj(basename).Z #else diff -c mit/config/Imake.tmpl:1.1.1.2 mit/config/Imake.tmpl:2.10 *** mit/config/Imake.tmpl:1.1.1.2 Sat Mar 12 00:36:16 1994 --- mit/config/Imake.tmpl Sat Mar 12 00:36:16 1994 *************** *** 7,12 **** --- 7,13 ---- #endif XCOMM ------------------------------------------------------------------------- XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE + XCOMM $XFree86: mit/config/Imake.tmpl,v 2.10 1994/02/28 13:54:37 dawes Exp $ XCOMM $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ XCOMM XCOMM Platform-specific parameters may be set in the appropriate .cf *************** *** 41,46 **** --- 42,57 ---- * 4. Create a .cf file with the name given by MacroFile. */ + #ifndef INCLUDE_PLATFORM + #define INCLUDE_PLATFORM + #endif + #include INCLUDE_PLATFORM + + #ifndef MacroIncludeFile + /* If INCLUDE_PLATFORM was included, both MacroFile and MacroIncludeFile + * will already be defined. + */ + #ifdef ultrix #define MacroIncludeFile #define MacroFile ultrix.cf *************** *** 63,74 **** #define VaxArchitecture #endif ! #ifdef sun #define MacroIncludeFile #define MacroFile sun.cf #undef sun #define SunArchitecture ! #endif /* sun */ #ifdef hpux #define MacroIncludeFile --- 74,85 ---- #define VaxArchitecture #endif ! #if defined(sun) && !defined(SOLX86) #define MacroIncludeFile #define MacroFile sun.cf #undef sun #define SunArchitecture ! #endif /* sun && !SOLX86 */ #ifdef hpux #define MacroIncludeFile *************** *** 220,234 **** #endif /* MOTOROLA */ #ifdef SYSV386 # define MacroIncludeFile # define MacroFile x386.cf # ifdef SVR4 # define i386SVR4Architecture # else # define i386SVR3Architecture ! # endif #endif /* SYSV386 */ #ifdef DGUX #define MacroIncludeFile #define MacroFile DGUX.cf --- 231,337 ---- #endif /* MOTOROLA */ #ifdef SYSV386 + # ifdef SOLX86 + # undef SOLX86 + # define SVR4 + # define i386SVR4Architecture + # undef i386SVR3Architecture + # define i386SVR4Solarisx86 + # endif # define MacroIncludeFile # define MacroFile x386.cf + # undef i386 # ifdef SVR4 + # undef SVR4 # define i386SVR4Architecture + # ifdef NCR + # define i386Ncr + # undef NCR + # endif # else # define i386SVR3Architecture ! # ifdef SCO ! # define i386Sco ! # undef SCO ! # ifdef SCO324 ! # define ScoVersion 324 ! # undef SCO324 ! # else ! # define ScoVersion 322 ! # endif /* SCO324 */ ! # endif /* SCO */ ! # ifdef ISC ! # define i386Isc ! # undef ISC ! # ifdef ISC202 ! # define IscVersion 202 ! # undef ISC202 ! # else ! # ifdef ISC30 ! # define IscVersion 300 ! # undef ISC30 ! # else ! # ifdef ISC40 ! # define IscVersion 400 ! # undef ISC40 ! # else ! # define IscVersion 221 ! # endif /* ISC40 */ ! # endif /* ISC30 */ ! # endif /* ISC202 */ ! # endif /* ISC */ ! # ifdef ESIX ! # define i386Esix ! # undef ESIX ! # endif /* ESIX */ ! # ifdef ATT ! # define i386Att ! # undef ATT ! # endif /* ATT */ ! # endif /* SVR4 */ #endif /* SYSV386 */ + #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) + # define MacroIncludeFile + # define MacroFile x386.cf + # define i386BsdArchitecture + # ifdef __386BSD__ + # undef __386BSD__ + # endif /* __386BSD__ */ + # ifdef __NetBSD__ + # define i386NetBsd + # undef __NetBSD__ + # endif /* __NetBSD */ + # ifdef NetBSD + # undef NetBSD + # endif /* NetBSD */ + # ifdef __FreeBSD__ + # define i386FreeBsd + # undef __FreeBSD__ + # endif /* __FreeBSD__ */ + # ifdef FreeBSD + # undef FreeBSD + # endif /* FreeBSD */ + #endif /* __386BSD__ || __NetBSD__ || __FreeBSD__ */ + + #ifdef __bsdi__ + # define MacroIncludeFile + # define MacroFile x386.cf + # define i386BsdArchitecture + # define i386Bsdi + # undef __bsdi__ + # ifdef bsdi + # undef bsdi + # endif /* bsdi */ + #endif /* __bsdi__ */ + + #if defined(__OSF__) || defined(OSF) + # define MacroIncludeFile + # define MacroFile x386.cf + # define OsfArchitecture + # undef OSF + #endif + #ifdef DGUX #define MacroIncludeFile #define MacroFile DGUX.cf *************** *** 245,250 **** --- 348,373 ---- # define ConvexArchitecture #endif + #ifdef linux + # define MacroIncludeFile + # define MacroFile x386.cf + # undef linux + # define LinuxArchitecture + #endif /* linux */ + + #ifdef MACH + # ifdef i386 + # undef i386 + # define i386MachArchitecture + # define i386Mach_BsdTree + # define MacroIncludeFile + # define MacroFile x386.cf + # endif + # ifdef CMU + # undef CMU + # endif + #endif + #ifndef MacroIncludeFile XCOMM WARNING: Imake.tmpl not configured; guessing at definitions!!! XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake. *************** *** 252,257 **** --- 375,382 ---- #define MacroFile generic.cf #endif + #endif /* MacroIncludeFile */ + /***************************************************************************** * * * DO NOT MODIFY BELOW THIS LINE * *************** *** 316,321 **** --- 441,452 ---- #ifndef SystemV4 #define SystemV4 NO /* SVR4 */ #endif + #ifndef i386Bsd + #define i386Bsd NO + #endif + #ifndef i386Mach + #define i386Mach NO + #endif #ifndef OSMajorVersion #define OSMajorVersion 0 #endif *************** *** 461,466 **** --- 592,600 ---- #ifndef DefaultCCOptions #define DefaultCCOptions /* as nothing: this is for floating point, etc. */ #endif + #ifndef AnsiCCOptions + #define AnsiCCOptions /* as nothing */ + #endif #ifndef InstPgmFlags #define InstPgmFlags -s #endif *************** *** 519,524 **** --- 653,661 ---- #ifndef AsCmd #define AsCmd as #endif + #ifndef YaccCmd + #define YaccCmd yacc + #endif #ifndef CompressCmd #define CompressCmd compress #endif *************** *** 618,623 **** --- 755,763 ---- #define NdbmDefines /**/ #endif #endif + #ifndef OSLibraries + #define OSLibraries /**/ + #endif #ifndef ExtraLibraries #if SystemV4 #if HasSockets *************** *** 639,644 **** --- 779,790 ---- #define LdCombineFlags -X -r #endif #endif + #if defined(MakeLdRunPath) && AlternateUsrLibDir + #define LdRunPath MakeLdRunPath($(USRLIBDIR)) + #define LdLinkPath MakeLdLinkPath($(USRLIBDIR)) + #else + #define LdRunPath /* */ + #endif #ifndef TagsCmd #define TagsCmd ctags #endif *************** *** 660,665 **** --- 806,826 ---- #ifndef EqnCmd #define EqnCmd eqn #endif + #ifndef NroffCmd + #define NroffCmd nroff + #endif + #ifndef NeqnCmd + #define NeqnCmd neqn + #endif + #ifndef LexCmd + #define LexCmd lex + #endif + #ifndef LexLib + #define LexLib + #endif + #ifndef YaccCmd + #define YaccCmd yacc + #endif #ifndef ExpandManNames #if SystemV #define ExpandManNames NO *************** *** 679,684 **** --- 840,848 ---- #ifndef FilesToClean #define FilesToClean *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut #endif + #ifdef i386SVR3Architecture + .NOEXPORT: + #endif SHELL = BourneShell *************** *** 689,694 **** --- 853,861 ---- BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */ CC = CcCmd AS = AsCmd + LEX = LexCmd + LEXLIB = LexLib + YACC = YaccCmd #if HasFortran FC = FortranCmd FDEBUGFLAGS = FortranDebugFlags *************** *** 715,725 **** --- 882,895 ---- MSMACROS = MsMacros TBL = TblCmd EQN = EqnCmd + NROFF = NroffCmd + NEQN = NeqnCmd STD_INCLUDES = StandardIncludes STD_CPP_DEFINES = StandardCppDefines STD_DEFINES = StandardDefines EXTRA_LOAD_FLAGS = ExtraLoadFlags EXTRA_LIBRARIES = ExtraLibraries + OS_LIBRARIES = OSLibraries TAGS = TagsCmd #if ConstructMFLAGS MFLAGS = -$(MAKEFLAGS) *************** *** 797,802 **** --- 967,976 ---- #endif CDEBUGFLAGS = DefaultCDebugFlags CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */ + ANSICCOPTIONS = AnsiCCOptions + + LDRUNPATH = LdRunPath + LDLINKPATH = LdLinkPath /* * STD_INCLUDES contains system-specific includes * TOP_INCLUDES specifies how to get to /usr/include or its build substitute *************** *** 806,822 **** */ ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) ! CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) #if AlternateUsrLibDir && !defined(UseInstalled) ! LDLIBS = -L$(USRLIBDIR) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) #else ! LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) #endif #if AlternateUsrLibDir && defined(UseInstalled) ! LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR) #else ! LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) #endif LDCOMBINEFLAGS = LdCombineFlags DEPENDFLAGS = DependFlags --- 980,1004 ---- */ ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) ! CFLAGS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) + #ifdef Amoeba + LDLIBS = $(SYS_LIBRARIES) $(OS_LIBRARIES) $(EXTRA_LIBRARIES) + #else #if AlternateUsrLibDir && !defined(UseInstalled) ! LDLIBS = -L$(USRLIBDIR) $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) #else ! LDLIBS = $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) ! #endif #endif + #if !CrossCompiling #if AlternateUsrLibDir && defined(UseInstalled) ! LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR) $(LDRUNPATH) ! #else ! LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) $(LDRUNPATH) ! #endif #else ! LDOPTIONS = #endif LDCOMBINEFLAGS = LdCombineFlags DEPENDFLAGS = DependFlags *************** *** 848,853 **** --- 1030,1047 ---- XCOMM start of Imakefile #include INCLUDE_IMAKEFILE + #ifdef INoCrossCompilation + /* When we are crosscompiling, the programs that are to run on the local host + * (like makedepend, imake(!), ..) should be compiled by the host's compiler. + * If this is the case, insert a define of INoCrossCompilation in the + * Imakefile. The following include will then take care of redefining + * parameters like CC. + */ + #include "hostcc.def" + OS_LIBRARIES = + #endif + + XCOMM ------------------------------------------------------------------------- XCOMM common rules for all Makefiles - do not edit /* *************** *** 882,887 **** --- 1076,1082 ---- InstallSubdirs($(SUBDIRS)) InstallManSubdirs($(SUBDIRS)) + InstallLinkKitSubdirs($(SUBDIRS)) CleanSubdirs($(SUBDIRS)) TagSubdirs($(SUBDIRS)) MakefileSubdirs($(SUBDIRS)) *************** *** 896,901 **** --- 1091,1099 ---- install.man:: @echo "install.man in $(CURRENT_DIR) done" + + install.linkkit:: + @echo "install.linkkit in $(CURRENT_DIR) done" Makefiles:: diff -c mit/config/Imakefile:1.1.1.2 mit/config/Imakefile:2.5 *** mit/config/Imakefile:1.1.1.2 Sat Mar 12 00:36:16 1994 --- mit/config/Imakefile Sat Mar 12 00:36:16 1994 *************** *** 1,6 **** /* - * $XConsortium: Imakefile,v 1.14 91/12/02 11:24:14 rws Exp $ - * * This is used to recreate imake. Makefile.ini is used to generate imake * the first time. */ --- 1,7 ---- + XCOMM $XFree86: mit/config/Imakefile,v 2.5 1994/03/03 12:40:20 dawes Exp $ + XCOMM $XConsortium: Imakefile,v 1.14 91/12/02 11:24:14 rws Exp $ + /* * This is used to recreate imake. Makefile.ini is used to generate imake * the first time. */ *************** *** 7,15 **** DEPLIBS = HEADERS = imakemdep.h ! CFFILES = $(HEADERS) *.rules *.tmpl site.def *.bac *.cf CPP_PROGRAM = CppCmd INCLUDES = -I$(BUILDINCDIR) DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) -DCPP_PROGRAM=\"$(CPP_PROGRAM)\" #ifdef MacIIArchitecture --- 8,19 ---- DEPLIBS = HEADERS = imakemdep.h ! CFFILES = $(HEADERS) *.rules *.tmpl *.def *.bac *.cf CPP_PROGRAM = CppCmd INCLUDES = -I$(BUILDINCDIR) + #ifdef CrossCompiling + BOOTSTRAPCFLAGS = -DCROSS_COMPILE + #endif DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) -DCPP_PROGRAM=\"$(CPP_PROGRAM)\" #ifdef MacIIArchitecture *************** *** 16,30 **** --- 20,101 ---- XBSDLIB = /**/ #endif + #ifdef NeedBerklib + XBSDLIB = /**/ + #endif + + #if NeedInetEmulLib + XINETLIB = /**/ + #endif + + #ifdef XFree86Version + + /* + * This is so we don't have to change the toplevel Imakefile + * We let make 'Makefiles' regenerate X386Conf.tmpl and the updated Makefile + */ + + IMAKE_CMD=$(IMAKE) + + Makefiles:: + $(RM) Makefile.x386 + $(IMAKE) -DMakefileX386 -s Makefile.x386 + $(MAKE) $(MFLAGS) -f Makefile.x386 X386Conf.tmpl + $(MAKE) $(MFLAGS) Makefile + $(RM) Makefile.x386 + + #ifdef MakefileX386 + #if XF86MonoServer + #define X386Vga2Args VGA2DRIVER X386Vga2Drivers + #define X386Hga2Args HGA2DRIVER X386Hga2Drivers + #define X386Bdm2Args BDM2DRIVER X386Bdm2Drivers + #else + #define X386Vga2Args + #define X386Hga2Args + #define X386Bdm2Args + #endif + #if XF86VGA16Server + #define X386Vga16Args VGA16DRIVER X386Vga16Drivers + #else + #define X386Vga16Args + #endif + #if XF86SVGAServer + #define X386VgaArgs VGADRIVER X386Vga256Drivers + #else + #define X386VgaArgs + #endif + #if XF86S3Server + #define XF86S3Args S3DRIVER XF86S3Drivers + #else + #define XF86S3Args + #endif + X386Conf.tmpl:: + $(RM) $@ + $(SHELL) x386config.sh \ + X386VgaArgs X386Vga16Args X386Vga2Args X386Hga2Args X386Bdm2Args \ + XF86S3Args RENDERER FontRenderers + #endif + + #endif + + #ifdef CrossCompiling + #define INoCrossCompilation #undef ImakeDependency #define ImakeDependency(dummy) @@\ Makefile:: imake + OBJS=imake.o + SRCS=imake.c + + ComplexCrossProgramTarget(imake) + #else SimpleProgramTarget(imake) + #endif BuildIncludes($(HEADERS),config,..) InstallMultipleDestFlags(install,$(CFFILES),$(CONFIGDIR),$(INSTDATFLAGS)) + InstallNonExecFile(README,$(CONFIGDIR)) depend:: diff -c mit/config/Library.tmpl:1.1.1.2 mit/config/Library.tmpl:1.5 *** mit/config/Library.tmpl:1.1.1.2 Sat Mar 12 00:36:17 1994 --- mit/config/Library.tmpl Sat Mar 12 00:36:17 1994 *************** *** 6,11 **** --- 6,12 ---- * DoNormalLib, DoSharedLib, DoDebugLib, DoProfileLib */ + XCOMM $XFree86: mit/config/Library.tmpl,v 1.5 1993/03/27 08:55:03 dawes Exp $ XCOMM $XConsortium: Library.tmpl,v 1.12 92/03/20 15:05:19 rws Exp $ #ifndef LibraryCcCmd *************** *** 22,27 **** --- 23,31 ---- #define LibraryCCOptions DefaultCCOptions #endif #endif + #ifndef LibraryAnsiCCOptions + #define LibraryAnsiCCOptions AnsiCCOptions + #endif #ifndef LibraryDefines #define LibraryDefines StandardDefines #endif *************** *** 32,44 **** #define AvoidNullMakeCommand NO #endif #if AvoidNullMakeCommand ! _NULLCMD_ = @ echo -n #endif ! CC = LibraryCcCmd ! CCOPTIONS = LibraryCCOptions ! STD_DEFINES = LibraryDefines ! CDEBUGFLAGS = LibraryCDebugFlags #if DoDebugLib #define _DebuggedLibMkdir() LibMkdir(debugger) --- 36,49 ---- #define AvoidNullMakeCommand NO #endif #if AvoidNullMakeCommand ! _NULLCMD_ = @echo -n #endif ! CC = LibraryCcCmd ! CCOPTIONS = LibraryCCOptions ! ANSICCOPTIONS = LibraryAnsiCCOptions ! STD_DEFINES = LibraryDefines ! CDEBUGFLAGS = LibraryCDebugFlags #if DoDebugLib #define _DebuggedLibMkdir() LibMkdir(debugger) *************** *** 74,79 **** --- 79,98 ---- #define _NormalObjCompile(options) NormalSharedLibObjCompile(options) #else #define _NormalObjCompile(options) NormalLibObjCompile(options) + #endif + + #if defined(i386SVR3Architecture) + #if DoSharedLib + #define _SharedDatCompile(options) NormalSharedLibObjCompile(options) + #else + #define _SharedDatCompile(options) $(_NULLCMD_) + #endif + #ifndef SpecialLibDataRule + #define SpecialLibDataRule(objs,depends,options) @@\ + objs: depends @@\ + _SharedDatCompile(-DSVR3SHDAT options) @@\ + + #endif /* SpecialLibDataRule */ #endif #ifndef LibraryObjectRule diff -c mit/config/Makefile.ini:1.1.1.1 mit/config/Makefile.ini:2.0 *** mit/config/Makefile.ini:1.1.1.1 Sat Mar 12 00:36:17 1994 --- mit/config/Makefile.ini Sat Mar 12 00:36:17 1994 *************** *** 1,3 **** --- 1,4 ---- + # $XFree86: mit/config/Makefile.ini,v 2.0 1993/09/21 15:14:14 dawes Exp $ # # WARNING WARNING WARNING WARNING WARNING WARNING WARNING # *************** *** 20,25 **** --- 21,28 ---- imake:: @echo "making imake with BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)" + @$(RM) X386Conf.tmpl + @touch X386Conf.tmpl imake:: imake.o $(CC) -o imake imake.o diff -c mit/config/Project.tmpl:1.1.1.3 mit/config/Project.tmpl:2.5 *** mit/config/Project.tmpl:1.1.1.3 Sat Mar 12 00:36:18 1994 --- mit/config/Project.tmpl Sat Mar 12 00:36:18 1994 *************** *** 1,5 **** --- 1,6 ---- XCOMM ------------------------------------------------------------------------- XCOMM X Window System Build Parameters + XCOMM $XFree86: mit/config/Project.tmpl,v 2.5 1994/02/27 11:25:48 dawes Exp $ XCOMM $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $ /***************************************************************************** *************** *** 19,33 **** --- 20,65 ---- #ifndef BuildServer #define BuildServer YES #endif + #ifndef BuildServersOnly + #define BuildServersOnly NO + #endif #ifndef BuildFonts #define BuildFonts BuildServer #endif + #ifndef Build75Dpi + #define Build75Dpi BuildFonts + #endif + #ifndef Build100Dpi + #define Build100Dpi BuildFonts + #endif #ifndef BuildFontServer #define BuildFontServer BuildServer #endif + #ifndef BuildType1 + #define BuildType1 NO + #endif + #ifndef BuildSpeedo + #define BuildSpeedo YES + #endif #ifndef BuildPex #define BuildPex YES #endif + #ifndef FontRenderers + #if BuildType1 + #define Type1Renderer Type1 + #else + #define Type1Renderer /**/ + #endif + #if BuildSpeedo + #define SpeedoRenderer Speedo + #else + #define SpeedoRenderer /**/ + #endif + #define FontRenderers SpeedoRenderer Type1Renderer + #endif + #ifndef BuildLargeMiscFonts + #define BuildLargeMiscFonts YES + #endif #ifndef BuildPexClients #define BuildPexClients BuildPex #endif *************** *** 44,49 **** --- 76,87 ---- #ifndef BuildXInputLib #define BuildXInputLib YES #endif + #ifndef WantServerLocks + #define WantServerLocks NO + #endif + #ifndef PartialNetDefault + #define PartialNetDefault NO + #endif #ifndef InstallLibManPages #define InstallLibManPages YES #endif *************** *** 149,154 **** --- 187,199 ---- #ifndef LibManSuffix #define LibManSuffix 3 /* use just one tab or cpp will die */ #endif + #ifndef FileManSuffix + #if SystemV || SystemV4 + #define FileManSuffix 4 /* use just one tab or cpp will die */ + #else + #define FileManSuffix 5 /* use just one tab or cpp will die */ + #endif + #endif #ifndef HasXdmAuth #define HasXdmAuth NO /* if you can not use XDM-AUTH* */ #endif *************** *** 323,328 **** --- 368,376 ---- #ifndef LibmanDir #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX) #endif + #ifndef FileManDir + #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX) + #endif #ifndef NlsDir #define NlsDir $(LIBDIR)/nls #endif *************** *** 329,340 **** #ifndef PexApiDir #define PexApiDir $(LIBDIR)/PEX #endif #ifndef XFileSearchPathBase ! #define XFileSearchPathBase $(LIBDIR)/%L/%T/%N%C%S:$(LIBDIR)/%l/%T/%N%C%S:$(LIBDIR)/%T/%N%C%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S #endif #ifndef XFileSearchPathDefault #ifdef XAppLoadDir ! #define XFileSearchPathDefault XAppLoadDir/%N%C%S:XAppLoadDir/%N%S:XFileSearchPathBase #else #define XFileSearchPathDefault XFileSearchPathBase #endif --- 377,392 ---- #ifndef PexApiDir #define PexApiDir $(LIBDIR)/PEX #endif + /* We need the following %C definition so that we can use sccs on this file. + * Without this def, the following %-sequences will be expanded by sccs. + */ + _percentC_ = %C #ifndef XFileSearchPathBase ! #define XFileSearchPathBase $(LIBDIR)/%L/%T/%N$(_percentC_)%S:$(LIBDIR)/%l/%T/%N$(_percentC_)%S:$(LIBDIR)/%T/%N$(_percentC_)%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S #endif #ifndef XFileSearchPathDefault #ifdef XAppLoadDir ! #define XFileSearchPathDefault XAppLoadDir/%N$(_percentC_)%S:XAppLoadDir/%N%S:XFileSearchPathBase #else #define XFileSearchPathDefault XFileSearchPathBase #endif *************** *** 363,370 **** #ifndef UseCCMakeDepend /* use slow cc -E script */ #define UseCCMakeDepend NO #endif #ifndef DependDir ! #if UseCCMakeDepend #define DependDir $(SCRIPTSRC) #else #define DependDir $(UTILSRC)/makedepend --- 415,425 ---- #ifndef UseCCMakeDepend /* use slow cc -E script */ #define UseCCMakeDepend NO #endif + #ifndef UseGccMakeDepend /* Slowish but correct gcc -M */ + #define UseGccMakeDepend NO + #endif #ifndef DependDir ! #if UseCCMakeDepend || UseGccMakeDepend #define DependDir $(SCRIPTSRC) #else #define DependDir $(UTILSRC)/makedepend *************** *** 374,381 **** --- 429,440 ---- #define ContribDir $(TOP)/../contrib /* contrib is outside core tree */ #endif #ifndef DependCmd + #if UseGccMakeDepend + #define DependCmd $(DEPENDSRC)/gccmakedep + #else #define DependCmd $(DEPENDSRC)/makedepend #endif + #endif #ifndef RemoveTargetProgramByMoving #define RemoveTargetProgramByMoving NO #endif *************** *** 384,390 **** #endif #ifndef ForceNormalLib ! #define ForceNormalLib (HasSaberC | HasGcc) #endif #ifndef SharedLibX #define SharedLibX HasSharedLibraries --- 443,449 ---- #endif #ifndef ForceNormalLib ! #define ForceNormalLib (HasSaberC | (HasGcc & !HasGcc2)) #endif #ifndef SharedLibX #define SharedLibX HasSharedLibraries *************** *** 452,457 **** --- 511,519 ---- #ifndef NormalLibPhigs #define NormalLibPhigs (!SharedLibPhigs | ForceNormalLib) #endif + #ifndef NeedInetEmulLib + #define NeedInetEmulLib NO + #endif #ifndef DoInstallExtensionsIntoXlib *************** *** 486,503 **** --- 548,572 ---- MANSOURCEPATH = ManSourcePath /* prefix for man page sources */ MANSUFFIX = ManSuffix /* suffix for man pages */ LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */ + FILEMANSUFFIX = FileManSuffix /* suffix for config file man pages */ MANDIR = ManDir /* man pages for commands */ LIBMANDIR = LibmanDir /* man pages for library routines */ + FILEMANDIR = FileManDir /* man pages for config files */ NLSDIR = NlsDir /* nls files */ PEXAPIDIR = PexApiDir /* PEX support files */ XAPPLOADDIR = XAppLoadDir /* application default resource dir */ FONTCFLAGS = FontCompilerFlags + LINKKITDIR = LinkKitDir /* Where to install Link Kit */ INSTAPPFLAGS = $(INSTDATFLAGS) /* XXX - this should go away - XXX */ #ifdef UseInstalled IMAKE = imake /* assume BINDIR in path */ + #if UseGccMakeDepend + DEPEND = gccmakedep /* assume BINDIR in path */ + #else DEPEND = makedepend /* assume BINDIR in path */ + #endif RGB = rgb /* assume BINDIR in path */ #ifdef SnfFonts FONTC = bdftosnf /* assume BINDIR in path */ *************** *** 519,524 **** --- 588,603 ---- MKDIRHIER = BourneShell $(SCRIPTSRC)/mkdirhier.sh #endif + #ifndef XFree86Version + #if BuildSpeedo + SPEEDOLIB = $(FONTSRC)/lib/font/Speedo/libSpeedo.a + #endif + #if BuildType1 + TYPE1LIB = $(FONTSRC)/lib/font/Type1/libType1.a + #endif + RENDERERLIBS = $(SPEEDOLIB) $(TYPE1LIB) + #endif + CONFIGSRC = $(TOP)/config DOCUTILSRC = $(TOP)/doc/util CLIENTSRC = $(TOP)/clients *************** *** 644,649 **** --- 723,732 ---- #endif DEPXBSDLIB = _UseCat($(USRLIBDIR),$(LIBSRC)/Berk,/libXbsd.a) XBSDLIB = LoaderLibPrefix _Use(-lXbsd,$(DEPXBSDLIB)) + #if NeedInetEmulLib + DEPXINETLIB = _UseCat($(USRLIBDIR),$(LIBSRC)/InetEmul,/libXinetem.a) + XINETLIB = LoaderLibPrefix _Use(-lXbsd,$(DEPXINETLIB)) + #endif LINTEXTENSIONLIB = _UseCat($(LINTLIBDIR),$(EXTENSIONSRC)/lib,/llib-lXext.ln) LINTXLIB = _UseCat($(LINTLIBDIR),$(XLIBSRC),/llib-lX11.ln) diff -c mit/config/Server.tmpl:1.1.1.1 mit/config/Server.tmpl:1.3 *** mit/config/Server.tmpl:1.1.1.1 Sat Mar 12 00:36:18 1994 --- mit/config/Server.tmpl Sat Mar 12 00:36:18 1994 *************** *** 3,11 **** * that Imakefiles in the server subtree will need. */ XCOMM $XConsortium: Server.tmpl,v 1.5 91/05/06 19:00:26 rws Exp $ ! #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CC=$(CC)' 'CCOPTIONS=$(CCOPTIONS)' #ifndef ServerCcCmd #define ServerCcCmd CcCmd --- 3,12 ---- * that Imakefiles in the server subtree will need. */ + XCOMM $XFree86: mit/config/Server.tmpl,v 1.3 1993/03/27 08:55:06 dawes Exp $ XCOMM $XConsortium: Server.tmpl,v 1.5 91/05/06 19:00:26 rws Exp $ ! #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' 'CC=$(CC)' 'CCOPTIONS=$(CCOPTIONS)' 'ANSICCOPTIONS=$(ANSICCOPTIONS)' #ifndef ServerCcCmd #define ServerCcCmd CcCmd diff -c /dev/null mit/config/ack_ux_i386.cf:1.1 *** /dev/null Sat Mar 12 00:36:19 1994 --- mit/config/ack_ux_i386.cf Sat Mar 12 00:36:19 1994 *************** *** 0 **** --- 1,36 ---- + XCOMM $XFree86: mit/config/ack_ux_i386.cf,v 1.1 1993/03/23 12:56:35 dawes Exp $ + + #include "x_am_i386.cf" + + #define AckToolset YES + #define CrossCompiling YES + + #define CcCmd ack + #define ServerCcCmd ack + #define LdCmd ack + #define YaccCmd byacc + #define DefaultCCOptions -mam_i80386 + #define LibraryCCOptions -mam_i80386 + #define LdCombineFlags -Rled-r -c.out + #define ExtraLoadFlags -fp + #define TermcapLibrary /* in libajax */ + + #if HasLargeTmp + #define ArCmd aal crv /* use /tmp for temp files */ + #else + #define ArCmd aal clrv /* use local dir for temp files */ + #endif + #define RanlibCmd /bin/true + + #define AsCmd AmoebaConf/$(ARCH).$(TOOLSET)/toolset/do_as + #define AsIncl -I$(ATOP)/src/h/machdep/arch/$(ARCH) + #define AsmDefines -DACK_ASSEMBLER + + #define AssembleObject(flags) $(RM) $@ @@\ + AsCmd -mam_i80386 -o $*.o AsmDefines $(INCLUDES) AsIncl flags $*.s + + ARCH = i80386 + TOOLSET = ack + ALDFLAGS = -mam_i80386 -.c -Rcv-s32 + + #include "x386.cf" diff -c /dev/null mit/config/am_site.def:1.2 *** /dev/null Sat Mar 12 00:36:19 1994 --- mit/config/am_site.def Sat Mar 12 00:36:19 1994 *************** *** 0 **** --- 1,72 ---- + XCOMM $XFree86: mit/config/am_site.def,v 1.2 1993/03/23 12:58:50 dawes Exp $ + + /* + * Amoeba configuration defines that should require no change. + */ + #ifdef BeforeVendorCF + + #define ProjectRoot AmoebaConf/$(ARCH).$(TOOLSET)/X11R5 + + #define CommonAmoebaDefines -DAMOEBA -D$(ARCH) + #define StandardDefines CommonAmoebaDefines + #define StandardCppDefines StandardDefines + + #endif /* BeforeVendorCF */ + + #ifdef AfterVendorCF + + #define InstallXdmConfig NO + #define InstallXinitConfig NO + #define InstallFSConfig NO + + #define UsrLibDir $(DESTDIR)/public/module/x11/lib + #define LibDir $(DESTDIR)/public/module/x11/lib + #define ManDirectoryRoot $(DESTDIR)/public/module/x11/man + #define BinDir $(DESTDIR)/public/module/x11/bin + #define IncRoot $(DESTDIR)/public/module/x11/include + #define FontDir $(DESTDIR)/public/module/x11/fonts/$(ARCH) + #define DefaultRGBDatabase $(DESTDIR)/public/module/x11/lib/rgb/$(ARCH)/rgb + + #define ManSuffix 1 + #define ManPath ManDirectoryRoot + #define XmanLocalSearchPath ManDirectoryRoot + + #define DefaultUserPath :/bin:$(BINDIR) + #define DefaultSystemPath /bin:$(BINDIR): + + #define StandardIncludes -I$(ATOP)/src/h -I$(ATOP)/src/h/posix -I$(ATOP)/src/h/posix/machdep/$(ARCH) -I$(ATOP)/src/h/machdep/arch/$(ARCH) -I$(ATOP)/src/h/toolset/$(TOOLSET) + + /* XDMCP is turned on by default, this turns it off for Amoeba */ + #ifdef GccGasOption + #define ServerExtraDefines -DXDEBUG -DNO_ALLOCA GccGasOption + #else + #define ServerExtraDefines -DXDEBUG -DNO_ALLOCA + #endif + + #define Malloc0ReturnsNull YES + #define ServerInstallFlags -s 32 + #define FontDefines -DFONT_SNF + #define ConnectionFlags -DAMTCPCONN -DAMCONN + #ifndef ExtraFPLoadFlags + #define ExtraFPLoadFlags + #endif + #define OSLibraries $(ALIB)/ajax/libajax.a $(ALIB)/amoeba/libamoeba.a $(ALIB)/math/libmath.a ExtraFPLoadFlags + + ATOP = AmoebaTop + ALIB = AmoebaConf/$(ARCH).$(TOOLSET)/lib + #ifdef AckToolset + /* The ACK toolset already links in the appropriate head.o by default */ + HEAD = + #else + HEAD = $(ALIB)/head/head.o + #endif + + ABIN = AmoebaBin + AINSTALL = /bin/sh $(SCRIPTSRC)/aminstall.sh $(ABIN) + AINSTALLFLAGS = + TOB = /bin/sh $(SCRIPTSRC)/aminstall.sh $(ABIN) + + MKXDIRHIER = /bin/sh $(SCRIPTSRC)/ammkdirhier.sh $(ABIN) + + #endif /* AfterVendorCF */ + diff -c /dev/null mit/config/amoeba.cf:1.2 *** /dev/null Sat Mar 12 00:36:19 1994 --- mit/config/amoeba.cf Sat Mar 12 00:36:19 1994 *************** *** 0 **** --- 1,26 ---- + XCOMM $XFree86: mit/config/amoeba.cf,v 1.2 1993/03/23 12:58:52 dawes Exp $ + + /* + * Defines for X11 Amoeba that are both compiler set and architecture + * independent. + */ + #define OSName AMOEBA + #define OSMajorVersion 5 + #define OSMinorVersion 1 + #define OSVendor Vrije Universiteit + + #define Amoeba YES + + #define BuildServer YES + #define BuildFonts NO + #define BuildFontServer NO + #define BuildPex NO + + #define ExecableScripts NO + #define HasPutenv NO /* will change, some day */ + #define HasVoidSignalReturn YES + #define HasSharedLibraries NO + #define HasShm NO + #define HasNdbm YES /* i.e. something that looks like it */ + + #define NdbmDefines -DSDBM -DNDBM -I$(INCLUDESRC) diff -c mit/config/att.cf:1.1.1.1 mit/config/att.cf:2.0 *** mit/config/att.cf:1.1.1.1 Sat Mar 12 00:36:20 1994 --- mit/config/att.cf Sat Mar 12 00:36:20 1994 *************** *** 15,19 **** #define NeedWidePrototypes NO /* experimental */ #define DefaultCCOptions -Xc #define ServerOSDefines -DSYSV386 -DATT ! #define X386Server YES #include --- 15,19 ---- #define NeedWidePrototypes NO /* experimental */ #define DefaultCCOptions -Xc #define ServerOSDefines -DSYSV386 -DATT ! #define XF86SVGAServer YES #include diff -c /dev/null mit/config/bsdLib.rules:2.1 *** /dev/null Sat Mar 12 00:36:20 1994 --- mit/config/bsdLib.rules Sat Mar 12 00:36:20 1994 *************** *** 0 **** --- 1,73 ---- + XCOMM $XFree86: mit/config/bsdLib.rules,v 2.1 1993/12/03 13:11:55 dawes Exp $ + XCOMM $XConsortium: sunLib.rules,v 1.7 91/12/20 11:19:47 rws Exp $ + + /* + * NetBSD/FreeBSD shared library rules + */ + + #ifndef HasSharedLibraries + #define HasSharedLibraries YES + #endif + #ifndef ForceNormalLib + #define ForceNormalLib YES + #endif + #ifndef SharedDataSeparation + #define SharedDataSeparation NO + #endif + #ifndef SharedCodeDef + #define SharedCodeDef + #endif + #ifndef SharedLibraryDef + #define SharedLibraryDef -DBSDSHLIB + #endif + #ifndef ShLibIncludeFile + #define ShLibIncludeFile + #endif + #ifndef SharedLibraryLoadFlags + #define SharedLibraryLoadFlags -Bshareable + #endif + #ifndef PositionIndependentCFlags + #define PositionIndependentCFlags -fpic + #endif + + /* + * InstallSharedLibrary - generate rules to install the shared library. + */ + #ifndef InstallSharedLibrary + #define InstallSharedLibrary(libname,rev,dest) @@\ + install:: Concat(lib,libname.so.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + + #endif /* InstallSharedLibrary */ + + /* + * NormalSharedLibraryTarget - generate rules to create a shared library; + * build it into a different name so that the we do not hose people by having + * the library gone for long periods. + */ + #ifndef SharedLibraryTarget + #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ + AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ + Concat(lib,libname.so.rev): solist @@\ + $(RM) $@~ @@\ + (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @@\ + clean:: @@\ + $(RM) Concat(lib,libname.so.rev) + + #endif /* SharedLibraryTarget */ + + /* + * SharedLibraryDataTarget - generate rules to create shlib data file; + */ + #ifndef SharedLibraryDataTarget + #define SharedLibraryDataTarget(libname,rev,salist) + #endif /* SharedLibraryDataTarget */ + + #ifndef InstallSharedLibraryData + #define InstallSharedLibraryData(libname,rev,dest) + #endif /* InstallSharedLibraryData */ diff -c /dev/null mit/config/bsdLib.tmpl:2.1 *** /dev/null Sat Mar 12 00:36:20 1994 --- mit/config/bsdLib.tmpl Sat Mar 12 00:36:20 1994 *************** *** 0 **** --- 1,79 ---- + XCOMM $XFree86: mit/config/bsdLib.tmpl,v 2.1 1993/12/17 10:57:09 dawes Exp $ + XCOMM $XConsortium: sunLib.tmpl,v 1.14.1.2 92/11/11 09:52.02 rws Exp $ + + /* + * SunOS shared library template + */ + + #ifndef SharedXlibRev + #define SharedXlibRev 2.0 + #endif + #ifndef SharedOldXRev + #define SharedOldXRev 2.0 + #endif + #ifndef SharedXtRev + #define SharedXtRev 2.0 + #endif + #ifndef SharedXawRev + #define SharedXawRev 2.0 + #endif + #ifndef SharedXmuRev + #define SharedXmuRev 2.0 + #endif + #ifndef SharedXextRev + #define SharedXextRev 2.0 + #endif + #ifndef SharedXinputRev + #define SharedXinputRev 2.0 + #endif + #ifndef SharedXTrapRev + #define SharedXTrapRev 2.0 + #endif + #ifndef SharedPexRev + #define SharedPexRev 2.0 + #endif + + SHLIBLDFLAGS = SharedLibraryLoadFlags + PICFLAGS = PositionIndependentCFlags + + /* + * and now a little bit of magic for using imake without source tree; if we + * are using shared libraries, we really do not need to depend on anything + */ + #if SharedLibXext + DEPEXTENSIONLIB = /* _UseCat($(USRLIBDIR),$(EXTENSIONSRC)/lib,/libXext.so.$(SOXEXTREV)) */ + EXTENSIONLIB = _Use(-lXext,-L$(EXTENSIONSRC)/lib -lXext) + #endif + #if SharedLibX + DEPXLIB = $(DEPEXTENSIONLIB) /* _UseCat($(USRLIBDIR),$(XLIBSRC),/libX11.so.$(SOXLIBREV)) */ + XLIB = $(EXTENSIONLIB) _Use(-lX11,-L$(XLIBSRC) -lX11) + #endif + #if SharedLibXmu + /* Sun shared libraries are deficient in link semantics */ + DEPXMULIB = _UseCat($(USRLIBDIR),$(XMUSRC),/libXmu.so.$(SOXMUREV)) + XMULIBONLY = _Use(-lXmu,-L$(XMUSRC) -lXmu) + XMULIB = _Use(-lXmu,-L$(XMUSRC) -lXmu -L$(TOOLKITSRC) -lXt -L$(EXTENSIONSRC)/lib -lXext -L$(XLIBSRC) -lX11) + #if !defined(UseInstalled) && !defined(XawClientLibs) + #define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB) + #endif + #endif + #if SharedOldLibX + DEPOLDXLIB = /* _UseCat($(USRLIBDIR),$(OLDXLIBSRC),/liboldX.so.$(SOOLDXREV)) */ + OLDXLIB = _Use(-loldX,-L$(OLDXLIBSRC) -loldX) + #endif + #if SharedLibXt + DEPXTOOLLIB = _UseCat($(USRLIBDIR),$(TOOLKITSRC),/libXt.so.$(SOXTREV)) + XTOOLLIB = _Use(-lXt,-L$(TOOLKITSRC) -lXt) + #endif + #if SharedLibXaw + DEPXAWLIB = _UseCat($(USRLIBDIR),$(AWIDGETSRC),/libXaw.so.$(SOXAWREV)) + XAWLIB = _Use(-lXaw,-L$(AWIDGETSRC) -lXaw) + #endif + #if SharedLibXinput + DEPXILIB = /* _UseCat($(USRLIBDIR),$(XILIBSRC),/libXi.so.$(SOXINPUTREV)) */ + XILIB = _Use(-lXi,-L$(XILIBSRC) -lXi) + #endif + #if SharedLibPex + DEPPEXLIB = /* _UseCat($(USRLIBDIR),$(PEXLIBSRC),/libPEX5.so.$(SOPEXREV)) */ + PEXLIB = _Use(-lPEX5,-L$(PEXLIBSRC) -lPEX5) + #endif diff -c /dev/null mit/config/gnu_am_i386.cf:1.1 *** /dev/null Sat Mar 12 00:36:20 1994 --- mit/config/gnu_am_i386.cf Sat Mar 12 00:36:20 1994 *************** *** 0 **** --- 1,8 ---- + XCOMM $XFree86: mit/config/gnu_am_i386.cf,v 1.1 1993/03/23 12:56:38 dawes Exp $ + + #include "x_am_i386.cf" + + #define ExtraLoadFlags -lsoft + #define CrossConf AmoebaConf + + #include "gnucross386.cf" diff -c /dev/null mit/config/gnu_mnx_386.cf:1.1 *** /dev/null Sat Mar 12 00:36:21 1994 --- mit/config/gnu_mnx_386.cf Sat Mar 12 00:36:21 1994 *************** *** 0 **** --- 1,8 ---- + XCOMM $XFree86: mit/config/gnu_mnx_386.cf,v 1.1 1993/03/23 12:56:39 dawes Exp $ + + #include "x_mnx_i386.cf" + + #define ExtraLoadFlags -lsoft -N + #define CrossConf MinixConf + + #include "gnucross386.cf" diff -c /dev/null mit/config/gnucross386.cf:1.1 *** /dev/null Sat Mar 12 00:36:21 1994 --- mit/config/gnucross386.cf Sat Mar 12 00:36:21 1994 *************** *** 0 **** --- 1,42 ---- + XCOMM $XFree86: mit/config/gnucross386.cf,v 1.1 1993/03/23 12:56:40 dawes Exp $ + + #define CrossCompiling YES + #define GnuToolset YES + + #define GccUsesGas YES + #define UseGas YES + + #define GccGasOption -DGCCUSESGAS + + #define CcCmd CrossConf/$(ARCH).$(TOOLSET)/toolset/do_gcc + #define ServerCcCmd CcCmd + #define LdCmd CrossConf/$(ARCH).$(TOOLSET)/toolset/do_ld + + #define DoGccOption -mam_i80386 -msoft + #define YaccCmd byacc + #define DefaultCCOptions DoGccOption -DNO_ASM -nodeps -fwritable-strings + #define LibraryCCOptions DoGccOption -DNO_ASM -nodeps + #define LdCombineFlags -r + #define OptimizedCDebugFlags -O2 + #define TermcapLibrary /* in standard library */ + + #define GnuAr CrossConf/$(ARCH).$(TOOLSET)/toolset/do_ar + #if HasLargeTmp + #define ArCmd GnuAr crsv /* use /tmp for temp files */ + #else + #define ArCmd GnuAr clrsv /* use local dir for temp files */ + #endif + #define RanlibCmd /bin/true + + #define AsCmd CrossConf/$(ARCH).$(TOOLSET)/toolset/do_as + #define AsIncl -I$(ATOP)/src/h/machdep/arch/$(ARCH) + #define AsmDefines -DUSE_GAS + + #define AssembleObject(flags) $(RM) $@ @@\ + AsCmd -mam_i80386 -o $*.o AsmDefines $(INCLUDES) AsIncl flags $*.s + + ARCH = i80386 + TOOLSET = gnu-2 + ALDFLAGS = -mam_i80386 + + #include "x386.cf" diff -c /dev/null mit/config/hostcc.def:1.1 *** /dev/null Sat Mar 12 00:36:21 1994 --- mit/config/hostcc.def Sat Mar 12 00:36:21 1994 *************** *** 0 **** --- 1,13 ---- + XCOMM $XFree86: mit/config/hostcc.def,v 1.1 1993/03/23 12:56:41 dawes Exp $ + + /* Host C compiler definitions. Used in cross-compile environments in + * case we want to compile a program that should run on the host itself. + */ + #ifdef CrossCompiling + CC = cc + CFLAGS = $(ALLINCLUDES) $(DEFINES) + AR = ar clq + RANLIB = ranlib + LD = cc + LDOPTIONS = + #endif /* CrossCompiling */ diff -c mit/config/imake.c:1.1.1.1 mit/config/imake.c:2.1 *** mit/config/imake.c:1.1.1.1 Sat Mar 12 00:36:22 1994 --- mit/config/imake.c Sat Mar 12 00:36:22 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/config/imake.c,v 2.1 1993/12/18 11:42:21 dawes Exp $ */ /* $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $ */ /*****************************************************************************\ *************** *** 100,107 **** --- 101,110 ---- #include #include "Xosdefs.h" #ifndef X_NOT_POSIX + #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #endif + #endif #include #include #ifdef X_NOT_POSIX *************** *** 129,135 **** #define waitSig(w) WTERMSIG(w) typedef int waitType; #else /* X_NOT_POSIX */ ! #ifdef SYSV #define waitCode(w) (((w) >> 8) & 0x7f) #define waitSig(w) ((w) & 0xff) typedef int waitType; --- 132,138 ---- #define waitSig(w) WTERMSIG(w) typedef int waitType; #else /* X_NOT_POSIX */ ! #if defined(SYSV) || defined(AMOEBA) || defined(_MINIX) #define waitCode(w) (((w) >> 8) & 0x7f) #define waitSig(w) ((w) & 0xff) typedef int waitType; *************** *** 155,165 **** --- 158,174 ---- #if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ char *malloc(), *realloc(); #endif /* macII */ + #ifdef __NetBSD__ + #include + #endif /* __NetBSD__ */ #ifdef X_NOT_STDC_ENV extern char *getenv(); #endif #include extern int errno; + #ifndef X_NO_STRERROR + #include + #endif #include "imakemdep.h" *************** *** 441,447 **** --- 450,458 ---- LogFatal(x0,x1) char *x0, *x1; { + #ifdef X_NO_STRERROR extern char *sys_errlist[]; + #endif static boolean entered = FALSE; if (entered) *************** *** 450,456 **** --- 461,471 ---- fprintf(stderr, "%s: ", program); if (errno) + #ifdef X_NO_STRERROR fprintf(stderr, "%s: ", sys_errlist[ errno ]); + #else + fprintf(stderr, "%s: ", strerror(errno)); + #endif fprintf(stderr, x0,x1); fprintf(stderr, " Stop.\n"); wrapup(); *************** *** 493,498 **** --- 508,520 ---- cleanedImakefile = CleanCppInput(Imakefile); if ((pipeFile = fdopen(pipefd[1], "w")) == NULL) LogFatalI("Cannot fdopen fd %d for output.", pipefd[1]); + #ifdef CROSS_COMPILE + fprintf(pipeFile, "#define INCLUDE_PLATFORM\t\n"); + #endif + #ifdef __NetBSD__ + fprintf(pipeFile, "#define __NetBSD__version__\t%d\n", + NetBSD); + #endif fprintf(pipeFile, "#define IMAKE_TEMPLATE\t\"%s\"\n", template); fprintf(pipeFile, "#define INCLUDE_IMAKEFILE\t<%s>\n", *************** *** 506,511 **** --- 528,534 ---- if (WIFEXITED(status) && waitCode(status)) LogFatalI("Exit code %d.", waitCode(status)); } + freopen(outfname, "r+", outfd); CleanCppOutput(outfd, outfname); } else { /* child... dup and exec cpp */ if (verbose) *************** *** 710,722 **** fseek(tmpfd, 0, 0); fstat(fileno(tmpfd), &st); pline = buf = Emalloc(st.st_size+1); ! total_red = read(fileno(tmpfd), buf, st.st_size); if (total_red != st.st_size) LogFatal("cannot read %s\n", tmpMakefile); end = buf + st.st_size; *end = '\0'; ! lseek(fileno(tmpfd), 0, 0); ! #ifdef SYSV freopen(tmpfname, "w+", tmpfd); #else /* !SYSV */ ftruncate(fileno(tmpfd), 0); --- 733,745 ---- fseek(tmpfd, 0, 0); fstat(fileno(tmpfd), &st); pline = buf = Emalloc(st.st_size+1); ! total_red = fread(buf, 1, st.st_size, tmpfd); if (total_red != st.st_size) LogFatal("cannot read %s\n", tmpMakefile); end = buf + st.st_size; *end = '\0'; ! fseek(tmpfd, 0, 0); ! #if defined(SYSV) || defined(AMOEBA) || defined(_MINIX) freopen(tmpfname, "w+", tmpfd); #else /* !SYSV */ ftruncate(fileno(tmpfd), 0); diff -c mit/config/imakemdep.h:1.1.1.1 mit/config/imakemdep.h:2.7 *** mit/config/imakemdep.h:1.1.1.1 Sat Mar 12 00:36:23 1994 --- mit/config/imakemdep.h Sat Mar 12 00:36:23 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/config/imakemdep.h,v 2.7 1994/02/12 11:03:52 dawes Exp $ * $XConsortium: imakemdep.h,v 1.38 91/08/25 11:36:39 rws Exp $ * * This file contains machine-dependent constants for the imake utility. *************** *** 73,84 **** #ifdef SYSV386 # ifdef SVR4 ! # define imake_ccflags "-Xc -DSVR4" # else # define imake_ccflags "-DSYSV" # endif #endif #ifdef __convex__ #define imake_ccflags "-fn -tm c1" #endif --- 74,95 ---- #ifdef SYSV386 # ifdef SVR4 ! # ifdef SOLX86 ! # define imake_ccflags "-DSOLX86 -DSVR4" ! # else ! # define imake_ccflags "-Xc -DSVR4" ! # endif # else # define imake_ccflags "-DSYSV" # endif #endif + #ifdef MACH + # ifdef i386 + # define imake_ccflags "-DNOSTDHDRS" + # endif + #endif + #ifdef __convex__ #define imake_ccflags "-fn -tm c1" #endif *************** *** 126,131 **** --- 137,151 ---- #if defined(_IBMR2) && !defined(DEFAULT_CPP) #define DEFAULT_CPP "/usr/lpp/X11/Xamples/util/cpp/cpp" #endif + #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) + #define DEFAULT_CPP "/usr/libexec/cpp" + #endif + #ifdef __bsdi__ + #define DEFAULT_CPP "/usr/bin/cpp" + #endif + #ifdef SOLX86 + #define DEFAULT_CPP "/usr/ccs/lib/cpp" + #endif /* * Step 5: cpp_argv *************** *** 156,161 **** --- 176,187 ---- #ifdef unix "-Uunix", /* remove unix symbol so that filename unix.c okay */ #endif + #if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined (__bsdi__) + "-traditional", + #endif + #ifdef __OSF__ + "-traditional", + #endif #ifdef M4330 "-DM4330", /* Tektronix */ #endif *************** *** 226,240 **** #endif /* MOTOROLA */ #ifdef SYSV386 /* System V/386 folks */ "-DSYSV386", # ifdef SVR4 "-DSVR4", # endif # ifdef ISC ! "-DISC", /* ISC 2.2.1 */ # endif # ifdef SCO "-DSCO", # endif # ifdef ESIX "-DESIX", # endif --- 252,288 ---- #endif /* MOTOROLA */ #ifdef SYSV386 /* System V/386 folks */ "-DSYSV386", + # ifdef SOLX86 /* Solaris 2.1 x86 */ + "-DSOLX86" + # endif # ifdef SVR4 "-DSVR4", # endif # ifdef ISC ! "-DISC", ! # ifdef ISC30 ! "-DISC30", /* ISC 3.0 */ ! # else ! # ifdef ISC202 ! "-DISC202", /* ISC 2.0.2 */ ! # else ! # ifdef ISC40 ! "-DISC40", /* ISC 4.0 */ ! # else ! "-DISC22", /* ISC 2.2.1 */ ! # endif ! # endif ! # endif # endif + # ifdef NCR + "-DNCR", + # endif # ifdef SCO "-DSCO", # endif + # ifdef SCO324 + "-DSCO324", + # endif # ifdef ESIX "-DESIX", # endif *************** *** 241,249 **** # ifdef ATT "-DATT", # endif ! # ifdef DELL ! "-DDELL", #endif #endif }; #else /* else MAKEDEPEND */ --- 289,303 ---- # ifdef ATT "-DATT", # endif ! #endif ! #ifdef __386BSD__ ! # ifdef __FreeBSD__ ! /* __FreeBSD__ is not defined by the OS in FreeBSD 1.0.2 or earlier. */ ! "-D__FreeBSD__", ! # endif #endif + #ifdef linux + "-traditional", #endif }; #else /* else MAKEDEPEND */ *************** *** 314,319 **** --- 368,379 ---- #ifdef CMU {"CMU", "1"}, #endif + #ifdef i386 + {"i386", "1"}, + #endif + #ifdef MACH + {"MACH", "1"}, + #endif #ifdef luna {"luna", "1"}, #ifdef luna1 *************** *** 348,354 **** {"bsd43", "1"}, #endif #ifdef hcx ! {"hcx", 1}, #endif /* add any additional symbols before this line */ {NULL, NULL} --- 408,426 ---- {"bsd43", "1"}, #endif #ifdef hcx ! {"hcx", "1"}, ! #endif ! #ifdef __386BSD__ ! {"__386BSD__", "1"}, ! #endif ! #ifdef __NetBSD__ ! {"__NetBSD__", "1"}, ! #endif ! #ifdef __FreeBSD__ ! {"__FreeBSD__", "1"}, ! #endif ! #ifdef __bsdi__ ! {"__bsdi__", "1"}, #endif /* add any additional symbols before this line */ {NULL, NULL} diff -c /dev/null mit/config/lnuxLib.rules:2.8 *** /dev/null Sat Mar 12 00:36:23 1994 --- mit/config/lnuxLib.rules Sat Mar 12 00:36:23 1994 *************** *** 0 **** --- 1,384 ---- + XCOMM $XFree86: mit/config/lnuxLib.rules,v 2.8 1994/03/08 06:10:55 dawes Exp $ + /* + * Linux shared library rules (DLL version) + */ + #ifndef HasSharedLibraries + #define HasSharedLibraries YES + #endif + #ifndef ForceNormalLib + #define ForceNormalLib NO + #endif + + #ifndef SharedLibX + #define SharedLibX HasSharedLibraries + #endif + #ifndef SharedOldLibX + #define SharedOldLibX NO + #endif + #ifndef SharedLibXt + #define SharedLibXt HasSharedLibraries + #endif + #ifndef SharedLibXaw + #define SharedLibXaw HasSharedLibraries + #endif + #ifndef SharedLibXmu + #define SharedLibXmu HasSharedLibraries + #endif + #ifndef SharedLibXext + #define SharedLibXext HasSharedLibraries + #endif + #ifndef SharedLibXTest + #define SharedLibXTest HasSharedLibraries + #endif + #ifndef NormalLibXTest + #define NormalLibXTest (!SharedLibXTest | ForceNormalLib) + #endif + #ifndef SharedLibXinput + #define SharedLibXinput HasSharedLibraries + #endif + #ifndef SharedLibPex + #define SharedLibPex HasSharedLibraries + #endif + + #ifndef SharedDataSeparation + #define SharedDataSeparation NO + #endif + #ifndef SharedCodeDef + #define SharedCodeDef /**/ + #endif + #ifndef SharedLibraryDef + #define SharedLibraryDef /**/ + #endif + #ifndef ShLibIncludeFile + #define ShLibIncludeFile + #endif + #ifndef SharedLibraryLoadFlags + #define SharedLibraryLoadFlags /**/ + #endif + #ifndef PositionIndependentCFlags + #define PositionIndependentCFlags -B/usr/dll/jump/ + #endif + + DLL_BINDIR = /usr/dll/bin + + /* + * These definitions are now extended to work with the X sources and + * external sources wishing to build shared libs. + * + * A library can create it's own shlibs (.so) or can be incorporated into + * another "host" lib. All libraries generate stub (.sa) files. + * A "host" lib does all the work to generate the stubs for itself and its + * "guests", invoking the "guest" Makefiles to create the objects for + * inclusion into the "host" shlib. A "guest" lib will ask the "host" to + * create the stubfiles, then copy its own into its directory. + * Most external libs are "host" libs; the concept of "guest" is a holdover + * from older libs during the days of scarce shared library address space. + * + * To create a simple "host" shared lib, Xfoo, define: + * + * JUMP_ROOT_Xfoo = + * JUMP_IS_HOST_Xfoo = YES + * JUMP_STUBLIBS_Xfoo = libXfoo.sa + * JUMP_DIR_Xfoo = $(JUMP_ROOT_Xfoo)/shared + * JUMP_VARS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_vars + * JUMP_FUNCS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_funcs + * JUMP_IGNORE_Xfoo = $(JUMP_ROOT_Xfoo)/jump_ignore + * JUMP_ADDRESS_Xfoo = 0xXXXXXXXX + * JUMP_JUMPTABLESIZE_Xfoo = 0x4000 + * JUMP_GOTSIZE_Xfoo = 4096 + * JUMP_STUBNAMES_Xfoo = libXfoo + * JUMP_STUBS_IMPORT_Xfoo = /usr/lib/libc.sa + * JUMP_LDLIBS_Xfoo = `$(CC) --print` -lc + * + * To create a complex "host", you need to add + * JUMP_SIBARS_Xt = jump/libXbar.a~ + * These are the archives of the shared objects of the "guest" libs. They + * need to be added to the JUMP_LDLIBS_Xfoo lines. + * + * For further clarification, study the definitions of libXaw, a simple "host" + * lib, libXt, a complex "host" lib, and libXmu, one of libXts "guests". + * + * As a hint of how to start (with the DLL docs), touch jump_vars, jump_funcs + * and jump_ignore, then compile. Then massage the jump.vars and jump.funcs + * files in the shared subdirectory into jump_xxx files. + */ + + #ifndef UseInstalled + XCOMM These are only needed to build the server + + XCOMM libX11.so (X11) + JUMP_ROOT_X11 = $(XLIBSRC) + JUMP_IS_HOST_X11 = YES + JUMP_STUBLIBS_X11 = libX11.sa + JUMP_DIR_X11 = $(JUMP_ROOT_X11)/shared + JUMP_VARS_X11 = $(JUMP_ROOT_X11)/jump_vars + JUMP_FUNCS_X11 = $(JUMP_ROOT_X11)/jump_funcs + JUMP_IGNORE_X11 = $(JUMP_ROOT_X11)/jump_ignore + JUMP_ADDRESS_X11 = 0x60200000 + JUMP_JUMPTABLESIZE_X11 = 0x4000 + JUMP_GOTSIZE_X11 = 4096 + JUMP_STUBNAMES_X11 = libX11 + JUMP_STUBS_IMPORT_X11 = /usr/lib/libc.sa + JUMP_LDLIBS_X11 = `$(CC) --print` -lc + + XCOMM libXt.so (Xt, Xmu, Xext, Xi, Xtst) + JUMP_ROOT_Xt = $(TOOLKITSRC) + JUMP_IS_HOST_Xt = YES + JUMP_STUBLIBS_Xt = libXt.sa libXmu.sa libXext.sa libXi.sa libXtst.sa + JUMP_SUBDIRS_Xt = $(JUMP_ROOT_X11) + JUMP_SIBDIRS_Xt = $(JUMP_ROOT_Xmu) $(JUMP_ROOT_Xext) \ + $(JUMP_ROOT_Xi) $(JUMP_ROOT_Xtst) + JUMP_DIR_Xt = $(JUMP_ROOT_Xt)/shared + JUMP_VARS_Xt = $(JUMP_ROOT_Xt)/jump_vars + JUMP_FUNCS_Xt = $(JUMP_ROOT_Xt)/jump_funcs + JUMP_IGNORE_Xt = $(JUMP_ROOT_Xt)/jump_ignore + JUMP_IMPORT_Xt = $(JUMP_VARS_X11) + JUMP_ADDRESS_Xt = 0x602a0000 + JUMP_JUMPTABLESIZE_Xt = 0x4000 + JUMP_GOTSIZE_Xt = 4096 + JUMP_STUBNAMES_Xt = libXt libXmu libXext libXi libXtst + JUMP_STUBS_IMPORT_Xt = $(JUMP_STUBS_IMPORT_X11) + JUMP_SIBARS_Xt = jump/libXmu.a~ jump/libXext.a~ jump/libXi.a~ jump/libXtst.a~ + JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_X11) + + XCOMM libXmu (part of libXt.so) + JUMP_ROOT_Xmu = $(XMUSRC) + JUMP_IS_HOST_Xmu = NO + JUMP_HOST_Xmu = $(JUMP_ROOT_Xt) + JUMP_DIR_Xmu = $(JUMP_DIR_Xt) + + XCOMM libXext (part of libXt.so) + JUMP_ROOT_Xext = $(EXTENSIONSRC)/lib + JUMP_IS_HOST_Xext = NO + JUMP_HOST_Xext = $(JUMP_ROOT_Xt) + JUMP_DIR_Xext = $(JUMP_DIR_Xt) + + XCOMM libXi (part of libXt.so) + JUMP_ROOT_Xi = $(XILIBSRC) + JUMP_IS_HOST_Xi = NO + JUMP_HOST_Xi = $(JUMP_ROOT_Xt) + JUMP_DIR_Xi = $(JUMP_DIR_Xt) + + XCOMM libXtst (part of libXt.so) + JUMP_ROOT_Xtst = $(EXTENSIONSRC)/lib/xtest + JUMP_IS_HOST_Xtst = NO + JUMP_HOST_Xtst = $(JUMP_ROOT_Xt) + JUMP_DIR_Xtst = $(JUMP_DIR_Xt) + + XCOMM libXaw.so (Xaw) + JUMP_ROOT_Xaw = $(AWIDGETSRC) + JUMP_IS_HOST_Xaw = YES + JUMP_STUBLIBS_Xaw = libXaw.sa + JUMP_SUBDIRS_Xaw = $(JUMP_ROOT_Xt) + JUMP_DIR_Xaw = $(JUMP_ROOT_Xaw)/shared + JUMP_VARS_Xaw = $(JUMP_ROOT_Xaw)/jump_vars + JUMP_FUNCS_Xaw = $(JUMP_ROOT_Xaw)/jump_funcs + JUMP_IGNORE_Xaw = $(JUMP_ROOT_Xaw)/jump_ignore + JUMP_IMPORT_Xaw = $(JUMP_VARS_Xt) $(JUMP_VARS_X11) + JUMP_ADDRESS_Xaw = 0x60300000 + JUMP_JUMPTABLESIZE_Xaw = 0x4000 + JUMP_GOTSIZE_Xaw = 4096 + JUMP_STUBNAMES_Xaw = libXaw + JUMP_STUBS_IMPORT_Xaw = $(JUMP_STUBS_IMPORT_X11) + JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libXt.sa $(JUMP_ROOT_Xt)/libXmu.sa \ + $(JUMP_ROOT_Xt)/libXext.sa $(JUMP_ROOT_X11)/libX11.sa \ + $(JUMP_LDLIBS_X11) + + # libPEX.so (PEX5) + JUMP_ROOT_PEX5 = $(EXTENSIONSRC)/lib/PEXlib + JUMP_IS_HOST_PEX5 = YES + JUMP_STUBLIBS_PEX5 = libPEX5.sa + JUMP_SUBDIRS_PEX5 = $(JUMP_ROOT_X11) + JUMP_DIR_PEX5 = $(JUMP_ROOT_PEX5)/shared + JUMP_VARS_PEX5 = $(JUMP_ROOT_PEX5)/jump_vars + JUMP_FUNCS_PEX5 = $(JUMP_ROOT_PEX5)/jump_funcs + JUMP_IGNORE_PEX5 = $(JUMP_ROOT_PEX5)/jump_ignore + JUMP_IMPORT_PEX5 = $(JUMP_VARS_X11) + JUMP_ADDRESS_PEX5 = 0x60b00000 + JUMP_JUMPTABLESIZE_PEX5 = 0x4000 + JUMP_GOTSIZE_PEX5 = 4096 + JUMP_STUBNAMES_PEX5 = libPEX5 + JUMP_STUBS_IMPORT_PEX5 = $(JUMP_STUBS_IMPORT_X11) /usr/lib/libm.sa + JUMP_LDLIBS_PEX5 = $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_X11) -lm + + #endif /* !UseInstalled */ + + /* + * SharedLibraryDataTarget - generate rules to create shared data file + */ + #ifndef SharedLibraryDataTarget + #define SharedLibraryDataTarget(libname,rev,salist) + #endif + + /* + * SharedLibraryTarget - generate rules to create a shared library; + * There are two basic flavors of libs: self-generating, which create + * their own (and possibly other) libs, and hosted, which rely on another + * lib for all the work. + */ + #ifndef SharedLibraryTarget + #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ + XCOMM This logic is such to compile the libs in their proper order, @@\ + XCOMM remain dependent on subsidiary libs, and yet minimize local work @@\ + @@\ + JUMP_DIR=./jump @@\ + JUMP_LIB=Concat(lib,libname) @@\ + @@\ + XCOMM this is needed for newer gnumake versions @@\ + export JUMP_DIR JUMP_LIB @@\ + @@\ + JUMP_IS_HOST=$(Concat(JUMP_IS_HOST_,libname)) @@\ + JUMP_AR=$(JUMP_DIR)/Concat(lib,libname.a~) @@\ + JUMP_SA=Concat(lib,libname.sa) @@\ + JUMP_SO=Concat(lib,libname.so.rev) @@\ + @@\ + JUMP_HOST=$(Concat(JUMP_HOST_,libname)) @@\ + @@\ + INSTSOLIBFLAGS=-m 0555 @@\ + @@\ + AllTarget($(JUMP_SA)) @@\ + @@\ + $(JUMP_SA) $(Concat(JUMP_STUBLIBS_,libname)) do_JUMP_SA: \ + down/mk_JUMP_SA_$(JUMP_IS_HOST) @@\ + @@\ + down/mk_JUMP_SA_0:: mk_JUMP_HOST @@\ + @@\ + down/mk_JUMP_SA_0:: $(JUMP_HOST)/$(JUMP_SA) @@\ + $(RM) $(JUMP_SA) @@\ + $(LN) $(JUMP_HOST)/$(JUMP_SA) $(JUMP_SA) @@\ + touch $@ @@\ + @@\ + down/mk_JUMP_SA_1:: $(JUMP_SO) @@\ + @@\ + down/mk_JUMP_SA_1:: down/mk_JUMP_SO_2 @@\ + $(RM) $(Concat(JUMP_STUBLIBS_,libname)) @@\ + $(DLL_BINDIR)/mkstubs -v rev -l $(JUMP_LIB) \ + -a $(Concat(JUMP_ADDRESS_,libname)) \ + -j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \ + -g $(Concat(JUMP_GOTSIZE_,libname)) \ + -- $(Concat(JUMP_STUBNAMES_,libname)) @@\ + $(DLL_BINDIR)/verify-shlib -l $(JUMP_SO) \ + $(Concat(JUMP_STUBLIBS_,libname)) && \ + $(RM) verify.out @@\ + touch $@ @@\ + @@\ + mk_JUMP_HOST: @@\ + @echo checking stub library $(JUMP_SA) in $(JUMP_HOST)... @@\ + @(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) $(JUMP_SA)) || exit 1 @@\ + @echo ok. continuing in $(Concat(JUMP_ROOT_,libname))... @@\ + @@\ + $(JUMP_SO): down/mk_JUMP_SO_$(JUMP_IS_HOST) @@\ + @@\ + down/mk_JUMP_SO_0: @@\ + @@\ + down/mk_JUMP_SO_1:: $(JUMP_AR) mk_JUMP_SIBDIRS down/mk_JUMP_SO_2 @@\ + @@\ + down/mk_JUMP_SO_2: down/mk_JUMP_AR $(Concat(JUMP_SIBARS_,libname)) @@\ + $(RM) $(JUMP_SO) @@\ + $(DLL_BINDIR)/mkimage -f -v rev -l $(JUMP_LIB) \ + -a $(Concat(JUMP_ADDRESS_,libname)) \ + -j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \ + -g $(Concat(JUMP_GOTSIZE_,libname)) \ + -- $(JUMP_AR) $(Concat(JUMP_LDLIBS_,libname)) @@\ + $(RM) $(JUMP_DIR)/__jump.s $(JUMP_DIR)/__jump.o @@\ + touch $@ @@\ + @@\ + mk_JUMP_SIBDIRS: @@\ + @for d in $(Concat(JUMP_SIBDIRS_,libname)); do \ + echo checking ar library in $$d...; \ + (cd $$d ; $(MAKE) $(MFLAGS) fastdo_JUMP_AR) || edit 1; \ + echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\ + @@\ + fastdo_JUMP_AR: $(JUMP_DIR) down/mk_JUMP_AR @@\ + @@\ + $(JUMP_AR) do_JUMP_AR:: jumpsetup down/mk_JUMP_AR @@\ + @@\ + jumpsetup: $(JUMP_DIR) jumpsetup_$(JUMP_IS_HOST) @@\ + @@\ + $(JUMP_DIR): @@\ + $(RM) jump @@\ + LibMkdir($(Concat(JUMP_DIR_,libname))) @@\ + $(LN) $(Concat(JUMP_DIR_,libname)) jump @@\ + @@\ + jumpsetup_0: @@\ + @echo doing jump setup in host $(JUMP_HOST)... @@\ + @(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) jumpsetup) || exit 1 @@\ + @echo ok. continuing in $(Concat(JUMP_ROOT_,libname))... @@\ + @@\ + jumpsetup_1:: @@\ + @for d in $(Concat(JUMP_SUBDIRS_,libname)); do \ + echo checking stub library in $$d...; \ + (cd $$d ; $(MAKE) $(MFLAGS) do_JUMP_SA) || exit 1; \ + echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\ + @@\ + jumpsetup_1:: $(JUMP_DIR)/jump.funcs $(JUMP_DIR)/jump.vars \ + $(JUMP_DIR)/jump.ignore $(JUMP_DIR)/jump.import @@\ + @@\ + $(JUMP_DIR)/jump.funcs: $(Concat(JUMP_FUNCS_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.funcs @@\ + cat $(Concat(JUMP_FUNCS_,libname)) > $@ @@\ + @@\ + $(JUMP_DIR)/jump.vars: $(Concat(JUMP_VARS_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.vars @@\ + cat $(Concat(JUMP_VARS_,libname)) > $@ @@\ + @@\ + $(JUMP_DIR)/jump.ignore: $(Concat(JUMP_IGNORE_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.ignore @@\ + cat $(Concat(JUMP_IGNORE_,libname)) > $@ @@\ + @@\ + $(JUMP_DIR)/jump.import: $(JUMP_DIR)/stubs.import \ + $(Concat(JUMP_IMPORT_,libname)) @@\ + $(RM) $(JUMP_DIR)/jump.import @@\ + cat $(JUMP_DIR)/stubs.import $(Concat(JUMP_IMPORT_,libname)) > $@ @@\ + @@\ + $(JUMP_DIR)/stubs.import: $(Concat(JUMP_STUBS_IMPORT_,libname)) @@\ + $(RM) $(JUMP_DIR)/stubs.import @@\ + nm --no-cplus $(Concat(JUMP_STUBS_IMPORT_,libname)) | grep '__GOT__' | \ + sed 's/__GOT__/_/' > $@ @@\ + @@\ + down/mk_JUMP_AR: solist @@\ + $(RM) $(JUMP_AR) @@\ + (cd down; $(AR) up/$(JUMP_AR) solist) || exit 1 @@\ + $(RANLIB) $(JUMP_AR) @@\ + touch $@ @@\ + @@\ + clean:: jumpclean @@\ + @@\ + jumpclean: jumpclean_$(JUMP_IS_HOST) @@\ + $(RM) $(JUMP_SA) $(JUMP_DIR)/__jump.s $(JUMP_DIR)/__jump.o \ + down/mk_JUMP_AR $(JUMP_AR) @@\ + $(RM) -r $(JUMP_DIR) @@\ + @@\ + jumpclean_0: @@\ + $(RM) down/mk_JUMP_SA_0 @@\ + @@\ + jumpclean_1: @@\ + $(RM) $(JUMP_SO) $(JUMP_DIR)/_GCMN_*.s $(JUMP_DIR)/_GVAR_*.s \ + $(JUMP_DIR)/jump.vars $(JUMP_DIR)/jump.funcs \ + $(JUMP_DIR)/jump.ignore $(JUMP_DIR)/jump.params \ + $(JUMP_DIR)/jump.undefs $(JUMP_DIR)/jump.log \ + $(JUMP_DIR)/jump.import $(JUMP_DIR)/stubs.import \ + down/mk_JUMP_SA_1 down/mk_JUMP_SO_1 down/mk_JUMP_SO_2 + #endif /* SharedLibraryTarget */ + + /* + * InstallSharedLibrary - generate rules to install the shared library. + */ + #ifndef InstallSharedLibrary + #define InstallSharedLibrary(libname,rev,dest) @@\ + install:: $(JUMP_SA) $(JUMP_SO) @@\ + MakeDir($(DESTDIR)dest) @@\ + @if [ "$(JUMP_IS_HOST)" = YES ]; then \ + (T=$(DESTDIR)dest/`echo $(JUMP_SO)|sed 's/\.[^\.]*\.[^\.]*$$//'`;\ + set -x; \ + $(INSTALL) -s -c $(INSTSOLIBFLAGS) $(JUMP_SO) $(DESTDIR)dest; \ + $(RM) $$T && $(LN) $(DESTDIR)dest/$(JUMP_SO) $$T); fi @@\ + $(INSTALL) -c $(INSTLIBFLAGS) $(JUMP_SA) $(DESTDIR)dest + #endif /* InstallSharedLibrary */ + + /* + * InstallSharedLibraryData - generate rules to install the shared library data + */ + #ifndef InstallSharedLibraryData + #define InstallSharedLibraryData(libname,rev,dest) + #endif /* InstallSharedLibraryData */ diff -c /dev/null mit/config/lnuxLib.tmpl:2.0 *** /dev/null Sat Mar 12 00:36:24 1994 --- mit/config/lnuxLib.tmpl Sat Mar 12 00:36:24 1994 *************** *** 0 **** --- 1,75 ---- + XCOMM $XFree86: mit/config/lnuxLib.tmpl,v 2.0 1993/08/29 14:15:39 dawes Exp $ + /* + * Linux shared library template + */ + #ifndef SharedXlibRev + #define SharedXlibRev 3.1.0 + #endif + #ifndef SharedOldXRev + #define SharedOldXRev 3.1.0 + #endif + #ifndef SharedXtRev + #define SharedXtRev 3.1.0 + #endif + #ifndef SharedXawRev + #define SharedXawRev 3.1.0 + #endif + #ifndef SharedXmuRev + #define SharedXmuRev 3.1.0 + #endif + #ifndef SharedXextRev + #define SharedXextRev 3.1.0 + #endif + #ifndef SharedXinputRev + #define SharedXinputRev 3.1.0 + #endif + #ifndef SharedPexRev + #define SharedPexRev 1.1.0 + #endif + + SHLIBLDFLAGS = SharedLibraryLoadFlags + PICFLAGS = PositionIndependentCFlags + + /* + * and now a little bit of magic for using imake without source tree; if we + * are using shared libraries, we really do not need to depend on anything + */ + #if SharedLibXext + DEPEXTENSIONLIB = /* _UseCat($(USRLIBDIR),$(EXTENSIONSRC)/lib,/libXext.sa.$(SOXEXTREV)) */ + EXTENSIONLIB = _Use(-lXext,-L$(EXTENSIONSRC)/lib -lXext) + #endif + #if SharedLibX + DEPXLIB = $(DEPEXTENSIONLIB) /* _UseCat($(USRLIBDIR),$(XLIBSRC),/libX11.sa.$(SOXLIBREV)) */ + XLIB = $(EXTENSIONLIB) _Use(-lX11,-L$(XLIBSRC) -lX11) + #endif + #if SharedLibXmu + DEPXMULIB = /* _UseCat($(USRLIBDIR),$(XMUSRC),/libXmu.sa.$(SOXMUREV)) */ + XMULIB = _Use(-lXmu,-L$(XMUSRC) -lXmu) + #ifndef XawClientLibs + #define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) + #endif + #endif + #if SharedOldLibX + DEPOLDXLIB = /* _UseCat($(USRLIBDIR),$(OLDXLIBSRC),/liboldX.sa.$(SOOLDXREV)) */ + OLDXLIB = _Use(-loldX,-L$(OLDXLIBSRC) -loldX) + #endif + #if SharedLibXt + DEPXTOOLLIB = /* _UseCat($(USRLIBDIR),$(TOOLKITSRC),/libXt.sa.$(SOXTREV)) */ + XTOOLLIB = _Use(-lXt,-L$(TOOLKITSRC) -lXt) + #endif + #if SharedLibXaw + DEPXAWLIB = /* _UseCat($(USRLIBDIR),$(AWIDGETSRC),/libXaw.sa.$(SOXAWREV)) */ + XAWLIB = _Use(-lXaw,-L$(AWIDGETSRC) -lXaw) + #endif + #if SharedLibXinput + DEPXILIB = /* _UseCat($(USRLIBDIR),$(XILIBSRC),/libXi.sa.$(SOXINPUTREV)) */ + XILIB = _Use(-lXi,-L$(XILIBSRC) -lXi) + #endif + #if SharedLibXTest + DEPXTESTLIB = /* _UseCat($(USRLIBDIR),$(EXTENSIONSRC)/lib,/libXtst.sa.$(SOXEXTREV)) */ + XTESTLIB = _Use(-lXtst,-L$(EXTENSIONSRC)/lib/xtest -lXtst) + #endif + #if SharedLibPex + DEPPEXLIB = /* _UseCat($(USRLIBDIR),$(PEXLIBSRC),/libPEX5.sa.$(SOPEXREV)) */ + PEXLIB = _Use(-lPEX5,-L$(PEXLIBSRC) -lPEX5) + #endif diff -c /dev/null mit/config/minix.cf:1.2 *** /dev/null Sat Mar 12 00:36:24 1994 --- mit/config/minix.cf Sat Mar 12 00:36:24 1994 *************** *** 0 **** --- 1,25 ---- + XCOMM $XFree86: mit/config/minix.cf,v 1.2 1993/04/20 05:09:29 dawes Exp $ + + /* + * Defines for Minix/X386 that are compiler set independent. + */ + #define OSName Minix + #define OSMajorVersion 1 + #define OSMinorVersion 6 + #define OSVendor /**/ + + #define Minix YES + + #define BuildServer YES + #define BuildFonts NO + #define BuildFontServer NO + #define BuildPex NO + + #define ExecableScripts NO + #define HasPutenv YES + #define HasVoidSignalReturn YES + #define HasSharedLibraries NO + #define HasShm NO + #define HasNdbm YES /* i.e. something that looks like it */ + + #define NdbmDefines -DSDBM -DNDBM -I$(INCLUDESRC) diff -c /dev/null mit/config/mnx_site.def:1.1 *** /dev/null Sat Mar 12 00:36:24 1994 --- mit/config/mnx_site.def Sat Mar 12 00:36:25 1994 *************** *** 0 **** --- 1,68 ---- + XCOMM $XFree86: mit/config/mnx_site.def,v 1.1 1993/03/23 12:56:44 dawes Exp $ + + /* + * Minix configuration defines that should require no change. + */ + #ifdef BeforeVendorCF + + #define ProjectRoot MinixConf/$(ARCH).$(TOOLSET)/X11R5 + + #define CommonMinixDefines -D_POSIX_C_SOURCE=2 -D_POSIX_SOURCE=2 -D_MINIX=2 -D_PCH_EXT -D_VMD_EXT -D_ARCH=_IBM_386_VM -D_ACK_LIB + #define StandardDefines CommonMinixDefines + #define StandardCppDefines StandardDefines + + #endif /* BeforeVendorCF */ + + #ifdef AfterVendorCF + + #define InstallXdmConfig NO + #define InstallXinitConfig NO + #define InstallFSConfig NO + + #define MinixLibX11 /usr/lib/X11 + #define UsrLibDir MinixLibX11 + #define LibDir MinixLibX11 + #define ManDirectoryRoot MinixLibX11/man + #define IncRoot MinixLibX11/include + #define FontDir MinixLibX11/fonts + #define DefaultRGBDatabase MinixLibX11/rgb + #define BinDir /usr/X386/bin + + #define DefaultUserPath :/bin:$(BINDIR) + #define DefaultSystemPath /bin:$(BINDIR): + + #define StandardIncludes -I$(MTOP)/incl -I$(MTOP)/include -I$(MTOP)/include/vmd -I$(MTOP)/include/minix + + /* ServerExtraDefines contains -DXDMCP by default */ + #ifdef AckToolset + #define ServerExtraDefines -DNO_ALLOCA + #else + #ifdef GccGasOption + #define ServerExtraDefines GccGasOption + #endif + #endif + + #define Malloc0ReturnsNull YES + #define FontDefines -DFONT_SNF + #define ConnectionFlags -DTCPCONN + #ifndef ExtraFPLoadFlags + #define ExtraFPLoadFlags + #endif + #define OSLibraries $(MLIB)/libc/libc.a ExtraFPLoadFlags + + MTOP = MinixTop + MLIB = MinixConf/$(ARCH).$(TOOLSET)/lib + #ifdef AckToolset + HEAD = + #else + HEAD = $(MLIB)/crtso/crtso.o + #endif + + ABIN = MinixBin + AINSTALL = /bin/sh $(SCRIPTSRC)/aminstall.sh $(ABIN) + AINSTALLFLAGS = + TOB = /bin/sh $(SCRIPTSRC)/aminstall.sh $(ABIN) + MKXDIRHIER = /bin/sh $(SCRIPTSRC)/ammkdirhier.sh $(ABIN) + + #endif /* AfterVendorCF */ + diff -c mit/config/site.def:1.1.1.1 mit/config/site.def:2.41 *** mit/config/site.def:1.1.1.1 Sat Mar 12 00:36:25 1994 --- mit/config/site.def Sat Mar 12 00:36:25 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/config/site.def,v 2.41 1994/03/07 13:53:40 dawes Exp $ XCOMM site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ /***************************************************************************** *************** *** 23,32 **** * * *****************************************************************************/ #ifdef BeforeVendorCF ! /* #define HasGcc YES */ #endif /* BeforeVendorCF */ #ifdef AfterVendorCF --- 24,460 ---- * * *****************************************************************************/ + #ifdef AmoebaConf + #include "am_site.def" + #endif + + #ifdef MinixConf + #include "mnx_site.def" + #endif + #ifdef BeforeVendorCF ! /***************************************************************************** ! * * ! * Make/Build parameters * ! * * ! *****************************************************************************/ ! ! /* ! * To build only the servers with a cut-down source tree, uncomment ! * this. ! */ ! ! /* #define BuildServersOnly YES */ ! ! /* ! * If you are using ISC's original make (which has a hash table bug), ! * uncomment this. You will not get dependencies as a result in ! * mit/lib/X, but better then nothing. (Using GNU make instead is recommended.) ! */ ! /* #define MakeHashTableBug YES */ ! ! /* ! * To build normal libraries in addition to shared libraries uncomment this ! * defaults: ! * SVR4: NO ! * SVR3: YES ! * Linux: NO ! * NetBSD, FreeBSD YES ! */ ! /* #define ForceNormalLib YES */ ! ! /* ! * To build shared libs on NetBSD uncomment this. ! * defaults: ! * FreeBSD: YES ! * others: NO ! */ ! /* #define BuildBsdSharedLibs YES */ ! ! /* ! * HasLibCrypt: If your system uses a separate libcrypt.a, uncomment this. ! * defaults: ! * NetBsd, FreeBsd YES ! * others: NO ! */ ! /* #define HasLibCrypt YES */ ! ! /* ! * UseGccMakeDepend: Uses 'gcc -M' to generate Makefile dependency lists. ! * This is much slower than the "standard" makedepend ! * but is more accurate. ! * defaults: ! * same as HasGcc ! */ ! /* #define UseGccMakeDepend NO */ ! ! /***************************************************************************** ! * * ! * Compiler parameters * ! * * ! *****************************************************************************/ ! ! /* ! * HasGcc: defaults: ! * SVR3,4: YES ! * NCR: NO ! * Mach, 386bsd: YES ! * linux: YES ! */ ! /* #define HasGcc NO */ ! ! /* ! * HasGcc2: (should also set HasGcc) ! * defaults: ! * SVR3,4: YES ! * NCR: NO ! * Mach, 386bsd: NO ! * NetBSD, FreeBSD YES ! * linux: YES ! */ ! /* #define HasGcc2 NO */ ! ! /* ! * ProWorksHome: location of the ProWorks compiler on Solaris x86, and can ! * be ignored if you are using gcc. ! * defaults: ! * Solaris x86: /opt/SUNWspro ! * ! * NOTE: ProWorks installs by default into /opt/SUNWspro. Use this option ! * to override the default location if ProWorks is installed in a ! * place other than /opt/SUNWspro ! */ ! /* #define ProWorksHome /opt/SUNWspro */ ! ! /* ! * GccUsesGas: Required if your gcc uses gas as its assembler. ! * defaults: ! * SVR3,4 NO ! * Mach, 386bsd: YES ! * linux: YES ! */ ! /* #define GccUsesGas YES */ ! ! /* ! * UseGas: Required if you use gas as your assembler. ! * defaults: ! * SVR3,4 NO ! * Mach, 386bsd: YES ! * linux: YES ! */ ! /* #define UseGas YES */ ! ! /* ! * GnuCpp: ! * defaults: ! * SVR3,4: NO ! * Mach: NO ! * 386bsd: YES ! * linux: YES ! */ ! /* #define GnuCpp YES */ ! ! /* ! * If you are building for a 386 you can uncomment this. It is not ! * necessary that you do this because the -m486 compiled binaries run ! * without performance loss on a 386 CPU. This option is only used ! * when using gcc-2.x ! */ ! /* #define Target_486 NO */ ! ! /***************************************************************************** ! * * ! * Networking parameters * ! * * ! *****************************************************************************/ ! ! /* If you don't want to include SCO's Xsight connection code for SVR4, ! * uncomment this (all SVR4's should be able to compile this). ! * Note: you must have SVR4.0.4 or later, with the 'Advanced Compatibility ! * Package' (iBSC-2 compatibility) to make use of this feature. ! */ ! /* #define SCOLocalConnSysv4 NO */ ! ! /* If you don't have sockets, uncomment this */ ! /* #define HasSockets NO */ ! ! /***************************************************************************** ! * * ! * Other compile-time parameters * ! * * ! *****************************************************************************/ ! ! /* ! * HasShadowPasswd: Required if your system uses shadow passwords. ! * defaults: ! * SVR3,4: YES ! * Mach, 386bsd: NO ! * linux: NO ! */ ! /* #define HasShadowPasswd NO */ ! ! /***************************************************************************** ! * * ! * Select features to be built/not built * ! * * ! *****************************************************************************/ ! ! /* You need the DES stuff from MIT to use this */ ! /* #define HasXdmAuth YES */ ! ! /* ! * To include MIT-SHM support for BSD systems, uncomment the following ! * defaults: ! * SVR3,4: YES ! * linux: YES ! * Mach, OSF/1 NO ! * FreeBSD YES ! * other BSD NO ! */ ! /* #define HasShm YES */ ! ! /* To exclude XTEST support, uncomment the following */ ! /* #define BuildXTest NO */ ! ! /* Do you *really* want PEX? */ ! /* #define BuildPex YES */ ! ! /***************************************************************************** ! * * ! * Font-related parameters * ! * * ! *****************************************************************************/ ! ! /* To build the Font Server, uncomment the following */ ! /* #define BuildFontServer YES */ ! ! /* Usually only want to build fonts once */ ! #define BuildFonts NO ! ! /* If you don't want to compress pcf fonts, uncomment this */ ! /* #define CompressAllFonts NO */ ! ! /* If you want to build 100dpi fonts, uncomment this */ ! /* #define Build100Dpi YES */ ! ! /* If you don't want to build 75dpi fonts, uncomment this */ ! /* #define Build75Dpi NO */ + /* If you want to build the k14, jiskan, hanglg fonts, uncomment this */ + /* #define BuildLargeMiscFonts YES */ + + /* If you want Type1 code included */ + #if !defined(AmoebaConf) && !defined(MinixConf) && !defined(OsfArchitecture) + #define BuildType1 YES + #endif + + /* If you don't want to build Speedo fonts, uncomment this */ + /* #define BuildSpeedo NO */ + + /* + * Select Font Renderers to include. This overrides BuildType1 and + * BuildSpeedo above - it's best to leave this alone and use the above + * defines unless you are adding a custom font renderer. + * + * Default: Speedo + */ + /* #define FontRenderers Speedo */ + + /***************************************************************************** + * * + * Server-related parameters * + * * + *****************************************************************************/ + + /* Uncomment this if you don't want to build the server */ + /* #define BuildServer NO */ + + /* Change YES to NO for servers you don't want to build */ + + /* Build the 256 colour SVGA server */ + #define XF86SVGAServer YES + + /* Build the 16 colour server */ + #define XF86VGA16Server YES + + /* Build the monochrome server */ + #define XF86MonoServer YES + + /* Build the S3 server */ + #define XF86S3Server YES + + /* Build the 8514/A server */ + #define XF86I8514Server YES + + /* Build the Mach8 server */ + #define XF86Mach8Server YES + + /* Build the Mach32 server */ + #define XF86Mach32Server YES + + /* Set the default server (ie the one that gets the sym-link to "X") */ + /* #define XFree86DefaultServer XF86_S3 */ + + /* + * Select drivers in 256-colour server + * + * Default: et4000 et3000 pvga1 gvga ati tvga8900 cirrus ncr compaq + */ + /* #define X386Vga256Drivers et4000 et3000 pvga1 gvga ati tvga8900 cirrus \ + ncr oak compaq */ + /* + * Select drivers in 16-colour server + * + * Default: et4000 tvga8900 generic + */ + /* #define X386Vga16Drivers et4000 tvga8900 generic */ + + /* + * Select (S)VGA drivers in monochrome server + * + * Default: et4000 et3000 pvga1 gvga tvga8900 ncr compaq generic + */ + /* #define X386Vga2Drivers et4000 et3000 pvga1 gvga tvga8900 ncr \ + compaq oak generic */ + /* + * To include the Hercules driver in the monochrome server, uncomment this: + */ + /* #define X386Hga2Drivers hga6845 */ + + /* + * To include the generic banked monochrome driver in the monochrome server, + * uncomment this with one of the following low level drivers + * hgc1280 [Hyundai HGC-1280 1280x1024] + * sigma [Sigma L-View] + * visa [???] + * ... + * (list is subject to grow) + */ + /* #define X386Bdm2Drivers hgc1280 sigma visa */ + + /* + * Select drivers in the accelerated S3 server + */ + /* #define XF86S3Drivers mmio_928 s3_generic */ + + /* Uncomment this to include support for SVR3 mmap driver */ + /* #define HasSVR3mmapDrv YES */ + + /* Uncomment this to include support for Solaris aperture driver */ + /* #define HasSolx86apertureDrv YES */ + + /* Uncomment this if you want to build a debuggable server */ + /* #define DebuggableServer YES */ + + /* Uncomment this if you are using Conor Cahill's debugging malloc library */ + /* #define SpecialMalloc YES */ + + /* Uncomment this if you want to link with the Gnu malloc library */ + /* #define GnuMalloc YES */ + + /* + * GnuMallocLib: link-time flags to include the Gnu malloc library. + * this is only used when GnuMalloc is set to YES. + * defaults: + * 386bsd: -lgnumalloc + * others: -lgmalloc + */ + /* #define GnuMallocLib -L/usr/local/gnu -lmalloc */ + + /* + * Set this to disable blanking the screen during startup (can be useful + * for debugging) + */ + /* #define DirtyStartup YES */ + + /***************************************************************************** + * * + * Client-related parameters * + * * + *****************************************************************************/ + + /* + * Set logging parameters for xterm. By default, logging is off because of + * security problems. It can be turned on by defining XtermLogFlags to be + * -DALLOWLOGGING -- BUT THIS IS A SECURITY RISK. + */ + + /* #define XtermLogFlags -DALLOWLOGGING */ + + /***************************************************************************** + * * + * Installation-related parameters * + * * + *****************************************************************************/ + + /* + * Enable these if you want to automatically install these config files + * Be careful of overwriting customised files + */ + /* + #define InstallXdmConfig YES + #define InstallXinitConfig YES + #define InstallFSConfig YES + */ + + /***************************************************************************** + * * + * Manual page parameters * + * * + *****************************************************************************/ + + /* + * Only for SVR3, 386BSD, FreeBSD and NetBSD. + * FormattedManPages: To install unformatted man pages, set this to NO. + * defaults: + * SVR3: YES + * FreeBSD: NO + * other BSD YES + */ + /* #define FormattedManPages NO */ + + /* + * The default man page installation paramters have been moved to x386.cf + * and may be overriden here. Note that these are ignored for preformatted + * man pages on *BSD -- where all suffices are '0'. + * + * defaults: ManSuffix LibManSuffix FileManSuffix + * SVR3,4: 1x 3x 4 + * others: 1x 3x 5x + */ + + /* + * Only for SVR3: + * Remove obsolete .DE and .DS macros from manual pages + * defaults: + * ISC 2.2, 3.0: YES + * SVR3: NO + */ + /* #define RemoveDSDENroffMacros YES */ + + /* Only for SVR3: + * Compress installed manual pages + * defaults: + * ISC, SCO: YES + * SVR3: NO + */ + /* #define CompressManPages YES */ + + /* + * If you compress the manual pages and want to use gzip, uncomment this. + * Use the first line if you are using gzip version 1.0.7 or earlier, and + * the second for gzip 1.1 or later. + * default: compress -v + */ + /* #define CompressManCmd gzip -v */ + /* #define CompressManCmd gzip -v --suffix .z */ + + /* If you don't like the 'x' at the end, uncomment these: */ + /* #define ManSuffix 1 */ + /* #define LibManSuffix 3 */ + /* #define FileManSuffix 5 */ + #endif /* BeforeVendorCF */ #ifdef AfterVendorCF *************** *** 37,41 **** --- 465,470 ---- #endif #define ProjectRoot /usr/X11R5 */ + #endif /* AfterVendorCF */ diff -c /dev/null mit/config/sv3Lib.rules:1.2 *** /dev/null Sat Mar 12 00:36:26 1994 --- mit/config/sv3Lib.rules Sat Mar 12 00:36:26 1994 *************** *** 0 **** --- 1,192 ---- + XCOMM $XFree86: mit/config/sv3Lib.rules,v 1.2 1993/03/06 09:02:42 dawes Exp $ + /* + * SVR3 shared library rules + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de + * Conception derived partially from work of Thomas Roell + */ + + #ifndef HasSharedLibraries + #define HasSharedLibraries YES + #endif + #ifndef ForceNormalLib + #define ForceNormalLib YES + #endif + + #ifndef SharedLibX + #define SharedLibX HasSharedLibraries + #endif + #ifndef SharedOldLibX + #define SharedOldLibX NO /* it's obsolete */ + #endif + #ifndef SharedLibXt + #define SharedLibXt HasSharedLibraries + #endif + #ifndef SharedLibXaw + #define SharedLibXaw HasSharedLibraries + #endif + #ifndef SharedLibXmu + #define SharedLibXmu HasSharedLibraries + #endif + #ifndef SharedLibXext + #define SharedLibXext HasSharedLibraries + #endif + #ifndef SharedLibXinput + #define SharedLibXinput HasSharedLibraries + #endif + #ifndef SharedLibPex + #define SharedLibPex NO + #endif + + #ifndef SharedDataSeparation + #define SharedDataSeparation NO + #endif + #ifndef SharedCodeDef + #define SharedCodeDef /**/ + #endif + #ifndef SharedLibraryDef + #define SharedLibraryDef -DSVR3SHLIB + #endif + #ifndef ShLibIncludeFile + #define ShLibIncludeFile + #endif + #ifndef SharedLibraryLoadFlags + #define SharedLibraryLoadFlags -q + #endif + #ifndef PositionIndependentCFlags + #if HasGcc2 + #define PositionIndependentCFlags -msvr3-shlib + #else + #define PositionIndependentCFlags /**/ + #endif + #endif + + /* + * LibCleanDir - helper for cleaning library object subdirectories + */ + #ifndef LibCleanDir + #define LibCleanDir(dir) -@if [ -d dir ]; then \ @@\ + (set -x; cd dir; $(RM) *.o *.sd); else exit 0; fi + #endif + + /* + * SharedLibObjCompile - compile fragment for shared objects + */ + #ifndef SharedLibObjCompile + #define SharedLibObjCompile(options) $(RM) shared/$@ @@\ + cat import.h $*.c >_$*.c @@\ + $(CC) -c $(ANSICCOPTIONS) $(CCOPTIONS) $(ALLDEFINES) options \ @@\ + $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $(CDEBUGFLAGS) _$*.c @@\ + $(MV) _$*.o shared/$@ @@\ + $(RM) _$*.c + #endif + + /* + * NormalSharedLibObjCompile - compile fragment for shared object when + * a normal library is not being built + */ + #ifndef NormalSharedLibObjCompile + #define NormalSharedLibObjCompile(options) $(RM) $@ @@\ + cat import.h $*.c >_$*.c @@\ + $(CC) -c $(CFLAGS) options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) _$*.c @@\ + $(MV) _$*.o $@ @@\ + $(RM) _$*.c + #endif + + + #ifndef LibraryObjectRule + #define LibraryObjectRule() @@\ + all:: @@\ + _DebuggedLibMkdir() @@\ + _ProfiledLibMkdir() @@\ + _SharedLibMkdir() @@\ + @@\ + includes:: @@\ + _DebuggedLibMkdir() @@\ + _ProfiledLibMkdir() @@\ + _SharedLibMkdir() @@\ + @@\ + .c.o: @@\ + _DebuggedObjCompile($(_NOOP_)) @@\ + _ProfiledObjCompile($(_NOOP_)) @@\ + _SharedObjCompile($(_NOOP_)) @@\ + _NormalObjCompile($(_NOOP_)) @@\ + @@\ + .SUFFIXES: .sd @@\ + .c.sd: @@\ + _SharedDatCompile(-DSVR3SHDAT) @@\ + @@\ + clean:: @@\ + _DebuggedCleanDir() @@\ + _ProfiledCleanDir() @@\ + _SharedCleanDir() @@\ + + #endif /* LibraryObjectRule */ + + + /* + * InstallSharedLibrary - generate rules to install the shared library. + */ + #ifndef InstallSharedLibrary + #if StripInstalledPrograms + #define InstallSharedLibrary(libname,rev,dest) @@\ + install:: Concat(lib,libname.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\ + MakeDir($(DESTDIR)$(LIBDIR)/shlib) @@\ + $(INSTALL) -c $(INSTPGMFLAGS) Concat(lib,libname.rev) \ @@\ + $(DESTDIR)$(LIBDIR)/shlib @@\ + strip Concat($(DESTDIR)$(LIBDIR)/shlib/lib,libname.rev) @@\ + mcs -d Concat($(DESTDIR)$(LIBDIR)/shlib/lib,libname.rev) + #else + #define InstallSharedLibrary(libname,rev,dest) @@\ + install:: Concat(lib,libname.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\ + MakeDir($(DESTDIR)$(LIBDIR)/shlib) @@\ + $(INSTALL) -c $(INSTPGMFLAGS) Concat(lib,libname.rev) \ @@\ + $(DESTDIR)$(LIBDIR)/shlib + #endif + + #endif /* InstallSharedLibrary */ + + /* + * InstallSharedLibraryData - generate rules to install the shared library data + */ + #ifndef InstallSharedLibraryData + #define InstallSharedLibraryData(libname,rev,dest) + #endif /* InstallSharedLibraryData */ + + + /* + * SharedLibraryTarget - generate rules to create a shared library; + * build it into a different name so that we do not hose people by having + * the library gone for long periods. + */ + #ifndef SharedLibraryTarget + #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ + AllTarget(Concat(lib,libname.rev)) @@\ + @@\ + Concat(lib,libname.rev): solist @@\ + $(RM) $@ Concat3(lib,libname,_s.a) @@\ + $(CPP) -DDOWN=down ConnectionFlags ShlibDefines Concat(lib,libname.def) | \ @@\ + sed -e '/^# *[0-9][0-9]* *.*$$/d; /^$$/d' >spec.cpp @@\ + sed -e '1,/#libraries/d; /#externals/,$$d' spec.cpp | \ @@\ + nawk '{ system("ar x " $$1 " " $$2 )}' @@\ + echo "#target " Concat($(LIBDIR)/shlib/lib,libname.rev) >spec @@\ + sed -e '/#libraries/,$$d' spec.cpp >>spec @@\ + mkshlib -s spec -t $@ -h Concat3(lib,libname,_s.a) $(SHLIBLDFLAGS) @@\ + ar rulv Concat3(lib,libname,_s.a) `sed -e '1,/#externals/d' spec.cpp` @@\ + $(RM) spec.cpp spec @@\ + @@\ + clean:: @@\ + $(RM) Concat(lib,libname.rev) Concat3(lib,libname,_s.a) + + #endif /* SharedLibraryTarget */ + + /* + * SharedLibraryDataTarget - generate rules to create shlib data file; + */ + #ifndef SharedLibraryDataTarget + #define SharedLibraryDataTarget(libname,rev,salist) + #endif /* SharedLibraryTarget */ diff -c /dev/null mit/config/sv3Lib.tmpl:1.3 *** /dev/null Sat Mar 12 00:36:27 1994 --- mit/config/sv3Lib.tmpl Sat Mar 12 00:36:27 1994 *************** *** 0 **** --- 1,73 ---- + XCOMM $XFree86: mit/config/sv3Lib.tmpl,v 1.3 1993/04/27 15:38:30 dawes Exp $ + /* + * SVR3 shared library template + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de + * Conception derived partially from work of Thomas Roell + */ + + #ifndef SharedXlibRev + #define SharedXlibRev 5.0.1 + #endif + #ifndef SharedOldXRev + #define SharedOldXRev 5.0 + #endif + #ifndef SharedXtRev + #define SharedXtRev 5.0 + #endif + #ifndef SharedXawRev + #define SharedXawRev 5.0 + #endif + #ifndef SharedXmuRev + #define SharedXmuRev 5.0 + #endif + #ifndef SharedXextRev + #define SharedXextRev 5.0 + #endif + #ifndef SharedXinputRev + #define SharedXinputRev 5.0 + #endif + #ifndef SharedPexRev + #define SharedPexRev 1.0 + #endif + + SHLIBLDFLAGS = SharedLibraryLoadFlags + PICFLAGS = PositionIndependentCFlags + + /* + * and now a little bit of magic for using imake without source tree; if we + * are using shared libraries, we really do not need to depend on anything + */ + #if SharedLibXext + DEPEXTENSIONLIB = _UseCat($(USRLIBDIR),$(EXTENSIONSRC)/lib,/libXext_s.a) + EXTENSIONLIB = LoaderLibPrefix _Use(-lXext_s, $(DEPEXTENSIONLIB)) + #endif + #if SharedLibX + DEPXLIB = $(DEPEXTENSIONLIB) _UseCat($(USRLIBDIR),$(XLIBSRC),/libX11_s.a) + XLIB = $(EXTENSIONLIB) LoaderLibPrefix _Use(-lX11_s,$(XLIBSRC)/libX11_s.a) + #endif + #if SharedLibXmu + DEPXMULIB = _UseCat($(USRLIBDIR),$(XMUSRC),/libXmu_s.a) + XMULIB = LoaderLibPrefix _Use(-lXmu_s,$(DEPXMULIB)) + #endif + #if SharedOldLibX + DEPOLDXLIB = _UseCat($(USRLIBDIR),$(OLDXLIBSRC),/liboldX_s.a) + OLDXLIB = LoaderLibPrefix _Use(-loldX_s,$(DEPOLDXLIB)) + #endif + #if SharedLibXt + DEPXTOOLLIB = _UseCat($(USRLIBDIR),$(TOOLKITSRC),/libXt_s.a) + XTOOLLIB = LoaderLibPrefix _Use(-lXt_s,$(DEPXTOOLLIB)) + #endif + #if SharedLibXaw + DEPXAWLIB = _UseCat($(USRLIBDIR),$(AWIDGETSRC),/libXaw_s.a) + XAWLIB = LoaderLibPrefix _Use(-lXaw_s,$(DEPXAWLIB)) + #endif + #if SharedLibXinput + DEPXILIB = _UseCat($(USRLIBDIR),$(XILIBSRC),/libXi_s.a) + XILIB = LoaderLibPrefix _Use(-lXi_s,$(DEPXILIB)) + #endif + #if SharedLibPhigs + DEPPHIGSLIB = _UseCat($(USRLIBDIR),$(PHIGSLIBSRC),/libphigs_s.a) + PHIGSLIB = LoaderLibPrefix _Use(-lphigs_s,$(DEPPHIGSLIB)) + #endif + diff -c mit/config/sv4Lib.rules:1.1.1.1 mit/config/sv4Lib.rules:2.0 *** mit/config/sv4Lib.rules:1.1.1.1 Sat Mar 12 00:36:28 1994 --- mit/config/sv4Lib.rules Sat Mar 12 00:36:28 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/config/sv4Lib.rules,v 2.0 1993/12/10 14:32:22 dawes Exp $ XCOMM $XConsortium: sv4Lib.rules,v 1.8 91/07/19 15:38:53 rws Exp $ /* *************** *** 23,35 **** --- 24,50 ---- #define SharedLibraryLoadFlags -G -z text #endif #ifndef PositionIndependentCFlags + #if HasGcc2 + #define PositionIndependentCFlags -fPIC + #else #define PositionIndependentCFlags -K PIC #endif + #endif + /* * InstallSharedLibrary - generate rules to install the shared library. */ #ifndef InstallSharedLibrary + #if StripInstalledPrograms + #define InstallSharedLibrary(libname,rev,dest) @@\ + install:: Concat(lib,libname.so.rev) @@\ + MakeDir($(DESTDIR)dest) @@\ + $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ + mcs -d Concat($(DESTDIR)dest/lib,libname.so.rev) @@\ + $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\ + $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so) + #else #define InstallSharedLibrary(libname,rev,dest) @@\ install:: Concat(lib,libname.so.rev) @@\ MakeDir($(DESTDIR)dest) @@\ *************** *** 36,41 **** --- 51,57 ---- $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\ $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so) + #endif #endif /* InstallSharedLibrary */ *************** *** 53,59 **** --- 69,92 ---- * the library gone for long periods. */ #ifndef SharedLibraryTarget + #if defined(i386Solarisx86) + #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ + AllTarget(Concat(lib,libname.so.rev)) @@\ + @@\ + Concat(lib,libname.so.rev): solist @@\ + $(RM) $@~ @@\ + (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS) $(LDLINKPATH)) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + $(RM) Concat(lib,libname.so) @@\ + $(LN) $@ Concat(lib,libname.so) @@\ + @@\ + clean:: @@\ + $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + + #else #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ + @@\ AllTarget(Concat(lib,libname.so.rev)) @@\ @@\ Concat(lib,libname.so.rev): solist @@\ *************** *** 66,71 **** --- 99,105 ---- @@\ clean:: @@\ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) + #endif /* Solaris x86 */ #endif /* SharedLibraryTarget */ diff -c mit/config/x386.cf:1.1.1.1 mit/config/x386.cf:2.41 *** mit/config/x386.cf:1.1.1.1 Sat Mar 12 00:36:29 1994 --- mit/config/x386.cf Sat Mar 12 00:36:29 1994 *************** *** 1,31 **** XCOMM platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $ /***************************************************************************** ! * Site-specfic parameters * *****************************************************************************/ /* ! * there are some switches to set appropriate... */ ! #define HasGcc YES /* doesn't work for SVR4 */ ! #define HasSockets YES ! #define HasNdbm YES /* correct for GNU dbm & SVR4 */ ! #define ProjectRoot /usr/X386 ! #define StripInstalledPrograms YES ! #define X386Server YES ! #define ExtensionOSDefines -DXTESTEXT1 ! #define MotifBC YES ! /***************************************************************************** ! * Do not change anything below * ! *****************************************************************************/ /* You must manually compute BootstrapCFlags for initial build */ ! #define BootstrapCFlags OSDefines OSRelease #define StandardDefines OSDefines OSRelease ! #define LdCombineFlags -r #if defined(i386SVR3Architecture) --- 1,569 ---- + XCOMM $XFree86: mit/config/x386.cf,v 2.41 1994/03/06 06:41:16 dawes Exp $ XCOMM platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $ /***************************************************************************** ! * Defaults for Site-specfic parameters * *****************************************************************************/ + /***************************************************************************** + * Do not change anything below * + *****************************************************************************/ + /* ! * If you want to change any of these, do it in the BeforeVendorCF part ! * of site.def */ ! #include ! #define WantServerLocks YES ! #define PartialNetDefault YES ! ! /* Defaults for SVR3, SVR4 */ ! ! #if defined(i386SVR3Architecture) || defined(i386SVR4Architecture) ! # ifndef HasGcc ! # ifdef i386Ncr ! # define HasGcc NO ! # else ! # define HasGcc YES ! # endif ! # endif ! # ifndef HasGcc2 ! # ifdef i386Ncr ! # define HasGcc2 NO ! # else ! # define HasGcc2 YES ! # endif ! # endif ! # ifndef GccUsesGas ! # define GccUsesGas NO ! # endif ! # ifndef UseGas ! # define UseGas NO ! # endif ! # ifndef GnuCpp ! # define GnuCpp NO ! # endif ! # ifndef HasShadowPasswd ! # define HasShadowPasswd YES ! # endif ! # ifndef HasLibCrypt ! # define HasLibCrypt NO ! # endif ! # ifndef SCOLocalConnSysv4 ! # if defined(i386SVR4Architecture) ! # define SCOLocalConnSysv4 YES ! # else ! # define SCOLocalConnSysv4 NO ! # endif ! # endif ! #ifndef HasSVR3mmapDrv ! # define HasSVR3mmapDrv NO ! #endif ! #if HasSVR3mmapDrv ! # define SVR3mmapFlags -DHAS_SVR3_MMAPDRV ! #else ! # define SVR3mmapFlags /**/ ! #endif ! /* Note: this flag has no effect for SVR4 */ ! #ifndef FormattedManPages ! # if defined(i386SVR3Architecture) ! # define FormattedManPages YES ! # else ! # define FormattedManPages NO ! # endif ! #endif ! #ifndef FileManSuffix ! #define FileManSuffix 4 ! #endif ! #ifndef FileManDir ! #define FileManDir $(MANSOURCEPATH)4 ! #endif ! #endif ! ! /* Defaults for BSD-like systems */ ! ! #if defined(i386BsdArchitecture) || defined(i386MachArchitecture) ! ! # ifndef HasGcc ! # define HasGcc YES ! # endif ! # ifndef HasGcc2 ! # if defined(i386NetBsd) || defined(i386FreeBsd) ! # define HasGcc2 YES ! # else ! # define HasGcc2 NO ! # endif ! # endif ! # ifndef GccUsesGas ! # define GccUsesGas YES ! # endif ! # ifndef UseGas ! # define UseGas YES ! # endif ! # ifndef GnuCpp ! # if defined(i386BsdArchitecture) ! # define GnuCpp YES ! # else ! # define GnuCpp NO ! # endif ! # endif ! # ifndef HasShadowPasswd ! # define HasShadowPasswd NO ! # endif ! # ifndef HasLibCrypt ! # if defined(i386NetBsd) || defined(i386FreeBsd) ! # define HasLibCrypt YES ! # else ! # define HasLibCrypt NO ! # endif ! # endif ! # ifndef SCOLocalConnSysv4 ! # define SCOLocalConnSysv4 NO ! # endif ! # ifndef FormattedManPages ! # if defined(i386FreeBsd) ! # define FormattedManPages NO ! # else ! # define FormattedManPages YES ! # endif ! # endif ! #endif ! ! /* Defaults for Linux and OSF/1 */ ! ! #if defined(LinuxArchitecture) || defined(OsfArchitecture) ! ! # ifndef HasGcc ! # define HasGcc YES ! # endif ! # ifndef HasGcc2 ! # define HasGcc2 YES /* for GCC 2.0 or later */ ! # endif ! # ifndef GccUsesGas ! # define GccUsesGas YES ! # endif ! # ifndef UseGas ! # define UseGas YES ! # endif ! # ifndef GnuCpp ! # define GnuCpp YES ! # endif ! # ifndef PreProcessCmd ! # define PreProcessCmd /lib/cpp ! # endif ! # ifndef HasShadowPasswd ! # define HasShadowPasswd NO ! # endif ! # ifndef HasLibCrypt ! # define HasLibCrypt NO ! # endif ! # ifndef SCOLocalConnSysv4 ! # define SCOLocalConnSysv4 NO ! # endif ! #endif ! ! /* Defaults which are the same for all systems */ ! ! #ifndef X386LinkKit ! # define X386LinkKit NO ! #endif ! #ifndef HasSockets ! # define HasSockets YES ! #endif ! #ifndef ProjectRoot ! # define ProjectRoot /usr/X386 ! #endif ! #ifndef StripInstalledPrograms ! # define StripInstalledPrograms YES ! #endif ! #ifndef BuildXTest ! # define BuildXTest YES ! #endif ! #if BuildXTest ! # define XTestDefines -DXTEST ! #else ! # define XTestDefines /**/ ! #endif ! #ifndef ExtensionOSDefines ! # define ExtensionOSDefines -DXTESTEXT1 XTestDefines ! #endif ! #ifndef MotifBC ! # define MotifBC YES ! #endif ! #ifndef Target_486 ! # define Target_486 YES ! #endif ! #ifndef Target_Pentium ! # define Target_Pentium NO ! #endif ! #ifndef CompressAllFonts ! # define CompressAllFonts YES ! #endif ! #ifndef Build75Dpi ! # define Build75Dpi YES ! #endif ! #ifndef Build100Dpi ! # define Build100Dpi NO ! #endif ! #ifndef BuildLargeMiscFonts ! # define BuildLargeMiscFonts NO ! #endif ! #ifndef BuildSpeedo ! # define BuildSpeedo YES ! #endif ! #ifndef BuildPex ! # define BuildPex NO ! #endif ! #ifndef BuildFontServer ! # define BuildFontServer NO ! #endif ! #ifndef DebuggableServer ! # define DebuggableServer NO ! #endif ! #ifndef SpecialMalloc ! # define SpecialMalloc NO ! #endif ! #ifndef GnuMalloc ! # define GnuMalloc NO ! #endif ! #ifndef LinkKitFlags ! # if X386LinkKit ! # define LinkKitFlags -DLINKKIT ! # else ! # define LinkKitFlags /**/ ! # endif ! #endif ! ! /* Some of these man page defaults are overriden in the above OS sections */ ! #ifndef AmoebaConf ! # ifndef ManSuffix ! # define ManSuffix 1x ! # endif ! # ifndef ManDir ! # define ManDir $(MANSOURCEPATH)1 ! # endif ! # ifndef LibManSuffix ! # define LibManSuffix 3x ! # endif ! # ifndef LibmanDir ! # define LibmanDir $(MANSOURCEPATH)3 ! # endif ! # ifndef FileManSuffix ! # define FileManSuffix 5x ! # endif ! # ifndef FileManDir ! # define FileManDir $(MANSOURCEPATH)5 ! # endif ! #endif ! ! #ifndef XF86SVGAServer ! # define XF86SVGAServer YES ! #endif ! ! #ifndef XF86MonoServer ! # define XF86MonoServer NO ! #endif ! ! #ifndef XF86VGA16Server ! # define XF86VGA16Server NO ! #endif ! ! #ifndef XF86S3Server ! # define XF86S3Server NO ! #endif ! ! #ifndef XF86I8514Server ! # define XF86I8514Server NO ! #endif ! ! #ifndef XF86Mach8Server ! # define XF86Mach8Server NO ! #endif ! ! #ifndef XF86Mach32Server ! # define XF86Mach32Server NO ! #endif ! ! #if XF86S3Server ! # define XF86S3Dir s3 ! #else ! # define XF86S3Dir /**/ ! #endif ! ! #if XF86I8514Server ! # define XF86I8514Dir ibm8514 ! #else ! # define XF86I8514Dir /**/ ! #endif ! ! #if XF86Mach8Server ! # define XF86Mach8Dir mach8 ! #else ! # define XF86Mach8Dir /**/ ! #endif ! ! #if XF86Mach32Server ! # define XF86Mach32Dir mach32 ! #else ! # define XF86Mach32Dir /**/ ! #endif ! ! #undef XF86AccelServerDirs ! #define XF86AccelServerDirs XF86S3Dir XF86I8514Dir XF86Mach8Dir XF86Mach32Dir ! ! #undef XF86AccelServer ! #if XF86S3Server || XF86I8514Server || XF86Mach8Server || XF86Mach32Server ! # define XF86AccelServer YES ! #else ! # define XF86AccelServer NO ! #endif ! ! #ifndef XFree86DefaultServer ! # if XF86SVGAServer ! # define XFree86DefaultServer XF86_SVGA ! # else ! # if XF86MonoServer ! # define XFree86DefaultServer XF86_Mono ! # endif ! # endif ! #endif ! ! #ifndef BuildServer ! # if !XF86SVGAServer && !XF86VGA16Server && !XF86MonoServer && !XF86AccelServer ! # define BuildServer NO ! # endif ! #endif ! ! #ifndef X386Vga256Drivers ! # define X386Vga256Drivers et4000 et3000 pvga1 gvga ati tvga8900 cirrus \ ! ncr compaq oak ! #endif ! ! #ifndef X386Vga16Drivers ! # define X386Vga16Drivers et4000 tvga8900 generic ! #endif ! ! #ifndef X386Vga2Drivers ! # define X386Vga2Drivers et4000 et3000 pvga1 gvga tvga8900 ncr \ ! compaq oak generic ! #endif ! ! #ifndef X386Hga2Drivers ! # define X386Hga2Drivers /**/ ! #endif ! ! #ifndef X386Bdm2Drivers ! # define X386Bdm2Drivers /**/ ! #endif ! ! #ifndef XF86S3Drivers ! # define XF86S3Drivers mmio_928 s3_generic ! #endif ! ! #ifndef DirtyStartup ! # define DirtyStartup NO ! #endif ! ! #ifndef BankedMonoVga ! # define BankedMonoVga YES ! #endif ! ! #if BankedMonoVga ! #define MonoDefines -DX386MONOVGA -DBANKEDMONOVGA ! #else ! #define MonoDefines -DX386MONOVGA ! #endif ! ! #ifndef ScoOsMouse ! # define ScoOsMouse YES ! #endif /* You must manually compute BootstrapCFlags for initial build */ ! ! #if defined(i386SVR3Architecture) || defined(i386SVR4Architecture) || defined(i386FreeBsd) ! # define BootstrapCFlags OSDefines OSRelease ! #else ! # define BootstrapCFlags /* nothing */ ! #endif + #ifndef StandardDefines #define StandardDefines OSDefines OSRelease ! #endif ! ! #if !defined(i386BsdArchitecture) ! # ifndef LdCombineFlags ! # define LdCombineFlags -r ! # endif ! #endif ! ! #if Target_Pentium ! # if defined (i386SVR4Solarisx86) ! # define ProworksMOption -xpentium ! # endif ! #endif ! ! #if Target_486 ! # if defined (i386SVR4Solarisx86) ! # define ProworksMOption -x486 ! # endif ! # define Gcc2MOption -m486 ! #else ! # if defined (i386SVR4Solarisx86) ! # define ProworksMOption -x386 ! # endif ! # define Gcc2MOption -m386 ! #endif ! ! #if GccUsesGas ! # define GccGasOption -DGCCUSESGAS ! #else ! # define GccGasOption /**/ ! #endif ! ! #ifndef AsmDefines ! # if UseGas ! # define AsmDefines -DUSE_GAS ! # else ! # define AsmDefines /**/ ! # endif ! #endif ! ! #if GnuCpp ! # define StandardCppDefines -traditional StandardDefines ! #else ! # if defined (i386SVR4Solarisx86) ! # define StandardCppDefines -P StandardDefines ! # else ! # define StandardCppDefines StandardDefines ! # endif ! #endif ! ! #if HasGcc2 && !HasGcc ! # undef HasGcc ! # define HasGcc YES ! #endif ! ! #if HasGcc ! # ifndef UseGccMakeDepend ! # define UseGccMakeDepend YES ! # endif ! #endif ! ! #if SpecialMalloc ! # define MallocFlags -DCAHILL_MALLOC -I/usr/local/debug_include ! #else ! # define MallocFlags /**/ ! #endif ! ! #if GnuMalloc ! # ifndef GnuMallocLib ! # if defined(i386BsdArchitecture) ! # define GnuMallocLib -lgnumalloc ! # else ! # define GnuMallocLib -lgmalloc ! # endif ! # endif ! #else ! # undef GnuMallocLib ! # define GnuMallocLib /**/ ! #endif ! ! #if DebuggableServer ! # if HasGcc ! # define ServerCDebugFlags DebuggableCDebugFlags OptimizedCDebugFlags ! # else ! # define ServerCDebugFlags DebuggableCDebugFlags ! # endif ! #endif ! ! #ifndef AssembleObject ! #define AssembleObject(flags) $(RM) $@ @@\ ! $(CPP) AsmDefines $(INCLUDES) flags $*.s > $*.i @@\ ! $(AS) -o $*.o $*.i @@\ ! $(RM) $*.i ! #endif ! ! #define NormalAsmObjectRule() @@\ ! .s.o: @@\ ! AssembleObject($(_NOOP_)) ! ! #define ObjectFromSpecialAsmSource(dst,src,flags) @@\ ! dst.s: src.s @@\ ! $(RM) $@ @@\ ! $(LN) $? $@ @@\ ! @@\ ! dst.o: dst.s @@\ ! AssembleObject(flags) @@\ ! @@\ ! depend:: dst.s @@\ ! @@\ ! clean:: @@\ ! $(RM) dst.s ! ! ! /* ! * Rules for building config files from scripts ! */ ! ! #ifndef Depend ! # define Depend depend ! #endif ! ! #define ConfigTargetLong(target,dep,script,args,extra) @@\ ! all:: Configure @@\ ! @@\ ! Configure:: target.o @@\ ! @@\ ! target.c: script dep @@\ ! $(MAKE) $(MFLAGS) Makefile @@\ ! $(MAKE) $(MFLAGS) extra Concat(Build,target) @@\ ! @@\ ! Concat(Build,target): @@\ ! $(RM) target.c @@\ ! $(SHELL) script args @@\ ! @@\ ! clean:: @@\ ! $(RM) target.c ! ! #define ConfigTarget(target,dep,script,args) ConfigTargetLong(target,dep,script,args,Depend) ! ! #define ConfigTargetNoDepend(target,dep,script,args) ConfigTargetLong(target,dep,script,args,) ! ! ! /* ! * Rules for installing LinkKit parts (target is install.linkkit) ! */ ! ! #define InstallLinkKitNonExecFile(file,dest) @@\ ! install.linkkit:: file @@\ ! MakeDir($(DESTDIR)dest) @@\ ! $(INSTALL) -c $(INSTDATFLAGS) file $(DESTDIR)dest ! ! #define InstallLinkKitLibrary(libname,dest) @@\ ! install.linkkit:: Concat(lib,libname.a) @@\ ! MakeDir($(DESTDIR)dest) @@\ ! $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.a) $(DESTDIR)dest @@\ ! RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.a)) ! ! #define InstallLinkKitNamedNonExec(srcname,dstname,dest) @@\ ! install.linkkit:: srcname @@\ ! MakeDir($(DESTDIR)dest) @@\ ! $(INSTALL) -c $(INSTDATFLAGS) srcname $(DESTDIR)dest/dstname ! ! #define InstallLinkKitNamedProg(srcname,dstname,dest) @@\ ! install.linkkit:: srcname @@\ ! MakeDir($(DESTDIR)dest) @@\ ! $(INSTALL) -c $(INSTBINFLAGS) srcname $(DESTDIR)dest/dstname ! ! #define InstallLinkKitSubdirs(dirs) \ ! NamedTargetSubdirs(install.linkkit,dirs,"installing link kit",DESTDIR='$(DESTDIR)',install.linkkit) ! ! #ifndef LinkKitDir ! # define LinkKitDir $(USRLIBDIR)/Server ! #endif ! #if defined(i386SVR3Architecture) *************** *** 36,69 **** /* * V/386 Release 3.2 */ ! #ifdef ISC ! /* INTERACTIVE UNIX Version 2.2.1 */ ! # define OSVendor "Interactive System Corp." ! # define OSDefines -DISC ! # define LocalLibraries -lpt ! # define PosixLibraries -lcposix # define SocketLibraries -linet #endif ! #ifdef ESIX ! #define OSVendor "ESIX System Inc." #define OSDefines -DESIX ! #define LocalLibraries -lpt #define SocketLibraries -lnet -lnsl_s #define PosixLibraries /**/ #endif ! #ifdef SCO ! #define OSDefines -DSCO -DBROKEN_FTOL -DNO_PROTOTYPE -D_SVID ! #define OSVendor "Santa Cruz Operation Ltd." ! #define LocalLibraries -lpt ! #define SocketLibraries -lsocket #define PosixLibraries /**/ #endif ! #ifdef ATT #define OSDefines -DATT ! #define OSVendor "AT&T" #define LocalLibraries -lpt #define SocketLibraries -lnet -lnsl_s /* just a guess */ #define PosixLibraries /**/ --- 574,667 ---- /* * V/386 Release 3.2 */ ! #ifdef i386Isc ! /* INTERACTIVE UNIX Version 2.0.2, 2.2.1, 3.0 and 4.0 */ ! # if IscVersion == 400 ! # define ISCVerDef -DISC40 -DISC30 ! # define OSVendor (ISC Version 4.0) ! # else ! # if IscVersion == 300 ! # define ISCVerDef -DISC30 ! # define OSVendor (ISC Version 3.0) ! # else ! # if IscVersion == 202 ! # define OSVendor (ISC Version 2.0.2) ! # define ISCVerDef -DISC202 ! # else ! # define OSVendor (ISC Version 2.2.1) ! # define ISCVerDef -DISC22 ! # endif ! # endif ! # endif ! # define OSDefines -DISC ISCVerDef ! # if IscVersion > 202 ! # define LocalLibraries -lpt ! # define PosixLibraries -lcposix ! # else ! # define LocalLibraries -lmalloc -lpt ! # define PosixLibraries ! # endif # define SocketLibraries -linet #endif ! #ifdef i386Esix ! #define OSVendor (ESIX Version 3.2D) #define OSDefines -DESIX ! #define LocalLibraries -lpt -lbsd #define SocketLibraries -lnet -lnsl_s #define PosixLibraries /**/ #endif ! #ifdef i386Sco ! #if ScoVersion == 324 ! /* ! * if your gcc is compiled with STDC_VALUE=0 then change the 1 to 0 ! */ ! # define GCC_STDC_VALUE 1 ! # if !GCC_STDC_VALUE ! # define OSDefines -DSCO -DSCO324 -DBROKEN_FTOL -D_NO_PROTOTYPE \ ! -D_SVID -D__STDC__=1 ! # undef StandardCppDefines ! # define StandardCppDefines -DUNIXCPP=1 StandardDefines ! # else ! # define OSDefines -DSCO -DSCO324 -DBROKEN_FTOL -D_NO_PROTOTYPE \ ! -D_SVID ! # endif ! # define OSVendor (SCO Version 3.2.4) ! #else /* ScoVersion == 324 */ ! # define OSDefines -DSCO -DBROKEN_FTOL -DNO_PROTOTYPE -D_SVID ! # define OSVendor (SCO Version 3.2.2) ! #endif /* ScoVersion == 324 */ ! /* ! * XBSDLIB is included with the Socket libraries, because SCO ! * needs Xbsd as its bcopy routine doesn't handle overlapping ! * regions. If HasSockets is false the XINETLIB does it for ! * us anyway. ! */ ! #if !X386LinkKit ! # define SocketLibraries $(XBSDLIB) -lsocket ! #else ! # define SocketLibraries -lsocket ! #endif #define PosixLibraries /**/ + #define ManSourcePath $(MANPATH)/cat. + + #if ScoOsMouse + # define ScoExtraServerDefines -DUSE_OSMOUSE + # define LocalLibraries -lmalloc -lpt -levent + #else + # define LocalLibraries -lmalloc -lpt + #endif /* ScoOsMouse */ + + #endif /* i386Sco */ + + #ifndef ScoExtraServerDefines + # define ScoExtraServerDefines /**/ #endif ! #ifdef i386Att #define OSDefines -DATT ! #define OSVendor (AT&T) #define LocalLibraries -lpt #define SocketLibraries -lnet -lnsl_s /* just a guess */ #define PosixLibraries /**/ *************** *** 75,158 **** #define OSRelease -DSYSV -DSYSV386 #if HasGcc ! # define CcCmd gcc -DNO_ASM -fstrength-reduce -fpcc-struct-return -fwritable-strings ! # define LibraryCcCmd gcc -DNO_ASM -fstrength-reduce -fpcc-struct-return ! # define ShlibDefines -D__GNUC__ -DGNULIB=/usr/local/lib/gcc-gnulib #else ! # define ShlibDefines /**/ #endif #if HasSockets ! /* # define ConnectionFlags -DLOCALCONN -DTCPCONN */ ! # define ConnectionFlags -DTCPCONN ! # define ExtraLibraries SocketLibraries LocalLibraries -lc_s PosixLibraries #else ! # define ConnectionFlags -DLOCALCONN ! # define ExtraLibraries $(LIBDIR)/etc/inetemul.o LocalLibraries -lc_s PosixLibraries #endif ! /* #include */ /* not working yet */ /* * Man pages need to be formatted when installed, so override the default * imake rules. */ ! #define InstallManPageLong(file,destdir,dest) @@\ install.man:: file.man @@\ ! $(RM) destdir/dest.ManSuffix @@\ ! cat file.man | neqn | nroff -man >/tmp/file.man @@\ ! $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man destdir/dest.ManSuffix @@\ ! $(RM) /tmp/file.man #define InstallMultipleMan(list,dest) @@\ install.man:: list @@\ ! @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ ! for i in list; do \ @@\ ! (set -x; \ @@\ ! $(RM) dest/$$i; \ @@\ ! cat $$i | neqn | nroff -man >/tmp/$$i; \ @@\ ! $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$i dest/$$i; \ @@\ ! $(RM) /tmp/$$i); \ @@\ ! done /* If you have trouble with make bombing out in Xlib, try uncommenting this. */ /* You will not get dependencies as a result, but better than nothing. */ ! /* #define DependTarget3(srcs1,srcs2,srcs3) */ #endif /* i386SVR3Architecture */ /* ! * V/386 Release 4.0 */ #if defined(i386SVR4Architecture) ! #define SystemV4 YES ! /* this is now just for Dell's one */ ! #ifdef DELL ! #define OSDefines -DDELL ! #define OSVendor "DELL Computer Corp." #endif ! #define OSName Unix System V/386 Release 4.0 #define OSMajorVersion 4 #define OSMinorVersion 0 #define OSRelease -DSVR4 -DSYSV386 #if HasGcc ! # define CcCmd gcc -ansi -fstrength-reduce -fpcc-struct-return -Di386 ! # if HasSharedLibraries ! # define LibraryCcCmd cc -Xc -Di386 -Dasm=__asm # endif #else ! # define CcCmd cc -Xc -Di386 -Dasm=__asm #endif #include #endif /* i386SVR4Architecture */ XCOMM operating system: OSName OSVendor --- 673,1322 ---- #define OSRelease -DSYSV -DSYSV386 #if HasGcc ! # define CcCmd gcc ! # if HasGcc2 ! # define DefaultCCOptions Gcc2MOption -DNO_ASM -fpcc-struct-return \ ! -fwritable-strings ! # define LibraryCCOptions Gcc2MOption -DNO_ASM -fpcc-struct-return ! # define OptimizedCDebugFlags -O2 ! # else ! # define DefaultCCOptions -DNO_ASM -fpcc-struct-return -fwritable-strings ! # define LibraryCCOptions -DNO_ASM -fpcc-struct-return ! # define OptimizedCDebugFlags -O -fstrength-reduce ! # endif ! # define ShlibDefines -D__GNUC__ $(XDMAUTHDEFS) #else ! # define ShlibDefines $(XDMAUTHDEFS) #endif + # define Malloc0ReturnsNull YES + #if HasSockets ! # define ConnectionFlags -DCLIENTS_LOCALCONN -DSERVER_LOCALCONN -DTCPCONN ! # define ExtraLibraries SocketLibraries LocalLibraries GnuMallocLib \ ! -lc_s PosixLibraries ! # define ServerExtraDefines GccGasOption -DXDMCP MallocFlags LinkKitFlags \ ! -DAVOID_GLYPHBLT ScoExtraServerDefines SVR3mmapFlags #else ! # define NeedInetEmulLib YES ! # define ConnectionFlags -DCLIENTS_LOCALCONN -DSERVER_LOCALCONN ! # define ExtraLibraries $(XINETLIB) LocalLibraries GnuMallocLib \ ! -lc_s PosixLibraries ! /* This turns off XDMCP in the server if no sockets */ ! # define ServerExtraDefines GccGasOption MallocFlags LinkKitFlags \ ! -DAVOID_GLYPHBLT ScoExtraServerDefines SVR3mmapFlags #endif ! #include /* * Man pages need to be formatted when installed, so override the default * imake rules. */ ! ! /* The .DS and .DE macros used in some manual pages are obsolete ! * in the often used ISC's Textprocessing Workbench 2.1.0 and break it, ! * so it's better to remove these previously ! */ ! #ifndef RemoveDSDENroffMacros ! #if defined(i386Isc) && IscVersion != 202 ! #define RemoveDSDENroffMacros YES ! #else ! #define RemoveDSDENroffMacros NO ! #endif ! #endif ! ! /* ! * Compress manual pages, default on ISC and SCO ! */ ! #ifndef CompressManPages ! #if defined(i386Isc) || defined(i386Sco) ! #define CompressManPages YES ! #else ! #define CompressManPages NO ! #endif ! #endif ! ! #if RemoveDSDENroffMacros ! # define RemoveDSDENroffMacrosCmd sed -e '/^\.D[S|E]$$/d' ! #else ! # define RemoveDSDENroffMacrosCmd cat ! #endif ! ! #ifndef CompressManCmd ! # if CompressManPages ! # if defined(i386Sco) && (ScoVersion < 324) ! # define CompressManCmd pack ! # else ! # define CompressManCmd $(COMPRESS) -v ! # endif ! # else ! # define CompressManCmd @true ! # endif ! #endif ! ! RMDSDEMACCMD = RemoveDSDENroffMacrosCmd ! COMPRESSMANCMD = CompressManCmd ! ! #if FormattedManPages ! ! #define InstallGenManPageLong(file,destdir,dest,suffix) @@\ install.man:: file.man @@\ ! MakeDir($(DESTDIR)destdir) @@\ ! $(RM) $(DESTDIR)destdir/dest.suffix* @@\ ! $(RMDSDEMACCMD) file.man | $(NEQN) | $(NROFF) -man >/tmp/file.man @@\ ! $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man $(DESTDIR)destdir/dest.suffix @@\ ! -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.suffix @@\ ! $(RM) /tmp/file.man ! ! #define InstallManPageLong(file,destdir,dest) @@\ ! InstallGenManPageLong(file,destdir,dest,$(MANSUFFIX)) ! #define InstallMultipleMan(list,dest) @@\ install.man:: list @@\ ! MakeDir($(DESTDIR)dest) @@\ ! @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\ ! for i in list; do \ @@\ ! (set -x; \ @@\ ! MNAME=`echo $$i | cut -f1 -d.`; \ @@\ ! $(RM) $(DESTDIR)dest/$${MNAME}*; \ @@\ ! $(RMDSDEMACCMD) $$i | $(NEQN) | $(NROFF) -man >/tmp/$$i; \ @@\ ! $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$i $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\ ! $(COMPRESSMANCMD) $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\ ! $(RM) /tmp/$$i); \ @@\ ! done ! ! /* ! * InstallManPageAliases - generate rules to install manual page aliases. ! * (Make hard links on SVR3.) ! */ ! ! #ifdef i386Sco ! /* ! * due to the extra '.' chars in the file name ! */ ! ! #define InstallManPageAliases(file,destdir,aliases) @@\ ! install.man:: @@\ ! @(SUFFIX=`echo $(DESTDIR)destdir/file.* | cut -f3,4 -d.`; \ @@\ ! for i in aliases; do (set -x; \ @@\ ! $(RM) $(DESTDIR)destdir/$$i.*; \ @@\ ! $(LN) $(DESTDIR)destdir/file.$${SUFFIX} \ @@\ ! $(DESTDIR)destdir/$$i.$${SUFFIX}); \ @@\ ! done) ! ! #else ! ! #define InstallManPageAliases(file,destdir,aliases) @@\ ! install.man:: @@\ ! @(SUFFIX=`echo $(DESTDIR)destdir/file.* | cut -f2,3 -d.`; \ @@\ ! for i in aliases; do (set -x; \ @@\ ! $(RM) $(DESTDIR)destdir/$$i.*; \ @@\ ! $(LN) $(DESTDIR)destdir/file.$${SUFFIX} \ @@\ ! $(DESTDIR)destdir/$$i.$${SUFFIX}); \ @@\ ! done) ! ! #endif ! ! #define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\ ! InstallManPageAliases(file,destdir,aliases) ! ! #endif /* If you have trouble with make bombing out in Xlib, try uncommenting this. */ /* You will not get dependencies as a result, but better than nothing. */ ! #ifndef MakeHashTableBug ! #define MakeHashTableBug NO ! #endif ! #if MakeHashTableBug ! #define DependTarget3(srcs1,srcs2,srcs3) ! #endif #endif /* i386SVR3Architecture */ /* ! * System V Release 4.0 (SVR4) */ #if defined(i386SVR4Architecture) + #if defined(i386SVR4Solarisx86) + /* + * SUN Microsystems -- Solaris 2.1 x86 FCS (SVR4) + */ + #define SystemV4 YES + #define OSName Solaris 2.1 x86 FCS (System V Release 4.0) + #define OSMajorVersion 4 + #define OSMinorVersion 0 + #define OSRelease -DSVR4 -DSYSV386 + #define OSDefines -DSOLX86 + #define OSVendor SUN Microsystems ! #ifndef HasSharedLibraries ! # define HasSharedLibraries YES ! #endif ! ! #ifndef HasSolx86apertureDrv ! # define HasSolx86apertureDrv NO ! #endif ! #if HasSolx86apertureDrv ! # define SOLX86apertureFlags -DHAS_SOLX86_APERTUREDRV ! #else ! # define SOLX86apertureFlags /**/ ! #endif ! ! #define CppCmd /usr/ccs/lib/cpp ! #define PreProcessCmd /usr/ccs/lib/cpp ! ! #if HasGcc ! # define CcCmd gcc ! # define AnsiCCOptions /* -ansi */ ! # if HasGcc2 ! # define DefaultCCOptions Gcc2MOption -fpcc-struct-return -Di386 ! # define OptimizedCDebugFlags -O2 ! # define MakeLdRunPath(dir) Concat3(-Xlinker -R,dir,$${LD_RUN_PATH+\:$$LD_RUN_PATH}) ! # define MakeLdLinkPath(dir) Concat3(-R,dir,$${LD_RUN_PATH+\:$$LD_RUN_PATH}) ! # else ! # define DefaultCCOptions -fpcc-struct-return -fstrength-reduce -Di386 ! # define MakeLdRunPath(dir) Concat3(-R,dir,$${LD_RUN_PATH+\:$$LD_RUN_PATH}) ! # define MakeLdLinkPath(dir) Concat3(-R,dir,$${LD_RUN_PATH+\:$$LD_RUN_PATH}) ! # if HasSharedLibraries ! # define LibraryCcCmd gcc ! # define LibraryAnsiCCOptions /* -ansi */ ! # define LibraryCCOptions -O2 -Di386 -Dasm=__asm ! # endif ! # endif ! #else /* Use ProWorks compiler */ ! # define NeedConstPrototoypes YES ! # define NeedFunctionPrototypes YES ! # define NeedNestedPrototypes YES ! # define NeedVarargsPrototypes YES ! # define NeedWidePrototypes NO ! # if !defined (ProWorksHome) ! # undef ProWorksHome ! # define ProWorksHome /opt/SUNWspro ! # endif ! # if defined((ProworksMOption) /* XXX: ProWorks 2.0:broken -x486, -xpentium..*/ ! # undef ProworksMOption ! # define ProworksMOption /**/ ! # endif ! # define CcCmd ProWorksHome/bin/cc ! # define AnsiCCOptions /* */ ! # define DefaultCCOptions -Xc ProworksMOption -DPROWORKS -DINCLUDE_ALLOCA_H -Di386 -Dasm=__asm ! # define ServerCcCmd ProWorksHome/bin/cc ! # define ServerCCOptions -Xa ProworksMOption -DPROWORKS -DINCLUDE_ALLOCA_H -Di386 -Dasm=__asm ! # define AllocateLocalDefines -DINCLUDE_ALLOCA_H ! # define MakeLdRunPath(dir) Concat3(-R,dir,$${LD_RUN_PATH+\:$$LD_RUN_PATH}) ! # define MakeLdLinkPath(dir) Concat3(-R,dir,$${LD_RUN_PATH+\:$$LD_RUN_PATH}) ! # if HasSharedLibraries ! # define LibraryCcCmd ProWorksHome/bin/cc ! # define LibraryAnsiCCOptions /* */ ! # define LibraryCCOptions -Xc ProworksMOption -DPROWORKS -DINCLUDE_ALLOCA_H -Di386 -Dasm=__asm ! # define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H ! # endif ! #endif ! ! /* Make sure we don't use /usr/ucb/ld */ ! #ifndef LdCmd ! # define LdCmd /usr/ccs/bin/ld ! #endif ! ! #define ServerExtraDefines GccGasOption -DXDMCP MallocFlags LinkKitFlags \ ! -DAVOID_GLYPHBLT SOLX86apertureFlags ! ! #if SCOLocalConnSysv4 ! # define Acp -DSVR4_ACP ! #else ! # define Acp /**/ ! #endif ! #define ConnectionFlags -DUNIXCONN -DTCPCONN -DCLIENTS_LOCALCONN \ ! -DSERVER_LOCALCONN Acp ! #define NeedBerklib YES ! ! #if defined(UseInstalled) && !X386LinkKit ! # define ExtraLibraries -lsocket -lnsl GnuMallocLib $(XBSDLIB) ! #else ! # define ExtraLibraries -lsocket -lnsl GnuMallocLib #endif ! #include ! ! #else ! /* ! * USL-based V/386 System V Release 4.0 ! */ ! #define SystemV4 YES ! ! /* No vendor defines required for SVR4 */ ! ! #define OSName Unix System V/386 Release 4.x #define OSMajorVersion 4 #define OSMinorVersion 0 #define OSRelease -DSVR4 -DSYSV386 + #define OSDefines /**/ + #ifdef i386Ncr + # define OSVendor (NCR) + #else + # define OSVendor /**/ + #endif + #ifndef HasSharedLibraries + #define HasSharedLibraries YES + #endif + #if HasGcc ! # define CcCmd gcc ! # define AnsiCCOptions -ansi ! # if HasGcc2 ! # define DefaultCCOptions Gcc2MOption -fpcc-struct-return -Di386 ! # define OptimizedCDebugFlags -O2 ! # else ! # define DefaultCCOptions -fpcc-struct-return -fstrength-reduce -Di386 ! # if HasSharedLibraries ! # define LibraryCcCmd /bin/cc ! # define LibraryAnsiCCOptions -Xc ! # define LibraryCCOptions -Di386 -Dasm=__asm ! # endif # endif #else ! # define CcCmd /bin/cc ! # ifdef i386Ncr ! # define AnsiCCOptions -Xa ! # define DefaultCCOptions -Di386 -Hnocopyr -DNO_SECONDARY ! # else ! # define AnsiCCOptions -Xc ! # define DefaultCCOptions -Di386 -Dasm=__asm ! # endif ! #endif ! ! /* Make sure we don't use /usr/ucb/ld */ ! #ifndef LdCmd ! #define LdCmd /bin/ld ! #endif ! ! #define ServerExtraDefines GccGasOption -DXDMCP MallocFlags LinkKitFlags \ ! -DAVOID_GLYPHBLT ! ! #if SCOLocalConnSysv4 ! # define Acp -DSVR4_ACP ! #else ! # define Acp /**/ ! #endif ! ! #define ConnectionFlags -DUNIXCONN -DTCPCONN -DCLIENTS_LOCALCONN \ ! -DSERVER_LOCALCONN Acp ! #define NeedBerklib YES ! ! #if defined(UseInstalled) && !X386LinkKit ! # define ExtraLibraries -lsocket -lnsl GnuMallocLib $(XBSDLIB) ! #else ! # define ExtraLibraries -lsocket -lnsl GnuMallocLib #endif #include + #endif /* i386SVR4Solarisx86 */ #endif /* i386SVR4Architecture */ + #if defined(i386BsdArchitecture) + + /* + * 386BSD, NetBSD, FreeBSD and BSD/386 + */ + + #define i386Bsd YES + + #ifdef i386Bsdi + # define OSName BSD/386 + #else + # ifdef i386NetBsd + # define OSName NetBSD + # else + # ifdef i386FreeBsd + # define OSName FreeBSD + # else + # define OSName 386BSD + # endif + # endif + #endif + #define OSMajorVersion 4 + #define OSMinorVersion 3 + #define OSRelease /* nothing */ + /* Not sure if this is needed */ + #ifdef i386FreeBsd + # define OSDefines -D__FreeBSD__ + #else + # define OSDefines /* nothing */ + #endif + #define OSVendor /* nothing */ + + /* NetBSD 0.9 and later */ + #if defined(i386NetBsd) && (__NetBSD__version__ >= 1993070) + # define LexLib -ll + #endif + + #ifdef i386Bsdi + # define CppCmd /usr/bin/cpp + #else + # define CppCmd /usr/libexec/cpp + #endif + + #ifndef BuildBsdSharedLibs + # if defined(i386FreeBsd) + # define BuildBsdSharedLibs YES + # else + # define BuildBsdSharedLibs NO + # endif + #endif + + #if defined(i386NetBsd) || defined(i386FreeBsd) + # if BuildBsdSharedLibs + # include + # endif + #endif + + #if HasGcc + # define AnsiCCOptions /**/ + # if HasGcc2 + # define CcCmd gcc + # define DefaultCCOptions Gcc2MOption + # define OptimizedCDebugFlags -O2 + # define LibraryCCOptions Gcc2MOption + # else + # define CcCmd cc + # define DefaultCCOptions /**/ + # define OptimizedCDebugFlags -O -fstrength-reduce + # define LibraryCCOptions /**/ + # endif + #endif + + # define ServerExtraDefines GccGasOption -DXDMCP MallocFlags LinkKitFlags \ + -DAVOID_GLYPHBLT + + #define ExtraLibraries GnuMallocLib + + #define HasVoidSignalReturn YES + #define AvoidNullMakeCommand YES + #define HasPutenv YES + #define UnalignedReferencesAllowed YES + #ifndef InstKmemFlags + # define InstKmemFlags -m 2755 -g kmem + #endif + #define AdmDir /var/log + + #if defined(i386FreeBsd) + # ifndef HasShm + # define HasShm YES + # endif + #endif + + #if OSMajorVersion >= 4 && OSMinorVersion >= 3 + # define SetTtyGroup YES + #endif + + /* These are used by xdm and can be overriden in the xdm config file */ + + #define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR) + #define DefaultUserPath :/bin:/usr/bin:/usr/local/bin:$(BINDIR) + + #ifdef i386Bsdi + # define NeqnCmd eqn + #endif + + #if FormattedManPages + /* + * Rules to install pre-formatted man pages. + */ + + #define ManSourcePath $(MANPATH)/cat + + #define InstallManPageLong(file,destdir,dest) @@\ + install.man:: file.man @@\ + MakeDir($(DESTDIR)destdir) @@\ + $(RM) $(DESTDIR)destdir/dest.0 @@\ + cat file.man | $(NEQN) | $(TBL) | $(NROFF) -man >/tmp/file.man @@\ + $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man $(DESTDIR)destdir/dest.0 @@\ + $(RM) /tmp/file.man + + #define InstallGenManPageLong(file,destdir,dest,suffix) @@\ + InstallManPageLong(file,destdir,dest) + + #define InstallManPageAliases(file,destdir,aliases) @@\ + install.man:: @@\ + @for i in aliases; do (cd $(DESTDIR)destdir; set -x; \ @@\ + $(RM) $$i.0; \ @@\ + $(LN) file.0 $$i.0); \ @@\ + done + #endif + + #define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\ + InstallManPageAliases(file,destdir,aliases) + + #endif /* FormattedManPages */ + + + #if defined(i386MachArchitecture) + + /* + * Mach i386 + */ + + #define i386Mach YES + + #define OSName Mach i386 + #define OSMajorVersion 2 + #define OSMinorVersion 6 + #define OSRelease /* nothing */ + #define OSDefines -DMACH386 -DNOSTDHDRS -DX_NOT_STDC_ENV \ + -DNOT_POSIX + #define OSVendor (CMU) + + #if HasGcc + # define CcCmd gcc + # define AnsiCCOptions -traditional + # if HasGcc2 + # define DefaultCCOptions Gcc2MOption -fwritable-strings + # define OptimizedCDebugFlags -O2 + # define LibraryCCOptions Gcc2MOption + # else + # define DefaultCCOptions -fwritable-strings + # define OptimizedCDebugFlags -O -fstrength-reduce + # define LibraryCCOptions /* nothing */ + # endif + #endif + + #define ServerExtraDefines GccGasOption -DXDMCP MallocFlags LinkKitFlags \ + -DAVOID_GLYPHBLT + + #define ExtraLibraries GnuMallocLib + + #define SetTtyGroup YES + #define HasBsearch NO + #define HasVoidSignalReturn NO + #define DirFailPrefix - + #define AvoidNullMakeCommand YES + + #endif /* i386MachArchitecture */ + + /* + * linux + */ + #if defined(LinuxArchitecture) + + #define OSName Linux + #define OSVendor /**/ + #define OSMajorVersion 99 + #define OSMinorVersion 15h + #define OSRelease -Dlinux + #define OSDefines -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE + + #define SystemV NO + #define AvoidNullMakeCommand YES + + #if StripInstalledPrograms + #define InstUidFlags -s -m 4755 + #else + #define InstUidFlags -m 4755 + #endif + #define ConnectionFlags -DUNIXCONN -DTCPCONN + #define DefaultFontPath $(FONTDIR)/misc/ + #define YaccCmd bison -y + #define LexCmd flex + + #if HasGcc + # define CcCmd gcc + # define CppCmd /lib/cpp + # define PreProcessCmd /lib/cpp + # define LdCombineFlags -r + # define DefaultCCOptions Gcc2MOption -DNO_ASM -fwritable-strings + # define LibraryCCOptions Gcc2MOption -DNO_ASM -fwritable-strings + # define OptimizedCDebugFlags -O2 + # define ServerExtraDefines GccGasOption -DXDMCP MallocFlags LinkKitFlags \ + -DAVOID_GLYPHBLT + # define Malloc0ReturnsNull YES + # define NeedConstPrototoypes YES + # define NeedFunctionPrototypes YES + # define NeedNestedPrototypes YES + # define NeedVarargsPrototypes YES + # define NeedWidePrototypes NO + #endif /* HasGcc */ + + #define ExtraLibraries GnuMallocLib + + #define HasPutenv YES + #ifndef HasShm + # define HasShm YES + #endif + + #include + + #endif /* LinuxArchitecture */ + + /* + * OSF/1 + */ + #if defined(OsfArchitecture) + + #define OSName OSF/1 + #define OSVendor (Open Software Foundation) + #define OSMajorVersion 1 + #define OSMinorVersion 1 + #define OSRelease /* __osf__ defined by cpp */ + #define OSDefines /* see /usr/include/standards.h */ + + #define InstallCmd installbsd + #define InstBinFlags -m 755 -o bin -g bin + #define InstDatFlags -m 644 -o bin -g bin + #define InstIncFlags -m 644 -o bin -g bin + #define InstKmemFlags -m 4755 -o root -g bin + #define InstLibFlags -m 644 -o bin -g bin + #define InstManFlags -m 644 -o bin -g bin + #define InstPgmFlags -m 755 -o bin -g bin + #define InstUidFlags -m 4755 -g bin + #define ConnectionFlags -DUNIXCONN -DTCPCONN + #define DefaultFontPath $(FONTDIR)/misc/ + + #if HasGcc + #undef PreProcessCmd + #define CppCmd /lib/cpp + #define PreProcessCmd CppCmd + #define DefaultCCOptions Gcc2MOption -pic-lib + #define LibraryCCOptions DefaultCCOptions + #define ServerExtraDefines GccGasOption -DXDMCP MallocFlags LinkKitFlags \ + -DAVOID_GLYPHBLT + #define NeedConstPrototoypes YES + #define NeedFunctionPrototypes YES + #define NeedNestedPrototypes YES + #define NeedVarargsPrototypes YES + #define NeedWidePrototypes YES + #define CcCmd gcc -ansi -fwritable-strings + #define OptimizedCDebugFlags -O2 -fomit-frame-pointer + #define ServerCcCmd CcCmd + #define ServerCCOptions -Di386=1 DefaultCCOptions + #endif /* HasGcc */ + + #ifndef HasShm + # define HasShm NO + #endif + #define HasSharedLibraries NO /* I haven't debugged this yet */ + #define HasLargeTmp YES + #define HasPutenv YES + #define HasSockets YES + #define HasVFork NO + #define Malloc0ReturnsNull YES + #define ExtraLoadFlags -L/usr/shlib + #define UseCCMakeDepend NO + #define ConstructMFLAGS NO + + #define ExtraLibraries GnuMallocLib + + XCOMM (one of these days I'll finish this) #include + #endif /* OsfArchitecture */ + + #if !defined(UseInstalled) || X386LinkKit + #include + #endif XCOMM operating system: OSName OSVendor diff -c /dev/null mit/config/x386config.sh:2.3 *** /dev/null Sat Mar 12 00:36:31 1994 --- mit/config/x386config.sh Sat Mar 12 00:36:31 1994 *************** *** 0 **** --- 1,205 ---- + #!/bin/sh + + # $XFree86: mit/config/x386config.sh,v 2.3 1993/09/04 16:19:20 dawes Exp $ + # + # Generate X386Conf.tmpl Imake template + # + # Usage: x386config.sh MODULETYPE1 module ... MODULETYPE2 module ... + # + + Iconfig=X386Conf.tmpl + + ModuleHeader= + ModuleList= + BuildVga2=NO + BuildHga2=NO + BuildBdm2=NO + BuildVga16=NO + BuildVga256=NO + ExtraRenderers=NO + + cat > $Iconfig <> $Iconfig + else + echo "$ObjsHeader \\" >> $Iconfig + set - $ModuleObjs + while [ $# -gt 1 ]; do + echo " $1 \\" >> $Iconfig + shift + done + echo " $1" >> $Iconfig + shift + fi + fi + if [ X"$SubdirsHeader" != X ]; then + if [ X"$ModuleSubdirs" = X ]; then + echo "$SubdirsHeader" >> $Iconfig + else + echo "$SubdirsHeader \\" >> $Iconfig + set - $ModuleSubdirs + while [ $# -gt 1 ]; do + echo " $1 \\" >> $Iconfig + shift + done + echo " $1" >> $Iconfig + shift + fi + fi + set - $Args + ModuleType=$1 + ModuleObjs= + ModuleSubdirs= + case $ModuleType in + VGADRIVER) + ObjsHeader=' VGAOBJS =' + SubdirsHeader=' VGASUBDIRS =' + ;; + VGA16DRIVER) + ObjsHeader=' VGA16OBJS =' + SubdirsHeader=' VGA16SUBDIRS =' + ;; + VGA2DRIVER) + ObjsHeader=' VGA2OBJS =' + SubdirsHeader=' VGA2SUBDIRS =' + ;; + HGA2DRIVER) + ObjsHeader=' HGA2OBJS =' + SubdirsHeader=' HGA2SUBDIRS =' + ;; + BDM2DRIVER) + ObjsHeader=' BDM2OBJS =' + SubdirsHeader=' BDM2SUBDIRS =' + ;; + S3DRIVER) + ObjsHeader=' S3OBJS =' + SubdirsHeader=' S3SUBDIRS =' + ;; + RENDERER) + ObjsHeader=' RENDERERLIBS =' + SubdirsHeader=' RENDERERSUBDIRS =' + ;; + esac + ;; + *) + case $ModuleType in + VGADRIVER) + BuildVga256=YES + ModuleObjs="$ModuleObjs "'$(VGADRIVERSRC)'/$1/$1.o + ModuleSubdirs="$ModuleSubdirs $1" + ;; + VGA16DRIVER) + BuildVga16=YES + ModuleObjs="$ModuleObjs "'$(VGA16DRIVERSRC)'/$1/$1.o + ModuleSubdirs="$ModuleSubdirs $1" + ;; + VGA2DRIVER) + BuildVga2=YES + ModuleObjs="$ModuleObjs "'$(VGA2DRIVERSRC)'/$1/$1.o + ModuleSubdirs="$ModuleSubdirs $1" + ;; + HGA2DRIVER) + BuildHga2=YES + ModuleObjs="$ModuleObjs "'$(HGA2DRIVERSRC)'/$1/$1.o + ModuleSubdirs="$ModuleSubdirs $1" + ;; + BDM2DRIVER) + BuildBdm2=YES + ModuleObjs="$ModuleObjs "'$(BDM2DRIVERSRC)'/$1/$1.o + ModuleSubdirs="$ModuleSubdirs $1" + ;; + S3DRIVER) + ModuleObjs="$ModuleObjs "'$(S3DRIVERSRC)'/$1/$1.o + ModuleSubdirs="$ModuleSubdirs $1" + ;; + RENDERER) + ExtraRenderers=YES + ModuleObjs="$ModuleObjs "'$(RENDERERSRC)'/$1/lib$1.a + ModuleSubdirs="$ModuleSubdirs "$1 + ;; + esac + ;; + esac + if [ $# -eq 0 ]; then + Done=YES + else + shift + fi + done + + echo >> $Iconfig + echo "#define BuildVga2 $BuildVga2" >> $Iconfig + echo "#define BuildHga2 $BuildHga2" >> $Iconfig + echo "#define BuildBdm2 $BuildBdm2" >> $Iconfig + echo "#define BuildVga16 $BuildVga16" >> $Iconfig + echo "#define BuildVga256 $BuildVga256" >> $Iconfig + echo "#define ExtraRenderers $ExtraRenderers" >> $Iconfig + echo >> $Iconfig + + cat >> $Iconfig < + #include + #include + + + + /* This is a fix for the difference between BSD's select() and + * some SVR4's select(). SVR4's select() can never return a value larger + * than the total number of file descriptors being checked. So, if + * you select for read and write on one file descriptor, and both + * are true, SVR4 select() will only return 1. BSD select in the + * same situation will return 2. + * + * Additionally, BSD select() on timing out, will zero the masks, + * while SVR4 does not. This is fixed here as well. + * + * Set your tabstops to 4 characters to have this code nicely formatted. + * + * Jerry Whelan, guru@bradley.edu, June 12th, 1993 + */ + + /* $XFree86: mit/lib/Berk/BSDselect.c,v 2.0 1993/09/12 07:19:21 dawes Exp $ */ + + int + BSDselect(nfds, readfds, writefds, exceptfds, timeout) + int nfds; + fd_set *readfds, *writefds, *exceptfds; + struct timeval *timeout; + { + int rval, + i; + + rval = select(nfds, readfds, writefds, exceptfds, timeout); + + switch(rval) { + case -1: return(rval); + break; + + case 0: if(readfds != NULL) + FD_ZERO(readfds); + if(writefds != NULL) + FD_ZERO(writefds); + if(exceptfds != NULL) + FD_ZERO(exceptfds); + + return(rval); + break; + + default: for(i=0, rval=0; i < nfds; i++) { + if((readfds != NULL) && FD_ISSET(i, readfds)) rval++; + if((writefds != NULL) && FD_ISSET(i, writefds)) rval++; + if((writefds != NULL) && FD_ISSET(i, exceptfds)) rval++; + } + return(rval); + } + /* Should never get here */ + } + #endif /* WANT_BSDSELECT */ diff -c mit/lib/Berk/Berklib.c:1.1.1.1 mit/lib/Berk/Berklib.c:2.0 *** mit/lib/Berk/Berklib.c:1.1.1.1 Sat Mar 12 00:36:35 1994 --- mit/lib/Berk/Berklib.c Sat Mar 12 00:36:35 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Berk/Berklib.c,v 2.0 1993/07/28 11:55:28 dawes Exp $ */ /* $XConsortium: Berklib.c,v 1.15 91/09/10 08:50:04 rws Exp $ */ /* *************** *** 38,49 **** #endif #endif /* you should use Xfuncs.h in code instead of relying on Berklib */ #ifdef WANT_BFUNCS #include ! #if (__STDC__ && defined(X_NOT_STDC_ENV)) || defined(SVR4) || defined(hpux) #include --- 39,57 ---- #endif #endif + #ifdef SCO + #ifndef SCO324 + #define WANT_SETITIMER + #endif + #define WANT_BFUNCS + #endif + /* you should use Xfuncs.h in code instead of relying on Berklib */ #ifdef WANT_BFUNCS #include ! #if !defined(SCO) && ((__STDC__ && defined(X_NOT_STDC_ENV)) || defined(SVR4) || defined(hpux)) #include *************** *** 248,251 **** --- 256,285 ---- } } #endif /* WANT_GTOD */ + + #ifdef WANT_SETITIMER + + #include "X11/Xos.h" + + int setitimer(which, value, ovalue) + int which; + struct itimerval *value; + struct itimerval *ovalue; + { + int sec, ret; + + if (!value->it_value.tv_sec && !value->it_value.tv_usec) { + ret = alarm(0); + } else { + sec = value->it_value.tv_sec + (value->it_value.tv_usec / 1000000); + ret = alarm((sec < 1) ? 1 : sec); + } + if (ovalue) { + ovalue->it_value.tv_sec = ret; + ovalue->it_value.tv_usec = 0; + } + return(0); + } + + #endif /* WANT_SETITIMER */ diff -c mit/lib/Berk/Imakefile:1.1.1.1 mit/lib/Berk/Imakefile:2.2 *** mit/lib/Berk/Imakefile:1.1.1.1 Sat Mar 12 00:36:36 1994 --- mit/lib/Berk/Imakefile Sat Mar 12 00:36:36 1994 *************** *** 1,8 **** XCOMM $XConsortium: Imakefile,v 1.4 91/09/10 08:49:42 rws Exp $ ! SRCS = Berklib.c ! OBJS = Berklib.o NormalLibraryTarget(Xbsd,$(OBJS)) InstallLibrary(Xbsd,$(USRLIBDIR)) DependTarget() --- 1,19 ---- + XCOMM $XFree86: mit/lib/Berk/Imakefile,v 2.2 1993/09/17 16:11:37 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.4 91/09/10 08:49:42 rws Exp $ ! SRCS = Berklib.c strcasecmp.c BSDselect.c ! OBJS = Berklib.o strcasecmp.o BSDselect.o + #if SystemV || SystemV4 + STRCASEDEF = -DWANT_STRCASEFUNCS + #endif + #if SystemV4 + SELECTDEF = -DWANT_BSDSELECT + #endif + DEFINES = $(STRCASEDEF) $(SELECTDEF) NormalLibraryTarget(Xbsd,$(OBJS)) InstallLibrary(Xbsd,$(USRLIBDIR)) + #if defined(i386SVR3Architecture) + InstallLinkKitNonExecFile(Berklib.o,$(LINKKITDIR)/lib) + #endif DependTarget() diff -c /dev/null mit/lib/Berk/strcasecmp.c:2.0 *** /dev/null Sat Mar 12 00:36:36 1994 --- mit/lib/Berk/strcasecmp.c Sat Mar 12 00:36:36 1994 *************** *** 0 **** --- 1,130 ---- + /* + * Copyright (c) 1987 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + /* $XFree86: mit/lib/Berk/strcasecmp.c,v 2.0 1993/09/12 05:15:52 dawes Exp $ */ + + #ifdef WANT_STRCASEFUNCS + + #include + #include + + #ifndef __STDC__ + # ifdef __GNUC__ + # define const __const__ + # else + # define const /**/ + # endif + #endif + + #if !defined(lint) + static char sccsid[] = "@(#)strcasecmp.c 5.10 (Berkeley) 1/26/91"; + #endif /* not lint */ + + #if 0 + typedef unsigned char u_char; + #endif + + /* + * This array is designed for mapping upper and lower case letter + * together for a case independent comparison. The mappings are + * based upon ascii character sequences. + */ + static const u_char charmap[] = { + '\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007', + '\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017', + '\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027', + '\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037', + '\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047', + '\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057', + '\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067', + '\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077', + '\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137', + '\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147', + '\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157', + '\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167', + '\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177', + '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207', + '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217', + '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227', + '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237', + '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247', + '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257', + '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267', + '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277', + '\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307', + '\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317', + '\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327', + '\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337', + '\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347', + '\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357', + '\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367', + '\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377', + }; + + int + strcasecmp(s1, s2) + const char *s1, *s2; + { + register const u_char *cm = charmap, + *us1 = (const u_char *)s1, + *us2 = (const u_char *)s2; + + while (cm[*us1] == cm[*us2++]) + if (*us1++ == '\0') + return (0); + return (cm[*us1] - cm[*--us2]); + } + + int + strncasecmp(s1, s2, n) + const char *s1, *s2; + register size_t n; + { + if (n != 0) { + register const u_char *cm = charmap, + *us1 = (const u_char *)s1, + *us2 = (const u_char *)s2; + + do { + if (cm[*us1] != cm[*us2++]) + return (cm[*us1] - cm[*--us2]); + if (*us1++ == '\0') + break; + } while (--n != 0); + } + return (0); + } + #endif /* WANT_STRCASEFUNCS */ diff -c /dev/null mit/lib/InetEmul/Imakefile:1.2 *** /dev/null Sat Mar 12 00:36:38 1994 --- mit/lib/InetEmul/Imakefile Sat Mar 12 00:36:38 1994 *************** *** 0 **** --- 1,8 ---- + XCOMM $XFree86: mit/lib/InetEmul/Imakefile,v 1.2 1993/03/27 09:15:23 dawes Exp $ + SRCS = inetemul.c + OBJS = inetemul.o + + NormalLibraryTarget(Xinetem,$(OBJS)) + InstallLibrary(Xinetem,$(USRLIBDIR)) + + DependTarget() diff -c /dev/null mit/lib/InetEmul/inetemul.c:1.2 *** /dev/null Sat Mar 12 00:36:39 1994 --- mit/lib/InetEmul/inetemul.c Sat Mar 12 00:36:39 1994 *************** *** 0 **** --- 1,278 ---- + /* $XFree86: mit/lib/InetEmul/inetemul.c,v 1.2 1993/03/27 09:15:25 dawes Exp $ */ + /* + * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, 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 Thomas Roell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Thomas Roell makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THOMAS ROELL 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. + * + * Author: Thomas Roell, roell@informatik.tu-muenchen.de + * + * /home/x_cvs/mit/server/ddx/x386/etc/inetemul.c,v 1.1.1.1 1992/05/01 13:15:04 root Exp + */ + + + /* + * This is a set of dummy-routines to make shared libs that were compiled for + * sockets linkable without libinet.a + * + * They all return with an error-condition !!! + */ + #include /* NULL */ + #include + + + unsigned long inet_addr(cp) + char *cp; + { + return(-1); + } + + + void *gethostbyname(name) + char *name; + { + return (NULL); + } + + int socket(domain, type, protocol) + int domain, type, protocol; + { + /* errno here, since they are only defined for TCP/IP ... */ + return(-1); + } + + + + int setsockopt(s, level, optname, optval, optlen) + int s, level, optname; + char optval; + int optlen; + { + errno = EBADF; + return (-1); + } + + + + int connect(s, name, namelen) + int s; + void *name; + int namelen; + { + errno = EBADF; + return (-1); + } + + + int bind(s, name, namelen) + int s; + void *name; + int namelen; + { + errno = EBADF; + return (-1); + } + + + + int listen(s, backlog) + int s, backlog; + { + errno = EBADF; + return (-1); + } + + + + int accept(s, addr, addrlen) + int s; + void *addr; + int *addrlen; + { + errno = EBADF; + return (-1); + } + + + + int getpeername(s, name, namelen) + int s; + void *name; + int namelen; + { + errno = EBADF; + return (-1); + } + + + + int recvfrom(s, buf, len, flags, from, fromlen) + int s; + char buf; + int len, flags; + void *from; + int fromlen; + { + errno = EBADF; + return (-1); + } + + + + int sendto(s, msg, len, flags, to, tolen) + int s; + char msg; + int len, flags; + void *to; + int tolen; + { + errno = EBADF; + return (-1); + } + + #ifdef ESIX + /* This one is taken from lib/X/Xstream.c */ + + #include + #ifndef NOFILES_MAX + #define NOFILES_MAX 128 + #endif + + #ifndef OPEN_MAX + #define OPEN_MAX NOFILES_MAX + #endif + + #if OPEN_MAX > 256 + #undef OPEN_MAX + #define OPEN_MAX 256 + #endif + + #define MSKCNT ((OPEN_MAX + 31) / 32) + + #if (MSKCNT==1) + #define BITMASK(i) (1 << (i)) + #define MASKIDX(i) 0 + #endif + #if (MSKCNT>1) + #define BITMASK(i) (1 << ((i) & 31)) + #define MASKIDX(i) ((i) >> 5) + #endif + + #define MASKWORD(buf, i) buf[MASKIDX(i)] + #define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) + #define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) + #define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) + + #ifdef DEBUG + #define PRMSG(x,a,b) fprintf(stderr, x,a,b); fflush(stderr) + #else + #define PRMSG(x,a,b) + #endif + + #include + #include + + #define POLLERROR (POLLHUP | POLLNVAL | POLLERR) + #define PFD(fds, i, x) { if (fds) if (ev & (x)) BITSET (fds, i); else BITCLEAR (fds, i); } + #define ERROR(x) { errno = x; return -1; } + /* + simulate BSD select system call with SYSV poll system call + note that efds parameter is not fully supported (or understood) + */ + + extern long ulimit(); + + int + select (nfds, rfds, wfds, efds, timeout) + int nfds; + unsigned long *rfds; + unsigned long *wfds; + unsigned long *efds; + struct timeval *timeout; + { + int i, rc, ev, timevalue; + struct pollfd pfds[NOFILES_MAX]; + static long _NOFILE = 0; + + PRMSG("in select\n", 0,0); + + if (_NOFILE == 0) { + _NOFILE = ulimit(4, (long)0); + if (_NOFILE > NOFILES_MAX) + _NOFILE = NOFILES_MAX; + } + + if (nfds > _NOFILE) + nfds = _NOFILE; /* make poll happy */ + + for (i = 0; i < nfds; i++) + { + ev = 0; + + if (rfds && GETBIT (rfds, i)) ev |= POLLIN; + if (wfds && GETBIT (wfds, i)) ev |= POLLOUT; + if (ev || (efds && GETBIT (efds, i))) + pfds[i].fd = i; + else + pfds[i].fd = -1; + pfds[i].events = ev; + } + if (timeout) + timevalue = timeout->tv_sec * 1000 + timeout->tv_usec / 1000; + else + timevalue = -1; + + while (1) { + rc = poll (pfds, (unsigned long)nfds, timevalue); + + if(rc<0 && errno == EAGAIN) + continue; + else break; + } + if(rc>0) { + if (!efds) + for (i = 0; i < nfds; ++i) + { + ev = pfds[i].revents; + if (ev & POLLERROR) + ERROR (EBADF); + } + + for (i = 0; i < nfds; ++i) + { + ev = pfds[i].revents; + PFD (rfds, i, POLLIN); + PFD (wfds, i, POLLOUT); + PFD (efds, i, POLLERROR); + } + } + + if(rc==0) { + i = (nfds+ 7)/8; + if ( rfds != NULL) + memset((char *) rfds, 0, i); + if ( wfds != NULL) + memset((char *) wfds, 0, i); + if ( efds != NULL) + memset((char *) efds, 0, i); + + } + + return rc; + } + #endif /* ESIX */ diff -c mit/lib/X/Imakefile:1.1.1.5 mit/lib/X/Imakefile:2.0 *** mit/lib/X/Imakefile:1.1.1.5 Sat Mar 12 00:37:01 1994 --- mit/lib/X/Imakefile Sat Mar 12 00:37:01 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/lib/X/Imakefile,v 2.0 1993/07/28 11:56:00 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.129.1.1 93/03/09 13:31:06 rws Exp $ #define DoNormalLib NormalLibX #define DoSharedLib SharedLibX *************** *** 26,31 **** --- 27,39 ---- #ifdef MacIIArchitecture XBSDLIB = /**/ #endif + #if NeedBerklib + XBSDLIB = /**/ + #endif + #if NeedInetEmulLib + XINETLIB = /**/ + #endif + #if Malloc0ReturnsNull DEFINES = -DMALLOC_0_RETURNS_NULL #endif *************** *** 1009,1015 **** --- 1017,1027 ---- SpecialLibObjectRule(Xstreams.o,$(ICONFIGFILES),$(CONN_DEFINES)) SpecialLibObjectRule(XlibInt.o,$(ICONFIGFILES),$(CONN_DEFINES)) SpecialLibObjectRule(XcmsColNm.o,$(ICONFIGFILES),$(CMS_DEFINES)) + #if !defined(i386SVR3Architecture) SpecialLibObjectRule(globals.o,$(ICONFIGFILES),$(CONN_DEFINES)) + #else + SpecialLibObjectRule(globals.o,$(ICONFIGFILES),$(CONN_DEFINES) -D_libX11_import $(XDMAUTHDEFS)) + #endif SpecialLibObjectRule(Context.o,$(ICONFIGFILES),$(BC_DEFINES)) LCRules() *************** *** 1055,1063 **** LinkSourceFile(Wrap.c,$(XDMCPLIBSRC)) LinkSourceFile(Wraphelp.c,$(XDMCPLIBSRC)) ks_tables.h: $(INCLUDESRC)/keysymdef.h util/makekeys.c $(RM) $@ makekeys ! -$(CC) -o makekeys util/makekeys.c $(CFLAGS) $(LOCAL_LDFLAGS) $(LDLIBS) ./makekeys < $(INCLUDESRC)/keysymdef.h > ks_tables_h $(MV) ks_tables_h $@ $(RM) makekeys ks_tables_h --- 1067,1082 ---- LinkSourceFile(Wrap.c,$(XDMCPLIBSRC)) LinkSourceFile(Wraphelp.c,$(XDMCPLIBSRC)) + #if CrossCompiling + HOSTCC = cc + #else + HOSTCC = $(CC) + HOSTFLAGS = $(CFLAGS) $(LOCAL_LDFLAGS) $(LDLIBS) + #endif + ks_tables.h: $(INCLUDESRC)/keysymdef.h util/makekeys.c $(RM) $@ makekeys ! -$(HOSTCC) -o makekeys util/makekeys.c $(HOSTFLAGS) ./makekeys < $(INCLUDESRC)/keysymdef.h > ks_tables_h $(MV) ks_tables_h $@ $(RM) makekeys ks_tables_h diff -c /dev/null mit/lib/X/VendorKeysym.h:1.1 *** /dev/null Sat Mar 12 00:37:02 1994 --- mit/lib/X/VendorKeysym.h Sat Mar 12 00:37:02 1994 *************** *** 0 **** --- 1,20 ---- + #define hpXK_mute_acute 0x100000A8 + #define hpXK_mute_grave 0x100000A9 + #define hpXK_mute_asciicircum 0x100000AA + #define hpXK_mute_diaeresis 0x100000AB + #define hpXK_mute_asciitilde 0x100000AC + + #define DXK_ring_accent 0x1000FEB0 + #define DXK_circumflex_accent 0x1000FE5E + #define DXK_cedilla_accent 0x1000FE2C + #define DXK_acute_accent 0x1000FE27 + #define DXK_grave_accent 0x1000FE60 + #define DXK_tilde 0x1000FE7E + #define DXK_diaeresis 0x1000FE22 + + #define SunXK_FA_Grave 0x1005FF00 + #define SunXK_FA_Circum 0x1005FF01 + #define SunXK_FA_Tilde 0x1005FF02 + #define SunXK_FA_Acute 0x1005FF03 + #define SunXK_FA_Diaeresis 0x1005FF04 + #define SunXK_FA_Cedilla 0x1005FF05 diff -c /dev/null mit/lib/X/XAmoeba.h:1.1 *** /dev/null Sat Mar 12 00:37:02 1994 --- mit/lib/X/XAmoeba.h Sat Mar 12 00:37:02 1994 *************** *** 0 **** --- 1,54 ---- + /* + * Xamoeba.h + * + * $XFree86: mit/lib/X/XAmoeba.h,v 1.1 1993/03/20 03:28:01 dawes Exp $ + * + */ + #define event __event + #define interval __interval + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #undef interval + #undef event + + #define MAX_TCPIP_RETRY 4 + #define CIRCBUFSIZE 1024 + + /* + */ + typedef struct _XAmChanDesc { + int state; /* current state of connection */ + int type; /* type of connection */ + signum signal; /* signal to kill TCP/IP reader */ + semaphore *sema; /* select semaphore */ + struct vc *virtcirc; /* virtual circuit for Amoeba */ + struct circbuf *circbuf; /* circular buffer for TCP/IP */ + capability chancap; /* TCP/IP channel capability */ + } XAmChanDesc; + + /* Amoeba channel descriptor states */ + #define ACDS_FREE 0 /* unused */ + #define ACDS_USED 1 /* intermediate state */ + #define ACDS_CLOSED 2 /* just closed */ + + /* Amoeba channel types */ + #define ACDT_TCPIP 1 /* TCP/IP connection */ + #define ACDT_VIRTCIRC 2 /* Amoeba virtual circuit connection */ + + extern XAmChanDesc *XAmAllocChanDesc(); + extern XAmChanDesc *XAmFdToChanDesc(); + extern int XAmChanDescToFd(); + extern void XAmFreeChanDesc(); diff -c mit/lib/X/XConnDis.c:1.1.1.3 mit/lib/X/XConnDis.c:2.1 *** mit/lib/X/XConnDis.c:1.1.1.3 Sat Mar 12 00:37:03 1994 --- mit/lib/X/XConnDis.c Sat Mar 12 00:37:03 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/XConnDis.c,v 2.1 1993/08/04 03:46:14 dawes Exp $ * $XConsortium: XConnDis.c,v 11.88 91/12/17 17:55:57 rws Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 57,63 **** --- 58,99 ---- #ifdef STREAMSCONN extern int _XMakeStreamsConnection(); #endif + #ifdef AMOEBA + static int MakeAmConnection(); + #endif + #ifdef CLIENTS_LOCALCONN + static int MakeLOCALConnection(); + static int ParseLocalName(); + static int LocalConnType; + + #define TYPE_INVALID -1 /* Invalid local type */ + #define TYPE_UNIX 0 /* Unix-domain socket */ + #define TYPE_USL 1 /* USL streams pipe */ + #define TYPE_NAMED 2 /* USL named pipe */ + #define TYPE_ISC 3 /* ISC streams pipe */ + #define TYPE_SCO 4 /* SCO streams pipe */ + #define TYPE_ANY 9 /* Any - try XLOCAL or fallback list */ + + static struct conntype { + char *pseudo_host; + char *env_name; + int conn_type; + } LocalConnModes[] = { + #ifdef UNIXCONN + {"unix", "UNIX", TYPE_UNIX}, + #else + {"unix", "UNIX", TYPE_ANY}, + #endif + {"usl", "USL", TYPE_USL}, + {"named", "NAMED", TYPE_NAMED}, + {"isc", "ISC", TYPE_ISC}, + {"sco", "SCO", TYPE_SCO}, + {"", "", TYPE_INVALID} + }; + + #endif /* CLIENTS_LOCALCONN */ + static void GetAuthorization(); static char *copystring (src, len) *************** *** 209,219 **** #ifdef STREAMSCONN connfunc = _XMakeStreamsConnection; #else connfunc = NULL; #endif #endif ! #ifdef UNIXCONN /* * Now that the defaults have been established, see if we have any * special names that we have to override: --- 245,259 ---- #ifdef STREAMSCONN connfunc = _XMakeStreamsConnection; #else + #ifdef AMOEBA + connfunc = MakeAmConnection; + #else connfunc = NULL; #endif #endif + #endif ! #if defined(UNIXCONN) && !defined(CLIENTS_LOCALCONN) /* * Now that the defaults have been established, see if we have any * special names that we have to override: *************** *** 235,248 **** else if (strcmp (phostname, "unix") == 0) { connfunc = MakeUNIXSocketConnection; } #endif if (!connfunc) goto bad; ! ! #ifdef UNIXCONN #define LOCALCONNECTION (!phostname || connfunc == MakeUNIXSocketConnection) ! #else #define LOCALCONNECTION (!phostname) #endif --- 275,325 ---- else if (strcmp (phostname, "unix") == 0) { connfunc = MakeUNIXSocketConnection; } + #endif /* UNIXCONN && !CLIENTS_LOCALCONN */ + + #ifdef CLIENTS_LOCALCONN + /* + * :N => if CLIENTS_LOCALCONN then streams + * unix:N => if UNIXCONN then unix-domain-socket + * else streams + * :N => if CLIENTS_LOCALCONN then specified mode + */ + if (!phostname) { + connfunc = MakeLOCALConnection; + LocalConnType = TYPE_ANY; + } + #if ABI_ALLOWS_PSEUDO_NAMES + /* + * ABI committee has decided to only use 'unix:N' until other pseudo + * hostnames get blessed by the X Consortium. + */ + else if ((LocalConnType = ParseLocalName(phostname)) != TYPE_INVALID) { + connfunc = MakeLOCALConnection; + } + #else /* ABI_ALLOWS_PSEUDO_NAMES */ + else if (strcmp (phostname, "unix") == 0) { + connfunc = MakeLOCALConnection; + #ifdef UNIXCONN + LocalConnType = TYPE_UNIX; + #else + LocalConnType = TYPE_ANY; #endif + } + #endif /* ABI_ALLOWS_PSEUDO_NAMES */ + #endif /* CLIENTS_LOCALCONN */ + if (!connfunc) goto bad; ! #if defined(UNIXCONN) && !defined(CLIENTS_LOCALCONN) #define LOCALCONNECTION (!phostname || connfunc == MakeUNIXSocketConnection) ! #endif ! ! #ifdef CLIENTS_LOCALCONN ! #define LOCALCONNECTION (!phostname || connfunc == MakeLOCALConnection) ! #endif ! ! #ifndef LOCALCONNECTION #define LOCALCONNECTION (!phostname) #endif *************** *** 286,291 **** --- 363,383 ---- * Set close-on-exec so that programs that fork() doesn't get confused. */ + #if !defined(AMOEBA) && !defined(_MINIX) + #ifdef FIOSNBIO + { + int arg = 1; + ioctl (fd, FIOSNBIO, &arg); + } + #else + # ifdef FNDELAY + (void) fcntl (fd, F_SETFL, FNDELAY); + # else + (void) fcntl (fd, F_SETFL, O_NDELAY); + # endif /* FNDELAY */ + #endif /* FIOSNBIO */ + #endif /* !AMOEBA && !_MINIX */ + #ifdef FD_CLOEXEC (void) fcntl (fd, F_SETFD, FD_CLOEXEC); #else *************** *** 337,342 **** --- 429,435 ---- * * *****************************************************************************/ + #ifndef _MINIX #ifdef DNETCONN /* stupid makedepend */ #define NEED_BSDISH #endif *************** *** 346,351 **** --- 439,445 ---- #ifdef TCPCONN #define NEED_BSDISH #endif + #endif /* !_MINIX */ #ifdef NEED_BSDISH /* makedepend can't handle #if */ /* *************** *** 452,458 **** --- 546,556 ---- sprintf (unaddr.sun_path, "%s%d", X_UNIX_PATH, idisplay); addr = (struct sockaddr *) &unaddr; + #ifdef SUN_LEN + addrlen = SUN_LEN (&unaddr); + #else addrlen = strlen(unaddr.sun_path) + sizeof(unaddr.sun_family); + #endif #ifdef hpux /* this is disgusting */ ounaddr.sun_family = AF_UNIX; *************** *** 512,520 **** --- 610,625 ---- char **saddrp; /* RETURN */ { char hostnamebuf[256]; /* tmp space */ + #ifndef _MINIX unsigned long hostinetaddr; /* result of inet_addr of arpa addr */ struct sockaddr_in inaddr; /* IP socket */ struct sockaddr *addr; /* generic socket pointer */ + #else /* _MINIX */ + ipaddr_t hostinetaddr; /* result of inet_addr of arpa addr */ + tcpport_t x_port; /* the tcp port of the X server */ + struct nwio_tcpconf tcpconf; /* for bind operation */ + struct nwio_tcpcl tcpcl; /* options for connect */ + #endif /* !_MINIX */ int addrlen; /* length of addr */ struct hostent *hp; /* entry in hosts table */ char *cp; /* character pointer iterator */ *************** *** 552,557 **** --- 657,663 ---- return -1; } + #ifndef _MINIX /* Set up the socket data. */ inaddr.sin_family = hp->h_addrtype; #if defined(CRAY) && defined(OLDTCP) *************** *** 565,571 **** --- 671,681 ---- bcopy ((char *)hp->h_addr, (char *)&inaddr.sin_addr, sizeof(inaddr.sin_addr)); #endif /* CRAY and OLDTCP */ + #else /* _MINIX */ + bcopy ((char *)hp->h_addr, &hostinetaddr, sizeof(hostinetaddr)); + #endif /* !_MINIX */ } else { + #ifndef _MINIX #if defined(CRAY) && defined(OLDTCP) /* Only Cray UNICOS3 and UNICOS4 will define this */ inaddr.sin_addr = hostinetaddr; *************** *** 573,580 **** --- 683,692 ---- inaddr.sin_addr.s_addr = hostinetaddr; #endif /* CRAY and OLDTCP */ inaddr.sin_family = AF_INET; + #endif /* _MINIX */ } + #ifndef _MINIX addr = (struct sockaddr *) &inaddr; addrlen = sizeof (struct sockaddr_in); inaddr.sin_port = X_TCP_PORT + idisplay; *************** *** 615,621 **** --- 727,777 ---- break; } } while (retries-- > 0); + #else /* _MINIX */ + x_port = htons(X_TCP_PORT + idisplay); + + /* + * Open the network connection. + */ + do { + fd= open("/dev/tcp", O_RDWR); + if (fd == -1) + return -1; + + + tcpconf.nwtc_flags= NWTC_EXCL | NWTC_LP_SEL | NWTC_SET_RA | NWTC_SET_RP; + tcpconf.nwtc_remaddr= hostinetaddr; + tcpconf.nwtc_remport= x_port; + + if (ioctl(fd, NWIOSTCPCONF, &tcpconf) == -1) + { + int olderrno; + + olderrno= errno; + close(fd); + errno= olderrno; + return -1; + } + /* + * connect to the socket; if there is no X server or if the backlog has + * been reached, then ECONNREFUSED will be returned. + */ + tcpcl.nwtcl_flags= 0; + if (ioctl(fd, NWIOTCPCONN, &tcpcl) == -1) + { + int olderrno = errno; + (void) close (fd); + if (olderrno != ECONNREFUSED || retries <= 0) { + errno = olderrno; + return -1; + } + sleep (1); + } else { + break; + } + } while (retries-- > 0); + #endif /* _MINIX */ /* * Success! So, save the auth information *************** *** 628,635 **** --- 784,796 ---- #endif /* OLDTCP */ cp = (char *) &inaddr.sin_addr; #else /* else not CRAY */ + #ifndef _MINIX len = sizeof(inaddr.sin_addr.s_addr); cp = (char *) &inaddr.sin_addr.s_addr; + #else /* _MINIX */ + len = sizeof(hostinetaddr); + cp = (char *) &hostinetaddr; + #endif /* !_MINIX */ #endif /* CRAY */ /* *************** *** 655,660 **** --- 816,1265 ---- #undef INVALID_INETADDR #endif /* TCPCONN */ + #ifdef CLIENTS_LOCALCONN + + #include + #ifdef UNIXCONN + # define X_ISC_PATH "/tmp/.ISC-unix/X" + #else + # define X_ISC_PATH "/tmp/.X11-unix/X" + #endif + #define X_XSIGHT_PATH "/dev/X" + #define X_ATT_PATH "/dev/X/server." + #define X_NSTREAMS_PATH "/dev/X/Nserver." + + #ifdef SVR4 + static char Def_Local_Search[] = "UNIX:NAMED:USL:SCO:ISC"; + #endif /* SVR4 */ + #ifdef ISC + static char Def_Local_Search[] = "ISC:USL:UNIX"; + #endif /* ISC */ + #ifdef SCO + static char Def_Local_Search[] = "SCO:USL:UNIX"; + #endif /* SCO */ + #ifdef ATT + static char Def_Local_Search[] = "USL:UNIX"; + #endif /* ATT */ + + static int ParseLocalName(name) + char *name; + { + struct conntype *p; + + p = LocalConnModes; + while (*(p->pseudo_host) != '\0') { + if ((strcmp(name, p->pseudo_host) == 0) || + (strcmp(name, p->env_name) == 0)) + return(p->conn_type); + p++; + } + return(TYPE_INVALID); + } + + static void _dummy(temp) + int temp; + { + return; + } + + static int MakeLOCALConnection (phostname, idisplay, retries, + familyp, saddrlenp, saddrp) + char *phostname; + int idisplay; + int retries; + int *familyp; /* RETURN */ + int *saddrlenp; /* RETURN */ + char **saddrp; /* RETURN */ + { + int fds, fd, server, fl, ret; + unsigned alarm_time; + void (*savef)(); + char rbuf[64], *slave; + char server_path[64]; + long temp; + char *to_try; + extern char *getenv(); + int conn_mode; + #if !defined (SVR4) || defined(SVR4_ACP) + struct strfdinsert buf; + struct strbuf ctlbuf; + #endif + + /* + * Get list of local connection modes to try. + */ + if (LocalConnType == TYPE_ANY) { + /* + * First check XLOCAL environment variable, then use default path. + */ + to_try = getenv("XLOCAL"); + if (!to_try) { + to_try = Xmalloc(strlen(Def_Local_Search)+1); + strcpy(to_try,Def_Local_Search); + } + } + else { + to_try = Xmalloc(strlen(LocalConnModes[LocalConnType].env_name)+1); + strcpy(to_try,LocalConnModes[LocalConnType].env_name); + } + + /* + * Now try each of the modes, in the search path. If the user specifies + * a mode that is not supported, it will be silently ignored, and the + * connection will fail later on. + */ + to_try = strtok(to_try, ": "); + while (to_try) { + switch (ParseLocalName(to_try)) { + case TYPE_UNIX: + #ifdef UNIXCONN + fd = MakeUNIXSocketConnection(phostname, idisplay, retries, + familyp, saddrlenp, saddrp); + if (fd >= 0) + return(fd); + #endif /* UNIXCONN */ + break; + case TYPE_USL: + /* + * USL's old-style local connection (SVR3&SVR4) + */ + sprintf(server_path,"%s%d", X_ATT_PATH, idisplay); + if ((server = open(server_path, O_RDWR)) >= 0) { + if ((fd = open("/dev/ptmx", O_RDWR)) >= 0) { + grantpt(fd); + unlockpt(fd); + slave = (char *)ptsname(fd); /* get name */ + + /* + * write slave name to server + */ + temp = strlen(slave); + rbuf[0] = temp; + sprintf(&rbuf[1], slave); + write(server, rbuf, temp+1); + + /* + * wait for server to respond + */ + savef = signal(SIGALRM, _dummy); + alarm_time = alarm (30); + ret = read(fd, rbuf, 1); + alarm(alarm_time); + signal(SIGALRM, savef); + if (ret == 1) { + /* + * Success! + */ + (void) close(server); + return(fd); + } + } + (void) close(server); + (void) close(fd); + } + break; + case TYPE_NAMED: + #ifdef SVR4 + /* + * USL's new-style local connection (SVR4) + */ + sprintf(server_path,"%s%d", X_NSTREAMS_PATH, idisplay); + if ((fd = open(server_path, O_RDWR)) >= 0) { + if (isastream(fd) == 1) { + /* + * Success! + */ + return(fd); + } + } + #endif /* SVR4 */ + break; + case TYPE_ISC: + #if !defined(SVR4) || defined(SVR4_ACP) + /* + * ISC's local connection (ISC or SVR4 w/ACP) + */ + sprintf(server_path,"%s%d", X_ISC_PATH, idisplay); + if ((server = open(server_path, O_RDWR)) >= 0) { + if ((fds = open("/dev/spx", O_RDWR)) >= 0 && + (fd = open("/dev/spx", O_RDWR)) >= 0) { + /* + * make a STREAMS-pipe + */ + buf.databuf.maxlen = -1; + buf.databuf.len = -1; + buf.databuf.buf = NULL; + buf.ctlbuf.maxlen = sizeof(long); + buf.ctlbuf.len = sizeof(long); + buf.ctlbuf.buf = (caddr_t)&temp; + buf.offset = 0; + buf.fildes = fd; + buf.flags = 0; + + if (ioctl(fds, I_FDINSERT, &buf) != -1 && + ioctl(server, I_SENDFD, fds) != -1) { + /* + * Success! + */ + (void) close(fds); + (void) close(server); + return (fd); + } + } + (void) close(server); + (void) close(fds); + (void) close(fd); + } + #endif /* !SVR4 || SVR4_ACP */ + break; + case TYPE_SCO: + #if !defined(SVR4) || defined(SVR4_ACP) + /* + * SCO Xsight's local connection (SCO or SVR4 w/ACP) + */ + sprintf(server_path,"%s%1dR", X_XSIGHT_PATH, idisplay); + if ((server = open(server_path, O_RDWR)) >= 0) { + if ((fd = open("/dev/spx", O_RDWR)) >= 0) { + (void) write(server, (char *) &server, 1); + ctlbuf.len = 0; + ctlbuf.maxlen = sizeof(long); + ctlbuf.buf = (caddr_t)&temp; + fl = 0; + /* + * Wait for server to respond + */ + savef = signal(SIGALRM, _dummy); + alarm_time = alarm(10); + ret = getmsg(server, &ctlbuf, 0, &fl); + alarm(alarm_time); + signal(SIGALRM, savef); + + if (ret >= 0) { + /* + * Success! + * + * The msg we got via getmsg is the result of an + * I_FDINSERT, so if we do a putmsg with whatever + * we recieved, we're doing another I_FDINSERT ... + */ + putmsg(fd, &ctlbuf, 0, 0); + fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NDELAY); + (void) close(server); + return(fd); + } + (void) close (server); + (void) close (fd); + } + } + #endif /* !SVR4 || SVR4_ACP */ + break; + default: + break; + } + + /* + * Get the next token... + */ + to_try = strtok(NULL, ": "); + } + + return (-1); + } + #endif /* CLIENTS_LOCALCONN */ + + + #ifdef AMOEBA + /* + * Make an Amoeba TCP/IP or virtual circuit connection + */ + #include + #include "XAmoeba.h" + #include + #include + #include + #include + #include + #include + #include + #include + + #define THREAD_STACK_SIZE (4*1024) + + char *getenv(); + void XAmReaderThread(); + + static int + MakeAmConnection(phostname, idisplay, retries, familyp, saddrlenp, saddrp) + char *phostname; + int idisplay; + int retries; + int *familyp; /* RETURN */ + int *saddrlenp; /* RETURN */ + char **saddrp; /* RETURN */ + { + capability xservercap; + char xserverpath[256]; + XAmChanDesc *chandesc; + errstat err; + + /* Amoeba requires a server hostname */ + if (phostname == NULL || *phostname == '\0') { + fprintf(stderr, "Xlib: Display name expected\n"); + return -1; + } + + /* allocate channel descriptor */ + chandesc = XAmAllocChanDesc(); + if (chandesc == (XAmChanDesc *)NULL) { + fprintf(stderr, "Xlib: Out of channel capabilities\n"); + return -1; + } + + /* + * There are two possible way to make a connection on Amoeba. Either + * through an Amoeba RPC or a TCP/IP connection. Depending on whether + * the X server resides on Amoeba, Amoeba RPC's are used. Otherwise + * it uses a TCP/IP connection. + */ + (void)sprintf(xserverpath, "%s/%s:%d", DEF_XSVRDIR, phostname, idisplay); + if ((err = name_lookup(xserverpath, &xservercap)) == STD_OK) { + port vccaps[2]; + bufsize size; + errstat err; + header hdr; + + /* Amoeba virtual circuit connection */ + chandesc->type = ACDT_VIRTCIRC; + + /* get the two connection ports from the X-server */ + hdr.h_command = AX_CONNECT; + hdr.h_port = xservercap.cap_port; + hdr.h_priv = xservercap.cap_priv; + size = trans(&hdr, NILBUF, 0, &hdr, (char *)vccaps, sizeof(vccaps)); + if (ERR_STATUS(size)) { + err = ERR_CONVERT(size); + } else { + err = ERR_CONVERT(hdr.h_status); + } + if (err != STD_OK || size != sizeof(vccaps)) { + fprintf(stderr, "Xlib: connect to Amoeba X-server failed (%s)\n", + err_why(err)); + XAmFreeChanDesc(chandesc); + return -1; + } + + /* setup an Amoeba virtual circuit */ + chandesc->virtcirc = + vc_create(&vccaps[1], &vccaps[0], MAXBUFSIZE, MAXBUFSIZE); + if (chandesc->virtcirc == (struct vc *)NULL) { + fprintf(stderr, "Xlib: Amoeba virtual circuit create failed\n"); + XAmFreeChanDesc(chandesc); + return -1; + } + + /* + * Special Amoeba family type. For Amoeba no access control + * mechanism exists, when you have the capability you have + * the access. + */ + *familyp = FamilyAmoeba; + *saddrlenp = strlen(phostname); + *saddrp = copystring(phostname, *saddrlenp); + } else { + char tcpname[100]; + capability tcpcap; + ipaddr_t ipaddr; + char *tcpsvr; + nwio_tcpcl_t tcpcl; + nwio_tcpconf_t tcpconf; + XAmChanDesc **param; + int result; + + /* Amoeba TCP/IP connection */ + chandesc->type = ACDT_TCPIP; + + /* lookup up TCP/IP server */ + if ((tcpsvr = getenv("TCP_SERVER")) == NULL) + tcpsvr = TCP_SVR_NAME; + if ((err = name_lookup(tcpsvr, &tcpcap)) != STD_OK) { + fprintf(stderr, "Xlib: Cannot lookup %s (%s)\n", + tcpsvr, err_why(err)); + std_destroy(&chandesc->chancap); + XAmFreeChanDesc(chandesc); + return -1; + } + + /* establish TCP/IP connection */ + if ((err = tcpip_open(&tcpcap, &chandesc->chancap)) != STD_OK) { + fprintf(stderr, "Xlib: Cannot open TCP/IP server on %s (%s)\n", + tcpsvr, tcpip_why(err)); + std_destroy(&chandesc->chancap); + XAmFreeChanDesc(chandesc); + return -1; + } + + /* lookup TCP/IP hostname */ + if (isdigit(phostname[0])) { + ipaddr = inet_addr(phostname); + } else { + struct hostent *hp = gethostbyname(phostname); + if (hp == NULL) { + fprintf(stderr, "Xlib: %s unknown host\n", phostname); + return -1; + } + bcopy(hp->h_addr, &ipaddr, hp->h_length); + } + + /* set remote address/port on the TCP/IP connection */ + tcpconf.nwtc_flags = NWTC_SET_RA|NWTC_SET_RP|NWTC_LP_SEL; + tcpconf.nwtc_remaddr = ipaddr; + tcpconf.nwtc_remport = htons(6000+idisplay); + if ((err = tcp_ioc_setconf(&chandesc->chancap, &tcpconf)) != STD_OK) { + fprintf(stderr, "Xlib: Cannot configure TCP/IP server (%s)\n", + tcpip_why(err)); + std_destroy(&chandesc->chancap); + XAmFreeChanDesc(chandesc); + return -1; + } + + /* make the actual TCP/IP connection */ + tcpcl.nwtcl_flags = 0; + if ((err = tcp_ioc_connect(&chandesc->chancap, &tcpcl)) != STD_OK) { + fprintf(stderr, "Xlib: Cannot make TCP/IP connection (%s)\n", + tcpip_why(err)); + std_destroy(&chandesc->chancap); + XAmFreeChanDesc(chandesc); + return -1; + } + + /* start TCP/IP reader thread */ + chandesc->signal = sig_uniq(); + chandesc->circbuf = cb_alloc(CIRCBUFSIZE); + param = Xmalloc(sizeof(XAmChanDesc *)); + *param = chandesc; /* stupid convention */ + result = thread_newthread(XAmReaderThread, + THREAD_STACK_SIZE, (char *)param, sizeof(XAmChanDesc *)); + if (result == 0) { + fprintf(stderr, "Xlib: Cannot start reader thread\n"); + std_destroy(&chandesc->chancap); + XAmFreeChanDesc(chandesc); + return -1; + } + threadswitch(); /* give reader a try */ + + /* + * Family type is set to Internet so that the .Xauthority + * files from Unix will work under Amoeba (for Unix displays). + */ + *familyp = FamilyInternet; + *saddrlenp = sizeof(ipaddr_t); + *saddrp = Xmalloc(sizeof(ipaddr_t)); + bcopy((char *)&ipaddr, *saddrp, sizeof(ipaddr_t)); + } + + return XAmChanDescToFd(chandesc); + } + #endif /* AMOEBA */ /***************************************************************************** *************** *** 672,678 **** --- 1277,1296 ---- int server; { + #ifdef AMOEBA + register XAmChanDesc *chandesc; + + chandesc = XAmFdToChanDesc(server); + if (chandesc->type == ACDT_TCPIP) { + sig_raise(chandesc->signal); + std_destroy(&chandesc->chancap); + } + if (chandesc->type == ACDT_VIRTCIRC) + vc_close(chandesc->virtcirc, VC_BOTH); + XAmFreeChanDesc(chandesc); + #else (void) close(server); + #endif return 0; } *************** *** 687,692 **** --- 1305,1311 ---- _XWaitForWritable(dpy) Display *dpy; { + #if !defined(AMOEBA) && !defined(_MINIX) unsigned long r_mask[MSKCNT]; unsigned long w_mask[MSKCNT]; int nfound; *************** *** 699,706 **** BITSET(w_mask, dpy->fd); do { ! nfound = select (dpy->fd + 1, r_mask, w_mask, ! (char *)NULL, (char *)NULL); if (nfound < 0 && errno != EINTR) _XIOError(dpy); } while (nfound <= 0); --- 1318,1325 ---- BITSET(w_mask, dpy->fd); do { ! nfound = select (dpy->fd + 1, (fd_set *)r_mask, (fd_set *)w_mask, ! (fd_set *)NULL, (struct timeval *)NULL); if (nfound < 0 && errno != EINTR) _XIOError(dpy); } while (nfound <= 0); *************** *** 741,746 **** --- 1360,1370 ---- if (_XANYSET(w_mask)) return; } + #else /* AMOEBA || _MINIX */ + /* It's a fatal error when this is called under Amoeba or Minix */ + fprintf(stderr, "Xlib: _XWaitForWritable called\n"); + abort(); + #endif /* AMOEBA || _MINIX */ } *************** *** 747,752 **** --- 1371,1377 ---- _XWaitForReadable(dpy) Display *dpy; { + #if !defined(AMOEBA) && !defined(_MINIX) unsigned long r_mask[MSKCNT]; int result; *************** *** 753,762 **** CLEARBITS(r_mask); do { BITSET(r_mask, dpy->fd); ! result = select(dpy->fd + 1, r_mask, ! (char *)NULL, (char *)NULL, (char *)NULL); if (result == -1 && errno != EINTR) _XIOError(dpy); } while (result <= 0); } --- 1378,1393 ---- CLEARBITS(r_mask); do { BITSET(r_mask, dpy->fd); ! result = select(dpy->fd + 1, (fd_set *)r_mask, ! (fd_set *)NULL, (fd_set *)NULL, ! (struct timeval *)NULL); if (result == -1 && errno != EINTR) _XIOError(dpy); } while (result <= 0); + #else /* AMOEBA || _MINIX */ + /* It's a fatal error when this is called under Amoeba or Minix */ + fprintf(stderr, "Xlib: _XWaitForReadable called\n"); + abort(); + #endif /* AMOEBA || _MINIX */ } *************** *** 797,809 **** #undef add_to_iov len -= WritevToServer (dpy->fd, iovarray, niov); /* * Set the connection non-blocking since we use select() to block. */ /* ultrix reads hang on Unix sockets, hpux reads fail */ ! #if defined(O_NONBLOCK) && (!defined(ultrix) && !defined(hpux) && !defined(AIXV3)) (void) fcntl (dpy->fd, F_SETFL, O_NONBLOCK); #else #ifdef FIOSNBIO --- 1428,1445 ---- #undef add_to_iov + #ifndef _MINIX len -= WritevToServer (dpy->fd, iovarray, niov); + #else + len -= MNX_WritevToServer (dpy, iovarray, niov); + #endif + #if !defined(AMOEBA) && !defined(_MINIX) /* * Set the connection non-blocking since we use select() to block. */ /* ultrix reads hang on Unix sockets, hpux reads fail */ ! #if defined(O_NONBLOCK) && (!defined(SCO) && !defined(ultrix) && !defined(hpux) && !defined(AIXV3)) (void) fcntl (dpy->fd, F_SETFL, O_NONBLOCK); #else #ifdef FIOSNBIO *************** *** 823,828 **** --- 1459,1479 ---- #endif #endif #endif + #else /* !AMOEBA && !_MINIX */ + #ifdef _MINIX + { + int flags, r; + + flags= fcntl(dpy->fd, F_GETFD); + if (flags == -1) + return 0; + flags |= FD_ASYNCHIO; + r= fcntl(dpy->fd, F_SETFD, flags); + if (r == -1) + return 0; + } + #endif /* _MINIX */ + #endif /* !AMOEBA && !_MINIX */ return len == 0; } *************** *** 1065,1070 **** --- 1716,1725 ---- int addrlen; struct sockaddr_in in_addr; + #if defined(SYSV) && defined(SYSV386) && defined(CLIENTS_LOCALCONN) + if(family == FamilyLocal) goto UseLocalID; + #endif + addrlen = sizeof (in_addr); if (getsockname (fd, (struct sockaddr *) &in_addr, *************** *** 1076,1081 **** --- 1731,1737 ---- port = ntohs (in_addr.sin_port); } else + UseLocalID: #endif { static unsigned long unix_addr = 0xFFFFFFFF; diff -c mit/lib/X/XErrDes.c:1.1.1.2 mit/lib/X/XErrDes.c:2.0 *** mit/lib/X/XErrDes.c:1.1.1.2 Sat Mar 12 00:37:04 1994 --- mit/lib/X/XErrDes.c Sat Mar 12 00:37:04 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/XErrDes.c,v 2.0 1993/09/22 15:31:33 dawes Exp $ * $XConsortium: XErrDes.c,v 11.46 92/07/23 19:17:33 rws Exp $ */ *************** *** 31,36 **** --- 32,52 ---- #include "Xresource.h" #include + #if defined(_POSIX_SOURCE) && !defined(X_NOT_POSIX) + #include + #endif + + #ifndef PATH_MAX + #include + #ifndef PATH_MAX + #ifdef MAXPATHLEN + #define PATH_MAX MAXPATHLEN + #else + #define PATH_MAX 1024 + #endif + #endif + #endif + #ifndef ERRORDB #define ERRORDB "/usr/lib/X11/XErrorDB" #endif *************** *** 128,138 **** XrmString type_str; XrmValue result; char temp[BUFSIZ]; if (nbytes == 0) return; if (!initialized) { XrmInitialize(); ! db = XrmGetFileDatabase(ERRORDB); initialized = True; } if (db) --- 144,162 ---- XrmString type_str; XrmValue result; char temp[BUFSIZ]; + char errordbpath[PATH_MAX]; + char *xwinhome = NULL; if (nbytes == 0) return; if (!initialized) { + if ((xwinhome = getenv("XWINHOME")) == NULL) { + strcpy(errordbpath, ERRORDB); + } + else { + sprintf(errordbpath, "%s/lib/X11/XErrorDB", xwinhome); + } XrmInitialize(); ! db = XrmGetFileDatabase(errordbpath); initialized = True; } if (db) diff -c mit/lib/X/XGetDflt.c:1.1.1.1 mit/lib/X/XGetDflt.c:1.2 *** mit/lib/X/XGetDflt.c:1.1.1.1 Sat Mar 12 00:37:05 1994 --- mit/lib/X/XGetDflt.c Sat Mar 12 00:37:05 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/XGetDflt.c,v 1.2 1993/05/24 12:36:20 dawes Exp $ * $XConsortium: XGetDflt.c,v 1.27 91/07/09 14:54:15 rws Exp $ */ *************** *** 44,50 **** --- 45,53 ---- uid_t uid; #else int uid; + #ifndef SCO324 extern int getuid(); + #endif #ifndef SYSV386 extern struct passwd *getpwuid(), *getpwnam(); #endif diff -c mit/lib/X/XICWrap.c:1.1.1.1 mit/lib/X/XICWrap.c:1.3 *** mit/lib/X/XICWrap.c:1.1.1.1 Sat Mar 12 00:37:05 1994 --- mit/lib/X/XICWrap.c Sat Mar 12 00:37:05 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/XICWrap.c,v 1.3 1993/03/27 09:14:15 dawes Exp $ * $XConsortium: XICWrap.c,v 11.7 91/05/30 13:10:36 rws Exp $ */ *************** *** 36,41 **** --- 37,46 ---- * * M. Collins OSF */ + + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif #define NEED_EVENTS #include "Xlibint.h" diff -c mit/lib/X/XKeyBind.c:1.1.1.2 mit/lib/X/XKeyBind.c:2.0 *** mit/lib/X/XKeyBind.c:1.1.1.2 Sat Mar 12 00:37:06 1994 --- mit/lib/X/XKeyBind.c Sat Mar 12 00:37:06 1994 *************** *** 24,34 **** --- 24,140 ---- #define XK_LATIN3 #define XK_LATIN4 #include + #include "VendorKeysym.h" #include #define AllMods (ShiftMask|LockMask|ControlMask| \ Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask) + /* jbb 890512, rev. 900402 */ + static char *compose_tab[] = { + /* */ "''^^``~~ \240\"\250*\260", + /* ! */ "!\241^\246S\247s\247P\266p\266", + /* " */ " \250\"\250A\304E\313I\317O\326U\334a\344e\353i\357o\366u\374y\377", + /* # */ "", + /* $ */ "", + /* % */ "", + /* & */ "", + /* ' */ " ''\264A\301E\311I\315O\323U\332Y\335a\341e\351i\355o\363u\372y\375", + /* ( */ "([-{", + /* ) */ ")]-}", + /* * */ " \260A\305a\345", + /* + */ "+#-\261", + /* , */ ",\270C\307c\347", + /* - */ "({)}-\255L\243l\243Y\245y\245,\254^\257+\261D\320d\360:\367", + /* . */ "^\267", + /* / */ "/\\<\\^|C\242c\242U\265u\265O\330o\370", + + /* 0 */ "X\244x\244S\247s\247C\251c\251R\256r\256^\260", + /* 1 */ "^\2714\2742\275", + /* 2 */ "^\262", + /* 3 */ "^\2634\276", + /* 4 */ "", + /* 5 */ "", + /* 6 */ "", + /* 7 */ "", + /* 8 */ "", + /* 9 */ "", + /* : */ "-\367", + /* ; */ "", + /* < */ "/\\<\253", + /* = */ "L\243l\243Y\245y\245", + /* > */ ">\273", + /* ? */ "?\277", + + /* @ */ "", + /* A */ "A@a@_\252`\300'\301^\302~\303\"\304*\305E\306", + /* B */ "", + /* C */ "/\242|\2420\251O\251o\251,\307", + /* D */ "-\320", + /* E */ "`\310'\311^\312\"\313", + /* F */ "", + /* G */ "", + /* H */ "", + /* I */ "`\314'\315^\316\"\317", + /* J */ "", + /* K */ "", + /* L */ "-\243=\243", + /* M */ "", + /* N */ "~\321", + /* O */ "X\244x\244S\247s\247C\251c\251R\256r\256_\272`\322'\323^\324~\325\"\326/\330", + + /* P */ "!\266", + /* Q */ "", + /* R */ "0\256O\256o\256", + /* S */ "!\2470\247O\247o\247S\337", + /* T */ "H\336", + /* U */ "`\331'\332^\333\"\334", + /* V */ "", + /* W */ "", + /* X */ "0\244O\244o\244", + /* Y */ "-\245=\245'\335", + /* Z */ "", + /* [ */ "", + /* \ */ "", + /* ] */ "", + /* ^ */ " ^/|!\246-\257_\2570\2601\2712\2623\263.\267A\302E\312I\316O\324U\333a\342e\352i\356o\364u\373", + /* _ */ "A\252a\252^\257O\272o\272", + + /* ` */ " `A\300E\310I\314O\322U\331a\340e\350i\354o\362u\371", + /* a */ "A@a@_\252`\340'\341^\342~\343\"\344*\345e\346", + /* b */ "", + /* c */ "/\242|\2420\251O\251o\251,\347", + /* d */ "-\360", + /* e */ "`\350'\351^\352\"\353", + /* f */ "", + /* g */ "", + /* h */ "", + /* i */ "`\354'\355^\356\"\357", + /* j */ "", + /* k */ "", + /* l */ "-\243=\243", + /* m */ "", + /* n */ "~\361", + /* o */ "X\244x\244C\251c\251R\256r\256S\247s\247_\272`\362'\363^\364~\365\"\366/\370", + + /* p */ "!\266", + /* q */ "", + /* r */ "0\256O\256o\256", + /* s */ "!\2470\247O\247o\247s\337", + /* t */ "h\376", + /* u */ "`\371'\372^\373\"\374", + /* v */ "", + /* w */ "", + /* x */ "0\244O\244o\244x\327", + /* y */ "-\245=\245'\375\"\377", + /* z */ "", + /* { */ "", + /* | */ "C\242c\242|\246", + /* } */ "", + /* ~ */ " ~A\303N\321O\325a\343n\361o\365", + /*DEL*/ "" + }; + static ComputeMaskFromKeytrans(); static int Initialize(); static void XConvertCase(); *************** *** 371,376 **** --- 477,610 ---- return 1; } + static void + ComposeLed(dpy, state) + Display *dpy; + int state; + { + #define Compose_LED 16 + + XKeyboardControl kbdctrl; + + kbdctrl.led_mode = state; + kbdctrl.led = Compose_LED; + XChangeKeyboardControl(dpy, KBLed|KBLedMode, &kbdctrl); + } + + /* + * dead key and compose-character support (jbb 890909, rev. 900305, 910314, 910906) + */ + static void + ComposeHandler(dpy, keysym_in_out, modifiers, status) + Display *dpy; + KeySym *keysym_in_out; + unsigned int modifiers; + XComposeStatus *status; + { + register KeySym symbol = *keysym_in_out; + + switch(symbol) { + case XK_acute: symbol = XK_apostrophe; goto dead; + case XK_diaeresis: symbol = XK_quotedbl; goto dead; + case XK_cedilla: symbol = XK_comma; goto dead; + #ifdef SunXK_FA_Grave /* Sun */ + case SunXK_FA_Grave: symbol = XK_grave; goto dead; + case SunXK_FA_Circum: symbol = XK_asciicircum; goto dead; + case SunXK_FA_Tilde: symbol = XK_asciitilde; goto dead; + case SunXK_FA_Acute: symbol = XK_apostrophe; goto dead; + case SunXK_FA_Diaeresis: symbol = XK_quotedbl; goto dead; + case SunXK_FA_Cedilla: symbol = XK_comma; goto dead; + #endif + #ifdef DXK_grave_accent /* DEC */ + case DXK_grave_accent: + case DXK_acute_accent: + case DXK_circumflex_accent: + case DXK_tilde: + case DXK_diaeresis: + case DXK_ring_accent: + case DXK_cedilla_accent: + symbol &= 0xFF; goto dead; + #endif + #ifdef hpXK_mute_grave /* HP */ + case hpXK_mute_grave: symbol = XK_grave; goto dead; + case hpXK_mute_acute: symbol = XK_apostrophe; goto dead; + case hpXK_mute_asciicircum: symbol = XK_asciicircum; goto dead; + case hpXK_mute_asciitilde: symbol = XK_asciitilde; goto dead; + case hpXK_mute_diaeresis: symbol = XK_quotedbl; goto dead; + #endif + #if 0 + /* These don't occur in ISO Latin-1 */ + case XK_macron: + case XK_breve: + case XK_abovedot: + case XK_doubleacute: + case XK_ogonek: + case XK_caron: + #endif + dead: + status->chars_matched = 1; + ComposeLed(dpy, LedModeOn); + break; + case XK_Multi_key: + status->chars_matched = 1; + ComposeLed(dpy, LedModeOn); + *keysym_in_out = NoSymbol; + return; + case XK_Delete: + symbol = '\177'; + break; + } + + /* non-Latin-1 keys and ctrl chars silently terminate compose */ + if (status->chars_matched != 0 && + ((symbol >> 8) != 0x0 || (modifiers & ControlMask))) { + /* but modifiers have no effect on compose status! */ + if (! IsModifierKey(symbol)) { + status->chars_matched = 0; + ComposeLed(dpy, LedModeOff); + } + return; + } + + if (status->chars_matched == 1) { + /* DEL ends compose processing */ + if (symbol == '\177') { + status->chars_matched = 0; + ComposeLed(dpy, LedModeOff); + } else { + if (symbol == XK_degree) symbol = XK_asterisk; + /* degree behaves like asterisk for compose processing */ + status->compose_ptr = compose_tab[(symbol&0x7f) - ' ']; + status->chars_matched = 2; + } + *keysym_in_out = NoSymbol; + } + else if (status->chars_matched == 2) { + register unsigned char *p; + p = (unsigned char *)status->compose_ptr; + ComposeLed(dpy, LedModeOff); + if (symbol == '\177') { + *keysym_in_out = NoSymbol; + status->chars_matched = 0; + } else { + if (symbol == XK_degree) symbol = XK_asterisk; + while (p && *p) + if ((symbol&0x7f) == p[0]) { + *keysym_in_out = p[1]; + status->chars_matched = 3; /* 920304 for OW3 */ + return; + } else p+=2; + if (! (p && *p)) { + XBell(dpy, 50); + *keysym_in_out = NoSymbol; + status->chars_matched = 0; + } + } + } + else if (status->chars_matched == 3) + status->chars_matched = 0; + } + static int XTranslateKeySym(dpy, symbol, modifiers, buffer, nbytes) Display *dpy; *************** *** 439,445 **** char *buffer; /* buffer */ int nbytes; /* space in buffer for characters */ KeySym *keysym; ! XComposeStatus *status; /* not implemented */ { unsigned int modifiers; KeySym symbol; --- 673,679 ---- char *buffer; /* buffer */ int nbytes; /* space in buffer for characters */ KeySym *keysym; ! XComposeStatus *status; /* implemented jbb 890512 */ { unsigned int modifiers; KeySym symbol; *************** *** 447,452 **** --- 681,689 ---- if (! XTranslateKey(event->display, event->keycode, event->state, &modifiers, &symbol)) return 0; + + if (status && event->type == KeyPress) + ComposeHandler(event->display, &symbol, event->state, status); if (keysym) *keysym = symbol; diff -c mit/lib/X/XKeysymDB:1.1.1.1 mit/lib/X/XKeysymDB:1.4 *** mit/lib/X/XKeysymDB:1.1.1.1 Sat Mar 12 00:37:06 1994 --- mit/lib/X/XKeysymDB Sat Mar 12 00:37:06 1994 *************** *** 1,3 **** --- 1,4 ---- + ! $XFree86: mit/lib/X/XKeysymDB,v 1.4 1993/03/27 09:14:19 dawes Exp $ ! $XConsortium: XKeysymDB,v 1.2 91/06/18 13:43:07 rws Exp $ hpmute_acute :100000A8 *************** *** 154,159 **** SunAgain :FF66 SunFind :FF68 SunStop :FF69 ! SunAltGraph :FF7E WYSetup :1006FF00 --- 155,163 ---- SunAgain :FF66 SunFind :FF68 SunStop :FF69 ! SunAltGraph :FF7E WYSetup :1006FF00 + + X386Sys_Req :1007FF00 + X386Mode_Lock :1007FF01 diff -c mit/lib/X/XKeysymStr.c:1.1.1.1 mit/lib/X/XKeysymStr.c:1.2 *** mit/lib/X/XKeysymStr.c:1.1.1.1 Sat Mar 12 00:37:07 1994 --- mit/lib/X/XKeysymStr.c Sat Mar 12 00:37:07 1994 *************** *** 13,18 **** --- 13,21 ---- without express or implied warranty. */ + #ifdef SCO + #include + #endif #include "Xlibint.h" #include #include diff -c mit/lib/X/XOpenDis.c:1.1.1.3 mit/lib/X/XOpenDis.c:1.2 *** mit/lib/X/XOpenDis.c:1.1.1.3 Sat Mar 12 00:37:07 1994 --- mit/lib/X/XOpenDis.c Sat Mar 12 00:37:07 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/XOpenDis.c,v 1.2 1993/03/20 03:26:26 dawes Exp $ * $XConsortium: XOpenDis.c,v 11.123 91/12/20 16:04:29 rws Exp $ */ *************** *** 192,197 **** --- 193,212 ---- return(NULL); } dpy->bufmax = dpy->buffer + BUFSIZE; + + #ifdef _MINIX + /* Initialize the read buffer before the first read. */ + dpy->read_buffer= Xmalloc(BUFSIZE); + if (dpy->read_buffer == NULL) + { + OutOfMemory (dpy, setup); + UnlockMutex(&lock); + return(NULL); + } + dpy->read_bufptr= dpy->read_bufnxt= dpy->read_buffer; + dpy->read_bufmax= dpy->read_buffer + BUFSIZE; + dpy->read_inprogress= False; + #endif /* Set up the input event queue and input event queue parameters. */ dpy->head = dpy->tail = NULL; *************** *** 595,600 **** --- 610,619 ---- if (dpy->buffer) Xfree (dpy->buffer); + #ifdef _MINIX + if (dpy->read_buffer) + Xfree (dpy->read_buffer); + #endif if (dpy->keysyms) Xfree ((char *) dpy->keysyms); if (dpy->xdefaults) diff -c mit/lib/X/XRdBitF.c:1.1.1.1 mit/lib/X/XRdBitF.c:1.4 *** mit/lib/X/XRdBitF.c:1.1.1.1 Sat Mar 12 00:37:08 1994 --- mit/lib/X/XRdBitF.c Sat Mar 12 00:37:08 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/XRdBitF.c,v 1.4 1993/03/27 09:14:21 dawes Exp $ */ /* $XConsortium: XRdBitF.c,v 1.15 91/02/01 16:34:46 gildea Exp $ */ /* Copyright, 1987, Massachusetts Institute of Technology */ *************** *** 28,33 **** --- 29,38 ---- * without the other). */ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #include "Xlibint.h" #include #include "Xutil.h" *************** *** 34,39 **** --- 39,55 ---- #include #include + /* + * Don't want getc() declared as external function for __STDC__ on + * ISC 2.2.1 or for _POSIX_SOURCE on 2.2.1/3.0 because of shared + * library creation + */ + #if (defined(ISC) && defined(_POSIX_SOURCE)) || (defined(ISC22) && defined(__STDC__)) + #ifdef getc + #undef getc + #endif + #define getc(p) (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++) + #endif #define MAX_SIZE 255 diff -c mit/lib/X/XStrKeysym.c:1.1.1.1 mit/lib/X/XStrKeysym.c:2.0 *** mit/lib/X/XStrKeysym.c:1.1.1.1 Sat Mar 12 00:37:09 1994 --- mit/lib/X/XStrKeysym.c Sat Mar 12 00:37:09 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/XStrKeysym.c,v 2.0 1993/09/22 15:31:34 dawes Exp $ */ /* $XConsortium: XStrKeysym.c,v 11.15 91/06/07 18:20:55 rws Exp $ */ /* Copyright 1985, 1987, 1990 Massachusetts Institute of Technology */ *************** *** 13,18 **** --- 14,22 ---- without express or implied warranty. */ + #ifdef SCO + #include + #endif #include "Xlibint.h" #include #include *************** *** 33,38 **** --- 37,57 ---- #define NEEDKTABLE #include "ks_tables.h" + #if defined(_POSIX_SOURCE) && !defined(X_NOT_POSIX) + #include + #endif + + #ifndef PATH_MAX + #include + #ifndef PATH_MAX + #ifdef MAXPATHLEN + #define PATH_MAX MAXPATHLEN + #else + #define PATH_MAX 1024 + #endif + #endif + #endif + #ifndef KEYSYMDB #define KEYSYMDB "/usr/lib/X11/XKeysymDB" #endif *************** *** 47,59 **** if (!initialized) { char *dbname; XrmInitialize(); /* use and name of this env var is not part of the standard */ /* implementation-dependent feature */ dbname = getenv("XKEYSYMDB"); ! if (!dbname) ! dbname = KEYSYMDB; keysymdb = XrmGetFileDatabase(dbname); if (keysymdb) Qkeysym[0] = XrmStringToQuark("Keysym"); --- 66,87 ---- if (!initialized) { char *dbname; + char dbpath[PATH_MAX]; + char *xwinhome; XrmInitialize(); /* use and name of this env var is not part of the standard */ /* implementation-dependent feature */ dbname = getenv("XKEYSYMDB"); ! if (!dbname) { ! if ((xwinhome = getenv("XWINHOME")) != NULL) { ! sprintf(dbpath, "%s/lib/X11/XKeysymDB", xwinhome); ! dbname = dbpath; ! } ! else { ! dbname = KEYSYMDB; ! } ! } keysymdb = XrmGetFileDatabase(dbname); if (keysymdb) Qkeysym[0] = XrmStringToQuark("Keysym"); diff -c mit/lib/X/XcmsColNm.c:1.1.1.3 mit/lib/X/XcmsColNm.c:2.0 *** mit/lib/X/XcmsColNm.c:1.1.1.3 Sat Mar 12 00:37:09 1994 --- mit/lib/X/XcmsColNm.c Sat Mar 12 00:37:10 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/XcmsColNm.c,v 2.0 1993/09/22 15:31:36 dawes Exp $" */ /* $XConsortium: XcmsColNm.c,v 1.25 92/03/03 12:16:07 rws Exp $" */ /* *************** *** 53,62 **** --- 54,81 ---- extern void qsort(); extern char *bsearch(); #endif + #if defined(SVR3SHLIB) && defined(SCO) + extern int (*_libX11_stat)(); + #endif extern XcmsColorSpace **_XcmsDIColorSpaces; static Status LoadColornameDB(); void _XcmsCopyISOLatin1Lowered(); + #if defined(_POSIX_SOURCE) && !defined(X_NOT_POSIX) + #include + #endif + + #ifndef PATH_MAX + #include + #ifndef PATH_MAX + #ifdef MAXPATHLEN + #define PATH_MAX MAXPATHLEN + #else + #define PATH_MAX 1024 + #endif + #endif + #endif + /* * LOCAL DEFINES * #define declarations local to this package. *************** *** 723,733 **** char *pathname; struct stat txt; int length; /* use and name of this env var is not part of the standard */ /* implementation-dependent feature */ if ((pathname = getenv("XCMSDB")) == NULL) { ! pathname = XCMSDB; } length = strlen(pathname); --- 742,760 ---- char *pathname; struct stat txt; int length; + char xcmspath[PATH_MAX]; + char *xwinhome; /* use and name of this env var is not part of the standard */ /* implementation-dependent feature */ if ((pathname = getenv("XCMSDB")) == NULL) { ! if ((xwinhome = getenv("XWINHOME")) != NULL) { ! sprintf(xcmspath, "%s/lib/X11/Xcms.txt", xwinhome); ! pathname = xcmspath; ! } ! else { ! pathname = XCMSDB; ! } } length = strlen(pathname); diff -c mit/lib/X/Xlib.h:1.1.1.1 mit/lib/X/Xlib.h:1.5 *** mit/lib/X/Xlib.h:1.1.1.1 Sat Mar 12 00:37:12 1994 --- mit/lib/X/Xlib.h Sat Mar 12 00:37:13 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/Xlib.h,v 1.5 1993/03/20 03:26:30 dawes Exp $ */ /* $XConsortium: Xlib.h,v 11.215 91/07/22 15:42:38 rws Exp $ */ /* * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology *************** *** 27,33 **** #define XlibSpecificationRelease 5 ! #ifdef USG #ifndef __TYPES__ #include /* forgot to protect it... */ #define __TYPES__ --- 28,40 ---- #define XlibSpecificationRelease 5 ! #ifdef _MINIX ! #ifndef _POSIX_INCLUDED ! #include ! #endif /* _POSIX_INCLUDED */ ! #endif /* _MINIX */ ! ! #if defined(USG) || defined(SYSV) #ifndef __TYPES__ #include /* forgot to protect it... */ #define __TYPES__ *************** *** 40,46 **** #else #include #endif ! #endif /* USG */ #include --- 47,57 ---- #else #include #endif ! #endif /* USG || SYSV */ ! ! #if _MINIX ! typedef char *caddr_t; ! #endif #include *************** *** 58,65 **** --- 69,79 ---- #include #else /* replace this with #include or typedef appropriate for your system */ + #ifndef _WCHAR_T typedef unsigned long wchar_t; + #define _WCHAR_T #endif + #endif typedef char *XPointer; *************** *** 478,483 **** --- 492,504 ---- char *buffer; /* Output buffer starting address. */ char *bufptr; /* Output buffer index pointer. */ char *bufmax; /* Output buffer maximum+1 address. */ + #if _MINIX + char *read_buffer; /* Read buffer starting address. */ + char *read_bufptr; /* Start of data in read buffer. */ + char *read_bufnxt; /* Place of next byte in read buffer. */ + char *read_bufmax; /* Read buffer maximum+1 address. */ + Bool read_inprogress; /* read in progress or not */ + #endif unsigned max_request_size; /* maximum number 32 bit words in request*/ struct _XrmHashBucketRec *db; int (*synchandler)(); /* Synchronization handler */ diff -c mit/lib/X/XlibInt.c:1.1.1.3 mit/lib/X/XlibInt.c:2.1 *** mit/lib/X/XlibInt.c:1.1.1.3 Sat Mar 12 00:37:14 1994 --- mit/lib/X/XlibInt.c Sat Mar 12 00:37:14 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/XlibInt.c,v 2.1 1993/11/07 14:05:53 dawes Exp $ */ /* * $XConsortium: XlibInt.c,v 11.156.1.1 92/11/11 10:10:50 rws Exp $ */ *************** *** 27,32 **** --- 28,36 ---- #include #include "Xlibnet.h" #include + #if defined(AMOEBA) || defined(_MINIX) + #include + #endif static void _EatData32(); *************** *** 33,38 **** --- 37,43 ---- /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX * systems are broken and return EWOULDBLOCK when they should return EAGAIN */ + #if !defined(AMOEBA) && !defined(_MINIX) #if defined(EAGAIN) && defined(EWOULDBLOCK) #define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK) #else *************** *** 42,47 **** --- 47,55 ---- #define ETEST(err) (err == EWOULDBLOCK) #endif #endif + #else /* AMOEBA || _MINIX */ + #define ETEST(err) 0 /* EAGAIN or EWOULDBLOCK not expected */ + #endif /* AMOEBA || _MINIX */ #ifdef LACHMAN #ifdef EMSGSIZE *************** *** 100,106 **** --- 108,118 ---- */ while (size) { errno = 0; + #ifndef _MINIX write_stat = WriteToServer(dpy->fd, bufindex, (int) todo); + #else + write_stat = MNX_WriteToServer(dpy, bufindex, (int) todo); + #endif if (write_stat >= 0) { size -= write_stat; todo = size; *************** *** 118,123 **** --- 130,144 ---- else _XWaitForWritable(dpy); #endif + #ifdef CLIENTS_LOCALCONN + } else if (errno == EAGAIN) { + _XWaitForWritable(dpy); + } else if (errno == ERANGE) { + if (todo > 1) + todo >>= 1; + else + _XWaitForWritable(dpy); + #endif } else if (errno != EINTR) { /* Write failed! */ /* errno set by write system call. */ *************** *** 137,142 **** --- 158,166 ---- char buf[BUFSIZE]; register xReply *rep; + #ifdef AMOEBA + threadswitch(); + #endif if (mode == QueuedAfterFlush) { _XFlush(dpy); *************** *** 144,150 **** --- 168,178 ---- return(dpy->qlen); } if (dpy->flags & XlibDisplayIOError) return(dpy->qlen); + #ifndef _MINIX if (BytesReadable(dpy->fd, (char *) &pend) < 0) + #else + if (MNX_BytesReadable(dpy, (char *) &pend) < 0) + #endif _XIOError(dpy); #ifdef XCONN_CHECK_FREQ /* This is a crock, required because FIONREAD or equivalent is *************** *** 158,164 **** dpy->conn_checker = 0; CLEARBITS(r_mask); BITSET(r_mask, dpy->fd); ! if (pend = select(dpy->fd + 1, (int *)r_mask, NULL, NULL, &zero_time)) { if (pend > 0) --- 186,192 ---- dpy->conn_checker = 0; CLEARBITS(r_mask); BITSET(r_mask, dpy->fd); ! if (pend = select(dpy->fd + 1, (fd_set *)r_mask, NULL, NULL, &zero_time)) { if (pend > 0) *************** *** 217,223 **** --- 245,255 ---- do { /* find out how much data can be read */ + #ifndef _MINIX if (BytesReadable(dpy->fd, (char *) &pend_not_register) < 0) + #else + if (MNX_BytesReadable(dpy, (char *) &pend_not_register) < 0) + #endif _XIOError(dpy); pend = pend_not_register; *************** *** 265,282 **** --- 297,340 ---- register long size; { register long bytes_read; + #if defined(SVR4) && defined(SYSV386) + int have_waited=0; + #endif if ((dpy->flags & XlibDisplayIOError) || size == 0) return; errno = 0; + #ifndef _MINIX while ((bytes_read = ReadFromServer(dpy->fd, data, (int)size)) + #else + while ((bytes_read = MNX_ReadFromServer(dpy, data, (int)size)) + #endif != size) { if (bytes_read > 0) { size -= bytes_read; data += bytes_read; + #if defined(SVR4) && defined(SYSV386) + have_waited=0; + #endif } + #if defined(SVR4) && defined(SYSV386) + /* + * The condition where select() says the server fd is + * readable, but read returns -1 means the connection + * has been closed. This problem has been known to cause + * twm to stay running (and using CPU) after the server + * has finished. DHD Dec 1991. + */ + else if (ETEST(errno) && bytes_read < 0 && have_waited) { + errno = EPIPE; + _XIOError(dpy); + } + #endif else if (ETEST(errno)) { _XWaitForReadable(dpy); + #if defined(SVR4) && defined(SYSV386) + have_waited=1; + #endif errno = 0; } #ifdef SUNSYSV *************** *** 284,289 **** --- 342,353 ---- _XWaitForReadable(dpy); } #endif + #ifdef CLIENTS_LOCALCONN + else if (errno == EAGAIN) { + _XWaitForReadable(dpy); + errno = 0; + } + #endif else if (bytes_read == 0) { /* Read failed because of end of file! */ errno = EPIPE; *************** *** 445,451 **** --- 509,519 ---- iov[1].iov_base = pad; size += iov[1].iov_len; errno = 0; + #ifndef _MINIX while ((bytes_read = ReadvFromServer (dpy->fd, iov, 2)) != size) { + #else + while ((bytes_read = MNX_ReadvFromServer (dpy, iov, 2)) != size) { + #endif if (bytes_read > 0) { size -= bytes_read; *************** *** 466,471 **** --- 534,545 ---- _XWaitForReadable(dpy); } #endif + #ifdef CLIENTS_LOCALCONN + else if (errno == EAGAIN) { + _XWaitForReadable(dpy); + errno = 0; + } + #endif else if (bytes_read == 0) { /* Read failed because of end of file! */ errno = EPIPE; *************** *** 551,557 **** --- 625,635 ---- InsertIOV (pad, padsize) errno = 0; + #ifndef _MINIX if ((len = WritevToServer(dpy->fd, iov, i)) >= 0) { + #else + if ((len = MNX_WritevToServer(dpy, iov, i)) >= 0) { + #endif skip += len; total -= len; todo = total; *************** *** 568,573 **** --- 646,660 ---- else _XWaitForWritable(dpy); #endif + #ifdef CLIENTS_LOCALCONN + } else if (errno == EAGAIN) { + _XWaitForWritable(dpy); + } else if (errno == ERANGE) { + if (todo > 1) + todo >>= 1; + else + _XWaitForWritable(dpy); + #endif } else if (errno != EINTR) { _XIOError(dpy); } *************** *** 1232,1237 **** --- 1319,1327 ---- } + #ifndef X_NO_STRERROR + #define _SysErrorMsg(x) strerror(x) + #else #ifndef USL_SHARELIB static char *_SysErrorMsg (n) *************** *** 1245,1250 **** --- 1335,1341 ---- } #endif /* USL sharedlibs in don't define for SVR3.2 */ + #endif /* !X_NO_STRERROR */ /* *************** *** 1674,1680 **** * and so, you may be better off using gethostname (if it exists). */ ! #if (defined(_POSIX_SOURCE) && !defined(AIXV3)) || defined(hpux) || defined(USG) || defined(SVR4) #define NEED_UTSNAME #include #endif --- 1765,1771 ---- * and so, you may be better off using gethostname (if it exists). */ ! #if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(_MINIX)) || defined(hpux) || defined(USG) || defined(SYSV) || defined(SVR4) #define NEED_UTSNAME #include #endif *************** *** 1823,1828 **** --- 1914,1954 ---- return total; } + #ifdef SCO + /* + * SCO doesn't have writev either + */ + + int _XWriteV (fd, iov, iovcnt) + int fd; + struct iovec *iov; + int iovcnt; + { + int i, len, total; + char *base; + + errno = 0; + for (i = 0, total = 0; i < iovcnt; i++, iov++) { + len = iov->iov_len; + base = iov->iov_base; + while (len > 0) { + register int nbytes; + + nbytes = write(fd, base, len); + if (nbytes < 0 && total == 0) + return(-1); + if (nbytes <= 0) + return(total); + errno = 0; + len -= nbytes; + total += nbytes; + base += nbytes; + } + } + return(total); + } + #endif /* SCO */ + #endif /* SYSV && SYSV386 && !STREAMSCONN */ #ifdef STREAMSCONN *************** *** 1963,1965 **** --- 2089,2845 ---- #endif /* STREAMSCONN */ + + #if defined(SCO) /* && defined(TCPCONN) */ + BytesReadable(fd, ptr) + int fd, ptr; + { + /* + * On SCO CLIENTS_LOCALCONN uses STREAMS tty's and TCPCONN uses /dev/socksys. + * The later is not a STREAMS driver and will not respond to I_NREAD. + * On the other hand STREAMS will not respond to a FIONREAD. So we will + * try both here and see if any case will work. + */ + register int n; + if ( (n = ioctl(fd, FIONREAD, ptr)) < 0 && errno == EINVAL) + return ioctl(fd, I_NREAD, ptr); + + return n; + } + #endif /* SCO */ + + #ifdef AMOEBA + #include "XAmoeba.h" + + /* + * Philip's TCP/IP server silently assumes a + * maximum buffer size of 30000 bytes. + */ + #define TCPIP_BUFSIZE 16384 + + /* + * Amoeba connection information is stored in, so called, + * channel descriptors. Channel descriptors are identified + * by their index in the table below. + */ + XAmChanDesc XAmChanDescriptors[OPEN_MAX]; + + /* + * Cleanup connection descriptors + */ + void + XAmCleanUpChanDesc() + { + register int i; + + for (i = 0; i < OPEN_MAX; i++) { + if (XAmChanDescriptors[i].state != ACDS_FREE) { + /* + * The Amoeba TCP/IP server is capability oriented, i.e. + * it uses capabilities to identify connections. Since a + * capability is only destroyed when it has aged too much + * or is explicitly deleted, the connection it identifies + * will tend to exist for some while even if the client is + * already gone. To force connections to close this loop + * destroys all open TCP/IP connection. This loop us auto- + * matically executed when exit() is called. + */ + XAmChanDescriptors[i].state = ACDS_CLOSED; + if (XAmChanDescriptors[i].type == ACDT_TCPIP) + std_destroy(&XAmChanDescriptors[i].chancap); + if (XAmChanDescriptors[i].type == ACDT_VIRTCIRC) + vc_close(XAmChanDescriptors[i].virtcirc, VC_BOTH); + } + XAmChanDescriptors[i].state = ACDS_FREE; + } + } + + /* + * Cleanup connection descriptors on a signal + */ + void + XAmSignalCleanUpChanDesc(sig) + int sig; + { + XAmCleanUpChanDesc(); + _exit(sig | 0x80); + } + + /* + * Allocate a channel descriptor + */ + XAmChanDesc * + XAmAllocChanDesc() + { + register int i; + static int initialized = False; + + /* + * Since the TCP/IP server is capability based its connections exists + * even if the owner process is long gone. To overcome this nuisance, + * a sweep is made over the connection descriptors when exit() is + * called or when an un-catched (by application program) signal is + * received. + */ + if (!initialized) { + initialized = True; + atexit(XAmCleanUpChanDesc); + if (signal(SIGHUP, SIG_IGN) != SIG_IGN) + signal(SIGHUP, XAmSignalCleanUpChanDesc); + if (signal(SIGQUIT, SIG_IGN) != SIG_IGN) + signal(SIGQUIT, XAmSignalCleanUpChanDesc); + if (signal(SIGINT, SIG_IGN) != SIG_IGN) + signal(SIGINT, XAmSignalCleanUpChanDesc); + if (signal(SIGTERM, SIG_IGN) != SIG_IGN) + signal(SIGTERM, XAmSignalCleanUpChanDesc); + } + + for (i = 0; i < OPEN_MAX; i++) { + if (XAmChanDescriptors[i].state == ACDS_FREE) { + XAmChanDescriptors[i].state = ACDS_USED; + return &XAmChanDescriptors[i]; + } + } + return (XAmChanDesc *) NULL; + } + + /* + * Convert ``file descriptor'' to channel descriptor + */ + XAmChanDesc * + XAmFdToChanDesc(fd) + int fd; + { + assert(fd >= 0 && fd < OPEN_MAX); + return &XAmChanDescriptors[fd]; + } + + /* + * Convert channel descriptor to ``file descriptor'' + */ + int + XAmChanDescToFd(chandesc) + XAmChanDesc *chandesc; + { + return chandesc - XAmChanDescriptors; + } + + /* + * Free channel descriptor + */ + void + XAmFreeChanDesc(chandesc) + XAmChanDesc *chandesc; + { + if (chandesc->sema) { + Xfree(chandesc->sema); + chandesc->sema = NULL; + } + chandesc->state = ACDS_FREE; + } + + /* + * Shutdown TCP/IP reader thread + */ + void + XAmReaderSignalCatcher(sig, us, extra) + signum sig; + thread_ustate *us; + char *extra; + { + register XAmChanDesc *chandesc = (XAmChanDesc *)extra; + + cb_close(chandesc->circbuf); + chandesc->state = ACDS_CLOSED; + thread_exit(); + } + + /* + * TCP/IP reader thread + */ + void + XAmReaderThread(argptr, argsize) + void *argptr; + int argsize; + { + register XAmChanDesc *chandesc; + + assert(argsize == sizeof(XAmChanDesc *)); + chandesc = *((XAmChanDesc **)argptr); + (void)sig_catch(chandesc->signal, XAmReaderSignalCatcher, (char*)chandesc); + while (True) { + char buffer[CIRCBUFSIZE]; + bufsize size; + + size = tcpip_read(&chandesc->chancap, buffer, sizeof(buffer)); + if (ERR_STATUS(size)) { + fprintf(stderr, "Xlib: TCP/IP read failed (%s)\n", + err_why(ERR_CONVERT(size))); + cb_close(chandesc->circbuf); + thread_exit(); + } + + if (size == 0 || cb_puts(chandesc->circbuf, buffer, size)) { + if (size != 0) + fprintf(stderr, "Xlib: short write to circular buffer\n"); + cb_close(chandesc->circbuf); + chandesc->state = ACDS_CLOSED; + thread_exit(); + } + } + } + + /* + * Determine how many bytes are readable + */ + int + _XBytesReadable(ifd, count) + int ifd; + int *count; + { + register XAmChanDesc *chandesc; + + errno = 0; + chandesc = XAmFdToChanDesc(ifd); + if (chandesc->state == ACDS_CLOSED) { + errno = EBADF; + *count = 0; + return -1; + } + if (chandesc->type == ACDT_TCPIP) + *count = cb_full(chandesc->circbuf); + if (chandesc->type == ACDT_VIRTCIRC) + *count = vc_avail(chandesc->virtcirc, VC_IN); + if (*count < 0) { + errno = chandesc->state == ACDS_CLOSED ? EINTR : EPIPE; + *count = 0; + return -1; + } + return 0; + } + + /* + * Wait until input is available or until the timer expires + */ + int + _XAmSelect(ifd, timout) + int ifd; + int timout; + { + register XAmChanDesc *chandesc; + register int n; + + errno = 0; + chandesc = XAmFdToChanDesc(ifd); + if (chandesc->state == ACDS_CLOSED) { + errno = EBADF; + return -1; + } + + /* + * Allocate semaphore to sleep on when no characters + * are available. The underlying circular buffer and + * virtual circuit packages manage this semaphore. + */ + if (chandesc->sema == (semaphore *)NULL) { + chandesc->sema = Xmalloc(sizeof(semaphore)); + sema_init(chandesc->sema, 0); + if (chandesc->type == ACDT_TCPIP) + cb_setsema(chandesc->circbuf, chandesc->sema); + else + vc_setsema(chandesc->virtcirc, chandesc->sema); + } + + /* + * TCP/IP connection + */ + if (chandesc->type == ACDT_TCPIP) { + if ((n = cb_full(chandesc->circbuf)) != 0) { + if (n < 0) errno = EPIPE; + return n; /* includes error as well */ + } + if (sema_trydown(chandesc->sema, timout) < 0) { + errno = EINTR; + return -1; + } + if ((n = cb_full(chandesc->circbuf)) < 0) + errno = EPIPE; + return n; + } + + /* + * Virtual circuit connection + */ + if (chandesc->type == ACDT_VIRTCIRC) { + if ((n = vc_avail(chandesc->virtcirc, VC_IN)) != 0) { + if (n < 0) errno = EPIPE; + return n; /* includes error as well */ + } + if (sema_trydown(chandesc->sema, timout) < 0) { + errno = EINTR; + return -1; + } + if ((n = vc_avail(chandesc->virtcirc, VC_IN)) < 0) + errno = EPIPE; + return n; + } + + errno = EINVAL; + return -1; + } + + /* + * Read ``count'' bytes from server + */ + int + _XReadFromServer(fdi, buf, count) + int fdi, count; + char *buf; + { + register XAmChanDesc *chandesc; + register int rv; + + errno = 0; + chandesc = XAmFdToChanDesc(fdi); + if (chandesc->state == ACDS_CLOSED) { + errno = EBADF; + return -1; + } + + /* + * TCP/IP connection + */ + if (chandesc->type == ACDT_TCPIP) { + rv = cb_gets(chandesc->circbuf, buf, count, count); + if (rv != count) { + if (rv == 0) { + fprintf(stderr, "Xlib: Cannot read circular buffer\n"); + errno = EPIPE; + rv = -1; + } else + fprintf(stderr, "Xlib: Cannot read circular buffer (%d)\n", rv); + } + } + + /* + * Virtual circuit connection + */ + if (chandesc->type == ACDT_VIRTCIRC) { + rv = vc_readall(chandesc->virtcirc, buf, count); + if (rv < 0) { + fprintf(stderr, "Xlib: Cannot read virtual circuit\n"); + errno = EPIPE; + rv = -1; + } + } + + /* + * The circular buffer writer will only UP the semaphore when + * characters are available; we have to down it ourselfs. + */ + if (chandesc->sema && rv != -1) + sema_mdown(chandesc->sema, count); + return rv; + } + + /* + * Write ``count'' bytes to server + */ + int + _XWriteToServer(fdi, buf, count) + int fdi; + char *buf; + int count; + { + register XAmChanDesc *chandesc; + register int size; + + errno = 0; + chandesc = XAmFdToChanDesc(fdi); + if (chandesc->state == ACDS_CLOSED) { + errno = EBADF; + return -1; + } + + /* + * TCP/IP connection + */ + if (chandesc->type == ACDT_TCPIP) { + for (size = 0; count > 0; ) { + bufsize bsize; + int wrcnt; + + wrcnt = count > TCPIP_BUFSIZE ? TCPIP_BUFSIZE : count; + bsize = tcpip_write(&chandesc->chancap, buf, wrcnt); + if (ERR_STATUS(bsize)) { + fprintf(stderr, "Xlib: TCP/IP write failed (%s)\n", + tcpip_why(ERR_CONVERT(bsize))); + errno = EPIPE; + return -1; + } + if (bsize != wrcnt) { + fprintf(stderr, + "Xlib: TCP/IP write failed (expected %d, wrote %d)\n", + (int)bsize, wrcnt); + errno = EPIPE; + return -1; + } + buf += bsize; + count -= (int) bsize; + size += (int) bsize; + } + } + + /* + * Virtual circuit connection + */ + if (chandesc->type == ACDT_VIRTCIRC) { + if ((size = vc_write(chandesc->virtcirc, buf, count)) < 0) { + fprintf(stderr, "Xlib: virtual circuit write failed\n"); + errno = EPIPE; + return -1; + } + } + return size; + } + + /* + * _XReadV - scatter/gather routine + */ + _XReadV(fdi, iov, n) + int fdi, n; + register struct iovec *iov; + { + int count = 0, thiscount; + + while (n--) { + if (iov->iov_len) { + thiscount = ReadFromServer(fdi, iov->iov_base, iov->iov_len); + if (thiscount < 0) return thiscount; + count += thiscount; + if (thiscount < iov->iov_len) break; + } + iov++; + } + return count; + } + + /* + * _XWriteV - scatter/gather routine + */ + int + _XWriteV(fdi, iov, n) + int fdi, n; + register struct iovec *iov; + { + int count = 0, thiscount; + + while (n--) { + if (iov->iov_len) { + thiscount = WriteToServer(fdi, iov->iov_base, iov->iov_len); + if (thiscount < 0) + return thiscount; + count += thiscount; + if (thiscount < iov->iov_len) break; + } + iov++; + } + return count; + } + #endif /* AMOEBA */ + + #ifdef _MINIX + int MNX_BytesReadable (dpy, ptr) + Display *dpy; + int * ptr; + { + unsigned rd_siz; + int r; + asio_fd_set_t bits; + struct fwait fw; + + *ptr= 0; + if (dpy->read_bufnxt > dpy->read_bufptr) + { + *ptr= dpy->read_bufnxt-dpy->read_bufptr; + return 0; + } + if (!dpy->read_inprogress) + { + dpy->read_bufptr= dpy->read_bufnxt= dpy->read_buffer; + rd_siz= dpy->read_bufmax-dpy->read_bufnxt; + r= read(dpy->fd, dpy->read_bufnxt, rd_siz); + if (r > 0) + { + dpy->read_bufnxt += r; + *ptr= r; + return 0; + } + else if (r == 0) + { + errno= EPIPE; + return -1; + } + else if (errno != EINPROGRESS) + { + return r; + } + dpy->read_inprogress= True; + return 0; + } + ASIO_FD_ZERO(&bits); + ASIO_FD_SET(dpy->fd, ASIO_READ, &bits); + fw.fw_flags= FWF_NONBLOCK; + fw.fw_bits= bits.afds_bits; + fw.fw_maxfd= ASIO_FD_SETSIZE; + r= fwait(&fw); + assert(r == 0 || r == -1 && errno == EAGAIN); + if (r == -1) + { + return 0; + } + assert(fw.fw_fd == dpy->fd); + assert(fw.fw_operation == ASIO_READ); + dpy->read_inprogress= False; + if (fw.fw_result == -1 || fw.fw_result == 0) + { + if (fw.fw_result == -1) + errno= fw.fw_errno; + else + errno= EPIPE; + return fw.fw_result; + } + dpy->read_bufnxt += fw.fw_result; + *ptr= fw.fw_result; + return 0; + } + + int MNX_ReadFromServer(dpy, buf, siz) + Display *dpy; + char *buf; + unsigned siz; + { + unsigned rd_siz; + int r; + struct asio_fd_set bits; + struct fwait fw; + + assert(dpy->read_buffer <= dpy->read_bufptr && + dpy->read_bufptr <= dpy->read_bufnxt && + dpy->read_bufnxt <= dpy->read_bufmax && + dpy->read_buffer <= dpy->read_bufmax && + dpy->read_buffer != NULL); + if (dpy->read_bufptr < dpy->read_bufnxt) + goto gotbytes; + if (!dpy->read_inprogress) + { + dpy->read_bufptr= dpy->read_bufnxt= dpy->read_buffer; + rd_siz= dpy->read_bufmax-dpy->read_bufnxt; + r= read(dpy->fd, dpy->read_bufnxt, rd_siz); + if (r > 0) + { + dpy->read_bufnxt += r; + goto gotbytes; + } + if (r == -1 && errno != EINPROGRESS || r == 0) + { + return r; + } + dpy->read_inprogress= True; + } + ASIO_FD_ZERO(&bits); + ASIO_FD_SET(dpy->fd, ASIO_READ, &bits); + fw.fw_flags= 0; + fw.fw_bits= bits.afds_bits; + fw.fw_maxfd= ASIO_FD_SETSIZE; + r= fwait(&fw); + assert(r == 0 || r == -1 && errno == EINTR); + if (r == -1) + { + return -1; + } + assert(fw.fw_fd == dpy->fd); + assert(fw.fw_operation == ASIO_READ); + dpy->read_inprogress= False; + if (fw.fw_result == -1 || fw.fw_result == 0) + { + if (fw.fw_result == -1) + errno= fw.fw_errno; + return fw.fw_result; + } + dpy->read_bufnxt += fw.fw_result; + gotbytes: + if (siz > dpy->read_bufnxt-dpy->read_bufptr) + siz= dpy->read_bufnxt-dpy->read_bufptr; + memcpy(buf, dpy->read_bufptr, siz); + dpy->read_bufptr += siz; + return siz; + } + + int MNX_ReadvFromServer(dpy, iov, iovcnt) + Display *dpy; + struct iovec *iov; + int iovcnt; + { + int i, len, total; + char *base; + + errno = 0; + for (i=0, total=0; iiov_len; + base = iov->iov_base; + while (len > 0) { + register int nbytes; + nbytes = MNX_ReadFromServer(dpy, base, len); + if (nbytes < 0 && total == 0) return -1; + if (nbytes <= 0) return total; + errno = 0; + len -= nbytes; + total += nbytes; + base += nbytes; + } + } + return total; + } + + int MNX_WritevToServer(dpy, iov, iovcnt) + Display *dpy; + struct iovec *iov; + int iovcnt; + { + int i, len, total; + char *base; + + errno = 0; + for (i=0, total=0; iiov_len; + base = iov->iov_base; + while (len > 0) { + register int nbytes; + nbytes = MNX_WriteToServer(dpy, base, len); + if (nbytes < 0 && total == 0) return -1; + if (nbytes <= 0) return total; + errno = 0; + len -= nbytes; + total += nbytes; + base += nbytes; + } + } + return total; + } + + int MNX_WriteToServer(dpy, buf, siz) + Display *dpy; + char *buf; + unsigned siz; + { + /* Writing is difficult. If we just issued a blocking write then + * we can get deadlock if the server also decides to write. + * The server doesn't do deadlock prevention so we have to buffer + * incoming data. + */ + int r, pend; + xEvent *ev; + asio_fd_set_t bits; + struct fwait fw; + + /* Let's start with a write, maybe we are lucky. */ + r= write(dpy->fd, buf,siz); + if (r >= 0 || errno != EINPROGRESS) + return r; /* We were lucky. */ + for(;;) + { + /* Try to get a read in progress. */ + if (!dpy->read_inprogress) + { + char readbuf[BUFSIZE]; + + if (MNX_BytesReadable(dpy, &pend) < 0) + _XIOError(dpy); + if (dpy->read_inprogress) + continue; + if (pend < SIZEOF(xEvent)) pend = SIZEOF(xEvent); + + if (pend > BUFSIZE) pend = BUFSIZE; + + pend= (pend / SIZEOF(xEvent)) * SIZEOF(xEvent); + + _XRead(dpy, readbuf, pend); + + STARTITERATE (ev,xEvent, readbuf, (pend > 0), + (pend -= SIZEOF(xEvent))) { + if (ev->u.u.type == X_Error) + _XError(dpy, (xError *) ev); + else + _XEnq( dpy, ev); + } + ENDITERATE + continue; + } + /* Let's fwait. */ + ASIO_FD_ZERO(&bits); + ASIO_FD_SET(dpy->fd, ASIO_READ, &bits); + ASIO_FD_SET(dpy->fd, ASIO_WRITE, &bits); + fw.fw_flags= 0; + fw.fw_bits= bits.afds_bits; + fw.fw_maxfd= ASIO_FD_SETSIZE; + r= fwait(&fw); + if (r == -1) + { + assert(errno == EINTR); + continue; + } + assert(r == 0); + assert(fw.fw_fd == dpy->fd); + if (fw.fw_operation == ASIO_WRITE) + { + /* We are done. */ + r= fw.fw_result; + if (r == -1) + errno= fw.fw_errno; + return r; + } + assert(fw.fw_operation == ASIO_READ); + r= fw.fw_result; + if (r == -1) + { + errno= fw.fw_errno; + _XIOError(dpy); + } + if (r == 0) + { + errno= EPIPE; + _XIOError(dpy); + } + dpy->read_bufptr += r; + dpy->read_inprogress= False; + } + } + + int MNX_XConnectionNumber(dpy) + Display *dpy; + { + if (!dpy->read_inprogress) + return -1; + return dpy->fd; + } + + void XReplyReadStatus(dpy, r, err) + Display *dpy; + int r; + int err; + { + assert(dpy->read_inprogress); + dpy->read_inprogress= False; + if (r > 0) + { + dpy->read_bufnxt += r; + return; + } + if (r == 0) + errno= EPIPE; + else + errno= err; + _XIOError(dpy); + } + #endif /* _MINIX */ diff -c mit/lib/X/Xlibint.h:1.1.1.1 mit/lib/X/Xlibint.h:1.3 *** mit/lib/X/Xlibint.h:1.1.1.1 Sat Mar 12 00:37:16 1994 --- mit/lib/X/Xlibint.h Sat Mar 12 00:37:16 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/Xlibint.h,v 1.3 1993/03/27 09:14:24 dawes Exp $ */ /* $XConsortium: Xlibint.h,v 11.91 91/07/22 15:43:08 rws Exp $ */ /* Copyright 1984, 1985, 1987, 1989 Massachusetts Institute of Technology */ *************** *** 66,73 **** #include #include #else ! char *malloc(), *realloc(), *calloc(); ! void exit(); #ifdef SYSV #include #else --- 67,74 ---- #include #include #else ! extern char *malloc(), *realloc(), *calloc(); ! extern void exit(); #ifdef SYSV #include #else diff -c mit/lib/X/Xlibnet.h:1.1.1.1 mit/lib/X/Xlibnet.h:2.0 *** mit/lib/X/Xlibnet.h:1.1.1.1 Sat Mar 12 00:37:16 1994 --- mit/lib/X/Xlibnet.h Sat Mar 12 00:37:16 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/Xlibnet.h,v 2.0 1993/07/28 11:56:11 dawes Exp $ */ /* $XConsortium: Xlibnet.h,v 1.18 91/07/23 19:01:27 rws Exp $ */ /* *************** *** 26,37 **** --- 27,62 ---- #endif #endif /* X_UNIX_PATH */ + #ifdef _MINIX + #define ASYNCHCONN + #endif + + #ifdef ASYNCHCONN + #ifdef _MINIX + /* + * Minix Asynch I/O + */ + #define BytesReadable(fd,ptr) (_XBytesReadable ((fd), (ptr))) + + #include + #include + #include + #include + #include + #include + #endif /* _MINIX */ + + #else /* !ASYNCHCONN */ #ifdef STREAMSCONN #ifdef SYSV /* * UNIX System V Release 3.2 */ + #ifndef SCO #define BytesReadable(fd,ptr) (_XBytesReadable ((fd), (ptr))) + #else + #include + #endif #define MALLOC_0_RETURNS_NULL #include *************** *** 45,76 **** --- 70,131 ---- #endif /* SVR4 */ #else /* not STREAMSCONN */ + #ifdef AMOEBA + /* + * Amoeba 5.0, TCP/IP connections as well as virtual circuits + */ + #define BytesReadable(fd,ptr) (_XBytesReadable ((fd), (ptr))) + #ifndef MALLOC_0_RETURNS_NULL + #define MALLOC_0_RETURNS_NULL + #endif + #else /* not AMOEBA */ /* * socket-based systems */ + #if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN) #include + #else + #ifdef ESIX + #include + #endif + #endif #include + #if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN) #include + #endif #include /* needed for XlibInt.c */ #ifdef SVR4 #include + #ifdef SVR4_ACP + #include + #endif #endif #if defined(SYSV386) && defined(SYSV) + #ifndef ESIX #include + #endif #include + #ifndef SCO #define BytesReadable(fd,ptr) ioctl((fd), I_NREAD, (ptr)) #else + #include + #endif + #else #define BytesReadable(fd, ptr) ioctl ((fd), FIONREAD, (ptr)) #endif + #endif /* AMOEBA else */ #endif /* STREAMSCONN else */ + #endif /* ASYNCHCONN else */ + #if !defined(AMOEBA) && !defined(ASYNCHCONN) /* * If your BytesReadable correctly detects broken connections, then * you should NOT define XCONN_CHECK_FREQ. */ #define XCONN_CHECK_FREQ 256 + #endif /* AMOEBA */ #ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE *************** *** 90,100 **** --- 145,159 ---- #ifdef NOFILE #define OPEN_MAX NOFILE #else + #ifdef _POSIX_OPEN_MAX + #define OPEN_MAX _POSIX_OPEN_MAX + #else #define OPEN_MAX NOFILES_MAX #endif #endif #endif #endif + #endif #if OPEN_MAX > 256 #undef OPEN_MAX *************** *** 212,218 **** * int iov_len; * }; */ ! #if defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) struct iovec { caddr_t iov_base; int iov_len; --- 271,277 ---- * int iov_len; * }; */ ! #if defined(AMOEBA) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA)) struct iovec { caddr_t iov_base; int iov_len; *************** *** 234,244 **** --- 293,310 ---- #else /* else not STREAMSCONN */ + #ifdef AMOEBA + #define ReadFromServer(dpy, data, size) _XReadFromServer((dpy), (data), (size)) + #define WriteToServer(dpy, bufind, size) _XWriteToServer((dpy), (bufind), (size)) + #else /* !AMOEBA */ + #ifndef _MINIX /* * bsd can read from sockets directly */ #define ReadFromServer(dpy, data, size) read((dpy), (data), (size)) #define WriteToServer(dpy, bufind, size) write((dpy), (bufind), (size)) + #endif /* _MINIX */ + #endif /* AMOEBA */ #endif /* STREAMSCONN */ *************** *** 245,254 **** --- 311,324 ---- #ifndef USL_COMPAT #if !defined(USG) || defined(MOTOROLA) + #if !defined(AMOEBA) && !defined(_MINIX) #if !(defined(SYSV) && defined(SYSV386)) #define _XReadV readv #endif + #ifndef SCO #define _XWriteV writev + #endif + #endif /* !AMOEBA && !_MINIX */ #endif #endif /* !USL_COMPAT */ diff -c mit/lib/X/Xrm.c:1.1.1.4 mit/lib/X/Xrm.c:1.4 *** mit/lib/X/Xrm.c:1.1.1.4 Sat Mar 12 00:37:18 1994 --- mit/lib/X/Xrm.c Sat Mar 12 00:37:18 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/Xrm.c,v 1.4 1993/05/04 14:59:20 dawes Exp $ * $XConsortium: Xrm.c,v 1.72 92/01/10 14:21:12 rws Exp $ */ *************** *** 33,38 **** --- 34,55 ---- #include #include "XrmI.h" #include "Xlcint.h" + + #if defined(SVR3SHLIB) && defined(SCO) + extern int (*_libX11_stat)(); + #endif + + /* + * Don't want putc() declared as external function for __STDC__ + * on ISC 2.2.1 or for _POSIX_SOURCE on 2.2.1/3.0 because of + * shared library creation + */ + #if (defined(ISC) && defined(_POSIX_SOURCE)) || (defined(ISC22) && defined(__STDC__)) + #ifdef putc + #undef putc + #endif + #define putc(x, p) (--(p)->_cnt < 0 ? _flsbuf((unsigned char) (x), (p)) : (int) (*(p)->_ptr++ = (unsigned char) (x))) + #endif #if __STDC__ #define Const const diff -c mit/lib/X/evtomask.c:1.1.1.1 mit/lib/X/evtomask.c:2.0 *** mit/lib/X/evtomask.c:1.1.1.1 Sat Mar 12 00:37:19 1994 --- mit/lib/X/evtomask.c Sat Mar 12 00:37:19 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/evtomask.c,v 2.0 1993/07/24 04:51:03 dawes Exp $ */ /* $XConsortium: evtomask.c,v 1.8 91/02/20 18:49:00 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1987 */ *************** *** 12,17 **** --- 13,24 ---- suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ + + #ifdef SVR3SHLIB + #ifdef _Xevent_to_mask + #undef _Xevent_to_mask + #endif + #endif #include diff -c mit/lib/X/globals.c:1.1.1.1 mit/lib/X/globals.c:1.3 *** mit/lib/X/globals.c:1.1.1.1 Sat Mar 12 00:37:19 1994 --- mit/lib/X/globals.c Sat Mar 12 00:37:19 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/globals.c,v 1.3 1993/03/27 09:14:32 dawes Exp $ * $XConsortium: globals.c,v 1.13 91/07/12 15:54:41 gildea Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 32,38 **** * Some shared library implementations are *much* happier if there isn't any * global initialized data. */ ! #ifdef NULL_NOT_ZERO /* then need to initialize */ #define SetZero(t,var,z) t var = z #else #define SetZero(t,var,z) t var --- 33,39 ---- * Some shared library implementations are *much* happier if there isn't any * global initialized data. */ ! #if defined(NULL_NOT_ZERO) || defined(SVR3SHLIB) /* then need to initialize */ #define SetZero(t,var,z) t var = z #else #define SetZero(t,var,z) t var *************** *** 77,82 **** --- 78,84 ---- ZEROINIT (Display *, _XHeadOfDisplayList, NULL); + #include "libX11.c" #ifdef STREAMSCONN *************** *** 224,230 **** --- 226,234 ---- */ + #ifndef SVR3SHLIB _XQEvent * _qfree = NULL; + #endif long _qfreeFlag = 0; void * _qfreePtr = NULL; diff -c /dev/null mit/lib/X/import.h:2.1 *** /dev/null Sat Mar 12 00:37:19 1994 --- mit/lib/X/import.h Sat Mar 12 00:37:20 1994 *************** *** 0 **** --- 1,243 ---- + /* libX11 : import.h + * indirection defines + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived partially from work of Thomas Roell + * + * $XFree86: mit/lib/X/import.h,v 2.1 1993/09/22 15:31:38 dawes Exp $ + */ + + #ifndef _libX11_import + #define _libX11_import + #ifdef SVR3SHLIB + + #define _ctype (*_libX11__ctype) + #define _filbuf (*_libX11__filbuf) + #define _flsbuf (*_libX11__flsbuf) + #define _iob (*_libX11__iob) + #define access (*_libX11_access) + #define alarm (*_libX11_alarm) + #define atoi (*_libX11_atoi) + #define calloc (*_libX11_calloc) + /* prevent name conflict with member close of XIM */ + #define close(fd) (*_libX11_close)(fd) + #define connect (*_libX11_connect) + #define errno (*_libX11_errno) + #define exit (*_libX11_exit) + #define fclose (*_libX11_fclose) + #define fcntl (*_libX11_fcntl) + #define fgets (*_libX11_fgets) + #define fopen (*_libX11_fopen) + #define fprintf (*_libX11_fprintf) + #define fputs (*_libX11_fputs) + #define fread (*_libX11_fread) + /* prevent name conflict with member free of XFontSetMethods */ + #define free(ptr) (*_libX11_free)(ptr) + #define fwrite (*_libX11_fwrite) + #define getenv (*_libX11_getenv) + #define gethostbyname (*_libX11_gethostbyname) + #define uname (*_libX11_uname) + #define getmsg (*_libX11_getmsg) + #define getpid (*_libX11_getpid) + #define getpwnam (*_libX11_getpwnam) + #define getpwuid (*_libX11_getpwuid) + #define getuid (*_libX11_getuid) + #define grantpt (*_libX11_grantpt) + #define htons (*_libX11_htons) + #define inet_addr (*_libX11_inet_addr) + #define ioctl (*_libX11_ioctl) + #define malloc (*_libX11_malloc) + #define memset (*_libX11_memset) + #define ntohl (*_libX11_ntohl) + #define ntohs (*_libX11_ntohs) + #define open (*_libX11_open) + #define ptsname (*_libX11_ptsname) + #define putmsg (*_libX11_putmsg) + #define qsort (*_libX11_qsort) + #define read (*_libX11_read) + #define realloc (*_libX11_realloc) + #define rewind (*_libX11_rewind) + /* prevent name conflict with bitfield select of _XtEventRec */ + #define select(max, rd, wr, ex, to) (*_libX11_select)(max, rd, wr, ex, to) + #define setsockopt (*_libX11_setsockopt) + #define signal (*_libX11_signal) + #define sleep (*_libX11_sleep) + #define socket (*_libX11_socket) + #define sprintf (*_libX11_sprintf) + #define sscanf (*_libX11_sscanf) + /* prevent name conflict with struct stat */ + #define stat(path, buf) (*_libX11_stat)(path, buf) + #define strcat (*_libX11_strcat) + #define strchr (*_libX11_strchr) + #define strcmp (*_libX11_strcmp) + #define strcpy (*_libX11_strcpy) + #define strncmp (*_libX11_strncmp) + #define strncpy (*_libX11_strncpy) + #define strrchr (*_libX11_strrchr) + #define strtok (*_libX11_strtok) + #define sys_errlist (*_libX11_sys_errlist) + #define sys_nerr (*_libX11_sys_nerr) + #define tolower (*_libX11_tolower) + #define unlockpt (*_libX11_unlockpt) + #define write (*_libX11_write) + #define writev (*_libX11_writev) + #define XauDisposeAuth (*_libX11_XauDisposeAuth) + #define XauFileName (*_libX11_XauFileName) + #define XauGetBestAuthByAddr (*_libX11_XauGetBestAuthByAddr) + #define XauReadAuth (*_libX11_XauReadAuth) + /* + #define _Xevent_to_mask (*_libX11__Xevent_to_mask) + */ + + /* for XDM authorization */ + #define _XdmcpAuthSetup (*_libX11__XdmcpAuthSetup) + #define _XdmcpAuthDoIt (*_libX11__XdmcpAuthDoIt) + #define XdmcpWrap (*_libX11_XdmcpWrap) + + #define getsockname (*_libX11_getsockname) + /* prevent name conflict */ + #define time(tloc) (*_libX11_time)(tloc) + + + /* Imported functions declarations + * Why declaring some imported functions here? + * This should be done gracefully through including of the systems + * header files. Unfortunatly there are some source files don't + * include all headers they should include, there are also some functions + * nowhere declared in the systems headers and some are declared + * without extern and cause problems since the names are redefined + * and these declarations then become undesired false pointer definitions. + */ + + /* on ISC 2.2.1 doesn't declare time(2) for __STDC__ + * so get time_t from it and declare it excplicit + */ + #ifndef ATT + #include + #endif + + #ifdef __STDC__ + #ifndef ATT + extern time_t time(time_t *); + #else + extern long time(time_t *); /* gcc 2.3.3 seems to have problems */ + #endif /* with typedefs on AT&T */ + extern int creat(char const *, unsigned short); + extern void exit(int); + #ifndef SCO + extern int sprintf(char *, char const *, ...); + extern int sscanf(char *, char const *, ...); + #else + extern int open(); + extern int fcntl(); + #ifndef SCO324 + extern int uname(); + #endif + #endif /* SCO */ + extern int atoi(char const *); + extern int access(char const *, int); + extern unsigned int alarm(unsigned int); + extern unsigned int sleep(unsigned int); + extern int close(int); + #ifdef ISC32 + extern int read(int, const char *, unsigned int); + #else + extern int read(int, char *, unsigned int); + #endif + extern int write(int, char const *, unsigned int); + extern int grantpt(int); + extern char *ptsname(int); + extern int unlockpt(int); + extern char *getenv(char const *); + extern short /*pid_t*/ getpid(void); + extern void XdmcpWrap(unsigned char *, unsigned char*, + unsigned char *, int); + #else /* ifndef __STDC__ */ + #ifndef ATT + extern time_t time(); + #else + extern long time(); /* gcc 2.3.3 seems to have problems with */ + #endif /* typedefs on AT&T */ + extern int creat(); + extern void exit(); + #ifndef SCO + extern int sprintf(); + extern int sscanf(); + #else + extern int open(); + extern int fcntl(); + #ifndef SCO324 + extern int uname(); + #endif + #endif /* SCO */ + extern int atoi(); + extern int access(); + extern unsigned int alarm(); + extern unsigned int sleep(); + extern int close(); + extern int read(); + extern int write(); + extern int grantpt(); + extern char *ptsname(); + extern int unlockpt(); + extern char *getenv(); + extern short /*pid_t*/ getpid(); + extern void XdmcpWrap(); + #endif + + /* use char * also for __STDC__, the sources want it */ + extern char *malloc(), *realloc(), *calloc(); + + #include + + extern char *sys_errlist[]; + extern int sys_nerr; + + extern void qsort(); + #ifndef ISC40 + extern int _flsbuf(); + extern int _filbuf(); + #endif + extern int ioctl(); + extern int getmsg(); + extern int putmsg(); + + extern unsigned short ntohs(), htons(); + extern unsigned long ntohl(), htonl(); + extern unsigned long inet_addr(); + extern int connect(); + extern int gethostname(); + extern int setsockopt(); + extern int socket(); + extern int writev(); + extern int gettimeofday(); + extern int getsockname(); + + extern _XdmcpAuthSetup(); + extern _XdmcpAuthDoIt(); + + #if defined(ISC202) || defined(ATT) + extern int (*_libX11_stat)(); + extern char (*_libX11_tolower)(); + #endif + + /* Functions with ambiguous names */ + + #ifdef __STDC__ + extern int close(int); + extern void free(void *); + #include + #include + #ifdef SCO + #include + #endif /* SCO */ + extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); + #else + extern int (*_libX11_close)(); + extern void (*_libX11_free)(); + extern int (*_libX11_select)(); + #endif + + #endif + #endif diff -c /dev/null mit/lib/X/jump_funcs:1.1 *** /dev/null Sat Mar 12 00:37:20 1994 --- mit/lib/X/jump_funcs Sat Mar 12 00:37:20 1994 *************** *** 0 **** --- 1,787 ---- + # $XFree86: mit/lib/X/jump_funcs,v 1.1 1993/04/16 14:20:01 dawes Exp $ + # + 00000000 T _XSaveContext libX11 Context + 00000000 T _XFindContext libX11 Context + 00000000 T _XDeleteContext libX11 Context + 00000000 T _XListDepths libX11 Depths + 00000000 T _XrmParseCommand libX11 ParseCmd + 00000000 T _Xpermalloc libX11 Quarks + 00000000 T __XrmInternalStringToQuark libX11 Quarks + 00000000 T _XrmStringToQuark libX11 Quarks + 00000000 T _XrmPermStringToQuark libX11 Quarks + 00000000 T _XrmUniqueQuark libX11 Quarks + 00000000 T _XrmQuarkToString libX11 Quarks + 00000000 T _XAllocColorCells libX11 XAllCells + 00000000 T _XAllocColorPlanes libX11 XAllPlanes + 00000000 T _XAllowEvents libX11 XAllowEv + 00000000 T _XAutoRepeatOn libX11 XAutoRep + 00000000 T _XAutoRepeatOff libX11 XAutoRep + 00000000 T _XSetWindowBackground libX11 XBackgnd + 00000000 T _XSetWindowBorderWidth libX11 XBdrWidth + 00000000 T _XBell libX11 XBell + 00000000 T _XSetWindowBorder libX11 XBorder + 00000000 T _XEnableAccessControl libX11 XChAccCon + 00000000 T _XDisableAccessControl libX11 XChAccCon + 00000000 T _XSetAccessControl libX11 XChAccCon + 00000000 T _XSetCloseDownMode libX11 XChClMode + 00000000 T _XChangeActivePointerGrab libX11 XChActPGb + 00000000 T _XSetWindowColormap libX11 XChCmap + 00000000 T _XChangeGC libX11 XChGC + 00000000 T _XChangeKeyboardControl libX11 XChKeyCon + 00000000 T _XChangePointerControl libX11 XChPntCon + 00000000 T _XChangeProperty libX11 XChProp + 00000000 T _XChangeSaveSet libX11 XChSaveSet + 00000000 T _XAddToSaveSet libX11 XChSaveSet + 00000000 T _XRemoveFromSaveSet libX11 XChSaveSet + 00000000 T _XChangeWindowAttributes libX11 XChWAttrs + 00000000 T _XResizeWindow libX11 XChWindow + 00000000 T _XCheckIfEvent libX11 XChkIfEv + 00000000 T _XCheckMaskEvent libX11 XChkMaskEv + 00000000 T _XCheckWindowEvent libX11 XChkWinEv + 00000000 T _XCheckTypedEvent libX11 XChkTypEv + 00000000 T _XCheckTypedWindowEvent libX11 XChkTypWEv + 00000000 T _XCirculateSubwindows libX11 XCirWin + 00000000 T _XCirculateSubwindowsDown libX11 XCirWinDn + 00000000 T _XCirculateSubwindowsUp libX11 XCirWinUp + 00000000 T _XCloseDisplay libX11 XClDisplay + 00000000 T _XClearWindow libX11 XClear + 00000000 T _XClearArea libX11 XClearArea + 00000000 T _XMoveResizeWindow libX11 XConfWind + 00000000 T __XConnectDisplay libX11 XConnDis + 00000000 T __XDisconnectDisplay libX11 XConnDis + 00000000 T __XWaitForWritable libX11 XConnDis + 00000000 T __XWaitForReadable libX11 XConnDis + 00000000 T __XSendClientPrefix libX11 XConnDis + 00000000 T _XSetAuthorization libX11 XConnDis + 00000000 T _XConvertSelection libX11 XConvSel + 00000000 T _XCopyArea libX11 XCopyArea + 00000000 T _XCopyColormapAndFree libX11 XCopyCmap + 00000000 T _XCopyGC libX11 XCopyGC + 00000000 T _XCopyPlane libX11 XCopyPlane + 00000000 T _XCreateBitmapFromData libX11 XCrBFData + 00000000 T _XCreateColormap libX11 XCrCmap + 00000000 T _XCreatePixmapCursor libX11 XCrCursor + 00000000 T _XCreateGC libX11 XCrGC + 00000000 T __XUpdateGCCache libX11 XCrGC + 00000000 T __XFlushGCCache libX11 XCrGC + 00000000 T _XFlushGC libX11 XCrGC + 00000000 T _XGContextFromGC libX11 XCrGC + 00000000 T _XCreateGlyphCursor libX11 XCrGlCur + 00000000 T _XCreatePixmapFromBitmapData libX11 XCrPFBData + 00000000 T _XCreatePixmap libX11 XCrPixmap + 00000000 T _XCreateSimpleWindow libX11 XCrWindow + 00000000 T _XCreateFontCursor libX11 XCursor + 00000000 T _XDefineCursor libX11 XDefCursor + 00000000 T _XDeleteProperty libX11 XDelProp + 00000000 T _XDestroySubwindows libX11 XDestSubs + 00000000 T _XDestroyWindow libX11 XDestWind + 00000000 T _XDisplayName libX11 XDisName + 00000000 T _XDrawArc libX11 XDrArc + 00000000 T _XDrawArcs libX11 XDrArcs + 00000000 T _XDrawLine libX11 XDrLine + 00000000 T _XDrawLines libX11 XDrLines + 00000000 T _XDrawPoint libX11 XDrPoint + 00000000 T _XDrawPoints libX11 XDrPoints + 00000000 T _XDrawRectangle libX11 XDrRect + 00000000 T _XDrawRectangles libX11 XDrRects + 00000000 T _XDrawSegments libX11 XDrSegs + 00000000 T _XGetErrorText libX11 XErrDes + 00000000 T _XGetErrorDatabaseText libX11 XErrDes + 00000000 T _XSetErrorHandler libX11 XErrHndlr + 00000000 T _XSetIOErrorHandler libX11 XErrHndlr + 00000000 T __XEventToWire libX11 XEvToWire + 00000000 T _XFetchName libX11 XFetchName + 00000000 T _XGetIconName libX11 XFetchName + 00000000 T _XFillArc libX11 XFillArc + 00000000 T _XFillArcs libX11 XFillArcs + 00000000 T _XFillPolygon libX11 XFillPoly + 00000000 T _XFillRectangle libX11 XFillRect + 00000000 T _XFillRectangles libX11 XFillRects + 00000000 T _XFlush libX11 XFlush + 00000000 T _XLoadQueryFont libX11 XFont + 00000000 T _XFreeFont libX11 XFont + 00000000 T _XQueryFont libX11 XFont + 00000000 T _XListFonts libX11 XFontNames + 00000000 T _XFreeFontNames libX11 XFontNames + 00000000 T _XListFontsWithInfo libX11 XFontInfo + 00000000 T _XFreeFontInfo libX11 XFontInfo + 00000000 T _XFreeColormap libX11 XFreeCmap + 00000000 T _XFreeColors libX11 XFreeCols + 00000000 T _XFreeCursor libX11 XFreeCurs + 00000000 T __XFreeExtData libX11 XFreeEData + 00000000 T _XFreeGC libX11 XFreeGC + 00000000 T _XFreePixmap libX11 XFreePix + 00000000 T _XActivateScreenSaver libX11 XFSSaver + 00000000 T _XResetScreenSaver libX11 XFSSaver + 00000000 T _XForceScreenSaver libX11 XFSSaver + 00000000 T _XSetArcMode libX11 XGCMisc + 00000000 T _XSetFillRule libX11 XGCMisc + 00000000 T _XSetFillStyle libX11 XGCMisc + 00000000 T _XSetGraphicsExposures libX11 XGCMisc + 00000000 T _XSetSubwindowMode libX11 XGCMisc + 00000000 T _XGeometry libX11 XGeom + 00000000 T _XGetAtomName libX11 XGetAtomNm + 00000000 T _XAllocNamedColor libX11 XGetColor + 00000000 T _XGetDefault libX11 XGetDflt + 00000000 T _XGetFontPath libX11 XGetFPath + 00000000 T _XFreeFontPath libX11 XGetFPath + 00000000 T _XGetFontProperty libX11 XGetFProp + 00000000 T _XGetGeometry libX11 XGetGeom + 00000000 T _XAllocColor libX11 XGetHColor + 00000000 T _XGetSizeHints libX11 XGetHints + 00000000 T _XGetWMHints libX11 XGetHints + 00000000 T _XGetZoomHints libX11 XGetHints + 00000000 T _XGetNormalHints libX11 XGetHints + 00000000 T _XGetIconSizes libX11 XGetHints + 00000000 T _XGetCommand libX11 XGetHints + 00000000 T _XGetTransientForHint libX11 XGetHints + 00000000 T _XGetClassHint libX11 XGetHints + 00000000 T _XGetInputFocus libX11 XGetIFocus + 00000000 T _XGetImage libX11 XGetImage + 00000000 T _XGetSubImage libX11 XGetImage + 00000000 T _XGetKeyboardControl libX11 XGetKCnt + 00000000 T _XGetMotionEvents libX11 XGetMoEv + 00000000 T _XGetPointerControl libX11 XGetPCnt + 00000000 T _XGetPointerMapping libX11 XGetPntMap + 00000000 T _XGetKeyboardMapping libX11 XGetPntMap + 00000000 T _XGetWindowProperty libX11 XGetProp + 00000000 T _XGetSelectionOwner libX11 XGetSOwner + 00000000 T _XGetScreenSaver libX11 XGetSSaver + 00000000 T _XGetStandardColormap libX11 XGetStCmap + 00000000 T _XGetWindowAttributes libX11 XGetWAttrs + 00000000 T _XGrabButton libX11 XGrButton + 00000000 T _XGrabKey libX11 XGrKey + 00000000 T _XGrabKeyboard libX11 XGrKeybd + 00000000 T _XGrabPointer libX11 XGrPointer + 00000000 T _XGrabServer libX11 XGrServer + 00000000 T _XAddHost libX11 XHost + 00000000 T _XRemoveHost libX11 XHost + 00000000 T _XAddHosts libX11 XHost + 00000000 T _XRemoveHosts libX11 XHost + 00000000 T _XIfEvent libX11 XIfEvent + 00000000 T __XGetScanlinePad libX11 XImUtil + 00000000 T __XGetBitsPerPixel libX11 XImUtil + 00000000 T _XCreateImage libX11 XImUtil + 00000000 T __XSetImage libX11 XImUtil + 00000000 T __XInitImageFuncPtrs libX11 XImUtil + 00000000 T _XDrawImageString libX11 XImText + 00000000 T _XDrawImageString16 libX11 XImText16 + 00000000 T _XInitExtension libX11 XInitExt + 00000000 T _XAddExtension libX11 XInitExt + 00000000 T _XEHeadOfExtensionList libX11 XInitExt + 00000000 T _XAddToExtensionList libX11 XInitExt + 00000000 T _XFindOnExtensionList libX11 XInitExt + 00000000 T _XESetCreateGC libX11 XInitExt + 00000000 T _XESetCopyGC libX11 XInitExt + 00000000 T _XESetFlushGC libX11 XInitExt + 00000000 T _XESetFreeGC libX11 XInitExt + 00000000 T _XESetCreateFont libX11 XInitExt + 00000000 T _XESetFreeFont libX11 XInitExt + 00000000 T _XESetCloseDisplay libX11 XInitExt + 00000000 T _XESetWireToEvent libX11 XInitExt + 00000000 T _XESetEventToWire libX11 XInitExt + 00000000 T _XESetWireToError libX11 XInitExt + 00000000 T _XESetError libX11 XInitExt + 00000000 T _XESetErrorString libX11 XInitExt + 00000000 T _XESetPrintErrorValues libX11 XInitExt + 00000000 T _XInstallColormap libX11 XInsCmap + 00000000 T _XInternAtom libX11 XIntAtom + 00000000 T _XKeycodeToKeysym libX11 XKeyBind + 00000000 T _XKeysymToKeycode libX11 XKeyBind + 00000000 T _XLookupKeysym libX11 XKeyBind + 00000000 T _XRefreshKeyboardMapping libX11 XKeyBind + 00000000 T _XLookupString libX11 XKeyBind + 00000000 T _XRebindKeysym libX11 XKeyBind + 00000000 T _XKeysymToString libX11 XKeysymStr + 00000000 T _XKillClient libX11 XKillCl + 00000000 T _XListHosts libX11 XLiHosts + 00000000 T _XListInstalledColormaps libX11 XLiICmaps + 00000000 T _XListProperties libX11 XLiProps + 00000000 T _XListExtensions libX11 XListExt + 00000000 T _XFreeExtensionList libX11 XListExt + 00000000 T _XLoadFont libX11 XLoadFont + 00000000 T _XLookupColor libX11 XLookupCol + 00000000 T _XLowerWindow libX11 XLowerWin + 00000000 T _XConnectionNumber libX11 XMacros + 00000000 T _XRootWindow libX11 XMacros + 00000000 T _XDefaultScreen libX11 XMacros + 00000000 T _XDefaultRootWindow libX11 XMacros + 00000000 T _XDefaultVisual libX11 XMacros + 00000000 T _XDefaultGC libX11 XMacros + 00000000 T _XBlackPixel libX11 XMacros + 00000000 T _XWhitePixel libX11 XMacros + 00000000 T _XAllPlanes libX11 XMacros + 00000000 T _XQLength libX11 XMacros + 00000000 T _XDisplayWidth libX11 XMacros + 00000000 T _XDisplayHeight libX11 XMacros + 00000000 T _XDisplayWidthMM libX11 XMacros + 00000000 T _XDisplayHeightMM libX11 XMacros + 00000000 T _XDisplayPlanes libX11 XMacros + 00000000 T _XDisplayCells libX11 XMacros + 00000000 T _XScreenCount libX11 XMacros + 00000000 T _XServerVendor libX11 XMacros + 00000000 T _XProtocolVersion libX11 XMacros + 00000000 T _XProtocolRevision libX11 XMacros + 00000000 T _XVendorRelease libX11 XMacros + 00000000 T _XDisplayString libX11 XMacros + 00000000 T _XDefaultDepth libX11 XMacros + 00000000 T _XDefaultColormap libX11 XMacros + 00000000 T _XBitmapUnit libX11 XMacros + 00000000 T _XBitmapBitOrder libX11 XMacros + 00000000 T _XBitmapPad libX11 XMacros + 00000000 T _XImageByteOrder libX11 XMacros + 00000000 T _XNextRequest libX11 XMacros + 00000000 T _XLastKnownRequestProcessed libX11 XMacros + 00000000 T _XScreenOfDisplay libX11 XMacros + 00000000 T _XDefaultScreenOfDisplay libX11 XMacros + 00000000 T _XDisplayOfScreen libX11 XMacros + 00000000 T _XRootWindowOfScreen libX11 XMacros + 00000000 T _XBlackPixelOfScreen libX11 XMacros + 00000000 T _XWhitePixelOfScreen libX11 XMacros + 00000000 T _XDefaultColormapOfScreen libX11 XMacros + 00000000 T _XDefaultDepthOfScreen libX11 XMacros + 00000000 T _XDefaultGCOfScreen libX11 XMacros + 00000000 T _XDefaultVisualOfScreen libX11 XMacros + 00000000 T _XWidthOfScreen libX11 XMacros + 00000000 T _XHeightOfScreen libX11 XMacros + 00000000 T _XWidthMMOfScreen libX11 XMacros + 00000000 T _XHeightMMOfScreen libX11 XMacros + 00000000 T _XPlanesOfScreen libX11 XMacros + 00000000 T _XCellsOfScreen libX11 XMacros + 00000000 T _XMinCmapsOfScreen libX11 XMacros + 00000000 T _XMaxCmapsOfScreen libX11 XMacros + 00000000 T _XDoesSaveUnders libX11 XMacros + 00000000 T _XDoesBackingStore libX11 XMacros + 00000000 T _XEventMaskOfScreen libX11 XMacros + 00000000 T _XScreenNumberOfScreen libX11 XMacros + 00000000 T _XDestroyImage libX11 XMacros + 00000000 T _XGetPixel libX11 XMacros + 00000000 T _XPutPixel libX11 XMacros + 00000000 T _XSubImage libX11 XMacros + 00000000 T _XAddPixel libX11 XMacros + 00000000 T _XNoOp libX11 XMacros + 00000000 T _XMapRaised libX11 XMapRaised + 00000000 T _XMapSubwindows libX11 XMapSubs + 00000000 T _XMapWindow libX11 XMapWindow + 00000000 T _XMaskEvent libX11 XMaskEvent + 00000000 T _XMaxRequestSize libX11 XMisc + 00000000 T _XResourceManagerString libX11 XMisc + 00000000 T _XDisplayMotionBufferSize libX11 XMisc + 00000000 T _XDisplayKeycodes libX11 XMisc + 00000000 T _XVisualIDFromVisual libX11 XMisc + 00000000 T _XGetModifierMapping libX11 XModMap + 00000000 T _XSetModifierMapping libX11 XModMap + 00000000 T _XNewModifiermap libX11 XModMap + 00000000 T _XFreeModifiermap libX11 XModMap + 00000000 T _XInsertModifiermapEntry libX11 XModMap + 00000000 T _XDeleteModifiermapEntry libX11 XModMap + 00000000 T _XMoveWindow libX11 XMoveWin + 00000000 T _XNextEvent libX11 XNextEvent + 00000000 T _XOpenDisplay libX11 XOpenDis + 00000000 T __XFreeDisplayStructure libX11 XOpenDis + 00000000 T _XParseColor libX11 XParseCol + 00000000 T _XParseGeometry libX11 XParseGeom + 00000000 T _XPeekEvent libX11 XPeekEvent + 00000000 T _XPeekIfEvent libX11 XPeekIfEv + 00000000 T _XEventsQueued libX11 XPending + 00000000 T _XPending libX11 XPending + 00000000 T _XSetWindowBackgroundPixmap libX11 XPmapBgnd + 00000000 T _XSetWindowBorderPixmap libX11 XPmapBord + 00000000 T _XPolygonRegion libX11 XPolyReg + 00000000 T _XDrawText libX11 XPolyTxt + 00000000 T _XDrawText16 libX11 XPolyTxt16 + 00000000 T _XPutBackEvent libX11 XPutBEvent + 00000000 T __XReverse_Bytes libX11 XPutImage + 00000000 T _XPutImage libX11 XPutImage + 00000000 T _XQueryBestSize libX11 XQuBest + 00000000 T _XQueryColor libX11 XQuColor + 00000000 T _XQueryColors libX11 XQuColors + 00000000 T _XQueryBestCursor libX11 XQuCurShp + 00000000 T _XQueryExtension libX11 XQuExt + 00000000 T _XQueryKeymap libX11 XQuKeybd + 00000000 T _XQueryPointer libX11 XQuPntr + 00000000 T _XQueryBestStipple libX11 XQuStipShp + 00000000 T _XQueryTextExtents16 libX11 XQuTextE16 + 00000000 T _XQueryTextExtents libX11 XQuTextExt + 00000000 T _XQueryBestTile libX11 XQuTileShp + 00000000 T _XQueryTree libX11 XQuTree + 00000000 T _XRaiseWindow libX11 XRaiseWin + 00000000 T _XReadBitmapFile libX11 XRdBitF + 00000000 T _XRecolorCursor libX11 XRecolorC + 00000000 T _XConfigureWindow libX11 XReconfWin + 00000000 T _XCreateRegion libX11 XRegion + 00000000 T _XClipBox libX11 XRegion + 00000000 T _XUnionRectWithRegion libX11 XRegion + 00000000 T _XSetRegion libX11 XRegion + 00000000 T _XDestroyRegion libX11 XRegion + 00000000 T _XOffsetRegion libX11 XRegion + 00000000 T _XShrinkRegion libX11 XRegion + 00000000 T _XIntersectRegion libX11 XRegion + 00000000 T _XUnionRegion libX11 XRegion + 00000000 T _XSubtractRegion libX11 XRegion + 00000000 T _XXorRegion libX11 XRegion + 00000000 T _XEmptyRegion libX11 XRegion + 00000000 T _XEqualRegion libX11 XRegion + 00000000 T _XPointInRegion libX11 XRegion + 00000000 T _XRectInRegion libX11 XRegion + 00000000 T _XReparentWindow libX11 XRepWindow + 00000000 T _XRestackWindows libX11 XRestackWs + 00000000 T _XRotateWindowProperties libX11 XRotProp + 00000000 T _XScreenResourceString libX11 XScrResStr + 00000000 T _XSelectInput libX11 XSelInput + 00000000 T _XSendEvent libX11 XSendEvent + 00000000 T _XSetBackground libX11 XSetBack + 00000000 T _XSetClipRectangles libX11 XSetCRects + 00000000 T __XSetClipRectangles libX11 XSetCRects + 00000000 T _XSetClipMask libX11 XSetClMask + 00000000 T _XSetClipOrigin libX11 XSetClOrig + 00000000 T _XSetDashes libX11 XSetDashes + 00000000 T _XSetFontPath libX11 XSetFPath + 00000000 T _XSetFont libX11 XSetFont + 00000000 T _XSetForeground libX11 XSetFore + 00000000 T _XSetFunction libX11 XSetFunc + 00000000 T _XSetSizeHints libX11 XSetHints + 00000000 T _XSetWMHints libX11 XSetHints + 00000000 T _XSetZoomHints libX11 XSetHints + 00000000 T _XSetNormalHints libX11 XSetHints + 00000000 T _XSetIconSizes libX11 XSetHints + 00000000 T _XSetCommand libX11 XSetHints + 00000000 T _XSetStandardProperties libX11 XSetHints + 00000000 T _XSetTransientForHint libX11 XSetHints + 00000000 T _XSetClassHint libX11 XSetHints + 00000000 T _XSetInputFocus libX11 XSetIFocus + 00000000 T _XSetLineAttributes libX11 XSetLStyle + 00000000 T _XSetPlaneMask libX11 XSetPMask + 00000000 T _XSetPointerMapping libX11 XSetPntMap + 00000000 T _XChangeKeyboardMapping libX11 XSetPntMap + 00000000 T _XSetSelectionOwner libX11 XSetSOwner + 00000000 T _XSetScreenSaver libX11 XSetSSaver + 00000000 T _XSetState libX11 XSetState + 00000000 T _XSetStipple libX11 XSetStip + 00000000 T _XSetStandardColormap libX11 XSetStCmap + 00000000 T _XSetTile libX11 XSetTile + 00000000 T _XSetTSOrigin libX11 XSetTSOrig + 00000000 T _XRotateBuffers libX11 XStBytes + 00000000 T _XFetchBuffer libX11 XStBytes + 00000000 T _XFetchBytes libX11 XStBytes + 00000000 T _XStoreBuffer libX11 XStBytes + 00000000 T _XStoreBytes libX11 XStBytes + 00000000 T _XStoreColor libX11 XStColor + 00000000 T _XStoreColors libX11 XStColors + 00000000 T _XStoreNamedColor libX11 XStNColor + 00000000 T _XStoreName libX11 XStName + 00000000 T _XSetIconName libX11 XStName + 00000000 T __XInitKeysymDB libX11 XStrKeysym + 00000000 T _XStringToKeysym libX11 XStrKeysym + 00000000 T _XSync libX11 XSync + 00000000 T __XSyncFunction libX11 XSynchro + 00000000 T _XSynchronize libX11 XSynchro + 00000000 T _XSetAfterFunction libX11 XSynchro + 00000000 T _XDrawString libX11 XText + 00000000 T _XDrawString16 libX11 XText16 + 00000000 T _XTextExtents libX11 XTextExt + 00000000 T _XTextWidth libX11 XTextExt + 00000000 T _XTextExtents16 libX11 XTextExt16 + 00000000 T _XTextWidth16 libX11 XTextExt16 + 00000000 T _XTranslateCoordinates libX11 XTrCoords + 00000000 T _XUndefineCursor libX11 XUndefCurs + 00000000 T _XUngrabButton libX11 XUngrabBut + 00000000 T _XUngrabKeyboard libX11 XUngrabKbd + 00000000 T _XUngrabKey libX11 XUngrabKey + 00000000 T _XUngrabPointer libX11 XUngrabPtr + 00000000 T _XUngrabServer libX11 XUngrabSvr + 00000000 T _XUninstallColormap libX11 XUninsCmap + 00000000 T _XUnloadFont libX11 XUnldFont + 00000000 T _XUnmapSubwindows libX11 XUnmapSubs + 00000000 T _XUnmapWindow libX11 XUnmapWin + 00000000 T _XGetVisualInfo libX11 XVisUtil + 00000000 T _XMatchVisualInfo libX11 XVisUtil + 00000000 T _XWarpPointer libX11 XWarpPtr + 00000000 T _XWindowEvent libX11 XWinEvent + 00000000 T _XCreateWindow libX11 XWindow + 00000000 T __XProcessWindowAttributes libX11 XWindow + 00000000 T _XWriteBitmapFile libX11 XWrBitF + 00000000 T __XFlush libX11 XlibInt + 00000000 T __XEventsQueued libX11 XlibInt + 00000000 T __XReadEvents libX11 XlibInt + 00000000 T __XRead libX11 XlibInt + 00000000 T __XReadPad libX11 XlibInt + 00000000 T __XSend libX11 XlibInt + 00000000 T __XAllocID libX11 XlibInt + 00000000 T __XSetLastRequestRead libX11 XlibInt + 00000000 T __XReply libX11 XlibInt + 00000000 T __XEatData libX11 XlibInt + 00000000 T __XEnq libX11 XlibInt + 00000000 T __XUnknownWireEvent libX11 XlibInt + 00000000 T __XUnknownNativeEvent libX11 XlibInt + 00000000 T __XWireToEvent libX11 XlibInt + 00000000 T __XDefaultIOError libX11 XlibInt + 00000000 T __XDefaultError libX11 XlibInt + 00000000 T __XDefaultWireError libX11 XlibInt + 00000000 T __XError libX11 XlibInt + 00000000 T __XIOError libX11 XlibInt + 00000000 T __XAllocScratch libX11 XlibInt + 00000000 T __XVIDtoVisual libX11 XlibInt + 00000000 T _XFree libX11 XlibInt + 00000000 T __XFreeQ libX11 XlibInt + 00000000 T __XGetHostname libX11 XlibInt + 00000000 T __XScreenOfWindow libX11 XlibInt + 00000000 T __XANYSET libX11 XlibInt + 00000000 T _XrmInitialize libX11 Xrm + 00000000 T _XrmGetDatabase libX11 Xrm + 00000000 T _XrmSetDatabase libX11 Xrm + 00000000 T _XrmStringToQuarkList libX11 Xrm + 00000000 T _XrmStringToBindingQuarkList libX11 Xrm + 00000000 T _XrmCombineDatabase libX11 Xrm + 00000000 T _XrmMergeDatabases libX11 Xrm + 00000000 T _XrmQPutResource libX11 Xrm + 00000000 T _XrmPutResource libX11 Xrm + 00000000 T _XrmQPutStringResource libX11 Xrm + 00000000 T _XrmPutStringResource libX11 Xrm + 00000000 T _XrmPutLineResource libX11 Xrm + 00000000 T _XrmGetStringDatabase libX11 Xrm + 00000000 T _XrmGetFileDatabase libX11 Xrm + 00000000 T _XrmCombineFileDatabase libX11 Xrm + 00000000 T _XrmEnumerateDatabase libX11 Xrm + 00000000 T _XrmPutFileDatabase libX11 Xrm + 00000000 T _XrmQGetSearchList libX11 Xrm + 00000000 T _XrmQGetSearchResource libX11 Xrm + 00000000 T _XrmQGetResource libX11 Xrm + 00000000 T _XrmGetResource libX11 Xrm + 00000000 T _XrmLocaleOfDatabase libX11 Xrm + 00000000 T _XrmDestroyDatabase libX11 Xrm + 00000000 T _XGetGCValues libX11 GetGCVals + 00000000 T _XGetWMSizeHints libX11 GetNrmHint + 00000000 T _XGetWMNormalHints libX11 GetNrmHint + 00000000 T _XGetRGBColormaps libX11 GetRGBCMap + 00000000 T _XGetTextProperty libX11 GetTxtProp + 00000000 T _XGetWMName libX11 GetTxtProp + 00000000 T _XGetWMIconName libX11 GetTxtProp + 00000000 T _XGetWMClientMachine libX11 GetTxtProp + 00000000 T _XGetWMColormapWindows libX11 GetWMCMapW + 00000000 T _XGetWMProtocols libX11 GetWMProto + 00000000 T _XIconifyWindow libX11 Iconify + 00000000 T _XListPixmapFormats libX11 PixFormats + 00000000 T _XAllocSizeHints libX11 PropAlloc + 00000000 T _XAllocStandardColormap libX11 PropAlloc + 00000000 T _XAllocWMHints libX11 PropAlloc + 00000000 T _XAllocClassHint libX11 PropAlloc + 00000000 T _XAllocIconSize libX11 PropAlloc + 00000000 T _XReconfigureWMWindow libX11 ReconfWM + 00000000 T _XSetWMSizeHints libX11 SetNrmHint + 00000000 T _XSetWMNormalHints libX11 SetNrmHint + 00000000 T _XSetRGBColormaps libX11 SetRGBCMap + 00000000 T _XSetTextProperty libX11 SetTxtProp + 00000000 T _XSetWMName libX11 SetTxtProp + 00000000 T _XSetWMIconName libX11 SetTxtProp + 00000000 T _XSetWMClientMachine libX11 SetTxtProp + 00000000 T _XSetWMColormapWindows libX11 SetWMCMapW + 00000000 T _XSetWMProperties libX11 SetWMProps + 00000000 T _XSetWMProtocols libX11 SetWMProto + 00000000 T _XStringListToTextProperty libX11 StrToText + 00000000 T _XTextPropertyToStringList libX11 TextToStr + 00000000 T _XFreeStringList libX11 TextToStr + 00000000 T _XWMGeometry libX11 WMGeom + 00000000 T _XWithdrawWindow libX11 Withdraw + 00000000 T _XauDisposeAuth libX11 AuDispose + 00000000 T _XauGetBestAuthByAddr libX11 AuGetBest + 00000000 T _XauFileName libX11 AuFileName + 00000000 T _XauReadAuth libX11 AuRead + 00000000 T _XcmsCIELab_ValidSpec libX11 CIELab + 00000000 T _XcmsCIELabToCIEXYZ libX11 CIELab + 00000000 T _XcmsCIEXYZToCIELab libX11 CIELab + 00000000 T _XcmsCIELabClipab libX11 CIELabGcC + 00000000 T _XcmsCIELabClipL libX11 CIELabGcL + 00000000 T _XcmsCIELabClipLab libX11 CIELabGcLC + 00000000 T _XcmsCIELabQueryMinL libX11 CIELabMnL + 00000000 T _XcmsCIELabQueryMaxC libX11 CIELabMxC + 00000000 T _XcmsCIELabQueryMaxL libX11 CIELabMxL + 00000000 T __XcmsCIELabQueryMaxLCRGB libX11 CIELabMxLC + 00000000 T _XcmsCIELabQueryMaxLC libX11 CIELabMxLC + 00000000 T _XcmsCIELabWhiteShiftColors libX11 CIELabWpAj + 00000000 T _XcmsCIELuv_ValidSpec libX11 CIELuv + 00000000 T _XcmsCIELuvToCIEuvY libX11 CIELuv + 00000000 T _XcmsCIEuvYToCIELuv libX11 CIELuv + 00000000 T _XcmsCIELuvClipuv libX11 CIELuvGcC + 00000000 T _XcmsCIELuvClipL libX11 CIELuvGcL + 00000000 T _XcmsCIELuvClipLuv libX11 CIELuvGcLC + 00000000 T _XcmsCIELuvQueryMinL libX11 CIELuvMnL + 00000000 T _XcmsCIELuvQueryMaxC libX11 CIELuvMxC + 00000000 T _XcmsCIELuvQueryMaxL libX11 CIELuvMxL + 00000000 T __XcmsCIELuvQueryMaxLCRGB libX11 CIELuvMxLC + 00000000 T _XcmsCIELuvQueryMaxLC libX11 CIELuvMxLC + 00000000 T _XcmsCIELuvWhiteShiftColors libX11 CIELuvWpAj + 00000000 T _XcmsCIEXYZ_ValidSpec libX11 CIEXYZ + 00000000 T _XcmsCIEuvY_ValidSpec libX11 CIEuvY + 00000000 T _XcmsCIEuvYToCIEXYZ libX11 CIEuvY + 00000000 T _XcmsCIEXYZToCIEuvY libX11 CIEuvY + 00000000 T _XcmsCIExyY_ValidSpec libX11 CIExyY + 00000000 T _XcmsCIExyYToCIEXYZ libX11 CIExyY + 00000000 T _XcmsCIEXYZToCIExyY libX11 CIExyY + 00000000 T _XcmsTekHVC_ValidSpec libX11 TekHVC + 00000000 T _XcmsTekHVCToCIEuvY libX11 TekHVC + 00000000 T _XcmsCIEuvYToTekHVC libX11 TekHVC + 00000000 T __XcmsTekHVC_CheckModify libX11 TekHVC + 00000000 T _XcmsTekHVCClipC libX11 TekHVCGcC + 00000000 T _XcmsTekHVCClipV libX11 TekHVCGcV + 00000000 T _XcmsTekHVCClipVC libX11 TekHVCGcVC + 00000000 T _XcmsTekHVCQueryMinV libX11 TekHVCMnV + 00000000 T _XcmsTekHVCQueryMaxC libX11 TekHVCMxC + 00000000 T _XcmsTekHVCQueryMaxV libX11 TekHVCMxV + 00000000 T __XcmsTekHVCQueryMaxVCRGB libX11 TekHVCMxVC + 00000000 T _XcmsTekHVCQueryMaxVC libX11 TekHVCMxVC + 00000000 T _XcmsTekHVCQueryMaxVSamples libX11 TekHVCMxVs + 00000000 T _XcmsTekHVCWhiteShiftColors libX11 TekHVCWpAj + 00000000 T _XcmsAddColorSpace libX11 XcmsAddDIC + 00000000 T _XcmsAddFunctionSet libX11 XcmsAddSF + 00000000 T _XcmsAllocNamedColor libX11 XcmsAlNCol + 00000000 T _XcmsAllocColor libX11 XcmsAllCol + 00000000 T _XcmsCreateCCC libX11 XcmsCCC + 00000000 T _XcmsDefaultCCC libX11 XcmsCCC + 00000000 T _XcmsFreeCCC libX11 XcmsCCC + 00000000 T __XcmsAddCmapRec libX11 XcmsCmap + 00000000 T __XcmsCopyCmapRecAndFree libX11 XcmsCmap + 00000000 T __XcmsDeleteCmapRec libX11 XcmsCmap + 00000000 T _XcmsCCCOfColormap libX11 XcmsCmap + 00000000 T _XcmsFreeColorDB libX11 XcmsColNm + 00000000 T __XcmsCopyISOLatin1Lowered libX11 XcmsColNm + 00000000 T __XcmsResolveColorString libX11 XcmsColNm + 00000000 T __XcmsConvertColorsWithWhitePt libX11 XcmsCvColW + 00000000 T __XcmsEqualWhitePts libX11 XcmsCvCols + 00000000 T __XcmsDIConvertColors libX11 XcmsCvCols + 00000000 T __XcmsDDConvertColors libX11 XcmsCvCols + 00000000 T _XcmsConvertColors libX11 XcmsCvCols + 00000000 T __XcmsRegFormatOfPrefix libX11 XcmsCvCols + 00000000 T _XcmsFormatOfPrefix libX11 XcmsIdOfPr + 00000000 T __XcmsCopyPointerArray libX11 XcmsInt + 00000000 T __XcmsFreePointerArray libX11 XcmsInt + 00000000 T __XcmsPushPointerArray libX11 XcmsInt + 00000000 T __XcmsInitDefaultCCCs libX11 XcmsInt + 00000000 T __XcmsInitScrnInfo libX11 XcmsInt + 00000000 T __XcmsFreeIntensityMaps libX11 XcmsInt + 00000000 T __XcmsGetIntensityMap libX11 XcmsInt + 00000000 T __XcmsGetTableType0 libX11 XcmsLRGB + 00000000 T __XcmsGetTableType1 libX11 XcmsLRGB + 00000000 T __XcmsValueCmp libX11 XcmsLRGB + 00000000 T __XcmsIntensityCmp libX11 XcmsLRGB + 00000000 T __XcmsValueInterpolation libX11 XcmsLRGB + 00000000 T __XcmsIntensityInterpolation libX11 XcmsLRGB + 00000000 T __XcmsTableSearch libX11 XcmsLRGB + 00000000 T __XcmsMatVec libX11 XcmsLRGB + 00000000 T _XcmsLRGB_RGB_ParseString libX11 XcmsLRGB + 00000000 T _XcmsLRGB_RGBi_ParseString libX11 XcmsLRGB + 00000000 T _XcmsCIEXYZToRGBi libX11 XcmsLRGB + 00000000 T _XcmsRGBiToCIEXYZ libX11 XcmsLRGB + 00000000 T _XcmsRGBiToRGB libX11 XcmsLRGB + 00000000 T _XcmsRGBToRGBi libX11 XcmsLRGB + 00000000 T __XcmsLRGB_InitScrnDefault libX11 XcmsLRGB + 00000000 T _XcmsLookupColor libX11 XcmsLkCol + 00000000 T __XcmsCubeRoot libX11 XcmsMath + 00000000 T __XcmsSquareRoot libX11 XcmsMath + 00000000 T _XcmsDisplayOfCCC libX11 XcmsOfCCC + 00000000 T _XcmsVisualOfCCC libX11 XcmsOfCCC + 00000000 T _XcmsScreenNumberOfCCC libX11 XcmsOfCCC + 00000000 T _XcmsScreenWhitePointOfCCC libX11 XcmsOfCCC + 00000000 T _XcmsClientWhitePointOfCCC libX11 XcmsOfCCC + 00000000 T _XcmsPrefixOfFormat libX11 XcmsPrOfId + 00000000 T __XcmsGetElement libX11 XcmsProp + 00000000 T __XcmsGetProperty libX11 XcmsProp + 00000000 T _XcmsQueryBlack libX11 XcmsQBlack + 00000000 T _XcmsQueryBlue libX11 XcmsQBlue + 00000000 T _XcmsQueryGreen libX11 XcmsQGreen + 00000000 T _XcmsQueryRed libX11 XcmsQRed + 00000000 T _XcmsQueryWhite libX11 XcmsQWhite + 00000000 T _XcmsQueryColor libX11 XcmsQuCol + 00000000 T _XcmsQueryColors libX11 XcmsQuCols + 00000000 T _XcmsSetWhitePoint libX11 XcmsSetCCC + 00000000 T _XcmsSetCompressionProc libX11 XcmsSetCCC + 00000000 T _XcmsSetWhiteAdjustProc libX11 XcmsSetCCC + 00000000 T __XcmsSetGetColors libX11 XcmsSetGet + 00000000 T _XcmsStoreColor libX11 XcmsStCol + 00000000 T _XcmsStoreColors libX11 XcmsStCols + 00000000 T __XcmsCosine libX11 XcmsTrig + 00000000 T __XcmsSine libX11 XcmsTrig + 00000000 T __XcmsArcTangent libX11 XcmsTrig + 00000000 T __XcmsRGB_to_XColor libX11 XcmsXRGB + 00000000 T __XColor_to_XcmsRGB libX11 XcmsXRGB + 00000000 T __XcmsResolveColor libX11 XcmsXRGB + 00000000 T __XcmsUnresolveColor libX11 XcmsXRGB + 00000000 T __XUnresolveColor libX11 XcmsXRGB + 00000000 T __XParseBaseFontNameList libX11 XFSWrap + 00000000 T _XCreateFontSet libX11 XFSWrap + 00000000 T _XFontsOfFontSet libX11 XFSWrap + 00000000 T _XBaseFontNameListOfFontSet libX11 XFSWrap + 00000000 T _XLocaleOfFontSet libX11 XFSWrap + 00000000 T _XContextDependentDrawing libX11 XFSWrap + 00000000 T _XExtentsOfFontSet libX11 XFSWrap + 00000000 T _XFreeFontSet libX11 XFSWrap + 00000000 T _XVaCreateNestedList libX11 XICWrap + 00000000 T _XGetIMValues libX11 XICWrap + 00000000 T _XCreateIC libX11 XICWrap + 00000000 T _XDestroyIC libX11 XICWrap + 00000000 T _XGetICValues libX11 XICWrap + 00000000 T _XSetICValues libX11 XICWrap + 00000000 T _XSetICFocus libX11 XICWrap + 00000000 T _XUnsetICFocus libX11 XICWrap + 00000000 T _XIMOfIC libX11 XICWrap + 00000000 T _XmbResetIC libX11 XICWrap + 00000000 T _XwcResetIC libX11 XICWrap + 00000000 T _XmbLookupString libX11 XICWrap + 00000000 T _XwcLookupString libX11 XICWrap + 00000000 T __XIMCompileResourceList libX11 XIMWrap + 00000000 T __XCopyToArg libX11 XIMWrap + 00000000 T _XOpenIM libX11 XIMWrap + 00000000 T _XCloseIM libX11 XIMWrap + 00000000 T _XDisplayOfIM libX11 XIMWrap + 00000000 T _XLocaleOfIM libX11 XIMWrap + 00000000 T _XSetLocaleModifiers libX11 XlcWrap + 00000000 T _XSupportsLocale libX11 XlcWrap + 00000000 T __XlcValidModSyntax libX11 XlcWrap + 00000000 T __XlcDefaultMapModifiers libX11 XlcWrap + 00000000 T __XlcAddLoader libX11 XlcWrap + 00000000 T __XlcCurrentLC libX11 XlcWrap + 00000000 T _XmbSetWMProperties libX11 XmbWMProps + 00000000 T _XmbDrawText libX11 XmbWrap + 00000000 T _XmbDrawString libX11 XmbWrap + 00000000 T _XmbDrawImageString libX11 XmbWrap + 00000000 T _XmbTextEscapement libX11 XmbWrap + 00000000 T _XmbTextExtents libX11 XmbWrap + 00000000 T _XmbTextPerCharExtents libX11 XmbWrap + 00000000 T _XwcDrawText libX11 XwcWrap + 00000000 T _XwcDrawString libX11 XwcWrap + 00000000 T _XwcDrawImageString libX11 XwcWrap + 00000000 T _XwcTextEscapement libX11 XwcWrap + 00000000 T _XwcTextExtents libX11 XwcWrap + 00000000 T _XwcTextPerCharExtents libX11 XwcWrap + 00000000 T _XFilterEvent libX11 XFilterEv + 00000000 T __XRegisterFilterByMask libX11 XRegstFlt + 00000000 T __XRegisterFilterByType libX11 XRegstFlt + 00000000 T __XUnregisterFilter libX11 XRegstFlt + 00000000 T __XlcMapOSLocaleName libX11 XSetLocale + 00000000 T __XipSetICFocus libX11 XICFocus + 00000000 T __XipUnsetICFocus libX11 XICFocus + 00000000 T __XipICGetValues libX11 XICGetVal + 00000000 T __XipReceiveICValues libX11 XICGetVal + 00000000 T __XipGetICValues libX11 XICGetVal + 00000000 T __XipCallCallbacks libX11 ProtoFlt + 00000000 T __XipBackEndFilter libX11 ProtoFlt + 00000000 T __XConvertCTToWC libX11 XCnvCTToWC + 00000000 T __XConvertWCToCT libX11 XCnvCTToWC + 00000000 T __XctIsExtendSegment libX11 XCnvCTToWC + 00000000 T __XConvertMBToCT libX11 XCnvMBToCT + 00000000 T __XConvertCTToMB libX11 XCnvMBToCT + 00000000 T __XConvertMBToWC libX11 XCnvWCToMB + 00000000 T __XConvertWCToMB libX11 XCnvWCToMB + 00000000 T _XDefaultString libX11 XCnvToStr + 00000000 T __XConvertWCToString libX11 XCnvToStr + 00000000 T __XConvertMBToString libX11 XCnvToStr + 00000000 T __XipConnectIM libX11 XConnIM + 00000000 T __XipDisconnectIM libX11 XConnIM + 00000000 T __XsiCreateFontSet libX11 XCrFntSet + 00000000 T __XsiQueryFontSetFromId libX11 XCrFntSet + 00000000 T __XipDestroyIC libX11 XCrIC + 00000000 T __XipReadRdb libX11 XCrIC + 00000000 T __XipCreateDefIC libX11 XCrIC + 00000000 T __XipCreateIC libX11 XCrIC + 00000000 T __XipwcResetIC libX11 XCrIC + 00000000 T __XipmbResetIC libX11 XCrIC + 00000000 T __XipGetIMValues libX11 XGetIMVal + 00000000 T __XipICSetAttrValues libX11 XICSetVal + 00000000 T __XipICSetValues libX11 XICSetVal + 00000000 T __XipSendICValues libX11 XICSetVal + 00000000 T __XipSetICValues libX11 XICSetVal + 00000000 T __XipwcLookupString libX11 XIMKeyBind + 00000000 T __XipmbLookupString libX11 XIMKeyBind + 00000000 T __XipctLookupString libX11 XIMKeyBind + 00000000 T __XipSetIOErrorHandler libX11 XIMProto + 00000000 T __XipFlushToIM libX11 XIMProto + 00000000 T __XipWriteToIM libX11 XIMProto + 00000000 T __XipReadFromIM libX11 XIMProto + 00000000 T __XipTypeOfNextICQueue libX11 XIMQueue + 00000000 T __XipStateOfNextICQueue libX11 XIMQueue + 00000000 T __XipKeySymOfNextICQueue libX11 XIMQueue + 00000000 T __XipStringOfNextICQueue libX11 XIMQueue + 00000000 T __XipFreeNextICQueue libX11 XIMQueue + 00000000 T __XipPutICQueue libX11 XIMQueue + 00000000 T __XipGetNextICQueue libX11 XIMQueue + 00000000 T __XipFreeAllICQueue libX11 XIMQueue + 00000000 T __XipSaveOverflowICQueue libX11 XIMQueue + 00000000 T __XipGetOverflowICQueue libX11 XIMQueue + 00000000 T __XInitCTEncoding libX11 XInitCT + 00000000 T __XRegisterCharSet libX11 XInitCT + 00000000 T __XctisGLdsg libX11 XInitCT + 00000000 T __XcwNameGetGLorGRId libX11 XInitCT + 00000000 T __XcwNameGetAll libX11 XInitCT + 00000000 T __XcwEscSetStatus libX11 XInitCT + 00000000 T __XcwGetWoffset libX11 XInitCT + 00000000 T __XcwGetWoffsetFromLocale libX11 XInitCT + 00000000 T __XcwGetAll libX11 XInitCT + 00000000 T __XcwGetLength libX11 XInitCT + 00000000 T __XcwCheckDefaultState libX11 XInitCT + 00000000 T __XcwIdCheck libX11 XInitCT + 00000000 T __XcwIdGetAll libX11 XInitCT + 00000000 T __XcwIdGetLength libX11 XInitCT + 00000000 T __XcwIdGetEncoding libX11 XInitCT + 00000000 T __XcwGetDefaultEncoding libX11 XInitCT + 00000000 T __XcwIdGetWoffset libX11 XInitCT + 00000000 T __XcwIdGetISOState libX11 XInitCT + 00000000 T __XipLocalOpenIM libX11 XLocalIM + 00000000 T __XipLocalCallCallbacks libX11 XLocalIM + 00000000 T __XipLocalBackEndFilter libX11 XLocalIM + 00000000 T __XipLocalDestroyIC libX11 XLocalIM + 00000000 T __XipLocalCreateIC libX11 XLocalIM + 00000000 T __XipLocalwcResetIC libX11 XLocalIM + 00000000 T __XipLocalmbResetIC libX11 XLocalIM + 00000000 T __XipLocalGetIMValues libX11 XLocalIM + 00000000 T __XipLocalSetICFocus libX11 XLocalIM + 00000000 T __XipLocalUnsetICFocus libX11 XLocalIM + 00000000 T __XipLocalGetICValues libX11 XLocalIM + 00000000 T __XipLocalSetICValues libX11 XLocalIM + 00000000 T __XipOpenIM libX11 XOpenIM + 00000000 T __XParseISOEncoding libX11 XParseCT + 00000000 T __Xmbmsbon libX11 XlcAccess + 00000000 T __Xmbctid libX11 XlcAccess + 00000000 T __Xmbctidtocsid libX11 XlcAccess + 00000000 T __Xmbcsid libX11 XlcAccess + 00000000 T __XmbSetCsid libX11 XlcAccess + 00000000 T __XmbctGLorGR libX11 XlcAccess + 00000000 T __Xmbfscs libX11 XlcAccess + 00000000 T __Xmbfsname libX11 XlcAccess + 00000000 T __Xmblen libX11 XlcAccess + 00000000 T __Xmbfslen libX11 XlcAccess + 00000000 T __Xmbctocsc libX11 XlcAccess + 00000000 T __Xcsctombc libX11 XlcAccess + 00000000 T __Xmbdsg libX11 XlcAccess + 00000000 T __Xmbfsdsg libX11 XlcAccess + 00000000 T __Xmbfswf libX11 XlcAccess + 00000000 T __Xmbdlen libX11 XlcAccess + 00000000 T __XmbCheck libX11 XlcAccess + 00000000 T __XmbGetDefaultEncoding libX11 XlcAccess + 00000000 T __XlcDefaultLoader libX11 XlcDefLd + 00000000 T __XlcListLocale libX11 XlcLoad + 00000000 T __XlcMakeLocale libX11 XlcLoad + 00000000 T __XlcDupLocale libX11 XlcLoad + 00000000 T __XFallBackConvert libX11 XlcLoad + 00000000 T __XrmInitParseInfo libX11 XlcLoad + 00000000 T __XmbDecomposeGlyphCharset libX11 XmbDeGlyph + 00000000 T _XmbTextPropertyToTextList libX11 XmbPrpText + 00000000 T __XsimbDrawString libX11 XmbText + 00000000 T __XsimbDrawImageString libX11 XmbText + 00000000 T __Xsimb8DrawString libX11 XmbText + 00000000 T __Xsimb8DrawImageString libX11 XmbText + 00000000 T __XsimbTextEscapement libX11 XmbTextExt + 00000000 T __XsimbTextExtents libX11 XmbTextExt + 00000000 T __Xsimb8TextEscapement libX11 XmbTextExt + 00000000 T __Xsimb8TextExtents libX11 XmbTextExt + 00000000 T __XsimbTextPerCharExtents libX11 XmbTextPer + 00000000 T _XmbTextListToTextProperty libX11 XmbTextPrp + 00000000 T __XwcDecomposeGlyphCharset libX11 XwcDeGlyph + 00000000 T _XwcTextPropertyToTextList libX11 XwcPrpText + 00000000 T _XwcFreeStringList libX11 XwcPrpText + 00000000 T __Xsiwcstombs libX11 XwcText + 00000000 T __XsiwcDrawString libX11 XwcText + 00000000 T __XsiwcDrawImageString libX11 XwcText + 00000000 T __XsiwcTextEscapement libX11 XwcTextExt + 00000000 T __XsiwcTextExtents libX11 XwcTextExt + 00000000 T __XsiwcTextPerCharExtents libX11 XwcTextPer + 00000000 T _XwcTextListToTextProperty libX11 XwcTextPrp diff -c /dev/null mit/lib/X/jump_ignore:1.1 *** /dev/null Sat Mar 12 00:37:21 1994 --- mit/lib/X/jump_ignore Sat Mar 12 00:37:23 1994 *************** *** 0 **** --- 1 ---- + # $XFree86: mit/lib/X/jump_ignore,v 1.1 1993/04/17 02:36:56 dawes Exp $ diff -c /dev/null mit/lib/X/jump_vars:1.1 *** /dev/null Sat Mar 12 00:37:23 1994 --- mit/lib/X/jump_vars Sat Mar 12 00:37:23 1994 *************** *** 0 **** --- 1,36 ---- + # $XFree86: mit/lib/X/jump_vars,v 1.1 1993/04/16 14:20:04 dawes Exp $ + # + 00008000 K __XkeyTable libX11 XStrKeysym + 00000100 K __Xevent_to_mask libX11 evtomask + 00000004 D __qfree libX11 globals + 00000004 D __qfreeFlag libX11 globals + 00000004 D __qfreePtr libX11 globals + 00000004 C __XIOErrorFunction libX11 globals + 00000004 C __XErrorFunction libX11 globals + 00000004 C __Xdebug libX11 globals + 00000004 C __XHeadOfDisplayList libX11 globals + 00000040 D _XcmsCIELabColorSpace libX11 CIELab + 00000040 D _XcmsCIELuvColorSpace libX11 CIELuv + 00000040 D _XcmsCIEXYZColorSpace libX11 CIEXYZ + 00000040 D _XcmsCIEuvYColorSpace libX11 CIEuvY + 00000040 D _XcmsCIExyYColorSpace libX11 CIExyY + 00000040 D _XcmsTekHVCColorSpace libX11 TekHVC + 00000040 D _XcmsUNDEFINEDColorSpace libX11 UNDEFINED + 00000040 D __XcmsDIColorSpacesInit libX11 XcmsGlobls + 00000004 D __XcmsDIColorSpaces libX11 XcmsGlobls + 00000020 D __XcmsDDColorSpacesInit libX11 XcmsGlobls + 00000004 D __XcmsDDColorSpaces libX11 XcmsGlobls + 00000010 D __XcmsSCCFuncSetsInit libX11 XcmsGlobls + 00000004 D __XcmsSCCFuncSets libX11 XcmsGlobls + 00000010 D _XcmsCIEXYZ_prefix libX11 XcmsGlobls + 00000010 D _XcmsCIEuvY_prefix libX11 XcmsGlobls + 00000010 D _XcmsCIExyY_prefix libX11 XcmsGlobls + 00000010 D _XcmsCIELab_prefix libX11 XcmsGlobls + 00000010 D _XcmsCIELuv_prefix libX11 XcmsGlobls + 00000010 D _XcmsTekHVC_prefix libX11 XcmsGlobls + 00000010 D _XcmsRGBi_prefix libX11 XcmsGlobls + 00000010 D _XcmsRGB_prefix libX11 XcmsGlobls + 00000080 D __XcmsRegColorSpaces libX11 XcmsGlobls + 00000040 D _XcmsRGBiColorSpace libX11 XcmsLRGB + 00000040 D _XcmsRGBColorSpace libX11 XcmsLRGB + 00000020 D _XcmsLinearRGBFunctionSet libX11 XcmsLRGB diff -c /dev/null mit/lib/X/libX11.c:1.4 *** /dev/null Sat Mar 12 00:37:23 1994 --- mit/lib/X/libX11.c Sat Mar 12 00:37:24 1994 *************** *** 0 **** --- 1,121 ---- + /* libX11 : libX11.c + * exported data + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived partially from work of Thomas Roell + * + * $XFree86: mit/lib/X/libX11.c,v 1.4 1993/05/22 06:42:58 dawes Exp $ + */ + + #ifdef SVR3SHLIB + + #define VoidInit(var) void *var = 0 + + VoidInit(_libX11__ctype); + VoidInit(_libX11__filbuf); + VoidInit(_libX11__flsbuf); + VoidInit(_libX11__iob); + VoidInit(_libX11_access); + VoidInit(_libX11_alarm); + VoidInit(_libX11_atoi); + VoidInit(_libX11_calloc); + VoidInit(_libX11_close); + VoidInit(_libX11_connect); + VoidInit(_libX11_errno); + VoidInit(_libX11_exit); + VoidInit(_libX11_fclose); + VoidInit(_libX11_fcntl); + VoidInit(_libX11_fgets); + VoidInit(_libX11_fopen); + VoidInit(_libX11_fprintf); + VoidInit(_libX11_fputs); + VoidInit(_libX11_fread); + VoidInit(_libX11_free); + VoidInit(_libX11_fwrite); + VoidInit(_libX11_getenv); + VoidInit(_libX11_gethostbyname); + VoidInit(_libX11_uname); + VoidInit(_libX11_getmsg); + VoidInit(_libX11_getpid); + VoidInit(_libX11_getpwnam); + VoidInit(_libX11_getpwuid); + VoidInit(_libX11_getuid); + VoidInit(_libX11_grantpt); + VoidInit(_libX11_htons); + VoidInit(_libX11_inet_addr); + VoidInit(_libX11_ioctl); + VoidInit(_libX11_malloc); + VoidInit(_libX11_memset); + VoidInit(_libX11_ntohl); + VoidInit(_libX11_ntohs); + VoidInit(_libX11_open); + VoidInit(_libX11_ptsname); + VoidInit(_libX11_putmsg); + VoidInit(_libX11_qsort); + VoidInit(_libX11_read); + VoidInit(_libX11_realloc); + VoidInit(_libX11_rewind); + VoidInit(_libX11_select); + VoidInit(_libX11_setsockopt); + VoidInit(_libX11_signal); + VoidInit(_libX11_sleep); + VoidInit(_libX11_socket); + VoidInit(_libX11_sprintf); + VoidInit(_libX11_sscanf); + VoidInit(_libX11_stat); + VoidInit(_libX11_strcat); + VoidInit(_libX11_strchr); + VoidInit(_libX11_strcmp); + VoidInit(_libX11_strcpy); + VoidInit(_libX11_strncmp); + VoidInit(_libX11_strncpy); + VoidInit(_libX11_strrchr); + VoidInit(_libX11_strtok); + VoidInit(_libX11_sys_errlist); + VoidInit(_libX11_sys_nerr); + VoidInit(_libX11_tolower); + VoidInit(_libX11_unlockpt); + VoidInit(_libX11_write); + VoidInit(_libX11_writev); + VoidInit(_libX11_XauDisposeAuth); + VoidInit(_libX11_XauFileName); + VoidInit(_libX11_XauGetBestAuthByAddr); + VoidInit(_libX11_XauReadAuth); + VoidInit(_libX11__Xevent_to_mask); + VoidInit(_libX11__XdmcpAuthSetup); + VoidInit(_libX11__XdmcpAuthDoIt); + VoidInit(_libX11_XdmcpWrap); + VoidInit(_libX11_getsockname); + VoidInit(_libX11_time); + + + #ifndef __GNUC__ + /* + * If we are working with floating point aritmetic, stock AT&T cc generates + * an unresolved reference to __fltused. But we want to make a shared lib from + * this here and don't want to reference /lib/libc_s.a, just define this sym as + * (shared lib) static. + * The trick is that while building the shared lib all references to this + * symbol are resolved internally. But the symbol will be outside only visible + * as a static one, so preventing a name conflict with other shared libs. + */ + long __fltused = 0; + #endif + + /* A dummy function for free branchtab-slots. + * This would be a great place for an error-check mechanism for shared libs. + * (Print error message if not existent function is called.) + */ + extern void _libX11_dummy(){}; + + #ifndef HASXDMAUTH + extern void _no_des_dummy1(){}; + extern void _no_des_dummy2(){}; + extern void _no_des_dummy3(){}; + #endif + + + #endif + + diff -c /dev/null mit/lib/X/libX11.def:1.6 *** /dev/null Sat Mar 12 00:37:24 1994 --- mit/lib/X/libX11.def Sat Mar 12 00:37:24 1994 *************** *** 0 **** --- 1,1326 ---- + /* libX11 : libX11.def + * shared library description file + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived partially from work of Thomas Roell + * + * $XFree86: mit/lib/X/libX11.def,v 1.6 1993/05/22 06:43:01 dawes Exp $ + */ + + /**/#address .text 0xB0000000 + /**/#address .data 0xB0400000 + + + + /**/#branch + XActivateScreenSaver 1 + XAddExtension 2 + XAddHost 3 + XAddHosts 4 + XAddPixel 5 + XAddToExtensionList 6 + XAddToSaveSet 7 + XAllPlanes 8 + XAllocClassHint 9 + XAllocColor 10 + XAllocColorCells 11 + XAllocColorPlanes 12 + XAllocIconSize 13 + XAllocNamedColor 14 + XAllocSizeHints 15 + XAllocStandardColormap 16 + XAllocWMHints 17 + XAllowEvents 18 + XAutoRepeatOff 19 + XAutoRepeatOn 20 + XBaseFontNameListOfFontSet 21 + XBell 22 + XBitmapBitOrder 23 + XBitmapPad 24 + XBitmapUnit 25 + XBlackPixel 26 + XBlackPixelOfScreen 27 + XCellsOfScreen 28 + XChangeActivePointerGrab 29 + XChangeGC 30 + XChangeKeyboardControl 31 + XChangeKeyboardMapping 32 + XChangePointerControl 33 + XChangeProperty 34 + XChangeSaveSet 35 + XChangeWindowAttributes 36 + XCheckIfEvent 37 + XCheckMaskEvent 38 + XCheckTypedEvent 39 + XCheckTypedWindowEvent 40 + XCheckWindowEvent 41 + XCirculateSubwindows 42 + XCirculateSubwindowsDown 43 + XCirculateSubwindowsUp 44 + XClearArea 45 + XClearWindow 46 + XClipBox 47 + XCloseDisplay 48 + XCloseIM 49 + XConfigureWindow 50 + XConnectionNumber 51 + XContextDependentDrawing 52 + XConvertSelection 53 + XCopyArea 54 + XCopyColormapAndFree 55 + XCopyGC 56 + XCopyPlane 57 + XCreateBitmapFromData 58 + XCreateColormap 59 + XCreateFontCursor 60 + XCreateFontSet 61 + XCreateGC 62 + XCreateGlyphCursor 63 + XCreateIC 64 + XCreateImage 65 + XCreatePixmap 66 + XCreatePixmapCursor 67 + XCreatePixmapFromBitmapData 68 + XCreateRegion 69 + XCreateSimpleWindow 70 + XCreateWindow 71 + XDefaultColormap 72 + XDefaultColormapOfScreen 73 + XDefaultDepth 74 + XDefaultDepthOfScreen 75 + XDefaultGC 76 + XDefaultGCOfScreen 77 + XDefaultRootWindow 78 + XDefaultScreen 79 + XDefaultScreenOfDisplay 80 + XDefaultString 81 + XDefaultVisual 82 + XDefaultVisualOfScreen 83 + XDefineCursor 84 + XDeleteContext 85 + XDeleteModifiermapEntry 86 + XDeleteProperty 87 + XDestroyIC 88 + XDestroyImage 89 + XDestroyRegion 90 + XDestroySubwindows 91 + XDestroyWindow 92 + XDisableAccessControl 93 + XDisplayCells 94 + XDisplayHeight 95 + XDisplayHeightMM 96 + XDisplayKeycodes 97 + XDisplayMotionBufferSize 98 + XDisplayName 99 + XDisplayOfIM 100 + XDisplayOfScreen 101 + XDisplayPlanes 102 + XDisplayString 103 + XDisplayWidth 104 + XDisplayWidthMM 105 + XDoesBackingStore 106 + XDoesSaveUnders 107 + XDrawArc 108 + XDrawArcs 109 + XDrawImageString 110 + XDrawImageString16 111 + XDrawLine 112 + XDrawLines 113 + XDrawPoint 114 + XDrawPoints 115 + XDrawRectangle 116 + XDrawRectangles 117 + XDrawSegments 118 + XDrawString 119 + XDrawString16 120 + XDrawText 121 + XDrawText16 122 + XEHeadOfExtensionList 123 + XESetCloseDisplay 124 + XESetCopyGC 125 + XESetCreateFont 126 + XESetCreateGC 127 + XESetError 128 + XESetErrorString 129 + XESetEventToWire 130 + XESetFlushGC 131 + XESetFreeFont 132 + XESetFreeGC 133 + XESetPrintErrorValues 134 + XESetWireToError 135 + XESetWireToEvent 136 + XEmptyRegion 137 + XEnableAccessControl 138 + XEqualRegion 139 + XEventMaskOfScreen 140 + XEventsQueued 141 + XExtentsOfFontSet 142 + XFetchBuffer 143 + XFetchBytes 144 + XFetchName 145 + XFillArc 146 + XFillArcs 147 + XFillPolygon 148 + XFillRectangle 149 + XFillRectangles 150 + XFilterEvent 151 + XFindContext 152 + XFindOnExtensionList 153 + XFlush 154 + XFlushGC 155 + XFontsOfFontSet 156 + XForceScreenSaver 157 + XFree 158 + XFreeColormap 159 + XFreeColors 160 + XFreeCursor 161 + XFreeExtensionList 162 + XFreeFont 163 + XFreeFontInfo 164 + XFreeFontNames 165 + XFreeFontPath 166 + XFreeFontSet 167 + XFreeGC 168 + XFreeModifiermap 169 + XFreePixmap 170 + XFreeStringList 171 + XGContextFromGC 172 + XGeometry 173 + XGetAtomName 174 + XGetClassHint 175 + XGetCommand 176 + XGetDefault 177 + XGetErrorDatabaseText 178 + XGetErrorText 179 + XGetFontPath 180 + XGetFontProperty 181 + XGetGCValues 182 + XGetGeometry 183 + XGetICValues 184 + XGetIMValues 185 + XGetIconName 186 + XGetIconSizes 187 + XGetImage 188 + XGetInputFocus 189 + XGetKeyboardControl 190 + XGetKeyboardMapping 191 + XGetModifierMapping 192 + XGetMotionEvents 193 + XGetNormalHints 194 + XGetPixel 195 + XGetPointerControl 196 + XGetPointerMapping 197 + XGetRGBColormaps 198 + XGetScreenSaver 199 + XGetSelectionOwner 200 + XGetSizeHints 201 + XGetStandardColormap 202 + XGetSubImage 203 + XGetTextProperty 204 + XGetTransientForHint 205 + XGetVisualInfo 206 + XGetWMClientMachine 207 + XGetWMColormapWindows 208 + XGetWMHints 209 + XGetWMIconName 210 + XGetWMName 211 + XGetWMNormalHints 212 + XGetWMProtocols 213 + XGetWMSizeHints 214 + XGetWindowAttributes 215 + XGetWindowProperty 216 + XGetZoomHints 217 + XGrabButton 218 + XGrabKey 219 + XGrabKeyboard 220 + XGrabPointer 221 + XGrabServer 222 + XHeightMMOfScreen 223 + XHeightOfScreen 224 + XIMOfIC 225 + XIconifyWindow 226 + XIfEvent 227 + XImageByteOrder 228 + XInitExtension 229 + XInsertModifiermapEntry 230 + XInstallColormap 231 + XInternAtom 232 + XIntersectRegion 233 + XKeycodeToKeysym 234 + XKeysymToKeycode 235 + XKeysymToString 236 + XKillClient 237 + XLastKnownRequestProcessed 238 + XListDepths 239 + XListExtensions 240 + XListFonts 241 + XListFontsWithInfo 242 + XListHosts 243 + XListInstalledColormaps 244 + XListPixmapFormats 245 + XListProperties 246 + XLoadFont 247 + XLoadQueryFont 248 + XLocaleOfFontSet 249 + XLocaleOfIM 250 + XLookupColor 251 + XLookupKeysym 252 + XLookupString 253 + XLowerWindow 254 + XMapRaised 255 + XMapSubwindows 256 + XMapWindow 257 + XMaskEvent 258 + XMatchVisualInfo 259 + XMaxCmapsOfScreen 260 + XMaxRequestSize 261 + XMinCmapsOfScreen 262 + XMoveResizeWindow 263 + XMoveWindow 264 + XNewModifiermap 265 + XNextEvent 266 + XNextRequest 267 + XNoOp 268 + XOffsetRegion 269 + XOpenDisplay 270 + XOpenIM 271 + XParseColor 272 + XParseGeometry 273 + XPeekEvent 274 + XPeekIfEvent 275 + XPending 276 + XPlanesOfScreen 277 + XPointInRegion 278 + XPolygonRegion 279 + XProtocolRevision 280 + XProtocolVersion 281 + XPutBackEvent 282 + XPutImage 283 + XPutPixel 284 + XQLength 285 + XQueryBestCursor 286 + XQueryBestSize 287 + XQueryBestStipple 288 + XQueryBestTile 289 + XQueryColor 290 + XQueryColors 291 + XQueryExtension 292 + XQueryFont 293 + XQueryKeymap 294 + XQueryPointer 295 + XQueryTextExtents 296 + XQueryTextExtents16 297 + XQueryTree 298 + XRaiseWindow 299 + XReadBitmapFile 300 + XRebindKeysym 301 + XRecolorCursor 302 + XReconfigureWMWindow 303 + XRectInRegion 304 + XRefreshKeyboardMapping 305 + XRemoveFromSaveSet 306 + XRemoveHost 307 + XRemoveHosts 308 + XReparentWindow 309 + XResetScreenSaver 310 + XResizeWindow 311 + XResourceManagerString 312 + XRestackWindows 313 + XRootWindow 314 + XRootWindowOfScreen 315 + XRotateBuffers 316 + XRotateWindowProperties 317 + XSaveContext 318 + XScreenCount 319 + XScreenNumberOfScreen 320 + XScreenOfDisplay 321 + XScreenResourceString 322 + XSelectInput 323 + XSendEvent 324 + XServerVendor 325 + XSetAccessControl 326 + XSetAfterFunction 327 + XSetArcMode 328 + XSetAuthorization 329 + XSetBackground 330 + XSetClassHint 331 + XSetClipMask 332 + XSetClipOrigin 333 + XSetClipRectangles 334 + XSetCloseDownMode 335 + XSetCommand 336 + XSetDashes 337 + XSetErrorHandler 338 + XSetFillRule 339 + XSetFillStyle 340 + XSetFont 341 + XSetFontPath 342 + XSetForeground 343 + XSetFunction 344 + XSetGraphicsExposures 345 + XSetICFocus 346 + XSetICValues 347 + XSetIOErrorHandler 348 + XSetIconName 349 + XSetIconSizes 350 + XSetInputFocus 351 + XSetLineAttributes 352 + XSetLocaleModifiers 353 + XSetModifierMapping 354 + XSetNormalHints 355 + XSetPlaneMask 356 + XSetPointerMapping 357 + XSetRGBColormaps 358 + XSetRegion 359 + XSetScreenSaver 360 + XSetSelectionOwner 361 + XSetSizeHints 362 + XSetStandardColormap 363 + XSetStandardProperties 364 + XSetState 365 + XSetStipple 366 + XSetSubwindowMode 367 + XSetTSOrigin 368 + XSetTextProperty 369 + XSetTile 370 + XSetTransientForHint 371 + XSetWMClientMachine 372 + XSetWMColormapWindows 373 + XSetWMHints 374 + XSetWMIconName 375 + XSetWMName 376 + XSetWMNormalHints 377 + XSetWMProperties 378 + XSetWMProtocols 379 + XSetWMSizeHints 380 + XSetWindowBackground 381 + XSetWindowBackgroundPixmap 382 + XSetWindowBorder 383 + XSetWindowBorderPixmap 384 + XSetWindowBorderWidth 385 + XSetWindowColormap 386 + XSetZoomHints 387 + XShrinkRegion 388 + XStoreBuffer 389 + XStoreBytes 390 + XStoreColor 391 + XStoreColors 392 + XStoreName 393 + XStoreNamedColor 394 + XStringListToTextProperty 395 + XStringToKeysym 396 + XSubImage 397 + XSubtractRegion 398 + XSupportsLocale 399 + XSync 400 + XSynchronize 401 + XTextExtents 402 + XTextExtents16 403 + XTextPropertyToStringList 404 + XTextWidth 405 + XTextWidth16 406 + XTranslateCoordinates 407 + XUndefineCursor 408 + XUngrabButton 409 + XUngrabKey 410 + XUngrabKeyboard 411 + XUngrabPointer 412 + XUngrabServer 413 + XUninstallColormap 414 + XUnionRectWithRegion 415 + XUnionRegion 416 + XUnloadFont 417 + XUnmapSubwindows 418 + XUnmapWindow 419 + XUnsetICFocus 420 + XVaCreateNestedList 421 + XVendorRelease 422 + XVisualIDFromVisual 423 + XWMGeometry 424 + XWarpPointer 425 + XWhitePixel 426 + XWhitePixelOfScreen 427 + XWidthMMOfScreen 428 + XWidthOfScreen 429 + XWindowEvent 430 + XWithdrawWindow 431 + XWriteBitmapFile 432 + XXorRegion 433 + XauDisposeAuth 434 + XauFileName 435 + XauGetBestAuthByAddr 436 + XauReadAuth 437 + XcmsAddColorSpace 438 + XcmsAddFunctionSet 439 + XcmsAllocColor 440 + XcmsAllocNamedColor 441 + XcmsCCCOfColormap 442 + XcmsCIELabClipL 443 + XcmsCIELabClipLab 444 + XcmsCIELabClipab 445 + XcmsCIELabQueryMaxC 446 + XcmsCIELabQueryMaxL 447 + XcmsCIELabQueryMaxLC 448 + XcmsCIELabQueryMinL 449 + XcmsCIELabToCIEXYZ 450 + XcmsCIELabWhiteShiftColors 451 + XcmsCIELab_ValidSpec 452 + XcmsCIELuvClipL 453 + XcmsCIELuvClipLuv 454 + XcmsCIELuvClipuv 455 + XcmsCIELuvQueryMaxC 456 + XcmsCIELuvQueryMaxL 457 + XcmsCIELuvQueryMaxLC 458 + XcmsCIELuvQueryMinL 459 + XcmsCIELuvToCIEuvY 460 + XcmsCIELuvWhiteShiftColors 461 + XcmsCIELuv_ValidSpec 462 + XcmsCIEXYZToCIELab 463 + XcmsCIEXYZToCIEuvY 464 + XcmsCIEXYZToCIExyY 465 + XcmsCIEXYZToRGBi 466 + XcmsCIEXYZ_ValidSpec 467 + XcmsCIEuvYToCIELuv 468 + XcmsCIEuvYToCIEXYZ 469 + XcmsCIEuvYToTekHVC 470 + XcmsCIEuvY_ValidSpec 471 + XcmsCIExyYToCIEXYZ 472 + XcmsCIExyY_ValidSpec 473 + XcmsClientWhitePointOfCCC 474 + XcmsConvertColors 475 + XcmsCreateCCC 476 + XcmsDefaultCCC 477 + XcmsDisplayOfCCC 478 + XcmsFormatOfPrefix 479 + XcmsFreeCCC 480 + XcmsFreeColorDB 481 + XcmsLRGB_RGB_ParseString 482 + XcmsLRGB_RGBi_ParseString 483 + XcmsLookupColor 484 + XcmsPrefixOfFormat 485 + XcmsQueryBlack 486 + XcmsQueryBlue 487 + XcmsQueryColor 488 + XcmsQueryColors 489 + XcmsQueryGreen 490 + XcmsQueryRed 491 + XcmsQueryWhite 492 + XcmsRGBToRGBi 493 + XcmsRGBiToCIEXYZ 494 + XcmsRGBiToRGB 495 + XcmsScreenNumberOfCCC 496 + XcmsScreenWhitePointOfCCC 497 + XcmsSetCompressionProc 498 + XcmsSetWhiteAdjustProc 499 + XcmsSetWhitePoint 500 + XcmsStoreColor 501 + XcmsStoreColors 502 + XcmsTekHVCClipC 503 + XcmsTekHVCClipV 504 + XcmsTekHVCClipVC 505 + XcmsTekHVCQueryMaxC 506 + XcmsTekHVCQueryMaxV 507 + XcmsTekHVCQueryMaxVC 508 + XcmsTekHVCQueryMaxVSamples 509 + XcmsTekHVCQueryMinV 510 + XcmsTekHVCToCIEuvY 511 + XcmsTekHVCWhiteShiftColors 512 + XcmsTekHVC_ValidSpec 513 + XcmsVisualOfCCC 514 + XmbDrawImageString 515 + XmbDrawString 516 + XmbDrawText 517 + XmbLookupString 518 + XmbResetIC 519 + XmbSetWMProperties 520 + XmbTextEscapement 521 + XmbTextExtents 522 + XmbTextListToTextProperty 523 + XmbTextPerCharExtents 524 + XmbTextPropertyToTextList 525 + Xpermalloc 526 + XrmCombineDatabase 527 + XrmCombineFileDatabase 528 + XrmDestroyDatabase 529 + XrmEnumerateDatabase 530 + XrmGetDatabase 531 + XrmGetFileDatabase 532 + XrmGetResource 533 + XrmGetStringDatabase 534 + XrmInitialize 535 + XrmLocaleOfDatabase 536 + XrmMergeDatabases 537 + XrmParseCommand 538 + XrmPermStringToQuark 539 + XrmPutFileDatabase 540 + XrmPutLineResource 541 + XrmPutResource 542 + XrmPutStringResource 543 + XrmQGetResource 544 + XrmQGetSearchList 545 + XrmQGetSearchResource 546 + XrmQPutResource 547 + XrmQPutStringResource 548 + XrmQuarkToString 549 + XrmSetDatabase 550 + XrmStringToBindingQuarkList 551 + XrmStringToQuark 552 + XrmStringToQuarkList 553 + XrmUniqueQuark 554 + XwcDrawImageString 555 + XwcDrawString 556 + XwcDrawText 557 + XwcFreeStringList 558 + XwcLookupString 559 + XwcResetIC 560 + XwcTextEscapement 561 + XwcTextExtents 562 + XwcTextListToTextProperty 563 + XwcTextPerCharExtents 564 + XwcTextPropertyToTextList 565 + _XAllocID 566 + _XAllocScratch 567 + _XColor_to_XcmsRGB 568 + _XConnectDisplay 569 + _XConvertCTToMB 570 + _XConvertCTToWC 571 + _XConvertMBToCT 572 + _XConvertMBToString 573 + _XConvertMBToWC 574 + _XConvertWCToCT 575 + _XConvertWCToMB 576 + _XConvertWCToString 577 + _XCopyToArg 578 + _XDefaultError 579 + _XDefaultIOError 580 + _XDefaultWireError 581 + _XDisconnectDisplay 582 + _XEatData 583 + _XEnq 584 + _XError 585 + _XEventToWire 586 + _XEventsQueued 587 + _XFallBackConvert 588 + _XFlush 589 + _XFlushGCCache 590 + _XFreeDisplayStructure 591 + _XFreeExtData 592 + _XFreeQ 593 + _XGetBitsPerPixel 594 + _XGetHostname 595 + _XGetScanlinePad 596 + _XIMCompileResourceList 597 + _XIOError 598 + _XInitCTEncoding 599 + _XInitImageFuncPtrs 600 + _XInitKeysymDB 601 + _XParseBaseFontNameList 602 + _XParseISOEncoding 603 + _XProcessWindowAttributes 604 + _XRead 605 + _XReadEvents 606 + _XReadPad 607 + _XReadV 608 + _XRegisterCharSet 609 + _XRegisterFilterByMask 610 + _XRegisterFilterByType 611 + _XReply 612 + _XReverse_Bytes 613 + _XScreenOfWindow 614 + _XSend 615 + _XSendClientPrefix 616 + _XSetClipRectangles 617 + _XSetImage 618 + _XSetLastRequestRead 619 + _XSyncFunction 620 + _XUnknownNativeEvent 621 + _XUnknownWireEvent 622 + _XUnregisterFilter 623 + _XUnresolveColor 624 + _XUpdateGCCache 625 + _XVIDtoVisual 626 + _XWaitForReadable 627 + _XWaitForWritable 628 + _XWireToEvent 629 + _Xbcopy 630 + _XcmsAddCmapRec 631 + _XcmsArcTangent 632 + _XcmsCIELabQueryMaxLCRGB 633 + _XcmsCIELuvQueryMaxLCRGB 634 + _XcmsConvertColorsWithWhitePt 635 + _XcmsCopyCmapRecAndFree 636 + _XcmsCopyISOLatin1Lowered 637 + _XcmsCopyPointerArray 638 + _XcmsCosine 639 + _XcmsCubeRoot 640 + _XcmsDDConvertColors 641 + _XcmsDIConvertColors 642 + _XcmsDeleteCmapRec 643 + _XcmsEqualWhitePts 644 + _XcmsFreeIntensityMaps 645 + _XcmsFreePointerArray 646 + _XcmsGetElement 647 + _XcmsGetIntensityMap 648 + _XcmsGetProperty 649 + _XcmsGetTableType0 650 + _XcmsGetTableType1 651 + _XcmsInitDefaultCCCs 652 + _XcmsInitScrnInfo 653 + _XcmsIntensityCmp 654 + _XcmsIntensityInterpolation 655 + _XcmsLRGB_InitScrnDefault 656 + _XcmsMatVec 657 + _XcmsPushPointerArray 658 + _XcmsRGB_to_XColor 659 + _XcmsRegFormatOfPrefix 660 + _XcmsResolveColor 661 + _XcmsResolveColorString 662 + _XcmsSetGetColors 663 + _XcmsSine 664 + _XcmsSquareRoot 665 + _XcmsTableSearch 666 + _XcmsTekHVCQueryMaxVCRGB 667 + _XcmsTekHVC_CheckModify 668 + _XcmsUnresolveColor 669 + _XcmsValueCmp 670 + _XcmsValueInterpolation 671 + _Xcsctombc 672 + _XctIsExtendSegment 673 + _XctisGLdsg 674 + _XcwCheckDefaultState 675 + _XcwEscSetStatus 676 + _XcwGetAll 677 + _XcwGetDefaultEncoding 678 + _XcwGetLength 679 + _XcwGetWoffset 680 + _XcwGetWoffsetFromLocale 681 + _XcwIdCheck 682 + _XcwIdGetAll 683 + _XcwIdGetEncoding 684 + _XcwIdGetISOState 685 + _XcwIdGetLength 686 + _XcwIdGetWoffset 687 + _XcwNameGetAll 688 + _XcwNameGetGLorGRId 689 + _XipBackEndFilter 690 + _XipCallCallbacks 691 + _XipConnectIM 692 + _XipCreateDefIC 693 + _XipCreateIC 694 + _XipDestroyIC 695 + _XipDisconnectIM 696 + _XipFlushToIM 697 + _XipFreeAllICQueue 698 + _XipFreeNextICQueue 699 + _XipGetICValues 700 + _XipGetIMValues 701 + _XipGetNextICQueue 702 + _XipGetOverflowICQueue 703 + _XipICGetValues 704 + _XipICSetAttrValues 705 + _XipICSetValues 706 + _XipKeySymOfNextICQueue 707 + _XipLocalBackEndFilter 708 + _XipLocalCallCallbacks 709 + _XipLocalCreateIC 710 + _XipLocalDestroyIC 711 + _XipLocalGetICValues 712 + _XipLocalGetIMValues 713 + _XipLocalOpenIM 714 + _XipLocalSetICFocus 715 + _XipLocalSetICValues 716 + _XipLocalUnsetICFocus 717 + _XipLocalmbResetIC 718 + _XipLocalwcResetIC 719 + _XipOpenIM 720 + _XipPutICQueue 721 + _XipReadFromIM 722 + _XipReadRdb 723 + _XipReceiveICValues 724 + _XipSaveOverflowICQueue 725 + _XipSendICValues 726 + _XipSetICFocus 727 + _XipSetICValues 728 + _XipSetIOErrorHandler 729 + _XipStateOfNextICQueue 730 + _XipStringOfNextICQueue 731 + _XipTypeOfNextICQueue 732 + _XipUnsetICFocus 733 + _XipWriteToIM 734 + _XipctLookupString 735 + _XipmbLookupString 736 + _XipmbResetIC 737 + _XipwcLookupString 738 + _XipwcResetIC 739 + _XlcAddLoader 740 + _XlcCurrentLC 741 + _XlcDefaultLoader 742 + _XlcDefaultMapModifiers 743 + _XlcDupLocale 744 + _XlcListLocale 745 + _XlcMakeLocale 746 + _XlcValidModSyntax 747 + _XmbCheck 748 + _XmbDecomposeGlyphCharset 749 + _XmbGetDefaultEncoding 750 + _XmbSetCsid 751 + _Xmbcsid 752 + _XmbctGLorGR 753 + _Xmbctid 754 + _Xmbctidtocsid 755 + _Xmbctocsc 756 + _Xmbdlen 757 + _Xmbdsg 758 + _Xmbfscs 759 + _Xmbfsdsg 760 + _Xmbfslen 761 + _Xmbfsname 762 + _Xmbfswf 763 + _Xmblen 764 + _Xmbmsbon 765 + _XrmInitParseInfo 766 + _XrmInternalStringToQuark 767 + _Xsetlocale 768 + _XsiCreateFontSet 769 + _XsiQueryFontSetFromId 770 + _Xsimb8DrawImageString 771 + _Xsimb8DrawString 772 + _Xsimb8TextEscapement 773 + _Xsimb8TextExtents 774 + _XsimbDrawImageString 775 + _XsimbDrawString 776 + _XsimbTextEscapement 777 + _XsimbTextExtents 778 + _XsimbTextPerCharExtents 779 + _XsiwcDrawImageString 780 + _XsiwcDrawString 781 + _XsiwcTextEscapement 782 + _XsiwcTextExtents 783 + _XsiwcTextPerCharExtents 784 + _XwcDecomposeGlyphCharset 785 + #ifdef HASXDMAUTH + _XdmcpAuthSetup 786 + _XdmcpAuthDoIt 787 + XdmcpWrap 788 + _XdmcpWrapperToOddParity 789 + #else + _no_des_dummy1 786 + _no_des_dummy2 787 + _no_des_dummy3 788 + _libX11_dummy 789 + #endif + + + _libX11_dummy 790-850 + + + /**/#objects + DOWN/globals.o /* All objects with global data must be come at first!*/ + DOWN/CIELab.o + DOWN/CIELuv.o + DOWN/CIEXYZ.o + DOWN/CIEuvY.o + DOWN/CIExyY.o + DOWN/TekHVC.o + DOWN/UNDEFINED.o + DOWN/XcmsGlobls.o + DOWN/evtomask.o + DOWN/XStrKeysym.o + DOWN/XcmsLRGB.o + + DOWN/AuDispose.o + DOWN/AuFileName.o + DOWN/AuGetBest.o + DOWN/AuRead.o + DOWN/CIELabGcC.o + DOWN/CIELabGcL.o + DOWN/CIELabGcLC.o + DOWN/CIELabMnL.o + DOWN/CIELabMxC.o + DOWN/CIELabMxL.o + DOWN/CIELabMxLC.o + DOWN/CIELabWpAj.o + DOWN/CIELuvGcC.o + DOWN/CIELuvGcL.o + DOWN/CIELuvGcLC.o + DOWN/CIELuvMnL.o + DOWN/CIELuvMxC.o + DOWN/CIELuvMxL.o + DOWN/CIELuvMxLC.o + DOWN/CIELuvWpAj.o + DOWN/Context.o + DOWN/Depths.o + DOWN/GetGCVals.o + DOWN/GetNrmHint.o + DOWN/GetRGBCMap.o + DOWN/GetTxtProp.o + DOWN/GetWMCMapW.o + DOWN/GetWMProto.o + DOWN/Iconify.o + DOWN/ParseCmd.o + DOWN/PixFormats.o + DOWN/PropAlloc.o + DOWN/ProtoFlt.o + DOWN/Quarks.o + DOWN/ReconfWM.o + DOWN/SetNrmHint.o + DOWN/SetRGBCMap.o + DOWN/SetTxtProp.o + DOWN/SetWMCMapW.o + DOWN/SetWMProps.o + DOWN/SetWMProto.o + DOWN/StrToText.o + DOWN/TekHVCGcC.o + DOWN/TekHVCGcV.o + DOWN/TekHVCGcVC.o + DOWN/TekHVCMnV.o + DOWN/TekHVCMxC.o + DOWN/TekHVCMxV.o + DOWN/TekHVCMxVC.o + DOWN/TekHVCMxVs.o + DOWN/TekHVCWpAj.o + DOWN/TextToStr.o + DOWN/WMGeom.o + DOWN/Withdraw.o + DOWN/XAllCells.o + DOWN/XAllPlanes.o + DOWN/XAllowEv.o + DOWN/XAutoRep.o + DOWN/XBackgnd.o + DOWN/XBdrWidth.o + DOWN/XBell.o + DOWN/XBorder.o + DOWN/XChAccCon.o + DOWN/XChActPGb.o + DOWN/XChClMode.o + DOWN/XChCmap.o + DOWN/XChGC.o + DOWN/XChKeyCon.o + DOWN/XChPntCon.o + DOWN/XChProp.o + DOWN/XChSaveSet.o + DOWN/XChWAttrs.o + DOWN/XChWindow.o + DOWN/XChkIfEv.o + DOWN/XChkMaskEv.o + DOWN/XChkTypEv.o + DOWN/XChkTypWEv.o + DOWN/XChkWinEv.o + DOWN/XCirWin.o + DOWN/XCirWinDn.o + DOWN/XCirWinUp.o + DOWN/XClDisplay.o + DOWN/XClear.o + DOWN/XClearArea.o + DOWN/XCnvCTToWC.o + DOWN/XCnvMBToCT.o + DOWN/XCnvToStr.o + DOWN/XCnvWCToMB.o + DOWN/XConfWind.o + DOWN/XConnDis.o + DOWN/XConnIM.o + DOWN/XConvSel.o + DOWN/XCopyArea.o + DOWN/XCopyCmap.o + DOWN/XCopyGC.o + DOWN/XCopyPlane.o + DOWN/XCrBFData.o + DOWN/XCrCmap.o + DOWN/XCrCursor.o + DOWN/XCrFntSet.o + DOWN/XCrGC.o + DOWN/XCrGlCur.o + DOWN/XCrIC.o + DOWN/XCrPFBData.o + DOWN/XCrPixmap.o + DOWN/XCrWindow.o + DOWN/XCursor.o + DOWN/XDefCursor.o + DOWN/XDelProp.o + DOWN/XDestSubs.o + DOWN/XDestWind.o + DOWN/XDisName.o + DOWN/XDrArc.o + DOWN/XDrArcs.o + DOWN/XDrLine.o + DOWN/XDrLines.o + DOWN/XDrPoint.o + DOWN/XDrPoints.o + DOWN/XDrRect.o + DOWN/XDrRects.o + DOWN/XDrSegs.o + DOWN/XErrDes.o + DOWN/XErrHndlr.o + DOWN/XEvToWire.o + DOWN/XFSSaver.o + DOWN/XFSWrap.o + DOWN/XFetchName.o + DOWN/XFillArc.o + DOWN/XFillArcs.o + DOWN/XFillPoly.o + DOWN/XFillRect.o + DOWN/XFillRects.o + DOWN/XFilterEv.o + DOWN/XFlush.o + DOWN/XFont.o + DOWN/XFontInfo.o + DOWN/XFontNames.o + DOWN/XFreeCmap.o + DOWN/XFreeCols.o + DOWN/XFreeCurs.o + DOWN/XFreeEData.o + DOWN/XFreeGC.o + DOWN/XFreePix.o + DOWN/XGCMisc.o + DOWN/XGeom.o + DOWN/XGetAtomNm.o + DOWN/XGetColor.o + DOWN/XGetDflt.o + DOWN/XGetFPath.o + DOWN/XGetFProp.o + DOWN/XGetGeom.o + DOWN/XGetHColor.o + DOWN/XGetHints.o + DOWN/XGetIFocus.o + DOWN/XGetIMVal.o + DOWN/XGetImage.o + DOWN/XGetKCnt.o + DOWN/XGetMoEv.o + DOWN/XGetPCnt.o + DOWN/XGetPntMap.o + DOWN/XGetProp.o + DOWN/XGetSOwner.o + DOWN/XGetSSaver.o + DOWN/XGetStCmap.o + DOWN/XGetWAttrs.o + DOWN/XGrButton.o + DOWN/XGrKey.o + DOWN/XGrKeybd.o + DOWN/XGrPointer.o + DOWN/XGrServer.o + DOWN/XHost.o + DOWN/XICFocus.o + DOWN/XICGetVal.o + DOWN/XICSetVal.o + DOWN/XICWrap.o + DOWN/XIMKeyBind.o + DOWN/XIMProto.o + DOWN/XIMQueue.o + DOWN/XIMWrap.o + DOWN/XIfEvent.o + DOWN/XImText.o + DOWN/XImText16.o + DOWN/XImUtil.o + DOWN/XInitCT.o + DOWN/XInitExt.o + DOWN/XInsCmap.o + DOWN/XIntAtom.o + DOWN/XKeyBind.o + DOWN/XKeysymStr.o + DOWN/XKillCl.o + DOWN/XLiHosts.o + DOWN/XLiICmaps.o + DOWN/XLiProps.o + DOWN/XListExt.o + DOWN/XLoadFont.o + DOWN/XLocalIM.o + DOWN/XLookupCol.o + DOWN/XLowerWin.o + DOWN/XMacros.o + DOWN/XMapRaised.o + DOWN/XMapSubs.o + DOWN/XMapWindow.o + DOWN/XMaskEvent.o + DOWN/XMisc.o + DOWN/XModMap.o + DOWN/XMoveWin.o + DOWN/XNextEvent.o + DOWN/XOpenDis.o + DOWN/XOpenIM.o + DOWN/XParseCT.o + DOWN/XParseCol.o + DOWN/XParseGeom.o + DOWN/XPeekEvent.o + DOWN/XPeekIfEv.o + DOWN/XPending.o + DOWN/XPmapBgnd.o + DOWN/XPmapBord.o + DOWN/XPolyReg.o + DOWN/XPolyTxt.o + DOWN/XPolyTxt16.o + DOWN/XPutBEvent.o + DOWN/XPutImage.o + DOWN/XQuBest.o + DOWN/XQuColor.o + DOWN/XQuColors.o + DOWN/XQuCurShp.o + DOWN/XQuExt.o + DOWN/XQuKeybd.o + DOWN/XQuPntr.o + DOWN/XQuStipShp.o + DOWN/XQuTextE16.o + DOWN/XQuTextExt.o + DOWN/XQuTileShp.o + DOWN/XQuTree.o + DOWN/XRaiseWin.o + DOWN/XRdBitF.o + DOWN/XRecolorC.o + DOWN/XReconfWin.o + DOWN/XRegion.o + DOWN/XRegstFlt.o + DOWN/XRepWindow.o + DOWN/XRestackWs.o + DOWN/XRotProp.o + DOWN/XScrResStr.o + DOWN/XSelInput.o + DOWN/XSendEvent.o + DOWN/XSetBack.o + DOWN/XSetCRects.o + DOWN/XSetClMask.o + DOWN/XSetClOrig.o + DOWN/XSetDashes.o + DOWN/XSetFPath.o + DOWN/XSetFont.o + DOWN/XSetFore.o + DOWN/XSetFunc.o + DOWN/XSetHints.o + DOWN/XSetIFocus.o + DOWN/XSetLStyle.o + DOWN/XSetLocale.o + DOWN/XSetPMask.o + DOWN/XSetPntMap.o + DOWN/XSetSOwner.o + DOWN/XSetSSaver.o + DOWN/XSetStCmap.o + DOWN/XSetState.o + DOWN/XSetStip.o + DOWN/XSetTSOrig.o + DOWN/XSetTile.o + DOWN/XStBytes.o + DOWN/XStColor.o + DOWN/XStColors.o + DOWN/XStNColor.o + DOWN/XStName.o + DOWN/XSync.o + DOWN/XSynchro.o + DOWN/XText.o + DOWN/XText16.o + DOWN/XTextExt.o + DOWN/XTextExt16.o + DOWN/XTrCoords.o + DOWN/XUndefCurs.o + DOWN/XUngrabBut.o + DOWN/XUngrabKbd.o + DOWN/XUngrabKey.o + DOWN/XUngrabPtr.o + DOWN/XUngrabSvr.o + DOWN/XUninsCmap.o + DOWN/XUnldFont.o + DOWN/XUnmapSubs.o + DOWN/XUnmapWin.o + DOWN/XVisUtil.o + DOWN/XWarpPtr.o + DOWN/XWinEvent.o + DOWN/XWindow.o + DOWN/XWrBitF.o + DOWN/XcmsAddDIC.o + DOWN/XcmsAddSF.o + DOWN/XcmsAlNCol.o + DOWN/XcmsAllCol.o + DOWN/XcmsCCC.o + DOWN/XcmsCmap.o + DOWN/XcmsColNm.o + DOWN/XcmsCvColW.o + DOWN/XcmsCvCols.o + DOWN/XcmsIdOfPr.o + DOWN/XcmsInt.o + DOWN/XcmsLkCol.o + DOWN/XcmsMath.o + DOWN/XcmsOfCCC.o + DOWN/XcmsPrOfId.o + DOWN/XcmsProp.o + DOWN/XcmsQBlack.o + DOWN/XcmsQBlue.o + DOWN/XcmsQGreen.o + DOWN/XcmsQRed.o + DOWN/XcmsQWhite.o + DOWN/XcmsQuCol.o + DOWN/XcmsQuCols.o + DOWN/XcmsSetCCC.o + DOWN/XcmsSetGet.o + DOWN/XcmsStCol.o + DOWN/XcmsStCols.o + DOWN/XcmsTrig.o + DOWN/XcmsXRGB.o + DOWN/XlcAccess.o + DOWN/XlcDefLd.o + DOWN/XlcLoad.o + DOWN/XlcWrap.o + DOWN/XlibInt.o + DOWN/XmbDeGlyph.o + DOWN/XmbPrpText.o + DOWN/XmbText.o + DOWN/XmbTextExt.o + DOWN/XmbTextPer.o + DOWN/XmbTextPrp.o + DOWN/XmbWMProps.o + DOWN/XmbWrap.o + DOWN/Xrm.o + DOWN/Xstreams.o + DOWN/XwcDeGlyph.o + DOWN/XwcPrpText.o + DOWN/XwcText.o + DOWN/XwcTextExt.o + DOWN/XwcTextPer.o + DOWN/XwcTextPrp.o + DOWN/XwcWrap.o + #ifdef HASXDMAUTH + DOWN/Wraphelp.o + DOWN/Wrap.o + #endif + + + /* init section + */ + + /**/#init globals.o + _libX11__ctype _ctype + _libX11__iob _iob + _libX11_atoi atoi + _libX11_calloc calloc + _libX11_close close + _libX11_connect connect + _libX11_errno errno + _libX11_exit exit + _libX11_fclose fclose + _libX11_fgets fgets + _libX11_fopen fopen + _libX11_fprintf fprintf + _libX11_fputs fputs + _libX11_free free + _libX11_getenv getenv + _libX11_gethostbyname gethostbyname + _libX11_getpid getpid + _libX11_getpwuid getpwuid + _libX11_getuid getuid + _libX11_htons htons + _libX11_ioctl ioctl + _libX11_malloc malloc + _libX11_memset memset + _libX11_open open + _libX11_read read + _libX11_realloc realloc + _libX11_select select + _libX11_socket socket + _libX11_sprintf sprintf + _libX11_sscanf sscanf + _libX11_stat stat + _libX11_strcat strcat + _libX11_strchr strchr + _libX11_strcmp strcmp + _libX11_strcpy strcpy + _libX11_strncmp strncmp + _libX11_strncpy strncpy + _libX11_strrchr strrchr + _libX11_write write + #ifndef SCO + _libX11_writev writev + #else + _libX11_writev _XWriteV + #endif + _libX11_XauDisposeAuth XauDisposeAuth + _libX11_XauFileName XauFileName + _libX11_XauGetBestAuthByAddr XauGetBestAuthByAddr + _libX11_XauReadAuth XauReadAuth + _libX11__Xevent_to_mask _Xevent_to_mask + _libX11_ntohl ntohl + _libX11_ntohs ntohs + #ifndef HASXDMAUTH + _libX11__XdmcpAuthSetup _no_des_dummy1 + _libX11__XdmcpAuthDoIt _no_des_dummy2 + _libX11_XdmcpWrap _no_des_dummy3 + #endif + + /**/#init AuGetBest.o + _libX11_access access + + /**/#init AuRead.o + _libX11_fread fread + + /**/#init XConnDis.o + _libX11_alarm alarm + _libX11_fcntl fcntl + _libX11_getmsg getmsg + _libX11_grantpt grantpt + _libX11_inet_addr inet_addr + _libX11_ptsname ptsname + _libX11_putmsg putmsg + _libX11_setsockopt setsockopt + _libX11_signal signal + _libX11_sleep sleep + _libX11_unlockpt unlockpt + _libX11_strtok strtok + _libX11_getsockname getsockname + _libX11_time time + #ifdef HASXDMAUTH + _libX11_XdmcpWrap XdmcpWrap + #endif + + /**/#init XCrFntSet.o + _libX11_tolower tolower + + /**/#init XGetDflt.o + _libX11_getpwnam getpwnam + + /**/#init XOpenDis.o + _libX11_fwrite fwrite + + /**/#init XRdBitF.o + _libX11__filbuf _filbuf + + /**/#init XcmsColNm.o + _libX11_qsort qsort + _libX11_rewind rewind + + /**/#init XlibInt.o + _libX11_uname uname + _libX11_sys_errlist sys_errlist + _libX11_sys_nerr sys_nerr + + /**/#init Xrm.o + _libX11__flsbuf _flsbuf + + #ifdef HASXDMAUTH + /**/#init Wrap.o + _libX11__XdmcpAuthSetup _XdmcpAuthSetup + _libX11__XdmcpAuthDoIt _XdmcpAuthDoIt + #endif + + + + /**/#libraries + /* Here can objects be specified, which will extracted from + * an specified archive library and then linked to the shared + * library. This can avoid unwanted referencing of other + * shared libraries. + * NOTE: this objects must be listed also under #objects! + * e.g.: + /lib/libc.a memcpy.o + * or e.g.: + #ifdef __GNUC__ + GNULIB _fixdfsi.o + #endif + * + * NOT USED YET + * + */ + + /**/#externals + /* Here you can specify objects which will only linked to the + * host shared library. + * That are e.g. objects which contain only big data you want + * to seperate from the text section. (See mit/util/mksv3shlib/README.) + */ + + /* There must be a comment as last line */ diff -c mit/lib/X/Ximp/XimpLCUtil.c:1.1.1.4 mit/lib/X/Ximp/XimpLCUtil.c:1.2 *** mit/lib/X/Ximp/XimpLCUtil.c:1.1.1.4 Sat Mar 12 00:37:36 1994 --- mit/lib/X/Ximp/XimpLCUtil.c Sat Mar 12 00:37:36 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/X/Ximp/XimpLCUtil.c,v 1.2 1993/04/09 11:27:51 dawes Exp $ */ /* $XConsortium: XimpLCUtil.c,v 1.8 92/10/19 19:24:49 rws Exp $ */ /* * Copyright 1990, 1991, 1992 by TOSHIBA Corp. *************** *** 226,231 **** --- 227,237 ---- return fd; } #endif + if (dir = getenv("XWINHOME")) { + sprintf(buf, "%s/lib/X11/%s", dir, locale_file); + if (fd = fopen(buf, "r")) + return fd; + } sprintf(buf, "%s/%s", XLIBI18N_PATH, locale_file); return fopen(buf, "r"); diff -c mit/lib/X/Xsi/XConnIM.c:1.1.1.3 mit/lib/X/Xsi/XConnIM.c:1.4 *** mit/lib/X/Xsi/XConnIM.c:1.1.1.3 Sat Mar 12 00:37:39 1994 --- mit/lib/X/Xsi/XConnIM.c Sat Mar 12 00:37:39 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/Xsi/XConnIM.c,v 1.4 1993/03/21 06:17:58 dawes Exp $ * $XConsortium: XConnIM.c,v 1.18 92/07/29 13:55:35 rws Exp $ */ *************** *** 32,45 **** /* * This is an OS dependent file. this should work on 4.3BSD. */ #include "Xlibint.h" #include "Xlibnet.h" #include "Xi18nint.h" #include "XIMlibint.h" ! #include ! #ifdef TCPCONN #include #endif #ifdef UNIXCONN #include --- 33,49 ---- /* * This is an OS dependent file. this should work on 4.3BSD. */ + #include #include "Xlibint.h" #include "Xlibnet.h" #include "Xi18nint.h" #include "XIMlibint.h" ! #if (defined(TCPCONN) && !defined(_MINIX)) || defined(UNIXCONN) #include #endif + #ifdef AMTCPCONN + #include + #endif #ifdef UNIXCONN #include *************** *** 70,76 **** #ifdef UNIXCONN struct sockaddr_un saddr; /* UNIX domain socket address */ #endif /* UNIXCONN */ ! #ifdef TCPCONN struct sockaddr_in saddr_in; /* INET domain socket address */ struct hostent *hp; unsigned short port; --- 74,80 ---- #ifdef UNIXCONN struct sockaddr_un saddr; /* UNIX domain socket address */ #endif /* UNIXCONN */ ! #if defined(TCPCONN) && !defined(_MINIX) struct sockaddr_in saddr_in; /* INET domain socket address */ struct hostent *hp; unsigned short port; *************** *** 97,103 **** &byte_after, &prop); bcopy((char *)prop, im_hostname, hname_size); bcopy((char *)(prop + offset_of_portnumber), (char *)&s, portnumber_size); ! #ifdef TCPCONN port = ntohs(s); #endif bcopy((char *)(prop + offset_of_version), (char *)&i, version_size); --- 101,107 ---- &byte_after, &prop); bcopy((char *)prop, im_hostname, hname_size); bcopy((char *)(prop + offset_of_portnumber), (char *)&s, portnumber_size); ! #if defined(TCPCONN) && !defined(_MINIX) port = ntohs(s); #endif bcopy((char *)(prop + offset_of_version), (char *)&i, version_size); *************** *** 108,114 **** if (im->major_version != XIM_MAJOR_VERSION) return(False); if (!(im->minor_version >= XIM_MINOR_VERSION)) return(False); ! #ifdef TCPCONN /* * Attempts to open INET domain socket. */ --- 112,118 ---- if (im->major_version != XIM_MAJOR_VERSION) return(False); if (!(im->minor_version >= XIM_MINOR_VERSION)) return(False); ! #if defined(TCPCONN) && !defined(_MINIX) /* * Attempts to open INET domain socket. */ *************** *** 118,124 **** saddr_in.sin_family = AF_INET; saddr_in.sin_port = htons(port); if ((sd = socket(AF_INET, SOCK_STREAM, 0)) >= 0) { ! if (connect(sd, &saddr_in, sizeof(saddr_in)) >= 0) { inet_ok = 1; } else { close(sd); --- 122,129 ---- saddr_in.sin_family = AF_INET; saddr_in.sin_port = htons(port); if ((sd = socket(AF_INET, SOCK_STREAM, 0)) >= 0) { ! if (connect(sd, (struct sockaddr *)&saddr_in, sizeof(saddr_in)) ! >= 0) { inet_ok = 1; } else { close(sd); *************** *** 137,143 **** if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { return(False); } ! if (connect(sd, &saddr, strlen(saddr.sun_path)+sizeof(saddr.sun_family)) < 0) { close(sd); return(False); } --- 142,149 ---- if ((sd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) { return(False); } ! if (connect(sd, (struct sockaddr *)&saddr, ! strlen(saddr.sun_path)+sizeof(saddr.sun_family)) < 0) { close(sd); return(False); } diff -c mit/lib/X/Xsi/XLocalIM.c:1.1.1.5 mit/lib/X/Xsi/XLocalIM.c:1.2 *** mit/lib/X/Xsi/XLocalIM.c:1.1.1.5 Sat Mar 12 00:37:41 1994 --- mit/lib/X/Xsi/XLocalIM.c Sat Mar 12 00:37:41 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/Xsi/XLocalIM.c,v 1.2 1993/04/09 11:28:06 dawes Exp $ * $XConsortium: XLocalIM.c,v 1.11 92/10/22 14:26:20 rws Exp $ */ *************** *** 528,539 **** char *path; char *dir; char *env; if ((env = getenv("XNLSPATH")) == NULL) { ! env = XNLSPATHDEFAULT; } path = nlspath; ! strcpy(path, env); while (1) { if (path == NULL) { fprintf(stderr, "%s \"%s\".\n%s%s%s.\n", --- 529,549 ---- char *path; char *dir; char *env; + char *xwinhome = NULL; if ((env = getenv("XNLSPATH")) == NULL) { ! if ((xwinhome = getenv("XWINHOME")) == NULL) { ! env = XNLSPATHDEFAULT; ! } } path = nlspath; ! if (xwinhome) { ! strcpy(path, xwinhome); ! strcat(path, "/lib/X11/nls"); ! } ! else { ! strcpy(path, env); ! } while (1) { if (path == NULL) { fprintf(stderr, "%s \"%s\".\n%s%s%s.\n", diff -c mit/lib/X/Xsi/XOpenIM.c:1.1.1.2 mit/lib/X/Xsi/XOpenIM.c:1.4 *** mit/lib/X/Xsi/XOpenIM.c:1.1.1.2 Sat Mar 12 00:37:42 1994 --- mit/lib/X/Xsi/XOpenIM.c Sat Mar 12 00:37:42 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/Xsi/XOpenIM.c,v 1.4 1993/05/24 12:36:48 dawes Exp $ * $XConsortium: XOpenIM.c,v 1.19 92/07/28 17:52:13 rws Exp $ */ *************** *** 29,34 **** --- 30,39 ---- * kuwa%omron.co.jp@uunet.uu.net */ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #include "Xlibint.h" #include "Xi18nint.h" #include "XIMlibint.h" *************** *** 38,44 **** --- 43,51 ---- extern char *getenv(); #endif #ifdef X_NOT_POSIX + #ifndef SCO324 extern int getuid(); + #endif #endif #if __STDC__ && !defined(NORCONST) diff -c mit/lib/X/Xsi/XlcLoad.c:1.1.1.5 mit/lib/X/Xsi/XlcLoad.c:2.0 *** mit/lib/X/Xsi/XlcLoad.c:1.1.1.5 Sat Mar 12 00:37:42 1994 --- mit/lib/X/Xsi/XlcLoad.c Sat Mar 12 00:37:42 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/X/Xsi/XlcLoad.c,v 2.0 1994/02/10 21:23:39 dawes Exp $ * $XConsortium: XlcLoad.c,v 1.44 92/12/14 09:22:48 rws Exp $ */ *************** *** 38,43 **** --- 39,48 ---- #include "Xi18nint.h" #include + #if (BSD >= 199103) + #define fgetline Xfgetline + #endif + #if __STDC__ && !defined(NORCONST) #define RConst const #else *************** *** 792,797 **** --- 797,803 ---- char *path; char *dir; char *env; + char *xwinhome = NULL; LockMutex(&lock); if (NLSDir != NULL) { *************** *** 799,808 **** return; } if ((env = getenv("XNLSPATH")) == NULL) { ! env = XNLSPATHDEFAULT; } path = nlspath; ! strcpy(path, env); while (1) { if (path == NULL) { --- 805,822 ---- return; } if ((env = getenv("XNLSPATH")) == NULL) { ! if ((xwinhome = getenv("XWINHOME")) == NULL) { ! env = XNLSPATHDEFAULT; ! } } path = nlspath; ! if (xwinhome) { ! strcpy(path, xwinhome); ! strcat(path, "/lib/X11/nls"); ! } ! else { ! strcpy(path, env); ! } while (1) { if (path == NULL) { diff -c mit/lib/Xau/AuDispose.c:1.1.1.1 mit/lib/Xau/AuDispose.c:1.3 *** mit/lib/Xau/AuDispose.c:1.1.1.1 Sat Mar 12 00:37:45 1994 --- mit/lib/Xau/AuDispose.c Sat Mar 12 00:37:45 1994 *************** *** 1,6 **** --- 1,7 ---- /* * Xau - X Authorization Database Library * + * $XFree86: mit/lib/Xau/AuDispose.c,v 1.3 1993/03/27 09:15:03 dawes Exp $ * $XConsortium: AuDispose.c,v 1.3 91/01/08 15:08:21 gildea Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 19,24 **** --- 20,29 ---- */ #include + + #ifdef SVR3SHLIB + #undef XauDisposeAuth + #endif void XauDisposeAuth (auth) diff -c mit/lib/Xau/AuFileName.c:1.1.1.1 mit/lib/Xau/AuFileName.c:1.3 *** mit/lib/Xau/AuFileName.c:1.1.1.1 Sat Mar 12 00:37:46 1994 --- mit/lib/Xau/AuFileName.c Sat Mar 12 00:37:46 1994 *************** *** 1,6 **** --- 1,7 ---- /* * Xau - X Authorization Database Library * + * $XFree86: mit/lib/Xau/AuFileName.c,v 1.3 1993/03/27 09:15:05 dawes Exp $ * $XConsortium: AuFileName.c,v 1.2 91/01/08 15:09:00 gildea Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 20,30 **** #include char * XauFileName () { ! char *name, *malloc (), *getenv (); ! char *strcat (), *strcpy (); static char *buf; static int bsize; int size; --- 21,35 ---- #include + #ifdef SVR3SHLIB + #undef XauFileName + #endif + char * XauFileName () { ! char *name; extern char *malloc (), *getenv (); ! extern char *strcat (), *strcpy (); static char *buf; static int bsize; int size; diff -c mit/lib/Xau/AuGetBest.c:1.1.1.1 mit/lib/Xau/AuGetBest.c:1.3 *** mit/lib/Xau/AuGetBest.c:1.1.1.1 Sat Mar 12 00:37:46 1994 --- mit/lib/Xau/AuGetBest.c Sat Mar 12 00:37:46 1994 *************** *** 1,6 **** --- 1,7 ---- /* * Xau - X Authorization Database Library * + * $XFree86: mit/lib/Xau/AuGetBest.c,v 1.3 1993/03/27 09:15:06 dawes Exp $ * $XConsortium: AuGetBest.c,v 1.4 91/01/08 15:09:20 gildea Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 20,25 **** --- 21,30 ---- #include #include + + #ifdef SVR3SHLIB + #undef XauGetBestAuthByAddr + #endif static binaryEqual (a, b, len) diff -c mit/lib/Xau/AuRead.c:1.1.1.1 mit/lib/Xau/AuRead.c:1.3 *** mit/lib/Xau/AuRead.c:1.1.1.1 Sat Mar 12 00:37:47 1994 --- mit/lib/Xau/AuRead.c Sat Mar 12 00:37:47 1994 *************** *** 1,6 **** --- 1,7 ---- /* * Xau - X Authorization Database Library * + * $XFree86: mit/lib/Xau/AuRead.c,v 1.3 1993/03/27 09:15:07 dawes Exp $ * $XConsortium: AuRead.c,v 1.5 91/01/08 15:09:31 gildea Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 20,25 **** --- 21,30 ---- #include + #ifdef SVR3SHLIB + #undef XauReadAuth + #endif + static read_short (shortp, file) unsigned short *shortp; *************** *** 40,46 **** FILE *file; { unsigned short len; ! char *data, *malloc (); if (read_short (&len, file) == 0) return 0; --- 45,51 ---- FILE *file; { unsigned short len; ! char *data; extern char *malloc (); if (read_short (&len, file) == 0) return 0; *************** *** 66,72 **** { Xauth local; Xauth *ret; ! char *malloc (); if (read_short (&local.family, auth_file) == 0) return 0; --- 71,77 ---- { Xauth local; Xauth *ret; ! extern char *malloc (); if (read_short (&local.family, auth_file) == 0) return 0; diff -c mit/lib/Xau/Imakefile:1.1.1.1 mit/lib/Xau/Imakefile:1.4 *** mit/lib/Xau/Imakefile:1.1.1.1 Sat Mar 12 00:37:47 1994 --- mit/lib/Xau/Imakefile Sat Mar 12 00:37:47 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/lib/Xau/Imakefile,v 1.4 1993/03/27 09:15:09 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.18 91/07/16 22:53:38 gildea Exp $ #define DoNormalLib NormalLibXau #define DoSharedLib SharedLibXau *************** *** 34,39 **** --- 35,42 ---- LintLibraryTarget(Xau,$(SRCS)) InstallLintLibrary(Xau,$(LINTLIBDIR)) + + InstallLinkKitLibrary(Xau,$(LINKKITDIR)/lib) BuildIncludes($(HEADERS),.,.) InstallMultiple($(HEADERS),$(INCDIR)) diff -c mit/lib/Xaw/AllWidgets.c:1.1.1.1 mit/lib/Xaw/AllWidgets.c:1.3 *** mit/lib/Xaw/AllWidgets.c:1.1.1.1 Sat Mar 12 00:37:54 1994 --- mit/lib/Xaw/AllWidgets.c Sat Mar 12 00:37:54 1994 *************** *** 2,7 **** --- 2,8 ---- * This file is generated by the genlist.sh script and contains an array of * all the widgets in Athena widget set. * + * $XFree86: mit/lib/Xaw/AllWidgets.c,v 1.3 1993/03/27 09:09:31 dawes Exp $ * $XConsortium: AllWidgets.c,v 1.4 90/03/02 15:34:13 jim Exp $ */ #include *************** *** 51,56 **** --- 52,58 ---- extern WidgetClass viewportWidgetClass; extern WidgetClass wmShellWidgetClass; + #ifndef SVR3SHLIB XmuWidgetNode XawWidgetArray[] = { { "applicationShell", &applicationShellWidgetClass }, { "asciiSink", &asciiSinkObjectClass }, *************** *** 98,101 **** --- 100,159 ---- }; int XawWidgetCount = XtNumber(XawWidgetArray); + + #else /* SVR3SHLIB */ + + /* WidgetClass pointer will be initialized during runtime */ + + XmuWidgetNode XawWidgetArray[] = { + { "applicationShell" }, + { "asciiSink" }, + { "asciiSrc" }, + { "asciiText" }, + { "box" }, + { "clock" }, + { "command" }, + { "composite" }, + { "constraint" }, + { "core" }, + { "dialog" }, + { "form" }, + { "grip" }, + { "label" }, + { "list" }, + { "logo" }, + { "mailbox" }, + { "menuButton" }, + { "object" }, + { "overrideShell" }, + { "paned" }, + { "panner" }, + { "porthole" }, + { "rect" }, + { "repeater" }, + { "scrollbar" }, + { "shell" }, + { "simpleMenu" }, + { "simple" }, + { "smeBSB" }, + { "smeLine" }, + { "sme" }, + { "stripChart" }, + { "textSink" }, + { "textSrc" }, + { "text" }, + { "toggle" }, + { "topLevelShell" }, + { "transientShell" }, + { "tree" }, + { "vendorShell" }, + { "viewport" }, + { "wmShell" }, + }; + + XmuWidgetNode __arr__[FUTURE_WIDGET_COUNT] = {0}; + + int XawWidgetCount = XtNumber(XawWidgetArray); + + #endif diff -c mit/lib/Xaw/AsciiSink.c:1.1.1.1 mit/lib/Xaw/AsciiSink.c:1.3 *** mit/lib/Xaw/AsciiSink.c:1.1.1.1 Sat Mar 12 00:37:55 1994 --- mit/lib/Xaw/AsciiSink.c Sat Mar 12 00:37:55 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/AsciiSink.c,v 1.3 1993/03/27 09:09:35 dawes Exp $ */ /* $XConsortium: AsciiSink.c,v 1.57 91/07/21 20:35:00 converse Exp $ */ /*********************************************************** *************** *** 58,64 **** --- 59,69 ---- }; #undef offset + #ifndef SVR3SHLIB #define SuperClass (&textSinkClassRec) + #else + #define SuperClass NULL + #endif AsciiSinkClassRec asciiSinkClassRec = { { /* core_class fields */ *************** *** 113,120 **** /* unused */ 0 } }; ! WidgetClass asciiSinkObjectClass = (WidgetClass)&asciiSinkClassRec; /* Utilities */ --- 118,129 ---- /* unused */ 0 } }; ! #ifndef SVR3SHLIB WidgetClass asciiSinkObjectClass = (WidgetClass)&asciiSinkClassRec; + #else + extern WidgetClass asciiSinkObjectClass; + #define _XtInherit (*_libXt__XtInherit) + #endif /* Utilities */ diff -c mit/lib/Xaw/AsciiSrc.c:1.1.1.1 mit/lib/Xaw/AsciiSrc.c:2.0 *** mit/lib/Xaw/AsciiSrc.c:1.1.1.1 Sat Mar 12 00:37:56 1994 --- mit/lib/Xaw/AsciiSrc.c Sat Mar 12 00:37:56 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/AsciiSrc.c,v 2.0 1993/11/07 14:06:48 dawes Exp $ */ /* $XConsortium: AsciiSrc.c,v 1.55 91/07/25 18:09:27 rws Exp $ */ /* *************** *** 91,100 **** static void ClassInitialize(), Initialize(), Destroy(), GetValuesHook(); static String MyStrncpy(), StorePiecesInString(); static Boolean SetValues(), WriteToFile(); ! extern int errno, sys_nerr; extern char* sys_errlist[]; #define superclass (&textSrcClassRec) AsciiSrcClassRec asciiSrcClassRec = { { /* core_class fields */ --- 92,110 ---- static void ClassInitialize(), Initialize(), Destroy(), GetValuesHook(); static String MyStrncpy(), StorePiecesInString(); static Boolean SetValues(), WriteToFile(); ! extern int errno; ! #ifndef X_NO_STRERROR ! #include ! #else ! extern int sys_nerr; extern char* sys_errlist[]; + #endif + #ifndef SVR3SHLIB #define superclass (&textSrcClassRec) + #else + #define superclass NULL + #endif AsciiSrcClassRec asciiSrcClassRec = { { /* core_class fields */ *************** *** 142,152 **** }, /* asciiSrc_class fields */ { ! /* Keep the compiler happy */ NULL } }; ! WidgetClass asciiSrcObjectClass = (WidgetClass)&asciiSrcClassRec; /************************************************************ * --- 152,165 ---- }, /* asciiSrc_class fields */ { ! /* Keep the compiler happy */ 0 } }; ! #ifndef SVR3SHLIB WidgetClass asciiSrcObjectClass = (WidgetClass)&asciiSrcClassRec; + #else + extern WidgetClass asciiSrcObjectClass; + #endif /************************************************************ * *************** *** 991,996 **** --- 1004,1012 ---- char msg[11]; params[0] = src->ascii_src.string; + #ifndef X_NO_STRERROR + params[1] = strerror(errno); + #else if (errno <= sys_nerr) params[1] = sys_errlist[errno]; else { *************** *** 997,1002 **** --- 1013,1019 ---- sprintf(msg, "errno=%.4d", errno); params[1] = msg; } + #endif XtAppWarningMsg(XtWidgetToApplicationContext((Widget)src), "openError", "asciiSourceCreate", "XawWarning", "Cannot open file %s; %s", params, &num_params); diff -c mit/lib/Xaw/AsciiText.c:1.1.1.1 mit/lib/Xaw/AsciiText.c:1.3 *** mit/lib/Xaw/AsciiText.c:1.1.1.1 Sat Mar 12 00:37:57 1994 --- mit/lib/Xaw/AsciiText.c Sat Mar 12 00:37:57 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/AsciiText.c,v 1.3 1993/03/27 09:09:37 dawes Exp $ */ /* $XConsortium: AsciiText.c,v 1.44 91/07/12 11:27:23 converse Exp $ */ /* *************** *** 59,65 **** --- 60,70 ---- AsciiTextClassRec asciiTextClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &textClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Text", /* widget_size */ sizeof(AsciiRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 100,107 **** /* empty */ 0 } }; ! WidgetClass asciiTextWidgetClass = (WidgetClass)&asciiTextClassRec; static void --- 105,115 ---- /* empty */ 0 } }; ! #ifndef SVR3SHLIB WidgetClass asciiTextWidgetClass = (WidgetClass)&asciiTextClassRec; + #else + extern WidgetClass asciiTextWidgetClass; + #endif static void diff -c mit/lib/Xaw/Box.c:1.1.1.1 mit/lib/Xaw/Box.c:1.3 *** mit/lib/Xaw/Box.c:1.1.1.1 Sat Mar 12 00:37:57 1994 --- mit/lib/Xaw/Box.c Sat Mar 12 00:37:57 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Box.c,v 1.3 1993/03/27 09:09:40 dawes Exp $ */ /* $XConsortium: Box.c,v 1.45 90/12/31 10:22:09 gildea Exp $ */ /*********************************************************** *************** *** 72,78 **** --- 73,83 ---- BoxClassRec boxClassRec = { { /* core_class fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &compositeClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Box", /* widget_size */ sizeof(BoxRec), /* class_initialize */ ClassInitialize, *************** *** 117,123 **** --- 122,132 ---- } }; + #ifndef SVR3SHLIB WidgetClass boxWidgetClass = (WidgetClass)&boxClassRec; + #else + extern WidgetClass boxWidgetClass; + #endif /**************************************************************** diff -c /dev/null mit/lib/Xaw/ChkShlibRev.c:1.2 *** /dev/null Sat Mar 12 00:37:58 1994 --- mit/lib/Xaw/ChkShlibRev.c Sat Mar 12 00:37:58 1994 *************** *** 0 **** --- 1,34 ---- + /* libXaw: ChkShlibRev.c + * + * This code is linked to the clients and is called by their .init sections. + * It checks the SVR3 target shared library revision. + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/ChkShlibRev.c,v 1.2 1993/03/27 09:09:42 dawes Exp $ + */ + + #include + + #ifdef SVR3SHLIB + #ifdef __STDC__ + #define Const const + #else + #define Const /**/ + #endif + + extern Const char *_shared_libXaw_version; + + void __check_libXaw_rev_() + { + + /* check revision + */ + + if(strcmp(_shared_libXaw_version, SOXAWREV)) + fprintf(stderr, "Warning: %s has other revision (%s) than expected" + " %s\n", TARGET, _shared_libXaw_version, SOXAWREV); + + } + #endif + diff -c mit/lib/Xaw/Clock.c:1.1.1.1 mit/lib/Xaw/Clock.c:1.3 *** mit/lib/Xaw/Clock.c:1.1.1.1 Sat Mar 12 00:37:58 1994 --- mit/lib/Xaw/Clock.c Sat Mar 12 00:37:59 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Clock.c,v 1.3 1993/03/27 09:09:44 dawes Exp $ */ /* $XConsortium: Clock.c,v 1.65 91/08/14 12:12:56 rws Exp $ */ /*********************************************************** *************** *** 103,109 **** --- 104,114 ---- ClockClassRec clockClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &simpleClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Clock", /* widget_size */ sizeof(ClockRec), /* class_initialize */ ClassInitialize, *************** *** 144,150 **** --- 149,159 ---- } }; + #ifndef SVR3SHLIB WidgetClass clockWidgetClass = (WidgetClass) &clockClassRec; + #else + extern WidgetClass clockWidgetClass; + #endif /**************************************************************** * diff -c mit/lib/Xaw/Command.c:1.1.1.1 mit/lib/Xaw/Command.c:1.3 *** mit/lib/Xaw/Command.c:1.1.1.1 Sat Mar 12 00:37:59 1994 --- mit/lib/Xaw/Command.c Sat Mar 12 00:37:59 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Command.c,v 1.3 1993/03/27 09:09:47 dawes Exp $ */ /* $XConsortium: Command.c,v 1.76 91/05/04 19:29:00 converse Exp $ */ /*********************************************************** *************** *** 84,94 **** --- 85,103 ---- {"unhighlight", Unhighlight} }; + #ifndef SVR3SHLIB #define SuperClass ((LabelWidgetClass)&labelClassRec) + #else + #define SuperClass ((LabelWidgetClass)labelWidgetClass) + #endif CommandClassRec commandClassRec = { { + #ifndef SVR3SHLIB (WidgetClass) SuperClass, /* superclass */ + #else + NULL, /* superclass */ + #endif "Command", /* class_name */ sizeof(CommandRec), /* size */ ClassInitialize, /* class_initialize */ *************** *** 133,139 **** --- 142,152 ---- }; /* for public consumption */ + #ifndef SVR3SHLIB WidgetClass commandWidgetClass = (WidgetClass) &commandClassRec; + #else + extern WidgetClass commandWidgetClass; + #endif /**************************************************************** * diff -c mit/lib/Xaw/Dialog.c:1.1.1.1 mit/lib/Xaw/Dialog.c:1.3 *** mit/lib/Xaw/Dialog.c:1.1.1.1 Sat Mar 12 00:38:00 1994 --- mit/lib/Xaw/Dialog.c Sat Mar 12 00:38:00 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Dialog.c,v 1.3 1993/03/27 09:09:49 dawes Exp $ */ /* $XConsortium: Dialog.c,v 1.45 91/03/21 14:38:27 dave Exp $ */ /*********************************************************** *************** *** 68,74 **** --- 69,79 ---- DialogClassRec dialogClassRec = { { /* core_class fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &formClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Dialog", /* widget_size */ sizeof(DialogRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 125,131 **** --- 130,140 ---- } }; + #ifndef SVR3SHLIB WidgetClass dialogWidgetClass = (WidgetClass)&dialogClassRec; + #else + extern WidgetClass dialogWidgetClass; + #endif /* ARGSUSED */ static void Initialize(request, new) diff -c mit/lib/Xaw/Form.c:1.1.1.1 mit/lib/Xaw/Form.c:1.3 *** mit/lib/Xaw/Form.c:1.1.1.1 Sat Mar 12 00:38:00 1994 --- mit/lib/Xaw/Form.c Sat Mar 12 00:38:01 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Form.c,v 1.3 1993/03/27 09:09:52 dawes Exp $ */ /* $XConsortium: Form.c,v 1.48 91/07/22 18:08:25 ackerman Exp $ */ /*********************************************************** *************** *** 78,84 **** --- 79,89 ---- FormClassRec formClassRec = { { /* core_class fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &constraintClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Form", /* widget_size */ sizeof(FormRec), /* class_initialize */ ClassInitialize, *************** *** 132,138 **** --- 137,147 ---- } }; + #ifndef SVR3SHLIB WidgetClass formWidgetClass = (WidgetClass)&formClassRec; + #else + extern WidgetClass formWidgetClass; + #endif /**************************************************************** * diff -c mit/lib/Xaw/Grip.c:1.1.1.1 mit/lib/Xaw/Grip.c:1.3 *** mit/lib/Xaw/Grip.c:1.1.1.1 Sat Mar 12 00:38:01 1994 --- mit/lib/Xaw/Grip.c Sat Mar 12 00:38:01 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Grip.c,v 1.3 1993/03/27 09:09:54 dawes Exp $ */ /* $XConsortium: Grip.c,v 1.31 91/07/21 18:53:29 gildea Exp $ */ /*********************************************************** *************** *** 56,62 **** --- 57,67 ---- {"GripAction", GripAction}, }; + #ifndef SVR3SHLIB #define SuperClass (&simpleClassRec) + #else + #define SuperClass NULL + #endif GripClassRec gripClassRec = { { *************** *** 100,106 **** --- 105,115 ---- } }; + #ifndef SVR3SHLIB WidgetClass gripWidgetClass = (WidgetClass) &gripClassRec; + #else + extern WidgetClass gripWidgetClass; + #endif static void GripAction( widget, event, params, num_params ) Widget widget; diff -c mit/lib/Xaw/Imakefile:1.1.1.1 mit/lib/Xaw/Imakefile:2.0 *** mit/lib/Xaw/Imakefile:1.1.1.1 Sat Mar 12 00:38:02 1994 --- mit/lib/Xaw/Imakefile Sat Mar 12 00:38:02 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/lib/Xaw/Imakefile,v 2.0 1993/08/28 07:44:34 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.78 91/09/18 14:28:23 rws Exp $ #define DoNormalLib NormalLibXaw #define DoSharedLib SharedLibXaw *************** *** 121,127 **** Vendor.c \ Viewport.c \ XawInit.c \ ! sharedlib.c #if SharedDataSeparation UNSHAREDOBJS = AllWidgets.o sharedlib.o --- 122,167 ---- Vendor.c \ Viewport.c \ XawInit.c \ ! sharedlib.c \ ! globals.c \ ! InitLibStub.s \ ! InitClnStub.s \ ! InitLib.c \ ! ChkShlibRev.c \ ! dummyBind.c \ ! pAsciiSink.c \ ! pAsciiSrc.c \ ! pAsciiText.c \ ! pBox.c \ ! pClock.c \ ! pCommand.c \ ! pDialog.c \ ! pForm.c \ ! pGrip.c \ ! pLabel.c \ ! pList.c \ ! pLogo.c \ ! pMailbox.c \ ! pMenuBotton.c \ ! pPaned.c \ ! pPanner.c \ ! pPorthole.c \ ! pRepeater.c \ ! pScrollbar.c \ ! pSimple.c \ ! pSimpleMenu.c \ ! pSme.c \ ! pSmeBSB.c \ ! pSmeLine.c \ ! pStripChart.c \ ! pText.c \ ! pTextSink.c \ ! pTextSrc.c \ ! pToggle.c \ ! pTree.c \ ! pVendor.c \ ! pViewport.c \ ! pFuture.c #if SharedDataSeparation UNSHAREDOBJS = AllWidgets.o sharedlib.o *************** *** 164,182 **** Tree.o \ Vendor.o \ Viewport.o \ ! XawInit.o LibraryObjectRule() #if DoSharedLib && SharedDataSeparation ! SpecialObjectRule(sharedlib.o,,$(SHLIBDEF)) #endif #if DoSharedLib #if DoNormalLib SharedLibraryTarget(Xaw,$(SOXAWREV),$(OBJS),shared,..) #else SharedLibraryTarget(Xaw,$(SOXAWREV),$(OBJS),.,.) #endif SharedLibraryDataTarget(Xaw,$(SOXAWREV),$(UNSHAREDOBJS)) InstallSharedLibrary(Xaw,$(SOXAWREV),$(USRLIBDIR)) --- 204,279 ---- Tree.o \ Vendor.o \ Viewport.o \ ! XawInit.o + #if defined(i386SVR3Architecture) && DoSharedLib + SVR3SHLIBOBJS = \ + globals.o \ + InitLibStub.o \ + InitClnStub.o \ + InitLib.o \ + ChkShlibRev.o \ + dummyBind.o \ + pAsciiSink.o \ + pAsciiSrc.o \ + pAsciiText.o \ + pBox.o \ + pClock.o \ + pCommand.o \ + pDialog.o \ + pForm.o \ + pGrip.o \ + pLabel.o \ + pList.o \ + pLogo.o \ + pMailbox.o \ + pMenuBotton.o \ + pPaned.o \ + pPanner.o \ + pPorthole.o \ + pRepeater.o \ + pScrollbar.o \ + pSimple.o \ + pSimpleMenu.o \ + pSme.o \ + pSmeBSB.o \ + pSmeLine.o \ + pStripChart.o \ + pText.o \ + pTextSink.o \ + pTextSrc.o \ + pToggle.o \ + pTree.o \ + pVendor.o \ + pViewport.o \ + pFuture.o + #endif + LibraryObjectRule() + #if defined(i386SVR3Architecture) && DoSharedLib + SpecialLibObjectRule(globals.o,$(ICONFIGFILES),-D_libXaw_import -DSOXAWREV=\"$(SOXAWREV)\") + SpecialLibObjectRule(ChkShlibRev.o,,-D_libXaw_import -DSOXAWREV=\"$(SOXAWREV)\" -DTARGET=\"$(LIBDIR)/shlib/libXaw.$(SOXAWREV)\") + SpecialLibObjectRule(InitLib.o,,-D_libXaw_import) + #endif + #if DoSharedLib && SharedDataSeparation ! SpecialObjectRule(sharedlib.o,sharedlib.c,$(SHLIBDEF)) #endif #if DoSharedLib + #ifndef i386SVR3Architecture #if DoNormalLib SharedLibraryTarget(Xaw,$(SOXAWREV),$(OBJS),shared,..) #else SharedLibraryTarget(Xaw,$(SOXAWREV),$(OBJS),.,.) + #endif + #else + #if DoNormalLib + SharedLibraryTarget(Xaw,$(SOXAWREV),$(OBJS) $(SVR3SHLIBOBJS),shared,..) + #else + SharedLibraryTarget(Xaw,$(SOXAWREV),$(OBJS) $(SVR3SHLIBOBJS),.,.) + #endif #endif SharedLibraryDataTarget(Xaw,$(SOXAWREV),$(UNSHAREDOBJS)) InstallSharedLibrary(Xaw,$(SOXAWREV),$(USRLIBDIR)) diff -c /dev/null mit/lib/Xaw/InitClnStub.s:2.0 *** /dev/null Sat Mar 12 00:38:02 1994 --- mit/lib/Xaw/InitClnStub.s Sat Mar 12 00:38:02 1994 *************** *** 0 **** --- 1,31 ---- + .file "InitClnStub.s" + + /##################################################################### + /# InitClnStub.s # + /# ----------------------------------------------------------------- # + /# This stub goes to .init section of the client binary and calls # + /# the code which binds the client to the library # + /# Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany # + /# (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) # + /##################################################################### + + /# $XFree86: mit/lib/Xaw/InitClnStub.s,v 2.0 1993/09/30 17:34:58 dawes Exp $ + + .section .init,"x" + + .align 4 + + .globl __bind_to_sv3shlib_ + + / bind client to library (init pointers in subclasses of the client) + / _bind_to_sv3shlib_() must be supplied by the client, otherwise + / an empty dummy function from the host shared library is linked to it + + __bind_to_sv3shlib_: + pushl %ebp + movl %esp,%ebp + / call function in client + call _bind_to_sv3shlib_ + leave + + diff -c /dev/null mit/lib/Xaw/InitLib.c:1.3 *** /dev/null Sat Mar 12 00:38:02 1994 --- mit/lib/Xaw/InitLib.c Sat Mar 12 00:38:03 1994 *************** *** 0 **** --- 1,309 ---- + /* libXaw: InitLib.c + * ----------------- + * This code goes into .init section of the client binary. + * On archive libraries references like &widgetClassRec, &compositeClassRec + * and so on are unresolved. They will resolved during linking. So someone + * could define its own (e.g.) widgetClassRec and even the library code + * will use it gracefully (one example for this are the vendorShellClassRec's + * in the Toolkit, in the Athena Widgets and in the Motif widgets). + * On SVR3 shared lib such references are on fixed addresses. The library + * would never use a user defined (e.g.) vendorShellClassRec and the compiler + * would complain about multiply defined vendorShellClassRec. + * So we don't reference to (e.g.) vendorShellClassRec in the shared lib. + * Instead putting this code to client binary, which is resolved during + * linking and writes on runtime the needed addresses to the shared lib. + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/InitLib.c,v 1.3 1993/05/22 06:43:32 dawes Exp $ + */ + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #ifdef SVR3SHLIB + + /* Check whether the named class is really from shared libXaw. + * It could also be user supplied. We don't know with what the user + * wants to initialize, so let it be in that case. + * 0xB1C00000 : address of libXaw's .data section + */ + #define IsInLibXaw(ClassRec) ((unsigned)ClassRec & 0xFFC00000) == 0xB1C00000 + + extern WidgetClass __futureWidgetClass_0_; + extern WidgetClass __futureWidgetClass_1_; + extern WidgetClass __futureWidgetClass_2_; + extern WidgetClass __futureWidgetClass_3_; + extern WidgetClass __futureWidgetClass_4_; + extern WidgetClass __futureWidgetClass_5_; + extern WidgetClass __futureWidgetClass_6_; + extern WidgetClass __futureWidgetClass_7_; + extern WidgetClass __futureWidgetClass_8_; + extern WidgetClass __futureWidgetClass_9_; + extern WidgetClass __futureWidgetClass_10_; + extern WidgetClass __futureWidgetClass_11_; + extern WidgetClass __futureWidgetClass_12_; + extern WidgetClass __futureWidgetClass_13_; + extern WidgetClass __futureWidgetClass_14_; + extern WidgetClass __futureWidgetClass_15_; + extern WidgetClass __futureWidgetClass_16_; + extern WidgetClass __futureWidgetClass_17_; + extern WidgetClass __futureWidgetClass_18_; + extern WidgetClass __futureWidgetClass_19_; + + static WidgetClass *__AllWidgets[] = { + &applicationShellWidgetClass, + &asciiSinkObjectClass, + &asciiSrcObjectClass, + &asciiTextWidgetClass, + &boxWidgetClass, + &clockWidgetClass, + &commandWidgetClass, + &compositeWidgetClass, + &constraintWidgetClass, + &coreWidgetClass, + &dialogWidgetClass, + &formWidgetClass, + &gripWidgetClass, + &labelWidgetClass, + &listWidgetClass, + &logoWidgetClass, + &mailboxWidgetClass, + &menuButtonWidgetClass, + &objectClass, + &overrideShellWidgetClass, + &panedWidgetClass, + &pannerWidgetClass, + &portholeWidgetClass, + &rectObjClass, + &repeaterWidgetClass, + &scrollbarWidgetClass, + &shellWidgetClass, + &simpleMenuWidgetClass, + &simpleWidgetClass, + &smeBSBObjectClass, + &smeLineObjectClass, + &smeObjectClass, + &stripChartWidgetClass, + &textSinkObjectClass, + &textSrcObjectClass, + &textWidgetClass, + &toggleWidgetClass, + &topLevelShellWidgetClass, + &transientShellWidgetClass, + &treeWidgetClass, + &vendorShellWidgetClass, + &viewportWidgetClass, + &wmShellWidgetClass, + /* + * additional widgetClass's will be on the same address like this + * dummy pointers, so the client will initialize them in XawWidgetArray + * too + */ + &__futureWidgetClass_0_, + &__futureWidgetClass_1_, + &__futureWidgetClass_2_, + &__futureWidgetClass_3_, + &__futureWidgetClass_4_, + &__futureWidgetClass_5_, + &__futureWidgetClass_6_, + &__futureWidgetClass_7_, + &__futureWidgetClass_8_, + &__futureWidgetClass_9_, + &__futureWidgetClass_10_, + &__futureWidgetClass_11_, + &__futureWidgetClass_12_, + &__futureWidgetClass_13_, + &__futureWidgetClass_14_, + &__futureWidgetClass_15_, + &__futureWidgetClass_16_, + &__futureWidgetClass_17_, + &__futureWidgetClass_18_, + &__futureWidgetClass_19_ + }; + + extern XmuWidgetNode XawWidgetArray[]; + extern int XawWidgetCount; + extern XtActionsRec _XawTextActionsTable[]; + + void __libXaw_init_() + { + int i; + + /* initialize XawWidgetArray at first */ + + for(i = 0 ; i < (XawWidgetCount+FUTURE_WIDGET_COUNT); i++) + XawWidgetArray[i].widget_class_ptr = __AllWidgets[i]; + + /* AsciiSink.c */ + if(IsInLibXaw(asciiSinkObjectClass)) + asciiSinkObjectClass->core_class.superclass = textSinkObjectClass; + + /* AsciiSrc.c */ + if(IsInLibXaw(asciiSrcObjectClass)) + asciiSrcObjectClass->core_class.superclass = textSrcObjectClass; + + /* AsciiText.c */ + if(IsInLibXaw(asciiTextWidgetClass)) + asciiTextWidgetClass->core_class.superclass = textWidgetClass; + + /* Box.c */ + if(IsInLibXaw(boxWidgetClass)) + boxWidgetClass->core_class.superclass = compositeWidgetClass; + + /* Clock.c */ + if(IsInLibXaw(clockWidgetClass)) + clockWidgetClass->core_class.superclass = simpleWidgetClass; + + /* Command.c */ + if(IsInLibXaw(commandWidgetClass)) + commandWidgetClass->core_class.superclass = labelWidgetClass; + + /* Dialog.c */ + if(IsInLibXaw(dialogWidgetClass)) + dialogWidgetClass->core_class.superclass = formWidgetClass; + + /* Form.c */ + if(IsInLibXaw(formWidgetClass)) + formWidgetClass->core_class.superclass = constraintWidgetClass; + + /* Grip.c */ + if(IsInLibXaw(gripWidgetClass)) + gripWidgetClass->core_class.superclass = simpleWidgetClass; + + /* Label.c */ + if(IsInLibXaw(labelWidgetClass)) + labelWidgetClass->core_class.superclass = simpleWidgetClass; + + /* List.c */ + if(IsInLibXaw(listWidgetClass)) + listWidgetClass->core_class.superclass = simpleWidgetClass; + + /* Logo.c */ + if(IsInLibXaw(logoWidgetClass)) + logoWidgetClass->core_class.superclass = simpleWidgetClass; + + /* Mailbox.c */ + if(IsInLibXaw(mailboxWidgetClass)) + mailboxWidgetClass->core_class.superclass = simpleWidgetClass; + + /* MenuBotton.c */ + if(IsInLibXaw(menuButtonWidgetClass)) + menuButtonWidgetClass->core_class.superclass = commandWidgetClass; + + /* Paned.c */ + if(IsInLibXaw(panedWidgetClass)) + panedWidgetClass->core_class.superclass = constraintWidgetClass; + + /* Panner.c */ + if(IsInLibXaw(pannerWidgetClass)) + pannerWidgetClass->core_class.superclass = simpleWidgetClass; + + /* Porthole.c */ + if(IsInLibXaw(portholeWidgetClass)) + portholeWidgetClass->core_class.superclass = compositeWidgetClass; + + /* Repeater.c */ + if(IsInLibXaw(repeaterWidgetClass)) + repeaterWidgetClass->core_class.superclass = commandWidgetClass; + + /* Scrollbar.c */ + if(IsInLibXaw(scrollbarWidgetClass)) + scrollbarWidgetClass->core_class.superclass = simpleWidgetClass; + + /* Simple.o */ + if(IsInLibXaw(simpleWidgetClass)) + simpleWidgetClass->core_class.superclass = widgetClass; + + /* SimpleMenu.c */ + if(IsInLibXaw(simpleMenuWidgetClass)) + simpleMenuWidgetClass->core_class.superclass = overrideShellWidgetClass; + + /* Sem.c */ + if(IsInLibXaw(smeObjectClass)) + smeObjectClass->core_class.superclass = rectObjClass; + + /* SmeBSB.c */ + if(IsInLibXaw(smeBSBObjectClass)) + smeBSBObjectClass->core_class.superclass = smeObjectClass; + + /* SmeLine.c */ + if(IsInLibXaw(smeLineObjectClass)) + smeLineObjectClass->core_class.superclass = smeObjectClass; + + /* StripChart.c */ + if(IsInLibXaw(stripChartWidgetClass)) + stripChartWidgetClass->core_class.superclass = simpleWidgetClass; + + /* Text.c */ + if(IsInLibXaw(textWidgetClass)) { + textWidgetClass->core_class.superclass = simpleWidgetClass; + textWidgetClass->core_class.actions = _XawTextActionsTable; + } + + /* TextSink.c */ + if(IsInLibXaw(textSinkObjectClass)) + textSinkObjectClass->core_class.superclass = objectClass; + + /* TextSrc.c */ + if(IsInLibXaw(textSrcObjectClass)) + textSrcObjectClass->core_class.superclass = objectClass; + + /* Toggle.c */ + if(IsInLibXaw(toggleWidgetClass)) + toggleWidgetClass->core_class.superclass = commandWidgetClass; + + /* Tree.c */ + if(IsInLibXaw(treeWidgetClass)) + treeWidgetClass->core_class.superclass = constraintWidgetClass; + + /* Vendor.c */ + if(IsInLibXaw(vendorShellWidgetClass)) + vendorShellWidgetClass->core_class.superclass = wmShellWidgetClass; + + /* Viewport.c */ + if(IsInLibXaw(viewportWidgetClass)) + viewportWidgetClass->core_class.superclass = formWidgetClass; + + + } + #endif /* SVR3SHLIB */ + + diff -c /dev/null mit/lib/Xaw/InitLibStub.s:2.0 *** /dev/null Sat Mar 12 00:38:03 1994 --- mit/lib/Xaw/InitLibStub.s Sat Mar 12 00:38:04 1994 *************** *** 0 **** --- 1,45 ---- + .file "InitLibStub.s" + + /##################################################################### + /# InitLibStub.s # + /# ----------------------------------------------------------------- # + /# This stub goes to .init section of the client binary. It checks # + /# the revision of the library and calls the init code for the # + /# library # + /# Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany # + /# (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) # + /##################################################################### + + /# $XFree86: mit/lib/Xaw/InitLibStub.s,v 2.0 1993/08/22 12:35:58 dawes Exp $ + + .data + / create unresolved reference + .long __bind_to_sv3shlib_ + + .section .init,"x" + + .align 4 + .globl __libXaw_init_stub_ + + __libXaw_init_stub_: + + / check revision of target shared library + + pushl %ebp + movl %esp,%ebp + call __check_libXaw_rev_ + leave + + / inititialize library + + pushl %ebp + movl %esp,%ebp + call __default_libXaw_init_ + leave + + pushl %ebp + movl %esp,%ebp + call __libXaw_init_ + leave + + diff -c mit/lib/Xaw/Label.c:1.1.1.1 mit/lib/Xaw/Label.c:1.3 *** mit/lib/Xaw/Label.c:1.1.1.1 Sat Mar 12 00:38:05 1994 --- mit/lib/Xaw/Label.c Sat Mar 12 00:38:05 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Label.c,v 1.3 1993/03/27 09:10:03 dawes Exp $ */ /* $XConsortium: Label.c,v 1.92 91/07/24 16:56:28 converse Exp $ */ /*********************************************************** *************** *** 91,97 **** --- 92,102 ---- LabelClassRec labelClassRec = { { /* core_class fields */ + #ifndef SVR3SHLIB #define superclass (&simpleClassRec) + #else + #define superclass NULL + #endif /* superclass */ (WidgetClass) superclass, /* class_name */ "Label", /* widget_size */ sizeof(LabelRec), *************** *** 130,136 **** --- 135,145 ---- /* change_sensitive */ XtInheritChangeSensitive } }; + #ifndef SVR3SHLIB WidgetClass labelWidgetClass = (WidgetClass)&labelClassRec; + #else + extern WidgetClass labelWidgetClass; + #endif /**************************************************************** * * Private Procedures diff -c mit/lib/Xaw/List.c:1.1.1.1 mit/lib/Xaw/List.c:1.3 *** mit/lib/Xaw/List.c:1.1.1.1 Sat Mar 12 00:38:05 1994 --- mit/lib/Xaw/List.c Sat Mar 12 00:38:06 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/List.c,v 1.3 1993/03/27 09:10:06 dawes Exp $ */ /* $XConsortium: List.c,v 1.34 91/09/27 18:35:07 converse Exp $ */ /* *************** *** 117,123 **** --- 118,128 ---- ListClassRec listClassRec = { { /* core_class fields */ + #ifndef SVR3SHLIB #define superclass (&simpleClassRec) + #else + #define superclass NULL + #endif /* superclass */ (WidgetClass) superclass, /* class_name */ "List", /* widget_size */ sizeof(ListRec), *************** *** 155,161 **** --- 160,170 ---- } }; + #ifndef SVR3SHLIB WidgetClass listWidgetClass = (WidgetClass)&listClassRec; + #else + extern WidgetClass listWidgetClass; + #endif /**************************************************************** * diff -c mit/lib/Xaw/Logo.c:1.1.1.1 mit/lib/Xaw/Logo.c:1.3 *** mit/lib/Xaw/Logo.c:1.1.1.1 Sat Mar 12 00:38:06 1994 --- mit/lib/Xaw/Logo.c Sat Mar 12 00:38:06 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Logo.c,v 1.3 1993/03/27 09:10:08 dawes Exp $ */ /* $XConsortium: Logo.c,v 1.25 91/05/22 16:56:51 converse Exp $ */ /* *************** *** 36,42 **** --- 37,47 ---- LogoClassRec logoClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &simpleClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Logo", /* widget_size */ sizeof(LogoRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 77,83 **** --- 82,92 ---- } }; + #ifndef SVR3SHLIB WidgetClass logoWidgetClass = (WidgetClass) &logoClassRec; + #else + extern WidgetClass logoWidgetClass; + #endif /***************************************************************************** diff -c mit/lib/Xaw/Mailbox.c:1.1.1.1 mit/lib/Xaw/Mailbox.c:1.4 *** mit/lib/Xaw/Mailbox.c:1.1.1.1 Sat Mar 12 00:38:07 1994 --- mit/lib/Xaw/Mailbox.c Sat Mar 12 00:38:07 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xaw/Mailbox.c,v 1.4 1993/05/04 14:59:55 dawes Exp $ * $XConsortium: Mailbox.c,v 1.58 91/06/13 16:50:32 keith Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 22,27 **** --- 23,35 ---- * XBiff*emptyPixmap: mailempty */ + #if defined(SVR3SHLIB) && defined(SCO) + extern int (*_libXaw_stat)(); + #endif + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcpy + #endif + #include /* for toolkit stuff */ #include /* for useful atom names */ #include /* for cursor constants */ *************** *** 132,138 **** --- 140,150 ---- MailboxClassRec mailboxClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &simpleClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Mailbox", /* widget_size */ sizeof(MailboxRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 173,179 **** --- 185,195 ---- } }; + #ifndef SVR3SHLIB WidgetClass mailboxWidgetClass = (WidgetClass) &mailboxClassRec; + #else + extern WidgetClass mailboxWidgetClass; + #endif /* *************** *** 508,514 **** static void GetMailFile (w) MailboxWidget w; { ! char *getlogin(); char *username; username = getlogin (); --- 524,530 ---- static void GetMailFile (w) MailboxWidget w; { ! extern char *getlogin(); char *username; username = getlogin (); diff -c mit/lib/Xaw/MailboxP.h:1.1.1.1 mit/lib/Xaw/MailboxP.h:2.1 *** mit/lib/Xaw/MailboxP.h:1.1.1.1 Sat Mar 12 00:38:07 1994 --- mit/lib/Xaw/MailboxP.h Sat Mar 12 00:38:07 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xaw/MailboxP.h,v 2.1 1994/02/10 21:23:56 dawes Exp $ * $XConsortium: MailboxP.h,v 1.20 91/07/19 21:52:57 rws Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 22,31 **** #include #include #ifdef SYSV #define MAILBOX_DIRECTORY "/usr/mail" #else ! #ifdef SVR4 #define MAILBOX_DIRECTORY "/var/mail" #else #define MAILBOX_DIRECTORY "/usr/spool/mail" --- 23,38 ---- #include #include + #include + #ifdef SYSV + #ifdef SCO + #define MAILBOX_DIRECTORY "/usr/spool/mail" + #else #define MAILBOX_DIRECTORY "/usr/mail" + #endif #else ! #if defined(SVR4) || (BSD >= 199103) #define MAILBOX_DIRECTORY "/var/mail" #else #define MAILBOX_DIRECTORY "/usr/spool/mail" diff -c mit/lib/Xaw/MenuButton.c:1.1.1.1 mit/lib/Xaw/MenuButton.c:1.4 *** mit/lib/Xaw/MenuButton.c:1.1.1.1 Sat Mar 12 00:38:08 1994 --- mit/lib/Xaw/MenuButton.c Sat Mar 12 00:38:08 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/MenuButton.c,v 1.4 1993/05/22 06:43:34 dawes Exp $ */ /* $XConsortium: MenuButton.c,v 1.18 91/06/22 18:03:46 rws Exp $ */ /* *************** *** 52,58 **** --- 53,63 ---- static void ClassInitialize(); static void PopupMenu(); + #ifndef SVR3SHLIB #define superclass ((CommandWidgetClass)&commandClassRec) + #else + #define superclass NULL + #endif static char defaultTranslations[] = ": highlight() \n\ *************** *** 130,136 **** --- 135,145 ---- }; /* for public consumption */ + #ifndef SVR3SHLIB WidgetClass menuButtonWidgetClass = (WidgetClass) &menuButtonClassRec; + #else + extern WidgetClass menuButtonWidgetClass; + #endif /**************************************************************** * diff -c mit/lib/Xaw/Paned.c:1.1.1.1 mit/lib/Xaw/Paned.c:1.3 *** mit/lib/Xaw/Paned.c:1.1.1.1 Sat Mar 12 00:38:09 1994 --- mit/lib/Xaw/Paned.c Sat Mar 12 00:38:09 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Paned.c,v 1.3 1993/03/27 09:10:16 dawes Exp $ */ /* $XConsortium: Paned.c,v 1.23 91/07/21 18:56:15 gildea Exp $ */ /*********************************************************** *************** *** 177,188 **** --- 178,197 ---- static Boolean PopPaneStack(); static void ClearPaneStack(); + #ifndef SVR3SHLIB #define SuperClass ((ConstraintWidgetClass)&constraintClassRec) + #else + #define SuperClass ((ConstraintWidgetClass)constraintWidgetClass) + #endif PanedClassRec panedClassRec = { { /* core class fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) SuperClass, + #else + /* superclass */ NULL, + #endif /* class name */ "Paned", /* size */ sizeof(PanedRec), /* class_initialize */ ClassInitialize, *************** *** 233,239 **** --- 242,252 ---- } }; + #ifndef SVR3SHLIB WidgetClass panedWidgetClass = (WidgetClass) &panedClassRec; + #else + extern WidgetClass panedWidgetClass; + #endif /* For compatibility. */ WidgetClass vPanedWidgetClass = (WidgetClass) &panedClassRec; diff -c mit/lib/Xaw/Panner.c:1.1.1.1 mit/lib/Xaw/Panner.c:2.0 *** mit/lib/Xaw/Panner.c:1.1.1.1 Sat Mar 12 00:38:10 1994 --- mit/lib/Xaw/Panner.c Sat Mar 12 00:38:10 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xaw/Panner.c,v 2.0 1993/07/24 04:51:25 dawes Exp $ * $XConsortium: Panner.c,v 1.45 92/03/03 13:52:26 converse Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 32,38 **** #include /* for isascii() etc. */ #include /* for atof() */ ! #if defined(ISC) && defined(SYSV) && defined(SYSV386) && __STDC__ extern double atof(char *); #endif --- 33,46 ---- #include /* for isascii() etc. */ #include /* for atof() */ ! #if defined(ISC) && defined(__STDC__) ! #ifdef ISC30 ! extern double atof(const char *); ! #else ! extern double atof(); ! #endif ! #endif ! #if defined(SCO) && defined(__STDC__) extern double atof(char *); #endif *************** *** 123,129 **** --- 131,141 ---- PannerClassRec pannerClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &simpleClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Panner", /* widget_size */ sizeof(PannerRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 164,170 **** --- 176,186 ---- } }; + #ifndef SVR3SHLIB WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec; + #else + extern WidgetClass pannerWidgetClass; + #endif /***************************************************************************** diff -c mit/lib/Xaw/Porthole.c:1.1.1.1 mit/lib/Xaw/Porthole.c:1.3 *** mit/lib/Xaw/Porthole.c:1.1.1.1 Sat Mar 12 00:38:11 1994 --- mit/lib/Xaw/Porthole.c Sat Mar 12 00:38:11 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xaw/Porthole.c,v 1.3 1993/03/27 09:10:21 dawes Exp $ * $XConsortium: Porthole.c,v 1.14 91/03/14 16:48:01 converse Exp $ * * Copyright 1990 Massachusetts Institute of Technology *************** *** 55,61 **** --- 56,66 ---- PortholeClassRec portholeClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &compositeClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Porthole", /* widget_size */ sizeof(PortholeRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 100,106 **** --- 105,115 ---- } }; + #ifndef SVR3SHLIB WidgetClass portholeWidgetClass = (WidgetClass) &portholeClassRec; + #else + extern WidgetClass portholeWidgetClass; + #endif /***************************************************************************** diff -c mit/lib/Xaw/Repeater.c:1.1.1.1 mit/lib/Xaw/Repeater.c:1.3 *** mit/lib/Xaw/Repeater.c:1.1.1.1 Sat Mar 12 00:38:11 1994 --- mit/lib/Xaw/Repeater.c Sat Mar 12 00:38:11 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xaw/Repeater.c,v 1.3 1993/03/27 09:10:23 dawes Exp $ * $XConsortium: Repeater.c,v 1.8 91/03/14 16:48:04 converse Exp $ * * Copyright 1990 Massachusetts Institute of Technology *************** *** 101,107 **** --- 102,112 ---- RepeaterClassRec repeaterClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &commandClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Repeater", /* widget_size */ sizeof(RepeaterRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 148,154 **** --- 153,163 ---- } }; + #ifndef SVR3SHLIB WidgetClass repeaterWidgetClass = (WidgetClass) &repeaterClassRec; + #else + extern WidgetClass repeaterWidgetClass; + #endif /***************************************************************************** diff -c mit/lib/Xaw/Scrollbar.c:1.1.1.1 mit/lib/Xaw/Scrollbar.c:1.3 *** mit/lib/Xaw/Scrollbar.c:1.1.1.1 Sat Mar 12 00:38:12 1994 --- mit/lib/Xaw/Scrollbar.c Sat Mar 12 00:38:12 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Scrollbar.c,v 1.3 1993/03/27 09:10:26 dawes Exp $ */ /* $XConsortium: Scrollbar.c,v 1.69 91/05/04 23:07:32 keith Exp $ */ /*********************************************************** *************** *** 117,123 **** --- 118,128 ---- ScrollbarClassRec scrollbarClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &simpleClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Scrollbar", /* size */ sizeof(ScrollbarRec), /* class_initialize */ ClassInitialize, *************** *** 159,165 **** --- 164,174 ---- }; + #ifndef SVR3SHLIB WidgetClass scrollbarWidgetClass = (WidgetClass)&scrollbarClassRec; + #else + extern WidgetClass scrollbarWidgetClass; + #endif #define NoButton -1 #define PICKLENGTH(widget, x, y) \ diff -c mit/lib/Xaw/Simple.c:1.1.1.1 mit/lib/Xaw/Simple.c:1.3 *** mit/lib/Xaw/Simple.c:1.1.1.1 Sat Mar 12 00:38:12 1994 --- mit/lib/Xaw/Simple.c Sat Mar 12 00:38:13 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Simple.c,v 1.3 1993/03/27 09:10:28 dawes Exp $ */ /* $XConsortium: Simple.c,v 1.33 91/07/21 13:55:23 converse Exp $ */ /*********************************************************** *************** *** 52,58 **** --- 53,63 ---- SimpleClassRec simpleClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &widgetClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Simple", /* widget_size */ sizeof(SimpleRec), /* class_initialize */ ClassInitialize, *************** *** 90,96 **** --- 95,105 ---- } }; + #ifndef SVR3SHLIB WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec; + #else + extern WidgetClass simpleWidgetClass; + #endif static void ClassInitialize() { diff -c mit/lib/Xaw/SimpleMenu.c:1.1.1.2 mit/lib/Xaw/SimpleMenu.c:1.3 *** mit/lib/Xaw/SimpleMenu.c:1.1.1.2 Sat Mar 12 00:38:13 1994 --- mit/lib/Xaw/SimpleMenu.c Sat Mar 12 00:38:13 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/SimpleMenu.c,v 1.3 1993/03/27 09:10:30 dawes Exp $ */ /* $XConsortium: SimpleMenu.c,v 1.41 92/09/10 16:25:07 converse Exp $ */ /* *************** *** 135,145 **** --- 136,154 ---- /* accepts_objects */ TRUE, }; + #ifndef SVR3SHLIB #define superclass (&overrideShellClassRec) + #else + #define superclass (overrideShellWidgetClass) + #endif SimpleMenuClassRec simpleMenuClassRec = { { + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) superclass, + #else + /* superclass */ NULL, + #endif /* class_name */ "SimpleMenu", /* size */ sizeof(SimpleMenuRec), /* class_initialize */ ClassInitialize, *************** *** 186,192 **** --- 195,205 ---- } }; + #ifndef SVR3SHLIB WidgetClass simpleMenuWidgetClass = (WidgetClass)&simpleMenuClassRec; + #else + extern WidgetClass simpleMenuWidgetClass; + #endif /************************************************************ * diff -c mit/lib/Xaw/Sme.c:1.1.1.1 mit/lib/Xaw/Sme.c:1.3 *** mit/lib/Xaw/Sme.c:1.1.1.1 Sat Mar 12 00:38:14 1994 --- mit/lib/Xaw/Sme.c Sat Mar 12 00:38:14 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Sme.c,v 1.3 1993/03/27 09:10:32 dawes Exp $ */ /* $XConsortium: Sme.c,v 1.9 91/02/17 16:44:14 rws Exp $ */ /* *************** *** 54,61 **** --- 55,67 ---- static void Initialize(); static XtGeometryResult QueryGeometry(); + #ifndef SVR3SHLIB #define SUPERCLASS (&rectObjClassRec) + #else + #define SUPERCLASS NULL + #endif + SmeClassRec smeClassRec = { { /* superclass */ (WidgetClass) SUPERCLASS, *************** *** 100,106 **** --- 106,116 ---- } }; + #ifndef SVR3SHLIB WidgetClass smeObjectClass = (WidgetClass) &smeClassRec; + #else + extern WidgetClass smeObjectClass; + #endif /************************************************************ * diff -c mit/lib/Xaw/SmeBSB.c:1.1.1.1 mit/lib/Xaw/SmeBSB.c:1.3 *** mit/lib/Xaw/SmeBSB.c:1.1.1.1 Sat Mar 12 00:38:14 1994 --- mit/lib/Xaw/SmeBSB.c Sat Mar 12 00:38:15 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/SmeBSB.c,v 1.3 1993/03/27 09:10:34 dawes Exp $ */ /* $XConsortium: SmeBSB.c,v 1.16 91/03/15 15:59:41 gildea Exp $ */ /* *************** *** 85,92 **** static void GetDefaultSize(), DrawBitmaps(), GetBitmapInfo(); static void CreateGCs(), DestroyGCs(); ! #define superclass (&smeClassRec) SmeBSBClassRec smeBSBClassRec = { { /* superclass */ (WidgetClass) superclass, --- 86,97 ---- static void GetDefaultSize(), DrawBitmaps(), GetBitmapInfo(); static void CreateGCs(), DestroyGCs(); ! ! #ifndef SVR3SHLIB #define superclass (&smeClassRec) + #else + #define superclass NULL + #endif SmeBSBClassRec smeBSBClassRec = { { /* superclass */ (WidgetClass) superclass, *************** *** 135,141 **** --- 140,150 ---- } }; + #ifndef SVR3SHLIB WidgetClass smeBSBObjectClass = (WidgetClass) &smeBSBClassRec; + #else + extern WidgetClass smeBSBObjectClass; + #endif /************************************************************ * diff -c mit/lib/Xaw/SmeLine.c:1.1.1.1 mit/lib/Xaw/SmeLine.c:1.3 *** mit/lib/Xaw/SmeLine.c:1.1.1.1 Sat Mar 12 00:38:15 1994 --- mit/lib/Xaw/SmeLine.c Sat Mar 12 00:38:15 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/SmeLine.c,v 1.3 1993/03/27 09:10:36 dawes Exp $ */ /* $XConsortium: SmeLine.c,v 1.13 91/07/23 12:23:21 rws Exp $ */ /* *************** *** 62,68 **** --- 63,73 ---- static XtGeometryResult QueryGeometry(); + #ifndef SVR3SHLIB #define SUPERCLASS (&smeClassRec) + #else + #define SUPERCLASS NULL + #endif SmeLineClassRec smeLineClassRec = { { *************** *** 111,117 **** --- 116,126 ---- } }; + #ifndef SVR3SHLIB WidgetClass smeLineObjectClass = (WidgetClass) &smeLineClassRec; + #else + extern WidgetClass smeLineObjectClass; + #endif /************************************************************ * diff -c mit/lib/Xaw/StripChart.c:1.1.1.1 mit/lib/Xaw/StripChart.c:1.3 *** mit/lib/Xaw/StripChart.c:1.1.1.1 Sat Mar 12 00:38:15 1994 --- mit/lib/Xaw/StripChart.c Sat Mar 12 00:38:16 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/StripChart.c,v 1.3 1993/03/27 09:10:38 dawes Exp $ */ /* $XConsortium: StripChart.c,v 1.20 91/05/24 17:20:42 converse Exp $ */ /*********************************************************** *************** *** 64,70 **** --- 65,75 ---- StripChartClassRec stripChartClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &simpleClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "StripChart", /* size */ sizeof(StripChartRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 103,109 **** --- 108,118 ---- } }; + #ifndef SVR3SHLIB WidgetClass stripChartWidgetClass = (WidgetClass) &stripChartClassRec; + #else + extern WidgetClass stripChartWidgetClass; + #endif /**************************************************************** * diff -c mit/lib/Xaw/Text.c:1.1.1.2 mit/lib/Xaw/Text.c:1.3 *** mit/lib/Xaw/Text.c:1.1.1.2 Sat Mar 12 00:38:17 1994 --- mit/lib/Xaw/Text.c Sat Mar 12 00:38:17 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Text.c,v 1.3 1993/03/27 09:10:41 dawes Exp $ */ /* $XConsortium: Text.c,v 1.184 92/11/16 15:00:13 converse Exp $ */ /*********************************************************** *************** *** 24,29 **** --- 25,34 ---- ******************************************************************/ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #include #include #include *************** *** 43,49 **** --- 48,58 ---- #include + #ifndef SVR3SHLIB unsigned long FMT8BIT = 0L; + #else + extern unsigned long FMT8BIT; + #endif #define SinkClearToBG XawTextSinkClearToBackground *************** *** 2754,2760 **** --- 2763,2773 ---- Arg args[1]; TextWidget tw = (TextWidget) w; + #ifndef SVR3SHLIB (*(&simpleClassRec)->simple_class.change_sensitive)(w); + #else + (*((SimpleWidgetClass)simpleWidgetClass)->simple_class.change_sensitive)(w); + #endif XtSetArg(args[0], XtNancestorSensitive, (tw->core.ancestor_sensitive && tw->core.sensitive)); *************** *** 3256,3262 **** --- 3269,3279 ---- TextClassRec textClassRec = { { /* core fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &simpleClassRec, + #else + /* superclass */ NULL, + #endif /* class_name */ "Text", /* widget_size */ sizeof(TextRec), /* class_initialize */ ClassInitialize, *************** *** 3297,3300 **** --- 3314,3321 ---- } }; + #ifndef SVR3SHLIB WidgetClass textWidgetClass = (WidgetClass)&textClassRec; + #else + extern WidgetClass textWidgetClass; + #endif diff -c mit/lib/Xaw/TextAction.c:1.1.1.1 mit/lib/Xaw/TextAction.c:1.3 *** mit/lib/Xaw/TextAction.c:1.1.1.1 Sat Mar 12 00:38:19 1994 --- mit/lib/Xaw/TextAction.c Sat Mar 12 00:38:19 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/TextAction.c,v 1.3 1993/03/27 09:10:46 dawes Exp $ */ /* $XConsortium: TextAction.c,v 1.43 91/07/23 12:23:54 rws Exp $ */ /*********************************************************** *************** *** 36,41 **** --- 37,46 ---- * MIT X Consortium */ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #include #include #include *************** *** 1576,1579 **** --- 1581,1588 ---- {"PopdownSearchAction", _XawTextPopdownSearchAction}, }; + #ifdef SVR3SHLIB + #undef _XawTextActionsTableCount + #define _XawTextActionsTableCount __XawTextActionsTableCount + #endif Cardinal _XawTextActionsTableCount = XtNumber(_XawTextActionsTable); diff -c mit/lib/Xaw/TextPop.c:1.1.1.1 mit/lib/Xaw/TextPop.c:2.0 *** mit/lib/Xaw/TextPop.c:1.1.1.1 Sat Mar 12 00:38:20 1994 --- mit/lib/Xaw/TextPop.c Sat Mar 12 00:38:20 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/TextPop.c,v 2.0 1993/11/07 14:06:51 dawes Exp $ */ /* $XConsortium: TextPop.c,v 1.22 91/07/25 18:10:22 rws Exp $ */ /*********************************************************** *************** *** 45,50 **** --- 46,55 ---- * *************************************************************/ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #include #include #include *************** *** 60,67 **** #include /* for O_RDONLY */ #include ! extern int errno, sys_nerr; extern char* sys_errlist[]; #define INSERT_FILE ("Enter Filename:") --- 65,80 ---- #include /* for O_RDONLY */ #include ! extern int errno; ! #ifdef SCO ! extern int open(); ! #endif ! #ifndef X_NO_STRERROR ! #include ! #else ! extern int sys_nerr; extern char* sys_errlist[]; + #endif #define INSERT_FILE ("Enter Filename:") *************** *** 239,246 **** --- 252,263 ---- } else sprintf( msg, "*** Error: %s ***", + #ifndef X_NO_STRERROR + strerror(errno)); + #else (errno > 0 && errno < sys_nerr) ? sys_errlist[errno] : "Can't open file" ); + #endif (void)SetResourceByName(ctx->text.file_insert, diff -c mit/lib/Xaw/TextSink.c:1.1.1.1 mit/lib/Xaw/TextSink.c:1.3 *** mit/lib/Xaw/TextSink.c:1.1.1.1 Sat Mar 12 00:38:21 1994 --- mit/lib/Xaw/TextSink.c Sat Mar 12 00:38:21 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/TextSink.c,v 1.3 1993/03/27 09:10:49 dawes Exp $ */ /* $XConsortium: TextSink.c,v 1.16 91/05/28 10:50:01 converse Exp $ */ /* *************** *** 62,68 **** --- 63,73 ---- }; #undef offset + #ifndef SVR3SHLIB #define SuperClass (&objectClassRec) + #else + #define SuperClass NULL + #endif TextSinkClassRec textSinkClassRec = { { /* core_class fields */ *************** *** 114,120 **** --- 119,129 ---- } }; + #ifndef SVR3SHLIB WidgetClass textSinkObjectClass = (WidgetClass)&textSinkClassRec; + #else + extern WidgetClass textSinkObjectClass; + #endif static void ClassPartInitialize(wc) diff -c mit/lib/Xaw/TextSrc.c:1.1.1.1 mit/lib/Xaw/TextSrc.c:1.3 *** mit/lib/Xaw/TextSrc.c:1.1.1.1 Sat Mar 12 00:38:21 1994 --- mit/lib/Xaw/TextSrc.c Sat Mar 12 00:38:21 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/TextSrc.c,v 1.3 1993/03/27 09:10:52 dawes Exp $ */ /* $XConsortium: TextSrc.c,v 1.11 91/02/20 17:58:08 converse Exp $ */ /* *************** *** 58,64 **** --- 59,69 ---- static XawTextPosition Search(), Scan(), Read(); static int Replace(); + #ifndef SVR3SHLIB #define SuperClass (&objectClassRec) + #else + #define SuperClass NULL + #endif TextSrcClassRec textSrcClassRec = { { /* core_class fields */ *************** *** 106,112 **** --- 111,121 ---- } }; + #ifndef SVR3SHLIB WidgetClass textSrcObjectClass = (WidgetClass)&textSrcClassRec; + #else + extern WidgetClass textSrcObjectClass; + #endif static void ClassInitialize () diff -c mit/lib/Xaw/TextTr.c:1.1.1.1 mit/lib/Xaw/TextTr.c:1.3 *** mit/lib/Xaw/TextTr.c:1.1.1.1 Sat Mar 12 00:38:22 1994 --- mit/lib/Xaw/TextTr.c Sat Mar 12 00:38:22 1994 *************** *** 1,6 **** --- 1,11 ---- + /* $XFree86: mit/lib/Xaw/TextTr.c,v 1.3 1993/03/27 09:10:54 dawes Exp $ */ /* $XConsortium: TextTr.c,v 1.13 89/11/01 17:01:24 kit Exp $ */ + #ifndef SVR3SHLIB char *_XawDefaultTextTranslations1 = + #else + char __XawDefaultTextTranslations1[] = + #endif "\ CtrlA: beginning-of-line() \n\ CtrlB: backward-character() \n\ *************** *** 24,30 **** CtrlW: kill-selection() \n\ CtrlY: insert-selection(CUT_BUFFER1) \n\ CtrlZ: scroll-one-line-up() \n\ ! ", *_XawDefaultTextTranslations2 = "\ MetaB: backward-word() \n\ MetaF: forward-word() \n\ MetaI: insert-file() \n\ --- 29,41 ---- CtrlW: kill-selection() \n\ CtrlY: insert-selection(CUT_BUFFER1) \n\ CtrlZ: scroll-one-line-up() \n\ ! ", ! #ifndef SVR3SHLIB ! *_XawDefaultTextTranslations2 = ! #else ! __XawDefaultTextTranslations2[] = ! #endif ! "\ MetaB: backward-word() \n\ MetaF: forward-word() \n\ MetaI: insert-file() \n\ *************** *** 45,51 **** Shift MetaDelete: backward-kill-word() \n\ ~Shift MetaBackSpace: delete-previous-word() \n\ Shift MetaBackSpace: backward-kill-word() \n\ ! ", *_XawDefaultTextTranslations3 = "\ Right: forward-character() \n\ Left: backward-character() \n\ Down: next-line() \n\ --- 56,68 ---- Shift MetaDelete: backward-kill-word() \n\ ~Shift MetaBackSpace: delete-previous-word() \n\ Shift MetaBackSpace: backward-kill-word() \n\ ! ", ! #ifndef SVR3SHLIB ! *_XawDefaultTextTranslations3 = ! #else ! __XawDefaultTextTranslations3[] = ! #endif ! "\ Right: forward-character() \n\ Left: backward-character() \n\ Down: next-line() \n\ diff -c mit/lib/Xaw/Toggle.c:1.1.1.1 mit/lib/Xaw/Toggle.c:1.3 *** mit/lib/Xaw/Toggle.c:1.1.1.1 Sat Mar 12 00:38:22 1994 --- mit/lib/Xaw/Toggle.c Sat Mar 12 00:38:22 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Toggle.c,v 1.3 1993/03/27 09:10:56 dawes Exp $ */ /* $XConsortium: Toggle.c,v 1.24 91/07/25 14:07:48 converse Exp $ */ /* *************** *** 33,38 **** --- 34,43 ---- * */ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #include #include *************** *** 91,97 **** --- 96,106 ---- {"set", ToggleSet}, }; + #ifndef SVR3SHLIB #define SuperClass ((CommandWidgetClass)&commandClassRec) + #else + #define SuperClass NULL + #endif ToggleClassRec toggleClassRec = { { *************** *** 145,151 **** --- 154,164 ---- }; /* for public consumption */ + #ifndef SVR3SHLIB WidgetClass toggleWidgetClass = (WidgetClass) &toggleClassRec; + #else + extern WidgetClass toggleWidgetClass; + #endif /**************************************************************** * diff -c mit/lib/Xaw/Tree.c:1.1.1.1 mit/lib/Xaw/Tree.c:1.3 *** mit/lib/Xaw/Tree.c:1.1.1.1 Sat Mar 12 00:38:23 1994 --- mit/lib/Xaw/Tree.c Sat Mar 12 00:38:23 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xaw/Tree.c,v 1.3 1993/03/27 09:10:58 dawes Exp $ * $XConsortium: Tree.c,v 1.42 91/02/20 20:06:07 converse Exp $ * * Copyright 1990 Massachusetts Institute of Technology *************** *** 96,102 **** --- 97,107 ---- TreeClassRec treeClassRec = { { /* core_class fields */ + #ifndef SVR3SHLIB (WidgetClass) &constraintClassRec, /* superclass */ + #else + NULL, /* superclass */ + #endif "Tree", /* class_name */ sizeof(TreeRec), /* widget_size */ ClassInitialize, /* class_init */ *************** *** 153,159 **** --- 158,168 ---- } }; + #ifndef SVR3SHLIB WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec; + #else + extern WidgetClass treeWidgetClass; + #endif /***************************************************************************** diff -c mit/lib/Xaw/Vendor.c:1.1.1.1 mit/lib/Xaw/Vendor.c:1.3 *** mit/lib/Xaw/Vendor.c:1.1.1.1 Sat Mar 12 00:38:24 1994 --- mit/lib/Xaw/Vendor.c Sat Mar 12 00:38:24 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Vendor.c,v 1.3 1993/03/27 09:11:00 dawes Exp $ */ /* $XConsortium: Vendor.c,v 1.21 91/07/30 15:29:56 rws Exp $ */ /*********************************************************** *************** *** 59,68 **** --- 60,77 ---- static void XawVendorShellInitialize(); static void ChangeManaged(); + #ifndef SVR3SHLIB #define SuperClass (&wmShellClassRec) + #else + #define SuperClass ((WMShellWidgetClass)wmShellWidgetClass) + #endif externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { { + #ifndef SVR3SHLIB /* superclass */ (WidgetClass)SuperClass, + #else + /* superclass */ NULL, + #endif /* class_name */ "VendorShell", /* size */ sizeof(VendorShellRec), /* class_initialize */ XawVendorShellClassInitialize, *************** *** 109,116 **** --- 118,129 ---- } }; + #ifndef SVR3SHLIB externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (&vendorShellClassRec); + #else + externalref WidgetClass vendorShellWidgetClass; + #endif static void XawVendorShellClassInitialize() { diff -c mit/lib/Xaw/Viewport.c:1.1.1.1 mit/lib/Xaw/Viewport.c:1.3 *** mit/lib/Xaw/Viewport.c:1.1.1.1 Sat Mar 12 00:38:25 1994 --- mit/lib/Xaw/Viewport.c Sat Mar 12 00:38:25 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xaw/Viewport.c,v 1.3 1993/03/21 05:10:55 dawes Exp $ */ /* $XConsortium: Viewport.c,v 1.68 91/07/24 18:56:11 converse Exp $ */ /*********************************************************** *************** *** 59,68 **** --- 60,77 ---- static Boolean SetValues(), Layout(); static XtGeometryResult GeometryManager(), PreferredGeometry(); + #ifndef SVR3SHLIB #define superclass (&formClassRec) + #else + #define superclass ((FormWidgetClass)formWidgetClass) + #endif ViewportClassRec viewportClassRec = { { /* core_class fields */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) superclass, + #else + /* superclass */ NULL, + #endif /* class_name */ "Viewport", /* widget_size */ sizeof(ViewportRec), /* class_initialize */ XawInitializeWidgetSet, *************** *** 120,126 **** --- 129,139 ---- }; + #ifndef SVR3SHLIB WidgetClass viewportWidgetClass = (WidgetClass)&viewportClassRec; + #else + extern WidgetClass viewportWidgetClass; + #endif static Widget CreateScrollbar(w, horizontal) ViewportWidget w; *************** *** 130,142 **** ViewportConstraints constraints = (ViewportConstraints)clip->core.constraints; static Arg barArgs[] = { ! {XtNorientation, NULL}, ! {XtNlength, NULL}, ! {XtNleft, NULL}, ! {XtNright, NULL}, ! {XtNtop, NULL}, ! {XtNbottom, NULL}, ! {XtNmappedWhenManaged, False}, }; Widget bar; --- 143,155 ---- ViewportConstraints constraints = (ViewportConstraints)clip->core.constraints; static Arg barArgs[] = { ! {XtNorientation, (XtArgVal)NULL}, ! {XtNlength, (XtArgVal)NULL}, ! {XtNleft, (XtArgVal)NULL}, ! {XtNright, (XtArgVal)NULL}, ! {XtNtop, (XtArgVal)NULL}, ! {XtNbottom, (XtArgVal)NULL}, ! {XtNmappedWhenManaged, (XtArgVal)False}, }; Widget bar; diff -c /dev/null mit/lib/Xaw/dummyBind.c:1.2 *** /dev/null Sat Mar 12 00:38:25 1994 --- mit/lib/Xaw/dummyBind.c Sat Mar 12 00:38:25 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw: dummyBind.c + * + * This dummy function is only linked to the client if the client + * doesn't supply one + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/dummyBind.c,v 1.2 1993/03/27 09:11:02 dawes Exp $ + */ + + void _bind_to_sv3shlib_() + { + /* do nothing */ + + } + diff -c /dev/null mit/lib/Xaw/globals.c:1.3 *** /dev/null Sat Mar 12 00:38:25 1994 --- mit/lib/Xaw/globals.c Sat Mar 12 00:38:26 1994 *************** *** 0 **** --- 1,167 ---- + /* libXaw : libXaw.c + * exported data + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + * + * $XFree86: mit/lib/Xaw/globals.c,v 1.3 1993/03/20 03:33:49 dawes Exp $ + */ + + #include + #include + #include + #include + + #ifdef SVR3SHLIB + + #ifdef __STDC__ + #define Const const + #else + #define Const /**/ + #endif + + #define VoidInit(var) void *var = 0 + + Const char *_shared_libXaw_version = SOXAWREV; char __libXaw_sp1__[16] = ""; + + unsigned long FMT8BIT = 0L; + + extern char __XawDefaultTextTranslations1[]; + extern char __XawDefaultTextTranslations2[]; + extern char __XawDefaultTextTranslations3[]; + + char *_XawDefaultTextTranslations1 = __XawDefaultTextTranslations1; + char *_XawDefaultTextTranslations2 = __XawDefaultTextTranslations2; + char *_XawDefaultTextTranslations3 = __XawDefaultTextTranslations3; + + Cardinal _XawTextActionsTableCount = 0; + + VoidInit(_libXaw__aux__); + VoidInit(_libXaw_XShapeCombineMask); + VoidInit(_libXaw_XShapeQueryExtension); + VoidInit(_libXaw__ctype); + VoidInit(_libXaw__iob); + VoidInit(_libXaw_asctime); + VoidInit(_libXaw_atof); + VoidInit(_libXaw_atoi); + VoidInit(_libXaw_bcopy); + VoidInit(_libXaw_close); + VoidInit(_libXaw_creat); + VoidInit(_libXaw_errno); + VoidInit(_libXaw_exit); + VoidInit(_libXaw_fclose); + VoidInit(_libXaw_fopen); + VoidInit(_libXaw_fprintf); + VoidInit(_libXaw_fread); + VoidInit(_libXaw_fseek); + VoidInit(_libXaw_ftell); + VoidInit(_libXaw_getlogin); + VoidInit(_libXaw_getpwuid); + VoidInit(_libXaw_getuid); + VoidInit(_libXaw_localtime); + VoidInit(_libXaw_memset); + VoidInit(_libXaw_open); + VoidInit(_libXaw_printf); + VoidInit(_libXaw_read); + VoidInit(_libXaw_sprintf); + VoidInit(_libXaw_stat); + VoidInit(_libXaw_strcat); + VoidInit(_libXaw_strchr); + VoidInit(_libXaw_strcmp); + VoidInit(_libXaw_strcpy); + VoidInit(_libXaw_strncpy); + VoidInit(_libXaw_sys_errlist); + VoidInit(_libXaw_sys_nerr); + VoidInit(_libXaw_system); + VoidInit(_libXaw_time); + VoidInit(_libXaw_tmpnam); + VoidInit(_libXaw_toupper); + VoidInit(_libXaw_write); + VoidInit(_libXaw__XawTextActionsTableCount); + + VoidInit(_libXaw_asciiSinkObjectClass); + VoidInit(_libXaw_asciiSrcObjectClass); + VoidInit(_libXaw_asciiTextWidgetClass); + VoidInit(_libXaw_boxWidgetClass); + VoidInit(_libXaw_clockWidgetClass); + VoidInit(_libXaw_commandWidgetClass); + VoidInit(_libXaw_dialogWidgetClass); + VoidInit(_libXaw_formWidgetClass); + VoidInit(_libXaw_gripWidgetClass); + VoidInit(_libXaw_labelWidgetClass); + VoidInit(_libXaw_listWidgetClass); + VoidInit(_libXaw_logoWidgetClass); + VoidInit(_libXaw_mailboxWidgetClass); + VoidInit(_libXaw_menuButtonWidgetClass); + VoidInit(_libXaw_panedWidgetClass); + VoidInit(_libXaw_pannerWidgetClass); + VoidInit(_libXaw_portholeWidgetClass); + VoidInit(_libXaw_repeaterWidgetClass); + VoidInit(_libXaw_scrollbarWidgetClass); + VoidInit(_libXaw_simpleWidgetClass); + VoidInit(_libXaw_simpleMenuWidgetClass); + VoidInit(_libXaw_smeObjectClass); + VoidInit(_libXaw_smeBSBObjectClass); + VoidInit(_libXaw_smeLineObjectClass); + VoidInit(_libXaw_stripChartWidgetClass); + VoidInit(_libXaw_textWidgetClass); + VoidInit(_libXaw_textSinkObjectClass); + VoidInit(_libXaw_textSrcObjectClass); + VoidInit(_libXaw_toggleWidgetClass); + VoidInit(_libXaw_treeWidgetClass); + VoidInit(_libXaw_vendorShellWidgetClass); + VoidInit(_libXaw_viewportWidgetClass); + + VoidInit(_libXaw_transientShellWidgetClass); + + VoidInit(_libXaw__XA_CHARACTER_POSITION); + VoidInit(_libXaw__XA_COMPOUND_TEXT); + VoidInit(_libXaw__XA_DELETE); + VoidInit(_libXaw__XA_LENGTH); + VoidInit(_libXaw__XA_LIST_LENGTH); + VoidInit(_libXaw__XA_NULL); + VoidInit(_libXaw__XA_SPAN); + VoidInit(_libXaw__XA_TARGETS); + VoidInit(_libXaw__XA_TEXT); + + void *__libXaw_p__[FUTURE_WIDGET_COUNT] = {0}; + + + #ifndef __GNUC__ + /* + * If we are working with floating point aritmetic, stock AT&T cc generates + * an unresolved reference to __fltused. But we want to make a shared lib from + * this here and don't want to reference /lib/libc_s.a, just define this sym as + * (shared lib) static. + * The trick is that while building the shared lib all references to this + * symbol are resolved internally. But the symbol will be outside only visible + * as a static one, so preventing a name conflict with other shared libs. + */ + long __fltused = 0; + #endif + + /* A dummy function for free branchtab-slots. + * This would be a great place for an error-check mechanism for shared libs. + * (Print error message if not existent function is called.) + */ + extern void _libXaw_dummy() {}; + + + /* + * This function is for future versions of the library which could + * want initialize pointers to default values, which clients linked with + * the old version don't initialize. It's called from inside the + * .init section of the clients. + */ + extern Cardinal __XawTextActionsTableCount; + + void __default_libXaw_init_() + { + + _XawTextActionsTableCount = __XawTextActionsTableCount; + + } + + #endif + diff -c /dev/null mit/lib/Xaw/import.h:2.0 *** /dev/null Sat Mar 12 00:38:26 1994 --- mit/lib/Xaw/import.h Sat Mar 12 00:38:26 1994 *************** *** 0 **** --- 1,247 ---- + /* libXaw : import.h + * indirection defines + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + * + * $XFree86: mit/lib/Xaw/import.h,v 2.0 1993/09/22 15:32:03 dawes Exp $ + */ + + #define FUTURE_WIDGET_COUNT 20 + + #ifndef _libXaw_import + #define _libXaw_import + #ifdef SVR3SHLIB + + #define XShapeCombineMask (*_libXaw_XShapeCombineMask) + #define XShapeQueryExtension (*_libXaw_XShapeQueryExtension) + #define _ctype (*_libXaw__ctype) + #define _iob (*_libXaw__iob) + #define asctime (*_libXaw_asctime) + #define atof (*_libXaw_atof) + #define atoi (*_libXaw_atoi) + #define bcopy (*_libXaw_bcopy) + /* prevent name conflict with member close of XIM */ + #define close(fd) (*_libXaw_close)(fd) + #define creat (*_libXaw_creat) + #define errno (*_libXaw_errno) + #define exit (*_libXaw_exit) + #define fclose (*_libXaw_fclose) + #define fopen (*_libXaw_fopen) + #define fprintf (*_libXaw_fprintf) + #define fread (*_libXaw_fread) + #define fseek (*_libXaw_fseek) + #define ftell (*_libXaw_ftell) + #define getlogin (*_libXaw_getlogin) + #define getpwuid (*_libXaw_getpwuid) + #define getuid (*_libXaw_getuid) + #define localtime (*_libXaw_localtime) + #define memset (*_libXaw_memset) + #define open (*_libXaw_open) + #define printf (*_libXaw_printf) + #define read (*_libXaw_read) + #define sprintf (*_libXaw_sprintf) + /* prevent name conflict with struct stat */ + #define stat(path, buf) (*_libXaw_stat)(path, buf) + #define strcat (*_libXaw_strcat) + #define strchr (*_libXaw_strchr) + #define strcmp (*_libXaw_strcmp) + #define strcpy (*_libXaw_strcpy) + #define strncpy (*_libXaw_strncpy) + #define sys_errlist (*_libXaw_sys_errlist) + #define sys_nerr (*_libXaw_sys_nerr) + #define system (*_libXaw_system) + /* prevent name conflict with member time of TextWidget */ + #define time(tloc) (*_libXaw_time)(tloc) + #define tmpnam (*_libXaw_tmpnam) + #define toupper (*_libXaw_toupper) + #define write (*_libXaw_write) + #define _XawTextActionsTableCount (*_libXaw__XawTextActionsTableCount) + #define asciiSinkObjectClass (*_libXaw_asciiSinkObjectClass) + #define asciiSrcObjectClass (*_libXaw_asciiSrcObjectClass) + #define asciiTextWidgetClass (*_libXaw_asciiTextWidgetClass) + #define boxWidgetClass (*_libXaw_boxWidgetClass) + #define clockWidgetClass (*_libXaw_clockWidgetClass) + #define commandWidgetClass (*_libXaw_commandWidgetClass) + #define dialogWidgetClass (*_libXaw_dialogWidgetClass) + #define formWidgetClass (*_libXaw_formWidgetClass) + #define gripWidgetClass (*_libXaw_gripWidgetClass) + #define labelWidgetClass (*_libXaw_labelWidgetClass) + #define listWidgetClass (*_libXaw_listWidgetClass) + #define logoWidgetClass (*_libXaw_logoWidgetClass) + #define mailboxWidgetClass (*_libXaw_mailboxWidgetClass) + #define menuButtonWidgetClass (*_libXaw_menuButtonWidgetClass) + #define panedWidgetClass (*_libXaw_panedWidgetClass) + #define pannerWidgetClass (*_libXaw_pannerWidgetClass) + #define portholeWidgetClass (*_libXaw_portholeWidgetClass) + #define repeaterWidgetClass (*_libXaw_repeaterWidgetClass) + #define scrollbarWidgetClass (*_libXaw_scrollbarWidgetClass) + #define simpleWidgetClass (*_libXaw_simpleWidgetClass) + #define simpleMenuWidgetClass (*_libXaw_simpleMenuWidgetClass) + #define smeObjectClass (*_libXaw_smeObjectClass) + #define smeBSBObjectClass (*_libXaw_smeBSBObjectClass) + #define smeLineObjectClass (*_libXaw_smeLineObjectClass) + #define stripChartWidgetClass (*_libXaw_stripChartWidgetClass) + #define textWidgetClass (*_libXaw_textWidgetClass) + #define textSinkObjectClass (*_libXaw_textSinkObjectClass) + #define textSrcObjectClass (*_libXaw_textSrcObjectClass) + #define toggleWidgetClass (*_libXaw_toggleWidgetClass) + #define treeWidgetClass (*_libXaw_treeWidgetClass) + #define vendorShellWidgetClass (*_libXaw_vendorShellWidgetClass) + #define viewportWidgetClass (*_libXaw_viewportWidgetClass) + + #define transientShellWidgetClass (*_libXaw_transientShellWidgetClass) + + #define _XA_CHARACTER_POSITION (*_libXaw__XA_CHARACTER_POSITION) + #define _XA_COMPOUND_TEXT (*_libXaw__XA_COMPOUND_TEXT) + #define _XA_DELETE (*_libXaw__XA_DELETE) + #define _XA_LENGTH (*_libXaw__XA_LENGTH) + #define _XA_LIST_LENGTH (*_libXaw__XA_LIST_LENGTH) + #define _XA_NULL (*_libXaw__XA_NULL) + #define _XA_SPAN (*_libXaw__XA_SPAN) + #define _XA_TARGETS (*_libXaw__XA_TARGETS) + #define _XA_TEXT (*_libXaw__XA_TEXT) + + /* Imported functions declarations + * Why declaring some imported functions here? + * This should be done gracefully through including of the systems + * header files. Unfortunatly there are some source files don't + * include all headers they should include, there are also some functions + * nowhere declared in the systems headers and some are declared + * without extern and cause problems since the names are redefined + * and these declarations then become undesired false pointer definitions. + */ + + extern void XShapeCombineMask(); + extern int XShapeQueryExtension(); + + /* on ISC 2.2.1 doesn't declare time(2) for __STDC__ + * so get time_t from it and declare it excplicit + */ + #ifndef ATT + #include + #endif + + #if defined(ISC202) || defined(ATT) + extern int (*_libXaw_stat)(); + extern char (*_libXaw_toupper)(); + #endif + + #ifdef ISC202 + #include + #endif + + #ifdef ATT + extern int open(); + #endif + + #ifdef __STDC__ + #ifndef ATT + extern time_t time(time_t *); + #else + extern long time(time_t *); /* gcc 2.3.3 seems to have problems */ + #endif /* with typedefs on AT&T */ + #ifndef SCO324 + extern int creat(char const *, unsigned short); + #endif + extern void exit(int); + extern unsigned short /*uid_t*/ getuid(void); + #ifndef SCO + extern int printf(char const *, ...); + extern int sprintf(char *, char const *, ...); + extern int sscanf(char *, char const *, ...); + #endif + extern int system(char const *); + extern int atoi(char const *); + extern int access(char const *, int); + extern unsigned int alarm(unsigned int); + extern unsigned int sleep(unsigned int); + extern int close(int); + extern int read(int, char *, unsigned int); + extern int write(int, char const *, unsigned int); + extern int grantpt(int); + extern char *ptsname(int); + extern int unlockpt(int); + extern char *getenv(char const *); + #else + #ifndef ATT + extern time_t time(); + #else + extern long time(); /* gcc 2.3.3 seems to have problems with */ + #endif /* typedefs on AT&T */ + #ifndef SCO324 + extern int creat(); + #endif + extern void exit(); + extern unsigned short /*uid_t*/ getuid(); + #ifndef SCO + extern int printf(); + extern int sprintf(); + extern int sscanf(); + #endif + extern int system(); + extern int atoi(); + extern int access(); + extern unsigned int alarm(); + extern unsigned int sleep(); + extern int close(); + extern int read(); + extern int write(); + extern int grantpt(); + extern char *ptsname(); + extern int unlockpt(); + extern char *getenv(); + #endif + + /* use char * also for __STDC__, the sources want it */ + extern char *malloc(), *realloc(), *calloc(); + + #include + + extern char *sys_errlist[]; + extern int sys_nerr; + + extern void qsort(); + #ifndef ISC40 + extern int _flsbuf(); + extern int _filbuf(); + #endif + extern int ioctl(); + extern int getmsg(); + extern int putmsg(); + + extern unsigned short ntohs(), htons(); + extern unsigned long ntohl(), htonl(); + extern unsigned long inet_addr(); + extern int connect(); + extern int gethostname(); + extern int setsockopt(); + extern int socket(); + extern int writev(); + extern int gettimeofday(); + + + /* Functions with ambiguous names */ + + #ifdef __STDC__ + extern int close(int); + extern void free(void *); + #include + #include + #ifdef SCO + #include + #ifdef SCO324 + extern double atof(char *); + #endif /* SCO324 */ + #endif /* SCO */ + extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); + #else + extern int (*_libXaw_close)(); + extern void (*_libXaw_free)(); + extern int (*_libXaw_select)(); + #endif + + #endif + #endif + diff -c /dev/null mit/lib/Xaw/jump_funcs:1.1 *** /dev/null Sat Mar 12 00:38:26 1994 --- mit/lib/Xaw/jump_funcs Sat Mar 12 00:38:28 1994 *************** *** 0 **** --- 1,86 ---- + # $XFree86: mit/lib/Xaw/jump_funcs,v 1.1 1993/04/16 14:20:46 dawes Exp $ + # + 00000000 T _XawAsciiSourceFreeString libXaw AsciiSrc + 00000000 T _XawAsciiSave libXaw AsciiSrc + 00000000 T _XawAsciiSaveAsFile libXaw AsciiSrc + 00000000 T _XawAsciiSourceChanged libXaw AsciiSrc + 00000000 T _XawDialogAddButton libXaw Dialog + 00000000 T _XawDialogGetValueString libXaw Dialog + 00000000 T _XawFormDoLayout libXaw Form + 00000000 T _XawListChange libXaw List + 00000000 T _XawListUnhighlight libXaw List + 00000000 T _XawListHighlight libXaw List + 00000000 T _XawListShowCurrent libXaw List + 00000000 T _XawPanedSetMinMax libXaw Paned + 00000000 T _XawPanedGetMinMax libXaw Paned + 00000000 T _XawPanedSetRefigureMode libXaw Paned + 00000000 T _XawPanedGetNumSub libXaw Paned + 00000000 T _XawPanedAllowResize libXaw Paned + 00000000 T _XawScrollbarSetThumb libXaw Scrollbar + 00000000 T _XawSimpleMenuAddGlobalActions libXaw SimpleMenu + 00000000 T _XawSimpleMenuGetActiveEntry libXaw SimpleMenu + 00000000 T _XawSimpleMenuClearActiveEntry libXaw SimpleMenu + 00000000 T __XawTextNeedsUpdating libXaw Text + 00000000 T __XawTextGetText libXaw Text + 00000000 T __XawTextGetSTRING libXaw Text + 00000000 T __XawTextBuildLineTable libXaw Text + 00000000 T __XawTextSetScrollBars libXaw Text + 00000000 T __XawTextVScroll libXaw Text + 00000000 T __XawTextSaltAwaySelection libXaw Text + 00000000 T __XawTextReplace libXaw Text + 00000000 T __XawTextClearAndCenterDisplay libXaw Text + 00000000 T __XawTextCheckResize libXaw Text + 00000000 T __XawTextSelectionList libXaw Text + 00000000 T __XawTextSetSelection libXaw Text + 00000000 T __XawTextAlterSelection libXaw Text + 00000000 T __XawTextPrepareToUpdate libXaw Text + 00000000 T __XawTextShowPosition libXaw Text + 00000000 T __XawTextExecuteUpdate libXaw Text + 00000000 T _XawTextDisplay libXaw Text + 00000000 T _XawTextSetSelectionArray libXaw Text + 00000000 T _XawTextGetSelectionPos libXaw Text + 00000000 T _XawTextSetSource libXaw Text + 00000000 T _XawTextReplace libXaw Text + 00000000 T _XawTextTopPosition libXaw Text + 00000000 T _XawTextSetInsertionPoint libXaw Text + 00000000 T _XawTextGetInsertionPoint libXaw Text + 00000000 T _XawTextUnsetSelection libXaw Text + 00000000 T _XawTextSetSelection libXaw Text + 00000000 T _XawTextInvalidate libXaw Text + 00000000 T _XawTextDisableRedisplay libXaw Text + 00000000 T _XawTextEnableRedisplay libXaw Text + 00000000 T _XawTextGetSource libXaw Text + 00000000 T _XawTextDisplayCaret libXaw Text + 00000000 T _XawTextSearch libXaw Text + 00000000 T _XawTextSinkDisplayText libXaw TextSink + 00000000 T _XawTextSinkInsertCursor libXaw TextSink + 00000000 T _XawTextSinkClearToBackground libXaw TextSink + 00000000 T _XawTextSinkFindPosition libXaw TextSink + 00000000 T _XawTextSinkFindDistance libXaw TextSink + 00000000 T _XawTextSinkResolve libXaw TextSink + 00000000 T _XawTextSinkMaxLines libXaw TextSink + 00000000 T _XawTextSinkMaxHeight libXaw TextSink + 00000000 T _XawTextSinkSetTabs libXaw TextSink + 00000000 T _XawTextSinkGetCursorBounds libXaw TextSink + 00000000 T _XawTextSourceRead libXaw TextSrc + 00000000 T _XawTextSourceReplace libXaw TextSrc + 00000000 T _XawTextSourceScan libXaw TextSrc + 00000000 T _XawTextSourceSearch libXaw TextSrc + 00000000 T _XawTextSourceConvertSelection libXaw TextSrc + 00000000 T _XawTextSourceSetSelection libXaw TextSrc + 00000000 T __XawTextZapSelection libXaw TextAction + 00000000 T __XawTextInsertFileAction libXaw TextPop + 00000000 T __XawTextInsertFile libXaw TextPop + 00000000 T __XawTextDoSearchAction libXaw TextPop + 00000000 T __XawTextPopdownSearchAction libXaw TextPop + 00000000 T __XawTextSearch libXaw TextPop + 00000000 T __XawTextDoReplaceAction libXaw TextPop + 00000000 T __XawTextSetField libXaw TextPop + 00000000 T _XawToggleChangeRadioGroup libXaw Toggle + 00000000 T _XawToggleGetCurrent libXaw Toggle + 00000000 T _XawToggleSetCurrent libXaw Toggle + 00000000 T _XawToggleUnsetCurrent libXaw Toggle + 00000000 T _XawTreeForceLayout libXaw Tree + 00000000 T _XawViewportSetLocation libXaw Viewport + 00000000 T _XawViewportSetCoordinates libXaw Viewport + 00000000 T _XawInitializeWidgetSet libXaw XawInit diff -c /dev/null mit/lib/Xaw/jump_ignore:1.1 *** /dev/null Sat Mar 12 00:38:28 1994 --- mit/lib/Xaw/jump_ignore Sat Mar 12 00:38:28 1994 *************** *** 0 **** --- 1 ---- + # $XFree86: mit/lib/Xaw/jump_ignore,v 1.1 1993/04/17 02:37:57 dawes Exp $ diff -c /dev/null mit/lib/Xaw/jump_vars:1.1 *** /dev/null Sat Mar 12 00:38:28 1994 --- mit/lib/Xaw/jump_vars Sat Mar 12 00:38:28 1994 *************** *** 0 **** --- 1,75 ---- + # $XFree86: mit/lib/Xaw/jump_vars,v 1.1 1993/04/16 14:20:47 dawes Exp $ + # + 00001400 D _XawWidgetArray libXaw AllWidgets + 00000004 D _XawWidgetCount libXaw AllWidgets + 00000140 D _asciiSinkClassRec libXaw AsciiSink + 00000004 D _asciiSinkObjectClass libXaw AsciiSink + 00000120 D _asciiSrcClassRec libXaw AsciiSrc + 00000004 D _asciiSrcObjectClass libXaw AsciiSrc + 00000100 D _asciiTextClassRec libXaw AsciiText + 00000004 D _asciiTextWidgetClass libXaw AsciiText + 00000100 D _boxClassRec libXaw Box + 00000004 D _boxWidgetClass libXaw Box + 00000100 D _clockClassRec libXaw Clock + 00000004 D _clockWidgetClass libXaw Clock + 00000100 D _commandClassRec libXaw Command + 00000004 D _commandWidgetClass libXaw Command + 00000140 D _dialogClassRec libXaw Dialog + 00000004 D _dialogWidgetClass libXaw Dialog + 00000140 D _formClassRec libXaw Form + 00000004 D _formWidgetClass libXaw Form + 00000100 D _gripClassRec libXaw Grip + 00000004 D _gripWidgetClass libXaw Grip + 00000100 D _labelClassRec libXaw Label + 00000004 D _labelWidgetClass libXaw Label + 00000100 D _listClassRec libXaw List + 00000004 D _listWidgetClass libXaw List + 00000100 D _logoClassRec libXaw Logo + 00000004 D _logoWidgetClass libXaw Logo + 00000100 D _mailboxClassRec libXaw Mailbox + 00000004 D _mailboxWidgetClass libXaw Mailbox + 00000100 D _menuButtonClassRec libXaw MenuButton + 00000004 D _menuButtonWidgetClass libXaw MenuButton + 00000140 D _panedClassRec libXaw Paned + 00000004 D _panedWidgetClass libXaw Paned + 00000004 D _vPanedWidgetClass libXaw Paned + 00000100 D _pannerClassRec libXaw Panner + 00000004 D _pannerWidgetClass libXaw Panner + 00000100 D _portholeClassRec libXaw Porthole + 00000004 D _portholeWidgetClass libXaw Porthole + 00000100 D _repeaterClassRec libXaw Repeater + 00000004 D _repeaterWidgetClass libXaw Repeater + 00000100 D _scrollbarClassRec libXaw Scrollbar + 00000004 D _scrollbarWidgetClass libXaw Scrollbar + 00000100 D _simpleClassRec libXaw Simple + 00000004 D _simpleWidgetClass libXaw Simple + 00000100 D _simpleMenuClassRec libXaw SimpleMenu + 00000004 D _simpleMenuWidgetClass libXaw SimpleMenu + 00000100 D _smeClassRec libXaw Sme + 00000004 D _smeObjectClass libXaw Sme + 00000100 D _smeBSBClassRec libXaw SmeBSB + 00000004 D _smeBSBObjectClass libXaw SmeBSB + 00000100 D _smeLineClassRec libXaw SmeLine + 00000004 D _smeLineObjectClass libXaw SmeLine + 00000100 D _stripChartClassRec libXaw StripChart + 00000004 D _stripChartWidgetClass libXaw StripChart + 00000004 D _FMT8BIT libXaw Text + 00000100 D _textClassRec libXaw Text + 00000004 D _textWidgetClass libXaw Text + 00000100 D _textSinkClassRec libXaw TextSink + 00000004 D _textSinkObjectClass libXaw TextSink + 00000100 D _textSrcClassRec libXaw TextSrc + 00000004 D _textSrcObjectClass libXaw TextSrc + 00000300 D __XawTextActionsTable libXaw TextAction + 00000004 D __XawTextActionsTableCount libXaw TextAction + 00000004 D __XawDefaultTextTranslations1 libXaw TextTr + 00000004 D __XawDefaultTextTranslations2 libXaw TextTr + 00000004 D __XawDefaultTextTranslations3 libXaw TextTr + 00000100 D _toggleClassRec libXaw Toggle + 00000004 D _toggleWidgetClass libXaw Toggle + 00000140 D _treeClassRec libXaw Tree + 00000004 D _treeWidgetClass libXaw Tree + 00000100 D _vendorShellClassRec libXaw Vendor + 00000004 D _vendorShellWidgetClass libXaw Vendor + 00000140 D _viewportClassRec libXaw Viewport + 00000004 D _viewportWidgetClass libXaw Viewport diff -c /dev/null mit/lib/Xaw/libXaw.def:1.3 *** /dev/null Sat Mar 12 00:38:29 1994 --- mit/lib/Xaw/libXaw.def Sat Mar 12 00:38:29 1994 *************** *** 0 **** --- 1,368 ---- + /* libXaw : libXaw.def + * shared library description file + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + * + * $XFree86: mit/lib/Xaw/libXaw.def,v 1.3 1993/03/20 03:33:50 dawes Exp $ + */ + + /**/#address .text 0xB1800000 + /**/#address .data 0xB1C00000 + + + /**/#objects noload + ../X/libX11_s.a + ../Xt/libXt_s.a + ../Xmu/libXmu_s.a + + /**/#branch + XawAsciiSave 1 + XawAsciiSaveAsFile 2 + XawAsciiSourceChanged 3 + XawAsciiSourceFreeString 4 + XawDialogAddButton 5 + XawDialogGetValueString 6 + XawFormDoLayout 7 + XawInitializeWidgetSet 8 + XawListChange 9 + XawListHighlight 10 + XawListShowCurrent 11 + XawListUnhighlight 12 + XawPanedAllowResize 13 + XawPanedGetMinMax 14 + XawPanedGetNumSub 15 + XawPanedSetMinMax 16 + XawPanedSetRefigureMode 17 + XawScrollbarSetThumb 18 + XawSimpleMenuAddGlobalActions 19 + XawSimpleMenuClearActiveEntry 20 + XawSimpleMenuGetActiveEntry 21 + XawTextDisableRedisplay 22 + XawTextDisplay 23 + XawTextDisplayCaret 24 + XawTextEnableRedisplay 25 + XawTextGetInsertionPoint 26 + XawTextGetSelectionPos 27 + XawTextGetSource 28 + XawTextInvalidate 29 + XawTextReplace 30 + XawTextSearch 31 + XawTextSetInsertionPoint 32 + XawTextSetSelection 33 + XawTextSetSelectionArray 34 + XawTextSetSource 35 + XawTextSinkClearToBackground 36 + XawTextSinkDisplayText 37 + XawTextSinkFindDistance 38 + XawTextSinkFindPosition 39 + XawTextSinkGetCursorBounds 40 + XawTextSinkInsertCursor 41 + XawTextSinkMaxHeight 42 + XawTextSinkMaxLines 43 + XawTextSinkResolve 44 + XawTextSinkSetTabs 45 + XawTextSourceConvertSelection 46 + XawTextSourceRead 47 + XawTextSourceReplace 48 + XawTextSourceScan 49 + XawTextSourceSearch 50 + XawTextSourceSetSelection 51 + XawTextTopPosition 52 + XawTextUnsetSelection 53 + XawToggleChangeRadioGroup 54 + XawToggleGetCurrent 55 + XawToggleSetCurrent 56 + XawToggleUnsetCurrent 57 + XawTreeForceLayout 58 + XawViewportSetCoordinates 59 + XawViewportSetLocation 60 + _XawTextAlterSelection 61 + _XawTextBuildLineTable 62 + _XawTextCheckResize 63 + _XawTextClearAndCenterDisplay 64 + _XawTextDoReplaceAction 65 + _XawTextDoSearchAction 66 + _XawTextExecuteUpdate 67 + _XawTextGetSTRING 68 + _XawTextGetText 69 + _XawTextInsertFile 70 + _XawTextInsertFileAction 71 + _XawTextNeedsUpdating 72 + _XawTextPopdownSearchAction 73 + _XawTextPrepareToUpdate 74 + _XawTextReplace 75 + _XawTextSaltAwaySelection 76 + _XawTextSearch 77 + _XawTextSelectionList 78 + _XawTextSetField 79 + _XawTextSetScrollBars 80 + _XawTextSetSelection 81 + _XawTextShowPosition 82 + _XawTextVScroll 83 + _XawTextZapSelection 84 + __default_libXaw_init_ 85 + + _libXaw_dummy 86-150 + + + /**/#objects + DOWN/globals.o /* All objects with global data must be come at first!*/ + DOWN/pAsciiSink.o + DOWN/pAsciiSrc.o + DOWN/pAsciiText.o + DOWN/pBox.o + DOWN/pClock.o + DOWN/pCommand.o + DOWN/pDialog.o + DOWN/pForm.o + DOWN/pGrip.o + DOWN/pLabel.o + DOWN/pList.o + DOWN/pLogo.o + DOWN/pMailbox.o + DOWN/pMenuBotton.o + DOWN/pPaned.o + DOWN/pPanner.o + DOWN/pPorthole.o + DOWN/pRepeater.o + DOWN/pScrollbar.o + DOWN/pSimple.o + DOWN/pSimpleMenu.o + DOWN/pSme.o + DOWN/pSmeBSB.o + DOWN/pSmeLine.o + DOWN/pStripChart.o + DOWN/pText.o + DOWN/pTextSink.o + DOWN/pTextSrc.o + DOWN/pToggle.o + DOWN/pTree.o + DOWN/pVendor.o + DOWN/pViewport.o + DOWN/pFuture.o + DOWN/AllWidgets.o + DOWN/TextAction.o + /* + * Any additional global data must be inserted below this + * point to maintain the address in the objects before + */ + DOWN/AsciiSink.o + DOWN/AsciiSrc.o + DOWN/AsciiText.o + DOWN/Box.o + DOWN/Clock.o + DOWN/Command.o + DOWN/Dialog.o + DOWN/Form.o + DOWN/Grip.o + DOWN/Label.o + DOWN/List.o + DOWN/Logo.o + DOWN/Mailbox.o + DOWN/MenuButton.o + DOWN/Paned.o + DOWN/Panner.o + DOWN/Porthole.o + DOWN/Repeater.o + DOWN/Scrollbar.o + DOWN/Simple.o + DOWN/SimpleMenu.o + DOWN/Sme.o + DOWN/SmeBSB.o + DOWN/SmeLine.o + DOWN/StripChart.o + DOWN/Text.o + DOWN/TextPop.o + DOWN/TextSink.o + DOWN/TextSrc.o + DOWN/TextTr.o + DOWN/Toggle.o + DOWN/Tree.o + DOWN/Vendor.o + DOWN/Viewport.o + DOWN/XawInit.o + + + + /**/#init globals.o + _libXaw_XShapeCombineMask XShapeCombineMask + _libXaw_XShapeQueryExtension XShapeQueryExtension + _libXaw__ctype _ctype + _libXaw_bcopy bcopy + _libXaw_close close + _libXaw_errno errno + _libXaw_printf printf + _libXaw_sprintf sprintf + _libXaw_strcmp strcmp + _libXaw_strcpy strcpy + _libXaw_strncpy strncpy + _libXaw_sys_errlist sys_errlist + _libXaw_sys_nerr sys_nerr + _libXaw__XawTextActionsTableCount _XawTextActionsTableCount + _libXaw__aux__ __libXaw_init_stub_ + _libXaw_asciiSrcObjectClass asciiSrcObjectClass + _libXaw_asciiTextWidgetClass asciiTextWidgetClass + _libXaw_commandWidgetClass commandWidgetClass + _libXaw_formWidgetClass formWidgetClass + _libXaw_gripWidgetClass gripWidgetClass + _libXaw_labelWidgetClass labelWidgetClass + _libXaw_scrollbarWidgetClass scrollbarWidgetClass + _libXaw_smeBSBObjectClass smeBSBObjectClass + _libXaw_toggleWidgetClass toggleWidgetClass + _libXaw_vendorShellWidgetClass vendorShellWidgetClass + + /**/#init AllWidgets.o + _libXaw__aux__ __libXaw_init_stub_ + + /**/#init AsciiSink.o + _libXaw_asciiSinkObjectClass asciiSinkObjectClass + + /**/#init AsciiSrc.o + _libXaw_creat creat + _libXaw_fclose fclose + _libXaw_fopen fopen + _libXaw_fread fread + _libXaw_fseek fseek + _libXaw_ftell ftell + _libXaw_tmpnam tmpnam + _libXaw_write write + + /**/#init Box.o + _libXaw_boxWidgetClass boxWidgetClass + + /**/#init Clock.o + _libXaw_asctime asctime + _libXaw_localtime localtime + _libXaw_time time + _libXaw_clockWidgetClass clockWidgetClass + + /**/#init Dialog.o + _libXaw_dialogWidgetClass dialogWidgetClass + + /**/#init Label.o + _libXaw_strchr strchr + + /**/#init List.o + _libXaw_listWidgetClass listWidgetClass + + /**/#init Logo.o + _libXaw_logoWidgetClass logoWidgetClass + + /**/#init Mailbox.o + _libXaw__iob _iob + _libXaw_exit exit + _libXaw_fprintf fprintf + _libXaw_getlogin getlogin + _libXaw_getpwuid getpwuid + _libXaw_getuid getuid + _libXaw_stat stat + _libXaw_strcat strcat + _libXaw_system system + _libXaw_mailboxWidgetClass mailboxWidgetClass + + /**/#init MenuButton.o + _libXaw_menuButtonWidgetClass menuButtonWidgetClass + + /**/#init Paned.o + _libXaw_toupper toupper + _libXaw_panedWidgetClass panedWidgetClass + + /**/#init Panner.o + _libXaw_atof atof + _libXaw_pannerWidgetClass pannerWidgetClass + + /**/#init Porthole.o + _libXaw_portholeWidgetClass portholeWidgetClass + + /**/#init Repeater.o + _libXaw_repeaterWidgetClass repeaterWidgetClass + + /**/#init Simple.o + _libXaw_simpleWidgetClass simpleWidgetClass + + /**/#init SimpleMenu.o + _libXaw_simpleMenuWidgetClass simpleMenuWidgetClass + + /**/#init Sme.o + _libXaw_smeObjectClass smeObjectClass + + /**/#init SmeLine.o + _libXaw_smeLineObjectClass smeLineObjectClass + + /**/#init StripChart.o + _libXaw_stripChartWidgetClass stripChartWidgetClass + + /**/#init Text.o + _libXaw_memset memset + _libXaw_textWidgetClass textWidgetClass + _libXaw__XA_CHARACTER_POSITION _XA_CHARACTER_POSITION + _libXaw__XA_COMPOUND_TEXT _XA_COMPOUND_TEXT + _libXaw__XA_DELETE _XA_DELETE + _libXaw__XA_LENGTH _XA_LENGTH + _libXaw__XA_LIST_LENGTH _XA_LIST_LENGTH + _libXaw__XA_NULL _XA_NULL + _libXaw__XA_SPAN _XA_SPAN + _libXaw__XA_TARGETS _XA_TARGETS + _libXaw__XA_TEXT _XA_TEXT + + /**/#init TextSink.o + _libXaw_textSinkObjectClass textSinkObjectClass + + /**/#init TextSrc.o + _libXaw_textSrcObjectClass textSrcObjectClass + + /**/#init TextAction.o + _libXaw_atoi atoi + + /**/#init TextPop.o + _libXaw_open open + _libXaw_read read + _libXaw_transientShellWidgetClass transientShellWidgetClass + + /**/#init Tree.o + _libXaw_treeWidgetClass treeWidgetClass + + /**/#init Vendor.o + _libXaw__aux__ __libXaw_init_stub_ + + /**/#init Viewport.o + _libXaw_viewportWidgetClass viewportWidgetClass + + /**/#init XawInit.o + _libXaw__aux__ __libXaw_init_stub_ + + + + + /**/#libraries + /* Here can objects be specified, which will extracted from + * an specified archive library and then linked to the shared + * library. This can avoid unwanted referencing of other + * shared libraries. + * NOTE: this objects must be listed also under #objects! + * e.g.: + /lib/libc.a memcpy.o + * or e.g.: + #ifdef __GNUC__ + GNULIB _fixdfsi.o + #endif + * + * NOT USED YET + * + */ + + /**/#externals + /* Here you can specify objects which will only linked to the + * host shared library. + * That are e.g. objects which contain only big data you want + * to seperate from the text section. (See mit/util/mksv3shlib/README.) + */ + InitLibStub.o + InitClnStub.o + DOWN/InitLib.o + DOWN/ChkShlibRev.o + DOWN/dummyBind.o + + /* There must be a comment as last line */ diff -c /dev/null mit/lib/Xaw/pAsciiSink.c:1.2 *** /dev/null Sat Mar 12 00:38:30 1994 --- mit/lib/Xaw/pAsciiSink.c Sat Mar 12 00:38:30 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pAsciiSink.c + * --------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pAsciiSink.c,v 1.2 1993/03/27 09:11:03 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef asciiSinkObjectClass + WidgetClass asciiSinkObjectClass = (WidgetClass)&asciiSinkClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pAsciiSrc.c:1.2 *** /dev/null Sat Mar 12 00:38:30 1994 --- mit/lib/Xaw/pAsciiSrc.c Sat Mar 12 00:38:30 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pAsciiSrc.c + * -------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pAsciiSrc.c,v 1.2 1993/03/27 09:11:05 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef asciiSrcObjectClass + WidgetClass asciiSrcObjectClass = (WidgetClass)&asciiSrcClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pAsciiText.c:1.2 *** /dev/null Sat Mar 12 00:38:30 1994 --- mit/lib/Xaw/pAsciiText.c Sat Mar 12 00:38:32 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pAscii.c + * --------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pAsciiText.c,v 1.2 1993/03/27 09:11:06 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef asciiTextWidgetClass + WidgetClass asciiTextWidgetClass = (WidgetClass)&asciiTextClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pBox.c:1.2 *** /dev/null Sat Mar 12 00:38:32 1994 --- mit/lib/Xaw/pBox.c Sat Mar 12 00:38:32 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pBox.c + * --------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pBox.c,v 1.2 1993/03/27 09:11:08 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef boxWidgetClass + WidgetClass boxWidgetClass = (WidgetClass)&boxClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pClock.c:1.2 *** /dev/null Sat Mar 12 00:38:32 1994 --- mit/lib/Xaw/pClock.c Sat Mar 12 00:38:32 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pClock.c + * ----------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pClock.c,v 1.2 1993/03/27 09:11:09 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef clockWidgetClass + WidgetClass clockWidgetClass = (WidgetClass) &clockClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pCommand.c:1.2 *** /dev/null Sat Mar 12 00:38:32 1994 --- mit/lib/Xaw/pCommand.c Sat Mar 12 00:38:32 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pCommand.c + * ------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pCommand.c,v 1.2 1993/03/27 09:11:11 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef commandWidgetClass + WidgetClass commandWidgetClass = (WidgetClass) &commandClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pDialog.c:1.2 *** /dev/null Sat Mar 12 00:38:33 1994 --- mit/lib/Xaw/pDialog.c Sat Mar 12 00:38:33 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pDialog.c + * ------------------ + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pDialog.c,v 1.2 1993/03/27 09:11:12 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef dialogWidgetClass + WidgetClass dialogWidgetClass = (WidgetClass)&dialogClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pForm.c:1.2 *** /dev/null Sat Mar 12 00:38:33 1994 --- mit/lib/Xaw/pForm.c Sat Mar 12 00:38:33 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pForm.c + * ---------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pForm.c,v 1.2 1993/03/27 09:11:14 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef formWidgetClass + WidgetClass formWidgetClass = (WidgetClass)&formClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pFuture.c:1.3 *** /dev/null Sat Mar 12 00:38:33 1994 --- mit/lib/Xaw/pFuture.c Sat Mar 12 00:38:33 1994 *************** *** 0 **** --- 1,37 ---- + /* libXaw : pFuture.c + * ------------------ + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pFuture.c,v 1.3 1993/03/20 03:33:52 dawes Exp $ + */ + + #include + + #ifdef SVR3SHLIB + + WidgetClass __futureWidgetClass_0_ = 0; + WidgetClass __futureWidgetClass_1_ = 0; + WidgetClass __futureWidgetClass_2_ = 0; + WidgetClass __futureWidgetClass_3_ = 0; + WidgetClass __futureWidgetClass_4_ = 0; + WidgetClass __futureWidgetClass_5_ = 0; + WidgetClass __futureWidgetClass_6_ = 0; + WidgetClass __futureWidgetClass_7_ = 0; + WidgetClass __futureWidgetClass_8_ = 0; + WidgetClass __futureWidgetClass_9_ = 0; + WidgetClass __futureWidgetClass_10_ = 0; + WidgetClass __futureWidgetClass_11_ = 0; + WidgetClass __futureWidgetClass_12_ = 0; + WidgetClass __futureWidgetClass_13_ = 0; + WidgetClass __futureWidgetClass_14_ = 0; + WidgetClass __futureWidgetClass_15_ = 0; + WidgetClass __futureWidgetClass_16_ = 0; + WidgetClass __futureWidgetClass_17_ = 0; + WidgetClass __futureWidgetClass_18_ = 0; + WidgetClass __futureWidgetClass_19_ = 0; + + char __libXaw_sp2__[32] = ""; + + #endif diff -c /dev/null mit/lib/Xaw/pGrip.c:1.2 *** /dev/null Sat Mar 12 00:38:33 1994 --- mit/lib/Xaw/pGrip.c Sat Mar 12 00:38:34 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pGrip.c + * ---------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pGrip.c,v 1.2 1993/03/27 09:11:15 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef gripWidgetClass + WidgetClass gripWidgetClass = (WidgetClass) &gripClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pLabel.c:1.3 *** /dev/null Sat Mar 12 00:38:34 1994 --- mit/lib/Xaw/pLabel.c Sat Mar 12 00:38:34 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pLabel.c + * ----------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pLabel.c,v 1.3 1993/05/22 06:43:37 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef labelWidgetClass + WidgetClass labelWidgetClass = (WidgetClass)&labelClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pList.c:1.2 *** /dev/null Sat Mar 12 00:38:34 1994 --- mit/lib/Xaw/pList.c Sat Mar 12 00:38:34 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pList.c + * ---------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pList.c,v 1.2 1993/03/27 09:11:18 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef listWidgetClass + WidgetClass listWidgetClass = (WidgetClass)&listClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pLogo.c:1.2 *** /dev/null Sat Mar 12 00:38:34 1994 --- mit/lib/Xaw/pLogo.c Sat Mar 12 00:38:35 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pLogo.c + * ---------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pLogo.c,v 1.2 1993/03/27 09:11:20 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef logoWidgetClass + WidgetClass logoWidgetClass = (WidgetClass) &logoClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pMailbox.c:1.2 *** /dev/null Sat Mar 12 00:38:35 1994 --- mit/lib/Xaw/pMailbox.c Sat Mar 12 00:38:35 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pMailbox.c + * ------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pMailbox.c,v 1.2 1993/03/27 09:11:21 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef mailboxWidgetClass + WidgetClass mailboxWidgetClass = (WidgetClass) &mailboxClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pMenuBotton.c:1.2 *** /dev/null Sat Mar 12 00:38:35 1994 --- mit/lib/Xaw/pMenuBotton.c Sat Mar 12 00:38:35 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : p.MenuBotton.c + * ----------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pMenuBotton.c,v 1.2 1993/03/27 09:11:23 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef menuButtonWidgetClass + WidgetClass menuButtonWidgetClass = (WidgetClass) &menuButtonClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pPaned.c:1.2 *** /dev/null Sat Mar 12 00:38:35 1994 --- mit/lib/Xaw/pPaned.c Sat Mar 12 00:38:36 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pPaned.c + * ----------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pPaned.c,v 1.2 1993/03/27 09:11:25 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef panedWidgetClass + WidgetClass panedWidgetClass = (WidgetClass) &panedClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pPanner.c:1.2 *** /dev/null Sat Mar 12 00:38:36 1994 --- mit/lib/Xaw/pPanner.c Sat Mar 12 00:38:36 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pPanner.c + * ------------------ + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pPanner.c,v 1.2 1993/03/27 09:11:26 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef pannerWidgetClass + WidgetClass pannerWidgetClass = (WidgetClass) &pannerClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pPorthole.c:1.2 *** /dev/null Sat Mar 12 00:38:36 1994 --- mit/lib/Xaw/pPorthole.c Sat Mar 12 00:38:36 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pPorthole.c + * -------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pPorthole.c,v 1.2 1993/03/27 09:11:28 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef portholeWidgetClass + WidgetClass portholeWidgetClass = (WidgetClass) &portholeClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pRepeater.c:1.2 *** /dev/null Sat Mar 12 00:38:36 1994 --- mit/lib/Xaw/pRepeater.c Sat Mar 12 00:38:36 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pRepeater.c + * -------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pRepeater.c,v 1.2 1993/03/27 09:11:29 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef repeaterWidgetClass + WidgetClass repeaterWidgetClass = (WidgetClass) &repeaterClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pScrollbar.c:1.2 *** /dev/null Sat Mar 12 00:38:37 1994 --- mit/lib/Xaw/pScrollbar.c Sat Mar 12 00:38:37 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pScrollbar.c + * --------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pScrollbar.c,v 1.2 1993/03/27 09:11:31 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef scrollbarWidgetClass + WidgetClass scrollbarWidgetClass = (WidgetClass)&scrollbarClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pSimple.c:1.2 *** /dev/null Sat Mar 12 00:38:37 1994 --- mit/lib/Xaw/pSimple.c Sat Mar 12 00:38:37 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pSimple.c + * ------------------ + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pSimple.c,v 1.2 1993/03/27 09:11:32 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef simpleWidgetClass + WidgetClass simpleWidgetClass = (WidgetClass)&simpleClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pSimpleMenu.c:1.2 *** /dev/null Sat Mar 12 00:38:37 1994 --- mit/lib/Xaw/pSimpleMenu.c Sat Mar 12 00:38:37 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pSimpleMenu.c + * ---------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pSimpleMenu.c,v 1.2 1993/03/27 09:11:34 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef simpleMenuWidgetClass + WidgetClass simpleMenuWidgetClass = (WidgetClass)&simpleMenuClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pSme.c:1.2 *** /dev/null Sat Mar 12 00:38:38 1994 --- mit/lib/Xaw/pSme.c Sat Mar 12 00:38:38 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pSme.c + * --------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pSme.c,v 1.2 1993/03/27 09:11:35 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef smeObjectClass + WidgetClass smeObjectClass = (WidgetClass) &smeClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pSmeBSB.c:1.2 *** /dev/null Sat Mar 12 00:38:38 1994 --- mit/lib/Xaw/pSmeBSB.c Sat Mar 12 00:38:38 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pSmeBSB.c + * ------------------ + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pSmeBSB.c,v 1.2 1993/03/27 09:11:37 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef smeBSBObjectClass + WidgetClass smeBSBObjectClass = (WidgetClass) &smeBSBClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pSmeLine.c:1.2 *** /dev/null Sat Mar 12 00:38:38 1994 --- mit/lib/Xaw/pSmeLine.c Sat Mar 12 00:38:38 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pSmeLine.c + * ------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pSmeLine.c,v 1.2 1993/03/27 09:11:38 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef smeLineObjectClass + WidgetClass smeLineObjectClass = (WidgetClass) &smeLineClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pStripChart.c:1.2 *** /dev/null Sat Mar 12 00:38:38 1994 --- mit/lib/Xaw/pStripChart.c Sat Mar 12 00:38:39 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pStripChart.c + * ---------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pStripChart.c,v 1.2 1993/03/27 09:11:40 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef stripChartWidgetClass + WidgetClass stripChartWidgetClass = (WidgetClass) &stripChartClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pText.c:1.2 *** /dev/null Sat Mar 12 00:38:39 1994 --- mit/lib/Xaw/pText.c Sat Mar 12 00:38:39 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pText.c + * ---------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pText.c,v 1.2 1993/03/27 09:11:42 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef textWidgetClass + WidgetClass textWidgetClass = (WidgetClass)&textClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pTextSink.c:1.2 *** /dev/null Sat Mar 12 00:38:39 1994 --- mit/lib/Xaw/pTextSink.c Sat Mar 12 00:38:39 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pTextSink.c + * -------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pTextSink.c,v 1.2 1993/03/27 09:11:43 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef textSinkObjectClass + WidgetClass textSinkObjectClass = (WidgetClass)&textSinkClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pTextSrc.c:1.2 *** /dev/null Sat Mar 12 00:38:39 1994 --- mit/lib/Xaw/pTextSrc.c Sat Mar 12 00:38:40 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pTextSrc.c + * ------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pTextSrc.c,v 1.2 1993/03/27 09:11:45 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef textSrcObjectClass + WidgetClass textSrcObjectClass = (WidgetClass)&textSrcClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pToggle.c:1.2 *** /dev/null Sat Mar 12 00:38:40 1994 --- mit/lib/Xaw/pToggle.c Sat Mar 12 00:38:40 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pToggle.c + * ------------------ + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pToggle.c,v 1.2 1993/03/27 09:11:47 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef toggleWidgetClass + WidgetClass toggleWidgetClass = (WidgetClass) &toggleClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pTree.c:1.2 *** /dev/null Sat Mar 12 00:38:40 1994 --- mit/lib/Xaw/pTree.c Sat Mar 12 00:38:40 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pTree.c + * ---------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pTree.c,v 1.2 1993/03/27 09:11:48 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef treeWidgetClass + WidgetClass treeWidgetClass = (WidgetClass) &treeClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pVendor.c:1.2 *** /dev/null Sat Mar 12 00:38:40 1994 --- mit/lib/Xaw/pVendor.c Sat Mar 12 00:38:40 1994 *************** *** 0 **** --- 1,19 ---- + /* libXaw : pVendor.c + * ------------------ + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pVendor.c,v 1.2 1993/03/27 09:11:49 dawes Exp $ + */ + + #include + #include + #include + #include + #include + + #ifdef SVR3SHLIB + #undef vendorShellWidgetClass + WidgetClass vendorShellWidgetClass = (WidgetClass) &vendorShellClassRec; + #endif diff -c /dev/null mit/lib/Xaw/pViewport.c:1.2 *** /dev/null Sat Mar 12 00:38:41 1994 --- mit/lib/Xaw/pViewport.c Sat Mar 12 00:38:41 1994 *************** *** 0 **** --- 1,16 ---- + /* libXaw : pViewport.c + * -------------------- + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xaw/pViewport.c,v 1.2 1993/03/27 09:11:51 dawes Exp $ + */ + + #include + #include + + #ifdef SVR3SHLIB + #undef viewportWidgetClass + WidgetClass viewportWidgetClass = (WidgetClass)&viewportClassRec; + #endif diff -c mit/lib/Xdmcp/Fill.c:1.1.1.1 mit/lib/Xdmcp/Fill.c:2.0 *** mit/lib/Xdmcp/Fill.c:1.1.1.1 Sat Mar 12 00:38:45 1994 --- mit/lib/Xdmcp/Fill.c Sat Mar 12 00:38:45 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xdmcp/Fill.c,v 2.0 1993/09/22 15:32:23 dawes Exp $ * $XConsortium: Fill.c,v 1.4 91/07/16 20:33:50 gildea Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 28,39 **** --- 29,52 ---- #include #include + #if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN) + #define HASSOCKETS + #endif + #ifdef STREAMSCONN #include #else + #ifdef HASSOCKETS + #ifndef _MINIX #include + #else /* _MINIX */ + #include + #include + #endif /* !_MINIX */ #endif + #endif + #ifndef _MINIX int XdmcpFill (fd, buffer, from, fromlen) int fd; *************** *** 71,79 **** buffer->count = dataunit.udata.len; *fromlen = dataunit.addr.len; #else buffer->count = recvfrom (fd, buffer->data, buffer->size, 0, (struct sockaddr *)from, fromlen); ! #endif if (buffer->count < 6) { buffer->count = 0; return FALSE; --- 84,141 ---- buffer->count = dataunit.udata.len; *fromlen = dataunit.addr.len; #else + #ifdef HASSOCKETS buffer->count = recvfrom (fd, buffer->data, buffer->size, 0, (struct sockaddr *)from, fromlen); ! #else ! buffer->count = 0; ! #endif /* HASSOCKETS */ ! #endif /* STREAMSCONN */ ! if (buffer->count < 6) { ! buffer->count = 0; ! return FALSE; ! } ! return TRUE; ! } ! #else /* _MINIX */ ! int ! MNX_XdmcpFill (fd, buffer, from, fromlen, data, datalen) ! int fd; ! XdmcpBufferPtr buffer; ! XdmcpNetaddr from; /* return */ ! int *fromlen; /* return */ ! char *data; ! int datalen; ! { ! BYTE *newBuf; ! struct sockaddr *from_addr; ! udp_io_hdr_t *udp_io_hdr; ! ! if (buffer->size < XDM_MAX_MSGLEN) ! { ! newBuf = (BYTE *) Xalloc (XDM_MAX_MSGLEN); ! if (newBuf) ! { ! Xfree (buffer->data); ! buffer->data = newBuf; ! buffer->size = XDM_MAX_MSGLEN; ! } ! } ! buffer->pointer = 0; ! udp_io_hdr= (udp_io_hdr_t *)data; ! data += sizeof(udp_io_hdr_t) + udp_io_hdr->uih_ip_opt_len; ! datalen -= sizeof(udp_io_hdr_t) + udp_io_hdr->uih_ip_opt_len; ! buffer->count= udp_io_hdr->uih_data_len; ! if (buffer->count > datalen) ! { ! buffer->count= 0; ! return FALSE; ! } ! bcopy(data, (char *)buffer->data, buffer->count); ! from_addr= (struct sockaddr *)from; ! from_addr->sa_u.sa_family= AF_INET; ! from_addr->sa_u.sa_in.sin_addr= udp_io_hdr->uih_src_addr; ! from_addr->sa_u.sa_in.sin_port= udp_io_hdr->uih_src_port; if (buffer->count < 6) { buffer->count = 0; return FALSE; *************** *** 80,82 **** --- 142,145 ---- } return TRUE; } + #endif /* !_MINIX */ diff -c mit/lib/Xdmcp/Flush.c:1.1.1.1 mit/lib/Xdmcp/Flush.c:2.0 *** mit/lib/Xdmcp/Flush.c:1.1.1.1 Sat Mar 12 00:38:45 1994 --- mit/lib/Xdmcp/Flush.c Sat Mar 12 00:38:45 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xdmcp/Flush.c,v 2.0 1993/09/22 15:32:25 dawes Exp $ * $XConsortium: Flush.c,v 1.4 91/07/16 20:33:52 gildea Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 28,37 **** --- 29,50 ---- #include #include + #if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN) + #define HASSOCKETS + #endif + #ifdef STREAMSCONN #include #else + #ifdef HASSOCKETS + #ifndef _MINIX #include + #else /* _MINIX */ + #include + #include + #include + #endif /* !_MINIX */ + #endif #endif int *************** *** 42,47 **** --- 55,66 ---- int tolen; { int result; + #if _MINIX + struct sockaddr *to_addr; + char *b; + udp_io_hdr_t *udp_io_hdr; + int flags, s_errno; + #endif /* !_MINIX */ #ifdef STREAMSCONN struct t_unitdata dataunit; *************** *** 55,64 **** if (result < 0) return FALSE; #else result = sendto (fd, buffer->data, buffer->pointer, 0, (struct sockaddr *)to, tolen); if (result != buffer->pointer) return FALSE; ! #endif return TRUE; } --- 74,114 ---- if (result < 0) return FALSE; #else + #ifdef HASSOCKETS + #ifndef _MINIX result = sendto (fd, buffer->data, buffer->pointer, 0, (struct sockaddr *)to, tolen); if (result != buffer->pointer) return FALSE; ! #else /* _MINIX */ ! to_addr= (struct sockaddr *)to; ! b= (char *)Xalloc(buffer->pointer + sizeof(udp_io_hdr_t)); ! if (b == NULL) ! return FALSE; ! udp_io_hdr= (udp_io_hdr_t *)b; ! bcopy((char *)buffer->data, b+sizeof(udp_io_hdr_t), buffer->pointer); ! udp_io_hdr->uih_dst_addr= to_addr->sa_u.sa_in.sin_addr; ! udp_io_hdr->uih_dst_port= to_addr->sa_u.sa_in.sin_port; ! udp_io_hdr->uih_ip_opt_len= 0; ! udp_io_hdr->uih_data_len= buffer->pointer; ! ! /* Make the write synchronous by turning of asynch I/O */ ! flags= fcntl(fd, F_GETFD); ! fcntl(fd, F_SETFD, flags & ~FD_ASYNCHIO); ! result= write(fd, b, buffer->pointer + sizeof(udp_io_hdr_t)); ! s_errno= errno; ! Xfree(b); ! fcntl(fd, F_SETFD, flags); ! if (result != buffer->pointer + sizeof(udp_io_hdr_t)) ! { ! ErrorF("XdmcpFlush: unable to write: %d, '%s'\n", result, ! strerror(s_errno)); ! return FALSE; ! } ! #endif /* !_MINIX */ ! #else ! return FALSE; ! #endif /* HASSOCKETS */ ! #endif /* STREAMSCONN */ return TRUE; } diff -c mit/lib/Xdmcp/Imakefile:1.1.1.1 mit/lib/Xdmcp/Imakefile:1.4 *** mit/lib/Xdmcp/Imakefile:1.1.1.1 Sat Mar 12 00:38:46 1994 --- mit/lib/Xdmcp/Imakefile Sat Mar 12 00:38:46 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/lib/Xdmcp/Imakefile,v 1.4 1993/03/27 09:16:43 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.19 91/09/18 14:28:52 rws Exp $ #define DoNormalLib NormalLibXdmcp #define DoSharedLib SharedLibXdmcp *************** *** 124,129 **** --- 125,132 ---- LintLibraryTarget(Xdmcp,$(SRCS)) InstallLintLibrary(Xdmcp,$(LINTLIBDIR)) + + InstallLinkKitLibrary(Xdmcp,$(LINKKITDIR)/lib) BuildIncludes($(HEADERS),.,.) diff -c mit/lib/Xdmcp/Wrap.c:1.1.1.1 mit/lib/Xdmcp/Wrap.c:1.2 *** mit/lib/Xdmcp/Wrap.c:1.1.1.1 Sat Mar 12 00:38:47 1994 --- mit/lib/Xdmcp/Wrap.c Sat Mar 12 00:38:47 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xdmcp/Wrap.c,v 1.2 1993/05/22 06:45:12 dawes Exp $ * $XConsortium: Wrap.c,v 1.8 91/09/10 14:34:11 keith Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 29,34 **** --- 30,39 ---- #include #ifdef HASXDMAUTH + + #ifdef SVR3SHLIB + #undef XdmcpWrap + #endif /* * The following function exists only to demonstrate the diff -c mit/lib/Xmu/Atoms.c:1.1.1.1 mit/lib/Xmu/Atoms.c:1.3 *** mit/lib/Xmu/Atoms.c:1.1.1.1 Sat Mar 12 00:38:51 1994 --- mit/lib/Xmu/Atoms.c Sat Mar 12 00:38:52 1994 *************** *** 1,4 **** --- 1,5 ---- /* $XConsortium: Atoms.c,v 1.15 91/06/30 17:49:57 rws Exp $ + * $XFree86: mit/lib/Xmu/Atoms.c,v 1.3 1993/03/27 09:16:59 dawes Exp $ * * Copyright 1988 by the Massachusetts Institute of Technology * *************** *** 20,25 **** --- 21,39 ---- * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * */ + + #ifdef SVR3SHLIB + #undef _XA_CLASS + #undef _XA_CLIENT_WINDOW + #undef _XA_HOSTNAME + #undef _XA_IP_ADDRESS + #undef _XA_NAME + #undef _XA_NET_ADDRESS + #undef _XA_OWNER_OS + #undef _XA_TARGETS + #undef _XA_TIMESTAMP + #undef _XA_USER + #endif /* * This file contains routines to cache atoms, avoiding multiple diff -c /dev/null mit/lib/Xmu/ChkShlibRev.c:1.2 *** /dev/null Sat Mar 12 00:38:52 1994 --- mit/lib/Xmu/ChkShlibRev.c Sat Mar 12 00:38:52 1994 *************** *** 0 **** --- 1,34 ---- + /* libXmu: ChkShlibRev.c + * + * This code is linked to the clients and is called by their .init sections. + * It checks the SVR3 target shared library revision. + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xmu/ChkShlibRev.c,v 1.2 1993/03/27 09:17:02 dawes Exp $ + */ + + #include + + #ifdef SVR3SHLIB + #ifdef __STDC__ + #define Const const + #else + #define Const /**/ + #endif + + extern Const char *_shared_libXmu_version; + + void __check_libXmu_rev_() + { + + /* check revision + */ + + if(strcmp(_shared_libXmu_version, SOXMUREV)) + fprintf(stderr, "Warning: %s has other revision (%s) than expected" + " %s\n", TARGET, _shared_libXmu_version, SOXMUREV); + + } + #endif + diff -c mit/lib/Xmu/CvtStdSel.c:1.1.1.1 mit/lib/Xmu/CvtStdSel.c:1.5 *** mit/lib/Xmu/CvtStdSel.c:1.1.1.1 Sat Mar 12 00:38:52 1994 --- mit/lib/Xmu/CvtStdSel.c Sat Mar 12 00:38:52 1994 *************** *** 1,4 **** --- 1,5 ---- /* $XConsortium: CvtStdSel.c,v 1.23 91/04/11 09:04:08 rws Exp $ + * $XFree86: mit/lib/Xmu/CvtStdSel.c,v 1.5 1993/05/04 15:00:15 dawes Exp $ * * Copyright 1988 by the Massachusetts Institute of Technology * *************** *** 27,32 **** --- 28,37 ---- * XmuConvertStandardSelection() return a known selection */ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #ifdef SYSVNET #include #define __TYPES__ /* prevent #include in Xlib.h */ *************** *** 39,48 **** #include #include ! #ifndef SYSVNET #include #include #endif #include "Atoms.h" #include "StdSel.h" --- 44,55 ---- #include #include ! #if !defined(SYSVNET) && !defined(AMOEBA) && !defined(_MINIX) ! #if defined(TCPCONN) || defined(UNIXCONN) || defined(DNETCONN) #include #include #endif + #endif #include "Atoms.h" #include "StdSel.h" *************** *** 72,77 **** --- 79,88 ---- #endif #endif + #ifdef SCO + extern int uname(); + #endif + static char *get_os_name () { #ifdef OS_NAME *************** *** 186,192 **** *format = 8; return True; } ! #ifdef TCPCONN if (*target == XA_IP_ADDRESS(d)) { char hostname[1024]; --- 197,203 ---- *format = 8; return True; } ! #if defined(TCPCONN) && !defined(_MINIX) if (*target == XA_IP_ADDRESS(d)) { char hostname[1024]; diff -c mit/lib/Xmu/Imakefile:1.1.1.2 mit/lib/Xmu/Imakefile:2.1 *** mit/lib/Xmu/Imakefile:1.1.1.2 Sat Mar 12 00:38:53 1994 --- mit/lib/Xmu/Imakefile Sat Mar 12 00:38:53 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/lib/Xmu/Imakefile,v 2.1 1994/01/13 08:49:30 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.74 91/12/20 11:20:22 rws Exp $ XCOMM XCOMM This library contains miscellaneous utility routines and is not part *************** *** 97,103 **** VisCmap.c \ WidgetNode.c \ Xct.c \ ! sharedlib.c #if SharedDataSeparation UNSHAREDOBJS = sharedlib.o --- 98,107 ---- VisCmap.c \ WidgetNode.c \ Xct.c \ ! sharedlib.c \ ! globals.c \ ! InitLibStub.s \ ! ChkShlibRev.c #if SharedDataSeparation UNSHAREDOBJS = sharedlib.o *************** *** 147,171 **** WidgetNode.o \ Xct.o LibraryObjectRule() SpecialLibObjectRule(CvtStdSel.o,$(ICONFIGFILES),$(CSSDEFS)) SpecialLibObjectRule(LocBitmap.o,$(ICONFIGFILES),$(BITDEFS)) #if DoSharedLib && SharedDataSeparation ! SpecialObjectRule(sharedlib.o,,$(SHLIBDEF)) #endif #if DoSharedLib ! #if SunPost411FCSLd libXmu.so.$(SOXMUREV): $(EXTENSIONSRC)/lib/libXext.so.$(SOXEXTREV) $(EXTENSIONSRC)/lib/libXext.so.$(SOXEXTREV): cd $(EXTENSIONSRC)/lib; make libXext.so.$(SOXEXTREV) #endif #if DoNormalLib SharedLibraryTarget(Xmu,$(SOXMUREV),$(OBJS),shared,..) #else SharedLibraryTarget(Xmu,$(SOXMUREV),$(OBJS),.,.) #endif SharedLibraryDataTarget(Xmu,$(SOXMUREV),$(UNSHAREDOBJS)) #ifdef RsArchitecture --- 151,195 ---- WidgetNode.o \ Xct.o + #if defined(i386SVR3Architecture) && DoSharedLib + SVR3SHLIBOBJS = \ + globals.o \ + InitLibStub.o \ + ChkShlibRev.o + #endif + LibraryObjectRule() + #if defined(i386SVR3Architecture) && DoSharedLib + SpecialLibObjectRule(globals.o,$(ICONFIGFILES),-D_libXmu_import -DSOXMUREV=\"$(SOXMUREV)\") + SpecialLibObjectRule(ChkShlibRev.o,,-D_libXmu_import -DSOXMUREV=\"$(SOXMUREV)\" -DTARGET=\"$(LIBDIR)/shlib/libXmu.$(SOXMUREV)\") + #endif + SpecialLibObjectRule(CvtStdSel.o,$(ICONFIGFILES),$(CSSDEFS)) SpecialLibObjectRule(LocBitmap.o,$(ICONFIGFILES),$(BITDEFS)) #if DoSharedLib && SharedDataSeparation ! SpecialObjectRule(sharedlib.o,sharedlib.c,$(SHLIBDEF)) #endif #if DoSharedLib ! #if defined(SunPost411FCSLd) || defined(i386BsdArchitecture) libXmu.so.$(SOXMUREV): $(EXTENSIONSRC)/lib/libXext.so.$(SOXEXTREV) $(EXTENSIONSRC)/lib/libXext.so.$(SOXEXTREV): cd $(EXTENSIONSRC)/lib; make libXext.so.$(SOXEXTREV) #endif + #ifndef i386SVR3Architecture #if DoNormalLib SharedLibraryTarget(Xmu,$(SOXMUREV),$(OBJS),shared,..) #else SharedLibraryTarget(Xmu,$(SOXMUREV),$(OBJS),.,.) + #endif + #else + #if DoNormalLib + SharedLibraryTarget(Xmu,$(SOXMUREV),$(OBJS) $(SVR3SHLIBOBJS),shared,..) + #else + SharedLibraryTarget(Xmu,$(SOXMUREV),$(OBJS) $(SVR3SHLIBOBJS),.,.) + #endif #endif SharedLibraryDataTarget(Xmu,$(SOXMUREV),$(UNSHAREDOBJS)) #ifdef RsArchitecture diff -c /dev/null mit/lib/Xmu/InitLibStub.s:1.2 *** /dev/null Sat Mar 12 00:38:53 1994 --- mit/lib/Xmu/InitLibStub.s Sat Mar 12 00:38:53 1994 *************** *** 0 **** --- 1,28 ---- + .file "InitLibStub.s" + + /##################################################################### + /# InitLibStub.s # + /# ----------------------------------------------------------------- # + /# This stub goes to .init section of the client binary. It checks # + /# the revision of the library and calls the init code for the # + /# library # + /# Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany # + /# (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) # + /##################################################################### + + /# $XFree86: mit/lib/Xmu/InitLibStub.s,v 1.2 1993/03/27 09:17:05 dawes Exp $ + + .section .init,"x" + + .align 4 + .globl __libXmu_init_stub_ + + __libXmu_init_stub_: + + / check revision of target shared library + + pushl %ebp + movl %esp,%ebp + call __check_libXmu_rev_ + leave + diff -c mit/lib/Xmu/LocBitmap.c:1.1.1.1 mit/lib/Xmu/LocBitmap.c:1.4 *** mit/lib/Xmu/LocBitmap.c:1.1.1.1 Sat Mar 12 00:38:54 1994 --- mit/lib/Xmu/LocBitmap.c Sat Mar 12 00:38:54 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xmu/LocBitmap.c,v 1.4 1993/05/24 12:37:17 dawes Exp $ * $XConsortium: LocBitmap.c,v 1.16 91/07/02 09:09:59 rws Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 23,28 **** --- 24,32 ---- * Author: Jim Fulton, MIT X Consortium */ + #ifdef SCO324 + #include + #endif #include #include #include *************** *** 29,34 **** --- 33,44 ---- #include #include + #ifndef X_NOT_STDC_ENV + #include + #else + extern char *getenv(); + #endif + #ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE #include *************** *** 152,157 **** --- 162,169 ---- char *fn = filename; Pixmap pixmap; unsigned char *data; + char bitmappath[PATH_MAX]; + char *xwinhome = NULL; switch (i) { case 1: *************** *** 169,175 **** } continue; case 3: ! sprintf (filename, "%s/%s", BITMAPDIR, name); break; case 4: if (!try_plain_name) continue; --- 181,193 ---- } continue; case 3: ! if ((xwinhome = getenv("XWINHOME")) == NULL) { ! strcpy(bitmappath, BITMAPDIR); ! } ! else { ! sprintf(bitmappath, "%s/include/X11/bitmaps", xwinhome); ! } ! sprintf (filename, "%s/%s", bitmappath, name); break; case 4: if (!try_plain_name) continue; diff -c mit/lib/Xmu/RdBitF.c:1.1.1.1 mit/lib/Xmu/RdBitF.c:1.5 *** mit/lib/Xmu/RdBitF.c:1.1.1.1 Sat Mar 12 00:38:55 1994 --- mit/lib/Xmu/RdBitF.c Sat Mar 12 00:38:55 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xmu/RdBitF.c,v 1.5 1993/05/24 12:37:19 dawes Exp $ * $XConsortium: RdBitF.c,v 1.8 91/03/09 16:27:55 rws Exp $ * * Copyright 1988 Massachusetts Institute of Technology *************** *** 40,45 **** --- 41,50 ---- * Based on an optimized version provided by Jim Becker, Auguest 5, 1988. */ + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + #include #include #include *************** *** 46,51 **** --- 51,70 ---- #include #include + /* + * Don't want getc() declared as external function for __STDC__ on + * ISC 2.2.1 or for _POSIX_SOURCE on 2.2.1/3.0 because of shared + * library creation + * + * Under SCO324, getc is a macro but it uses errno so we always redefine it + * (mainly for shared libraries) + */ + #if (defined(ISC) && defined(_POSIX_SOURCE)) || (defined(ISC22) && defined(__STDC__)) || defined(SCO324) + #ifdef getc + #undef getc + #endif + #define getc(p) (--(p)->_cnt < 0 ? _filbuf(p) : (int) *(p)->_ptr++) + #endif #define MAX_SIZE 255 diff -c mit/lib/Xmu/StrToBmap.c:1.1.1.1 mit/lib/Xmu/StrToBmap.c:1.3 *** mit/lib/Xmu/StrToBmap.c:1.1.1.1 Sat Mar 12 00:38:55 1994 --- mit/lib/Xmu/StrToBmap.c Sat Mar 12 00:38:55 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xmu/StrToBmap.c,v 1.3 1993/03/27 09:17:08 dawes Exp $ */ /* static char rcsid[] = "$XConsortium: StrToBmap.c,v 1.11 91/03/09 17:08:48 rws Exp $"; */ *************** *** 24,29 **** --- 25,34 ---- SOFTWARE. ******************************************************************/ + + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif #include #include diff -c mit/lib/Xmu/StrToCurs.c:1.1.1.2 mit/lib/Xmu/StrToCurs.c:1.2 *** mit/lib/Xmu/StrToCurs.c:1.1.1.2 Sat Mar 12 00:38:56 1994 --- mit/lib/Xmu/StrToCurs.c Sat Mar 12 00:38:56 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xmu/StrToCurs.c,v 1.2 1993/05/24 12:37:21 dawes Exp $ */ /* $XConsortium: StrToCurs.c,v 1.19 92/03/19 15:22:29 converse Exp $ */ /*********************************************************** *************** *** 24,29 **** --- 25,33 ---- ******************************************************************/ + #ifdef SCO324 + #include + #endif #include #include #include diff -c mit/lib/Xmu/StrToLong.c:1.1.1.1 mit/lib/Xmu/StrToLong.c:1.2 *** mit/lib/Xmu/StrToLong.c:1.1.1.1 Sat Mar 12 00:38:56 1994 --- mit/lib/Xmu/StrToLong.c Sat Mar 12 00:38:56 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xmu/StrToLong.c,v 1.2 1993/05/04 15:00:17 dawes Exp $ * $XConsortium: StrToLong.c,v 1.3 90/10/26 16:43:40 dave Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 22,27 **** --- 23,31 ---- */ + #ifdef SCO + #include + #endif #include #include "Converters.h" diff -c /dev/null mit/lib/Xmu/globals.c:1.3 *** /dev/null Sat Mar 12 00:38:56 1994 --- mit/lib/Xmu/globals.c Sat Mar 12 00:38:57 1994 *************** *** 0 **** --- 1,87 ---- + /* libXmu : libXmu.c + * exported data + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + * + * $XFree86: mit/lib/Xmu/globals.c,v 1.3 1993/03/27 09:17:09 dawes Exp $ + */ + + #ifdef SVR3SHLIB + + #ifdef __STDC__ + #define Const const + #else + #define Const /**/ + #endif + + Const char *_shared_libXmu_version = SOXMUREV; char __libXmu_sp1__[16] = ""; + + #define VoidInit(var) void *var = 0 + + VoidInit(_libXmu__aux__); + VoidInit(_libXmu_XShapeCombineMask); + VoidInit(_libXmu__ctype); + VoidInit(_libXmu__filbuf); + VoidInit(_libXmu__iob); + VoidInit(_libXmu_atoi); + VoidInit(_libXmu_bcopy); + VoidInit(_libXmu_calloc); + VoidInit(_libXmu_exit); + VoidInit(_libXmu_fclose); + VoidInit(_libXmu_fgets); + VoidInit(_libXmu_fopen); + VoidInit(_libXmu_fprintf); + VoidInit(_libXmu_fputs); + VoidInit(_libXmu_free); + VoidInit(_libXmu_getenv); + VoidInit(_libXmu_gethostbyname); + VoidInit(_libXmu_gethostname); + VoidInit(_libXmu_malloc); + VoidInit(_libXmu_qsort); + VoidInit(_libXmu_realloc); + VoidInit(_libXmu_sprintf); + VoidInit(_libXmu_sscanf); + VoidInit(_libXmu_strcat); + VoidInit(_libXmu_strcmp); + VoidInit(_libXmu_strcpy); + VoidInit(_libXmu_strncmp); + VoidInit(_libXmu_strncpy); + VoidInit(_libXmu_strrchr); + VoidInit(_libXmu_uname); + + VoidInit(_libXmu__XA_CLASS); + VoidInit(_libXmu__XA_CLIENT_WINDOW); + VoidInit(_libXmu__XA_HOSTNAME); + VoidInit(_libXmu__XA_IP_ADDRESS); + VoidInit(_libXmu__XA_NAME); + VoidInit(_libXmu__XA_NET_ADDRESS); + VoidInit(_libXmu__XA_OWNER_OS); + VoidInit(_libXmu__XA_TARGETS); + VoidInit(_libXmu__XA_TIMESTAMP); + VoidInit(_libXmu__XA_USER); + + + #ifndef __GNUC__ + /* + * If we are working with floating point aritmetic, stock AT&T cc generates + * an unresolved reference to __fltused. But we want to make a shared lib from + * this here and don't want to reference /lib/libc_s.a, just define this sym as + * (shared lib) static. + * The trick is that while building the shared lib all references to this + * symbol are resolved internally. But the symbol will be outside only visible + * as a static one, so preventing a name conflict with other shared libs. + */ + long __fltused = 0; + #endif + + /* A dummy function for free branchtab-slots. + * This would be a great place for an error-check mechanism for shared libs. + * (Print error message if not existent function is called.) + */ + extern void _libXmu_dummy() {}; + + #endif + + diff -c /dev/null mit/lib/Xmu/import.h:2.0 *** /dev/null Sat Mar 12 00:38:57 1994 --- mit/lib/Xmu/import.h Sat Mar 12 00:38:57 1994 *************** *** 0 **** --- 1,160 ---- + /* libXmu : import.h + * indirection defines + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + * + * $XFree86: mit/lib/Xmu/import.h,v 2.0 1993/09/22 15:32:44 dawes Exp $ + */ + + #ifndef _libXmu_import + #define _libXmu_import + #ifdef SVR3SHLIB + + #define XShapeCombineMask (*_libXmu_XShapeCombineMask) + #define _ctype (*_libXmu__ctype) + #define _filbuf (*_libXmu__filbuf) + #define _iob (*_libXmu__iob) + #define atoi (*_libXmu_atoi) + #define bcopy (*_libXmu_bcopy) + #define calloc (*_libXmu_calloc) + #define exit (*_libXmu_exit) + #define fclose (*_libXmu_fclose) + #define fgets (*_libXmu_fgets) + #define fopen (*_libXmu_fopen) + #define fprintf (*_libXmu_fprintf) + #define fputs (*_libXmu_fputs) + /* prevent name conflict with member free of XFontSetMethods */ + #define free(ptr) (*_libXmu_free)(ptr) + #define getenv (*_libXmu_getenv) + #define gethostbyname (*_libXmu_gethostbyname) + #define gethostname (*_libXmu_gethostname) + #define malloc (*_libXmu_malloc) + #define qsort (*_libXmu_qsort) + #define realloc (*_libXmu_realloc) + #define sprintf (*_libXmu_sprintf) + #define sscanf (*_libXmu_sscanf) + #define strcat (*_libXmu_strcat) + #define strcmp (*_libXmu_strcmp) + #define strcpy (*_libXmu_strcpy) + #define strncmp (*_libXmu_strncmp) + #define strncpy (*_libXmu_strncpy) + #define strrchr (*_libXmu_strrchr) + #define uname (*_libXmu_uname) + + #define _XA_CLASS (*_libXmu__XA_CLASS) + #define _XA_CLIENT_WINDOW (*_libXmu__XA_CLIENT_WINDOW) + #define _XA_HOSTNAME (*_libXmu__XA_HOSTNAME) + #define _XA_IP_ADDRESS (*_libXmu__XA_IP_ADDRESS) + #define _XA_NAME (*_libXmu__XA_NAME) + #define _XA_NET_ADDRESS (*_libXmu__XA_NET_ADDRESS) + #define _XA_OWNER_OS (*_libXmu__XA_OWNER_OS) + #define _XA_TARGETS (*_libXmu__XA_TARGETS) + #define _XA_TIMESTAMP (*_libXmu__XA_TIMESTAMP) + #define _XA_USER (*_libXmu__XA_USER) + + + /* Imported functions declarations + * Why declaring some imported functions here? + * This should be done gracefully through including of the systems + * header files. Unfortunatly there are some source files don't + * include all headers they should include, there are also some functions + * nowhere declared in the systems headers and some are declared + * without extern and cause problems since the names are redefined + * and these declarations then become undesired false pointer definitions. + */ + + /* This section needs editing! It's only an example for the X libs. */ + + #ifdef __STDC__ + extern int creat(char const *, unsigned short); + extern void exit(int); + #ifndef SCO + extern int printf(char const *, ...); + extern int sprintf(char *, char const *, ...); + extern int sscanf(char *, char const *, ...); + #endif + extern int atoi(char const *); + extern int access(char const *, int); + extern unsigned int alarm(unsigned int); + extern unsigned int sleep(unsigned int); + extern int close(int); + extern int read(int, char *, unsigned int); + extern int write(int, char const *, unsigned int); + extern int grantpt(int); + extern char *ptsname(int); + extern int unlockpt(int); + extern char *getenv(char const *); + #else + extern int creat(); + extern void exit(); + #ifndef SCO + extern int printf(); + extern int sprintf(); + extern int sscanf(); + #endif + extern int atoi(); + extern int access(); + extern unsigned int alarm(); + extern unsigned int sleep(); + extern int close(); + extern int read(); + extern int write(); + extern int grantpt(); + extern char *ptsname(); + extern int unlockpt(); + extern char *getenv(); + #endif + + /* use char * also for __STDC__, the sources want it */ + extern char *malloc(), *realloc(), *calloc(); + + #include + + extern char *sys_errlist[]; + extern int sys_nerr; + + extern void qsort(); + #ifndef ISC40 + extern int _flsbuf(); + extern int _filbuf(); + #endif + extern int ioctl(); + extern int getmsg(); + extern int putmsg(); + + extern unsigned short ntohs(), htons(); + extern unsigned long ntohl(), htonl(); + extern unsigned long inet_addr(); + extern int connect(); + extern int gethostname(); + extern int setsockopt(); + extern int socket(); + extern int writev(); + extern int gettimeofday(); + #ifdef ATT + extern int uname(); + #endif + + + /* Functions with ambiguous names */ + + #ifdef __STDC__ + extern int close(int); + extern void free(void *); + #include + #include + #ifdef SCO + #include + #endif /* SCO */ + extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); + #else + extern int (*_libXmu_close)(); + extern void (*_libXmu_free)(); + extern int (*_libXmu_select)(); + #endif + + #endif + #endif + diff -c /dev/null mit/lib/Xmu/libXmu.def:1.4 *** /dev/null Sat Mar 12 00:38:57 1994 --- mit/lib/Xmu/libXmu.def Sat Mar 12 00:38:57 1994 *************** *** 0 **** --- 1,286 ---- + /* libXmu : libXmu.def + * shared library description file + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + * + * $XFree86: mit/lib/Xmu/libXmu.def,v 1.4 1993/04/24 05:21:53 dawes Exp $ + */ + + /**/#address .text 0xB1000000 + /**/#address .data 0xB1400000 + + + /**/#objects noload + ../X/libX11_s.a + ../Xt/libXt_s.a + + /**/#branch + XctCreate 1 + XctFree 2 + XctNextItem 3 + XctReset 4 + XmuAddCloseDisplayHook 5 + XmuAddInitializer 6 + XmuAllStandardColormaps 7 + XmuCallInitializers 8 + XmuClientWindow 9 + XmuCompareISOLatin1 10 + XmuConvertStandardSelection 11 + XmuCopyISOLatin1Lowered 12 + XmuCopyISOLatin1Uppered 13 + XmuCreateColormap 14 + XmuCreatePixmapFromBitmap 15 + XmuCreateStippledPixmap 16 + XmuCursorNameToIndex 17 + XmuCvtFunctionToCallback 18 + XmuCvtStringToBackingStore 19 + XmuCvtStringToBitmap 20 + XmuCvtStringToColorCursor 21 + XmuCvtStringToCursor 22 + XmuCvtStringToGravity 23 + XmuCvtStringToJustify 24 + XmuCvtStringToLong 25 + XmuCvtStringToOrientation 26 + XmuCvtStringToShapeStyle 27 + XmuCvtStringToWidget 28 + XmuDQAddDisplay 29 + XmuDQCreate 30 + XmuDQDestroy 31 + XmuDQLookupDisplay 32 + XmuDQRemoveDisplay 33 + XmuDeleteStandardColormap 34 + XmuDistinguishableColors 35 + XmuDistinguishablePixels 36 + XmuDrawLogo 37 + XmuDrawRoundedRectangle 38 + XmuFillRoundedRectangle 39 + XmuGetAtomName 40 + XmuGetColormapAllocation 41 + XmuGetHostname 42 + XmuInternAtom 43 + XmuInternStrings 44 + XmuLocateBitmapFile 45 + XmuLocatePixmapFile 46 + XmuLookupAPL 47 + XmuLookupArabic 48 + XmuLookupCloseDisplayHook 49 + XmuLookupCyrillic 50 + XmuLookupGreek 51 + XmuLookupHebrew 52 + XmuLookupJISX0201 53 + XmuLookupKana 54 + XmuLookupLatin1 55 + XmuLookupLatin2 56 + XmuLookupLatin3 57 + XmuLookupLatin4 58 + XmuLookupStandardColormap 59 + XmuLookupString 60 + XmuMakeAtom 61 + XmuNameOfAtom 62 + XmuNewCvtStringToWidget 63 + XmuPrintDefaultErrorMessage 64 + XmuReadBitmapData 65 + XmuReadBitmapDataFromFile 66 + XmuReleaseStippledPixmap 67 + XmuRemoveCloseDisplayHook 68 + XmuReshapeWidget 69 + XmuScreenOfWindow 70 + XmuSimpleErrorHandler 71 + XmuStandardColormap 72 + XmuUpdateMapHints 73 + XmuVisualStandardColormaps 74 + XmuWnCountOwnedResources 75 + XmuWnFetchResources 76 + XmuWnInitializeNodes 77 + XmuWnNameToNode 78 + _XEditResCheckMessages 79 + _XEditResGet16 80 + _XEditResGet32 81 + _XEditResGet8 82 + _XEditResGetSigned16 83 + _XEditResGetString8 84 + _XEditResGetWidgetInfo 85 + _XEditResPut16 86 + _XEditResPut32 87 + _XEditResPut8 88 + _XEditResPutString8 89 + _XEditResPutWidgetInfo 90 + _XEditResResetStream 91 + _XmuCCLookupDisplay 92 + _XmuStringToBitmapFreeCache 93 + _XmuStringToBitmapInitCache 94 + + _libXmu_dummy 95-150 + + + /**/#objects + DOWN/globals.o /* All objects with global data must be at come first!*/ + DOWN/Atoms.o /* must be second object */ + DOWN/AllCmap.o + DOWN/ClientWin.o + DOWN/CloseHook.o + DOWN/CmapAlloc.o + DOWN/CrCmap.o + DOWN/CrPixFBit.o + DOWN/CursorName.o + DOWN/CvtCache.o + DOWN/CvtStdSel.o + DOWN/DefErrMsg.o + DOWN/DelCmap.o + DOWN/DisplayQue.o + DOWN/Distinct.o + DOWN/DrRndRect.o + DOWN/DrawLogo.o + DOWN/EditresCom.o + DOWN/FToCback.o + DOWN/GetHost.o + DOWN/GrayPixmap.o + DOWN/Initer.o + DOWN/LocBitmap.o + DOWN/Lookup.o + DOWN/LookupCmap.o + DOWN/Lower.o + DOWN/RdBitF.o + DOWN/ScrOfWin.o + DOWN/ShapeWidg.o + DOWN/StdCmap.o + DOWN/StrToBS.o + DOWN/StrToBmap.o + DOWN/StrToCurs.o + DOWN/StrToGrav.o + DOWN/StrToJust.o + DOWN/StrToLong.o + DOWN/StrToOrnt.o + DOWN/StrToShap.o + DOWN/StrToWidg.o + DOWN/UpdMapHint.o + DOWN/VisCmap.o + DOWN/WidgetNode.o + DOWN/Xct.o + + + /**/#init globals.o + _libXmu__iob _iob + _libXmu_bcopy bcopy + _libXmu_calloc calloc + _libXmu_fprintf fprintf + _libXmu_free free + _libXmu_getenv getenv + _libXmu_malloc malloc + _libXmu_qsort qsort + _libXmu_sprintf sprintf + _libXmu_sscanf sscanf + _libXmu_strcmp strcmp + _libXmu_strcpy strcpy + _libXmu_strncmp strncmp + _libXmu__aux__ __libXmu_init_stub_ + + /**/#init CvtStdSel.o + _libXmu_gethostbyname gethostbyname + _libXmu_strcat strcat + _libXmu_uname uname + _libXmu__XA_CLASS _XA_CLASS + _libXmu__XA_CLIENT_WINDOW _XA_CLIENT_WINDOW + _libXmu__XA_HOSTNAME _XA_HOSTNAME + _libXmu__XA_IP_ADDRESS _XA_IP_ADDRESS + _libXmu__XA_NAME _XA_NAME + _libXmu__XA_NET_ADDRESS _XA_NET_ADDRESS + _libXmu__XA_OWNER_OS _XA_OWNER_OS + _libXmu__XA_TARGETS _XA_TARGETS + _libXmu__XA_TIMESTAMP _XA_TIMESTAMP + _libXmu__XA_USER _XA_USER + + + /**/#init DefErrMsg.o + _libXmu_fputs fputs + + /**/#init GetHost.o + _libXmu_gethostname gethostname + + /**/#init LocBitmap.o + _libXmu_strncpy strncpy + + /**/#init RdBitF.o + _libXmu__ctype _ctype + _libXmu__filbuf _filbuf + _libXmu_fclose fclose + _libXmu_fgets fgets + _libXmu_fopen fopen + _libXmu_strrchr strrchr + + /**/#init ShapeWidg.o + _libXmu_XShapeCombineMask XShapeCombineMask + + /**/#init StrToCurs.o + _libXmu_atoi atoi + + /**/#init WidgetNode.o + _libXmu_exit exit + + /**/#init Xct.o + _libXmu_realloc realloc + + /**/#init Atoms.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init ClientWin.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init CmapAlloc.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init CrPixFBit.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init DelCmap.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init DrawLogo.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init DrRndRect.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init FToCback.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init GrayPixmap.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init Initer.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init Lookup.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init Lower.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init ScrOfWin.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init StdCmap.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init StrToWidg.o + _libXmu__aux__ __libXmu_init_stub_ + /**/#init UpdMapHint.o + _libXmu__aux__ __libXmu_init_stub_ + + + + /**/#libraries + /* Here can objects be specified, which will extracted from + * an specified archive library and then linked to the shared + * library. This can avoid unwanted referencing of other + * shared libraries. + * NOTE: this objects must be listed also under #objects! + * e.g.: + /lib/libc.a memcpy.o + * or e.g.: + #ifdef __GNUC__ + GNULIB _fixdfsi.o + #endif + * + * NOT USED YET + * + */ + + /**/#externals + /* Here you can specify objects which will only linked to the + * host shared library. + * That are e.g. objects which contain only big data you want + * to seperate from the text section. (See mit/util/mksv3shlib/README.) + */ + InitLibStub.o + DOWN/ChkShlibRev.o + + /* There must be a comment as last line */ diff -c /dev/null mit/lib/Xt/ChkShlibRev.c:1.2 *** /dev/null Sat Mar 12 00:39:04 1994 --- mit/lib/Xt/ChkShlibRev.c Sat Mar 12 00:39:04 1994 *************** *** 0 **** --- 1,34 ---- + /* libXt: ChkShlibRev.c + * + * This code is linked to the clients and is called by their .init sections. + * It checks the SVR3 target shared library revision. + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/ChkShlibRev.c,v 1.2 1993/03/27 09:12:20 dawes Exp $ + */ + + #include + + #ifdef SVR3SHLIB + #ifdef __STDC__ + #define Const const + #else + #define Const /**/ + #endif + + extern Const char *_shared_libXt_version; + + void __check_libXt_rev_() + { + + /* check revision + */ + + if(strcmp(_shared_libXt_version, SOXTREV)) + fprintf(stderr, "Warning: %s has other revision (%s) than expected" + " %s\n", TARGET, _shared_libXt_version, SOXTREV); + + } + #endif + diff -c mit/lib/Xt/Composite.c:1.1.1.1 mit/lib/Xt/Composite.c:1.3 *** mit/lib/Xt/Composite.c:1.1.1.1 Sat Mar 12 00:39:05 1994 --- mit/lib/Xt/Composite.c Sat Mar 12 00:39:05 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Composite.c,v 1.3 1993/03/27 09:12:23 dawes Exp $ */ /* $XConsortium: Composite.c,v 1.18 91/04/04 20:52:53 converse Exp $ */ /*********************************************************** *************** *** 45,51 **** --- 46,56 ---- externaldef(compositeclassrec) CompositeClassRec compositeClassRec = { { /******* CorePart *******/ + #ifndef SVR3SHLIB /* superclass */ &widgetClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "Composite", /* widget_size */ sizeof(CompositeRec), /* class_initialize */ NULL, *************** *** 87,93 **** --- 92,103 ---- } }; + #ifndef SVR3SHLIB externaldef(compositewidgetclass) WidgetClass compositeWidgetClass = (WidgetClass) &compositeClassRec; + #else + externalref WidgetClass compositeWidgetClass; + #define _XtInherit (*_libXt__XtInherit) + #endif static void CompositeClassPartInitialize(widgetClass) WidgetClass widgetClass; diff -c mit/lib/Xt/Constraint.c:1.1.1.1 mit/lib/Xt/Constraint.c:1.4 *** mit/lib/Xt/Constraint.c:1.1.1.1 Sat Mar 12 00:39:05 1994 --- mit/lib/Xt/Constraint.c Sat Mar 12 00:39:05 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Constraint.c,v 1.4 1993/03/20 03:40:41 dawes Exp $ */ /* $XConsortium: Constraint.c,v 1.13 91/06/10 15:08:01 converse Exp $ */ /*********************************************************** *************** *** 31,37 **** --- 32,42 ---- static void ConstraintPartInitialize(); externaldef(constraintclassrec) ConstraintClassRec constraintClassRec = { { /******* CorePart *******/ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &compositeClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "Constraint", /* widget_size */ sizeof(ConstraintRec), /* class_initialize */ NULL, *************** *** 79,87 **** /* extension */ NULL } }; ! externaldef(constraintwidgetclass) WidgetClass constraintWidgetClass = (WidgetClass) &constraintClassRec; static void ConstraintPartInitialize(wc) --- 84,96 ---- /* extension */ NULL } }; ! #ifndef SVR3SHLIB externaldef(constraintwidgetclass) WidgetClass constraintWidgetClass = (WidgetClass) &constraintClassRec; + #else + externalref WidgetClass constraintWidgetClass; + #define _XtInherit (*_libXt__XtInherit) + #endif static void ConstraintPartInitialize(wc) diff -c mit/lib/Xt/Convert.c:1.1.1.3 mit/lib/Xt/Convert.c:2.0 *** mit/lib/Xt/Convert.c:1.1.1.3 Sat Mar 12 00:39:06 1994 --- mit/lib/Xt/Convert.c Sat Mar 12 00:39:06 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Convert.c,v 2.0 1993/11/13 04:23:32 dawes Exp $ */ /* $XConsortium: Convert.c,v 1.68 93/07/12 14:52:00 converse Exp $ */ /*********************************************************** diff -c mit/lib/Xt/Core.c:1.1.1.1 mit/lib/Xt/Core.c:1.4 *** mit/lib/Xt/Core.c:1.1.1.1 Sat Mar 12 00:39:06 1994 --- mit/lib/Xt/Core.c Sat Mar 12 00:39:07 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Core.c,v 1.4 1993/03/20 03:40:44 dawes Exp $ */ /* $XConsortium: Core.c,v 1.55 91/06/11 20:25:04 converse Exp $ */ /*********************************************************** *************** *** 40,46 **** --- 41,51 ---- * ******************************************************************/ + #ifndef SVR3SHLIB externaldef(xtinherittranslations) int _XtInheritTranslations = 0; + #else + externalref int _XtInheritTranslations; + #endif extern String XtCXtToolkitError; /* from IntrinsicI.h */ static void XtCopyScreen(); *************** *** 85,93 **** static Boolean CoreSetValues(); static void CoreSetValuesAlmost(); ! static RectObjClassRec unNamedObjClassRec = { { /* superclass */ (WidgetClass)&rectObjClassRec, /* class_name */ "UnNamedObj", /* widget_size */ 0, /* class_initialize */ NULL, --- 90,107 ---- static Boolean CoreSetValues(); static void CoreSetValuesAlmost(); ! #ifndef SVR3SHLIB ! static ! #else ! #define unNamedObjClassRec _libXtCore_unNamedObjClassRec ! #endif ! RectObjClassRec unNamedObjClassRec = { { + #ifndef SVR3SHLIB /* superclass */ (WidgetClass)&rectObjClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "UnNamedObj", /* widget_size */ 0, /* class_initialize */ NULL, *************** *** 159,167 **** --- 173,187 ---- /* extension */ NULL } }; + #ifndef SVR3SHLIB externaldef (WidgetClass) WidgetClass widgetClass = &widgetClassRec; externaldef (WidgetClass) WidgetClass coreWidgetClass = &widgetClassRec; + #else + externalref WidgetClass widgetClass; + externalref WidgetClass coreWidgetClass; + #define _XtInherit (*_libXt__XtInherit) + #endif /*ARGSUSED*/ diff -c mit/lib/Xt/Display.c:1.1.1.4 mit/lib/Xt/Display.c:2.0 *** mit/lib/Xt/Display.c:1.1.1.4 Sat Mar 12 00:39:07 1994 --- mit/lib/Xt/Display.c Sat Mar 12 00:39:07 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Display.c,v 2.0 1993/11/13 04:23:34 dawes Exp $ */ /* $XConsortium: Display.c,v 1.89.1.1 93/07/20 16:32:36 kaleb Exp $ */ /*********************************************************** *************** *** 26,31 **** --- 27,36 ---- #include "IntrinsicI.h" + #ifdef AMOEBA + #define fd_set Fd_set + #endif + #ifndef X_NOT_STDC_ENV #include #else *************** *** 65,70 **** --- 70,82 ---- XtAppContext app; { #define DISPLAYS_TO_ADD 4 + #ifdef AMOEBA + if (app->count >= 1 ) { + XtErrorMsg("noMoreDisplays", "XtAddToAppContext", "XtToolkitError", + "AMOEBA-X only supports one display per application", + (String *) NULL, (Cardinal *)NULL); + } + #endif if (app->count >= app->max) { app->max += DISPLAYS_TO_ADD; *************** *** 73,81 **** --- 85,95 ---- } app->list[app->count++] = d; + #ifndef AMOEBA if (ConnectionNumber(d) + 1 > app->fds.nfds) { app->fds.nfds = ConnectionNumber(d) + 1; } + #endif #undef DISPLAYS_TO_ADD } *************** *** 312,320 **** app->sync = app->being_destroyed = app->error_inited = FALSE; app->in_phase2_destroy = NULL; app->fds.nfds = app->fds.count = 0; ! FD_ZERO(&app->fds.rmask); ! FD_ZERO(&app->fds.wmask); ! FD_ZERO(&app->fds.emask); app->input_max = 0; _XtHeapInit(&app->heap); app->fallback_resources = NULL; --- 326,336 ---- app->sync = app->being_destroyed = app->error_inited = FALSE; app->in_phase2_destroy = NULL; app->fds.nfds = app->fds.count = 0; ! #ifndef _MINIX ! FD_ZERO((fd_set *)&app->fds.rmask); ! FD_ZERO((fd_set *)&app->fds.wmask); ! FD_ZERO((fd_set *)&app->fds.emask); ! #endif app->input_max = 0; _XtHeapInit(&app->heap); app->fallback_resources = NULL; diff -c mit/lib/Xt/Error.c:1.1.1.1 mit/lib/Xt/Error.c:2.0 *** mit/lib/Xt/Error.c:1.1.1.1 Sat Mar 12 00:39:08 1994 --- mit/lib/Xt/Error.c Sat Mar 12 00:39:08 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Error.c,v 2.0 1993/06/13 06:58:59 dawes Exp $ */ /* $XConsortium: Error.c,v 1.33 91/11/09 15:38:01 keith Exp $ */ /*********************************************************** *************** *** 27,32 **** --- 28,50 ---- #include "IntrinsicI.h" #include + #ifndef PATH_MAX + #include + #ifndef PATH_MAX + #ifdef MAXPATHLEN + #define PATH_MAX MAXPATHLEN + #else + #define PATH_MAX 1024 + #endif + #endif + #endif + + #ifndef X_NOT_STDC_ENV + #include + #else + extern char *getenv(); + #endif + /* The error handlers in the application context aren't used since we can't come up with a uniform way of using them. If you can, define GLOBALERRORS to be FALSE (or 0). */ *************** *** 162,169 **** XrmDatabase *db; { XrmDatabase errordb; ! errordb = XrmGetFileDatabase(ERRORDB); XrmMergeDatabases(errordb, db); } --- 180,195 ---- XrmDatabase *db; { XrmDatabase errordb; + char errordbpath[PATH_MAX]; + char *xwinhome = NULL; ! if ((xwinhome = getenv("XWINHOME")) == NULL) { ! strcpy(errordbpath, ERRORDB); ! } ! else { ! sprintf(errordbpath, "%s/lib/X11/XtErrorDB"); ! } ! errordb = XrmGetFileDatabase(errordbpath); XrmMergeDatabases(errordb, db); } *************** *** 389,395 **** --- 415,423 ---- void _XtDefaultError(message) String message; { + #ifdef X_NOT_STDC_ENV extern void exit(); + #endif (void)fprintf(stderr, "%sError: %s\n", XTERROR_PREFIX, message); exit(1); diff -c mit/lib/Xt/Imakefile:1.1.1.1 mit/lib/Xt/Imakefile:2.0 *** mit/lib/Xt/Imakefile:1.1.1.1 Sat Mar 12 00:39:09 1994 --- mit/lib/Xt/Imakefile Sat Mar 12 00:39:09 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/lib/Xt/Imakefile,v 2.0 1993/08/28 07:45:11 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.93 91/09/18 14:29:25 rws Exp $ #define DoNormalLib NormalLibXt #define DoSharedLib SharedLibXt *************** *** 112,119 **** VarGet.c \ Varargs.c \ Vendor.c \ ! sharedlib.c ! OBJS = \ ActionHook.o \ Alloc.o \ --- 113,133 ---- VarGet.c \ Varargs.c \ Vendor.c \ ! sharedlib.c \ ! globals.c \ ! InitLibStub.s \ ! InitClnStub.s \ ! InitLib.c \ ! ChkShlibRev.c \ ! dummyBind.c \ ! pComposite.c \ ! pConstraint.c \ ! pCore.c \ ! pObject.c \ ! pRectObj.c \ ! pShell.c \ ! pVendor.c ! OBJS = \ ActionHook.o \ Alloc.o \ *************** *** 166,171 **** --- 180,203 ---- Varargs.o \ Vendor.o + #if defined(i386SVR3Architecture) && DoSharedLib + SVR3SHLIBOBJS = \ + globals.o \ + InitLibStub.o \ + InitClnStub.o \ + InitLib.o \ + ChkShlibRev.o \ + dummyBind.o \ + pComposite.o \ + pConstraint.o \ + pCore.o \ + pObject.o \ + pRectObj.o \ + pShell.o \ + pVendor.o + #endif + + #if SharedDataSeparation UNSHAREDOBJS = StringDefs.o sharedlib.o #else *************** *** 174,192 **** LibraryObjectRule() SpecialLibObjectRule(Intrinsic.o,$(ICONFIGFILES),$(SRCH_DEFINES)) SpecialLibObjectRule(Error.o,$(ICONFIGFILES),$(DB_DEFINES)) SpecialLibObjectRule(Alloc.o,NullParameter,$(ALLOC_DEFINES)) SpecialLibObjectRule(Converters.o,$(ICONFIGFILES),$(BC_DEFINES)) #if DoSharedLib ! SpecialObjectRule(sharedlib.o,,$(SHLIBDEF)) #endif #if DoSharedLib #if DoNormalLib SharedLibraryTarget(Xt,$(SOXTREV),$(OBJS),shared,..) #else SharedLibraryTarget(Xt,$(SOXTREV),$(OBJS),.,.) #endif SharedLibraryDataTarget(Xt,$(SOXTREV),$(UNSHAREDOBJS)) InstallSharedLibrary(Xt,$(SOXTREV),$(USRLIBDIR)) --- 206,238 ---- LibraryObjectRule() + #if defined(i386SVR3Architecture) && DoSharedLib + SpecialLibObjectRule(globals.o,$(ICONFIGFILES),-D_libXt_import -DSOXTREV=\"$(SOXTREV)\") + SpecialLibObjectRule(ChkShlibRev.o,,-D_libXt_import -DSOXTREV=\"$(SOXTREV)\" -DTARGET=\"$(LIBDIR)/shlib/libXt.$(SOXTREV)\") + SpecialLibObjectRule(InitLib.o,,-D_libXt_import) + #endif + SpecialLibObjectRule(Intrinsic.o,$(ICONFIGFILES),$(SRCH_DEFINES)) SpecialLibObjectRule(Error.o,$(ICONFIGFILES),$(DB_DEFINES)) SpecialLibObjectRule(Alloc.o,NullParameter,$(ALLOC_DEFINES)) SpecialLibObjectRule(Converters.o,$(ICONFIGFILES),$(BC_DEFINES)) #if DoSharedLib ! SpecialObjectRule(sharedlib.o,sharedlib.c,$(SHLIBDEF)) #endif #if DoSharedLib + #ifndef i386SVR3Architecture #if DoNormalLib SharedLibraryTarget(Xt,$(SOXTREV),$(OBJS),shared,..) #else SharedLibraryTarget(Xt,$(SOXTREV),$(OBJS),.,.) + #endif + #else + #if DoNormalLib + SharedLibraryTarget(Xt,$(SOXTREV),$(OBJS) $(SVR3SHLIBOBJS),shared,..) + #else + SharedLibraryTarget(Xt,$(SOXTREV),$(OBJS) $(SVR3SHLIBOBJS),.,.) + #endif #endif SharedLibraryDataTarget(Xt,$(SOXTREV),$(UNSHAREDOBJS)) InstallSharedLibrary(Xt,$(SOXTREV),$(USRLIBDIR)) diff -c /dev/null mit/lib/Xt/InitClnStub.s:2.0 *** /dev/null Sat Mar 12 00:39:09 1994 --- mit/lib/Xt/InitClnStub.s Sat Mar 12 00:39:09 1994 *************** *** 0 **** --- 1,31 ---- + .file "InitClnStub.s" + + /##################################################################### + /# InitClnStub.s # + /# ----------------------------------------------------------------- # + /# This stub goes to .init section of the client binary and calls # + /# the code which binds the client to the library # + /# Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany # + /# (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) # + /##################################################################### + + /# $XFree86: mit/lib/Xt/InitClnStub.s,v 2.0 1993/09/30 17:35:13 dawes Exp $ + + .section .init,"x" + + .align 4 + + .globl __bind_to_sv3shlib_ + + / bind client to library (init pointers in subclasses of the client) + / _bind_to_sv3shlib_() must be supplied by the client, otherwise + / an empty dummy function from the host shared library is linked to it + + __bind_to_sv3shlib_: + pushl %ebp + movl %esp,%ebp + / call function in client + call _bind_to_sv3shlib_ + leave + + diff -c /dev/null mit/lib/Xt/InitLib.c:1.3 *** /dev/null Sat Mar 12 00:39:09 1994 --- mit/lib/Xt/InitLib.c Sat Mar 12 00:39:10 1994 *************** *** 0 **** --- 1,147 ---- + /* libXt : InitLib.c + * ----------------- + * This code goes into .init section of the client binary. + * On archive library references like &widgetClassRec, &compositeClassRec + * and so on are unresolved. They will resolved during linking. So someone + * could define its own (e.g.) widgetClassRec and even the library code + * will use it gracefully. + * On SVR3 shared lib such references are to fixed addresses. The library + * would never use a user defined (e.g.) widgetClassRec and more worse + * the compiler would complain about multiply defined widgetClassRec. + * So we don't reference to (e.g.) widgetClassRec in the shared lib. + * Instead putting this code to client binary, which is resolved during + * linking and writes on runtime the needed addresses to the shared lib. + * + * Second, it initializes all References to _XtInherit in the Library. + * This is necessary in libXt only, because a behavior of the mkshlib(1) tool. + * It seems to forget to replace function addresses in structures + * with the new function address from the branch table. But there are + * several places in the code were pointers are compared with _XtInherit. + * + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/InitLib.c,v 1.3 1993/05/22 06:51:00 dawes Exp $ + */ + + #include "IntrinsicI.h" + #include "VarargsI.h" + #include "ShellP.h" + #include "VendorP.h" + + #ifdef SVR3SHLIB + + /* Check whether the named class is really from shared libXt. + * It could also be user supplied (e.g. vendorShellClassRec from Motif). + * We don't know with what the user wants to initialize, so let it be in + * that case. + * 0xB0C00000 : address of libXt's .data section + */ + #define IsInLibXt(ClassRec) ((unsigned)ClassRec & 0xFFC00000) == 0xB0C00000 + + externalref WidgetClass _libXtCore_unNamedObjClass; + + void __libXt_init_() + { + + /* Composite.c */ + if(IsInLibXt(compositeWidgetClass)) { + compositeWidgetClass->core_class.superclass = widgetClass; + compositeWidgetClass->core_class.realize = XtInheritRealize; + compositeWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + } + + /* Constraint.c */ + if(IsInLibXt(constraintWidgetClass)) { + constraintWidgetClass->core_class.superclass = compositeWidgetClass; + constraintWidgetClass->core_class.realize = XtInheritRealize; + constraintWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((ConstraintWidgetClass)constraintWidgetClass)->composite_class.insert_child = XtInheritInsertChild; + ((ConstraintWidgetClass)constraintWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + /* Core.c */ + if(IsInLibXt(_libXtCore_unNamedObjClass)) { + _libXtCore_unNamedObjClass->core_class.superclass = rectObjClass; + _libXtCore_unNamedObjClass->core_class.realize = XtInheritRealize; + _libXtCore_unNamedObjClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + } + + /* RectObj.c */ + if(IsInLibXt(rectObjClass)) + rectObjClass->core_class.superclass = objectClass; + + /* Shell.c */ + if(IsInLibXt(shellWidgetClass)) { + shellWidgetClass->core_class.superclass = compositeWidgetClass; + shellWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((ShellWidgetClass)shellWidgetClass)->composite_class.insert_child = XtInheritInsertChild; + ((ShellWidgetClass)shellWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + if(IsInLibXt(overrideShellWidgetClass)) { + overrideShellWidgetClass->core_class.realize = XtInheritRealize; + overrideShellWidgetClass->core_class.resize = XtInheritResize; + overrideShellWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((OverrideShellWidgetClass)overrideShellWidgetClass)->composite_class.geometry_manager = XtInheritGeometryManager; + ((OverrideShellWidgetClass)overrideShellWidgetClass)->composite_class.change_managed = XtInheritChangeManaged; + ((OverrideShellWidgetClass)overrideShellWidgetClass)->composite_class.insert_child = XtInheritInsertChild; + ((OverrideShellWidgetClass)overrideShellWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + if(IsInLibXt(wmShellWidgetClass)) { + wmShellWidgetClass->core_class.realize = XtInheritRealize; + wmShellWidgetClass->core_class.resize = XtInheritResize; + wmShellWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((WMShellWidgetClass)wmShellWidgetClass)->composite_class.geometry_manager = XtInheritGeometryManager; + ((WMShellWidgetClass)wmShellWidgetClass)->composite_class.change_managed = XtInheritChangeManaged; + ((WMShellWidgetClass)wmShellWidgetClass)->composite_class.insert_child = XtInheritInsertChild; + ((WMShellWidgetClass)wmShellWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + if(IsInLibXt(transientShellWidgetClass)) { + transientShellWidgetClass->core_class.superclass = vendorShellWidgetClass; + transientShellWidgetClass->core_class.resize = XtInheritResize; + transientShellWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((TransientShellWidgetClass)transientShellWidgetClass)->composite_class.geometry_manager = XtInheritGeometryManager; + ((TransientShellWidgetClass)transientShellWidgetClass)->composite_class.change_managed = XtInheritChangeManaged; + ((TransientShellWidgetClass)transientShellWidgetClass)->composite_class.insert_child = XtInheritInsertChild; + ((TransientShellWidgetClass)transientShellWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + if(IsInLibXt(topLevelShellWidgetClass)) { + topLevelShellWidgetClass->core_class.superclass = vendorShellWidgetClass; + topLevelShellWidgetClass->core_class.realize = XtInheritRealize; + topLevelShellWidgetClass->core_class.resize = XtInheritResize; + topLevelShellWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((TopLevelShellWidgetClass)topLevelShellWidgetClass)->composite_class.geometry_manager = XtInheritGeometryManager; + ((TopLevelShellWidgetClass)topLevelShellWidgetClass)->composite_class.change_managed = XtInheritChangeManaged; + ((TopLevelShellWidgetClass)topLevelShellWidgetClass)->composite_class.insert_child = XtInheritInsertChild; + ((TopLevelShellWidgetClass)topLevelShellWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + if(IsInLibXt(applicationShellWidgetClass)) { + applicationShellWidgetClass->core_class.realize = XtInheritRealize; + applicationShellWidgetClass->core_class.resize = XtInheritResize; + applicationShellWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((ApplicationShellWidgetClass)applicationShellWidgetClass)->composite_class.geometry_manager = XtInheritGeometryManager; + ((ApplicationShellWidgetClass)applicationShellWidgetClass)->composite_class.change_managed = XtInheritChangeManaged; + ((ApplicationShellWidgetClass)applicationShellWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + /* Vendor.c */ + if(IsInLibXt(vendorShellWidgetClass)) { + vendorShellWidgetClass->core_class.superclass = wmShellWidgetClass; + vendorShellWidgetClass->core_class.realize = XtInheritRealize; + vendorShellWidgetClass->core_class.resize = XtInheritResize; + vendorShellWidgetClass->core_class.set_values_almost = XtInheritSetValuesAlmost; + ((VendorShellWidgetClass)vendorShellWidgetClass)->composite_class.geometry_manager = XtInheritGeometryManager; + ((VendorShellWidgetClass)vendorShellWidgetClass)->composite_class.change_managed = XtInheritChangeManaged; + ((VendorShellWidgetClass)vendorShellWidgetClass)->composite_class.insert_child = XtInheritInsertChild; + ((VendorShellWidgetClass)vendorShellWidgetClass)->composite_class.delete_child = XtInheritDeleteChild; + } + + } + #endif /* SVR3SHLIB */ + + diff -c /dev/null mit/lib/Xt/InitLibStub.s:2.0 *** /dev/null Sat Mar 12 00:39:10 1994 --- mit/lib/Xt/InitLibStub.s Sat Mar 12 00:39:10 1994 *************** *** 0 **** --- 1,45 ---- + .file "InitLibStub.s" + + /##################################################################### + /# InitLibStub.s # + /# ----------------------------------------------------------------- # + /# This stub goes to .init section of the client binary. It checks # + /# the revision of the library and calls the init code for the # + /# library # + /# Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany # + /# (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) # + /##################################################################### + + /# $XFree86: mit/lib/Xt/InitLibStub.s,v 2.0 1993/08/22 12:36:56 dawes Exp $ + + .data + / create unresolved reference + .long __bind_to_sv3shlib_ + + .section .init,"x" + + .align 4 + .globl __libXt_init_stub_ + + __libXt_init_stub_: + + / check revision of target shared library + + pushl %ebp + movl %esp,%ebp + call __check_libXt_rev_ + leave + + / inititialize library + + pushl %ebp + movl %esp,%ebp + call __default_libXt_init_ + leave + + pushl %ebp + movl %esp,%ebp + call __libXt_init_ + leave + + diff -c mit/lib/Xt/InitialI.h:1.1.1.3 mit/lib/Xt/InitialI.h:2.1 *** mit/lib/Xt/InitialI.h:1.1.1.3 Sat Mar 12 00:39:12 1994 --- mit/lib/Xt/InitialI.h Sat Mar 12 00:39:12 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/InitialI.h,v 2.1 1993/11/13 04:23:36 dawes Exp $ */ /* $XConsortium: InitialI.h,v 1.64.1.1 93/07/20 16:26:20 kaleb Exp $ */ /*********************************************************** *************** *** 80,88 **** --- 81,91 ---- typedef struct { + #ifndef _MINIX Fd_set rmask; Fd_set wmask; Fd_set emask; + #endif int nfds; int count; } FdStruct; diff -c mit/lib/Xt/Initialize.c:1.1.1.2 mit/lib/Xt/Initialize.c:1.2 *** mit/lib/Xt/Initialize.c:1.1.1.2 Sat Mar 12 00:39:12 1994 --- mit/lib/Xt/Initialize.c Sat Mar 12 00:39:12 1994 *************** *** 178,184 **** --- 178,186 ---- uid_t uid; #else int uid; + #ifndef SCO324 extern int getuid(); + #endif #ifndef SYSV386 extern struct passwd *getpwuid(), *getpwnam(); #endif diff -c mit/lib/Xt/Intrinsic.c:1.1.1.2 mit/lib/Xt/Intrinsic.c:1.6 *** mit/lib/Xt/Intrinsic.c:1.1.1.2 Sat Mar 12 00:39:13 1994 --- mit/lib/Xt/Intrinsic.c Sat Mar 12 00:39:13 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Intrinsic.c,v 1.6 1993/05/19 05:30:23 dawes Exp $ */ /* $XConsortium: Intrinsic.c,v 1.173 93/02/26 16:37:13 converse Exp $ */ /*********************************************************** *************** *** 41,47 **** --- 42,55 ---- extern char *getenv(); #endif + #ifndef SVR3SHLIB String XtCXtToolkitError = "XtToolkitError"; + #else + extern String XtCXtToolkitError; + #ifdef SCO + extern int (*_libXt_stat)(); + #endif + #endif Boolean XtIsSubclass(widget, widgetClass) Widget widget; *************** *** 985,990 **** --- 993,999 ---- { XtPerDisplay pd = _XtGetPerDisplay(dpy); static char *defaultPath = NULL; + static char defpath[1024]; char *massagedPath; int bytesAllocd, bytesLeft; char *ch, *result; *************** *** 997,1005 **** if (path == NULL) { #ifndef VMS if (defaultPath == NULL) { ! defaultPath = getenv("XFILESEARCHPATH"); ! if (defaultPath == NULL) defaultPath = XFILESEARCHPATHDEFAULT; } path = defaultPath; #else --- 1006,1029 ---- if (path == NULL) { #ifndef VMS + char *xwinhome = NULL; + if (defaultPath == NULL) { ! if ((defaultPath = getenv("XFILESEARCHPATH")) == NULL) { ! if ((xwinhome = getenv("XWINHOME")) == NULL) { ! defaultPath = XFILESEARCHPATHDEFAULT; ! } ! else { ! char libpath[256]; ! ! sprintf(libpath, "%s/lib/X11", xwinhome); ! sprintf(defpath, ! "%s/%%L/%%T/%%N%%C%%S:%s/%%l/%%T/%%N%%C%%S:%s/%%T/%%N%%C%%S:%s/%%L/%%T/%%N%%S:%s/%%l/%%T/%%N%%S:%s/%%T/%%N%%S", ! libpath, libpath, libpath, libpath, libpath, ! libpath); ! defaultPath = defpath; ! } ! } } path = defaultPath; #else diff -c mit/lib/Xt/Intrinsic.h:1.1.1.1 mit/lib/Xt/Intrinsic.h:1.2 *** mit/lib/Xt/Intrinsic.h:1.1.1.1 Sat Mar 12 00:39:14 1994 --- mit/lib/Xt/Intrinsic.h Sat Mar 12 00:39:15 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Intrinsic.h,v 1.2 1993/03/20 03:40:49 dawes Exp $ */ /* $XConsortium: Intrinsic.h,v 1.174 91/09/09 16:25:56 converse Exp $ */ /*********************************************************** *************** *** 1880,1889 **** #endif /* !CRAY2 */ #endif /* __STDC__ */ #else /* ! (CRAY || __arm) */ ! #define XtOffset(p_type,field) \ ((Cardinal) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) ! #endif /* !CRAY */ #ifdef offsetof --- 1881,1892 ---- #endif /* !CRAY2 */ #endif /* __STDC__ */ #else /* ! (CRAY || __arm) */ ! #ifndef AMOEBA #define XtOffset(p_type,field) \ ((Cardinal) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL))) ! #else /* !AMOEBA */ ! #define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field)) ! #endif /* AMOEBA */ #endif /* !CRAY */ #ifdef offsetof diff -c mit/lib/Xt/IntrinsicI.h:1.1.1.1 mit/lib/Xt/IntrinsicI.h:1.2 *** mit/lib/Xt/IntrinsicI.h:1.1.1.1 Sat Mar 12 00:39:15 1994 --- mit/lib/Xt/IntrinsicI.h Sat Mar 12 00:39:15 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/IntrinsicI.h,v 1.2 1993/03/20 03:40:52 dawes Exp $ */ /* $XConsortium: IntrinsicI.h,v 1.48 91/06/27 13:24:18 converse Exp $ */ /*********************************************************** *************** *** 148,154 **** --- 149,159 ---- /* used by XtResolvePathname */ #ifndef XFILESEARCHPATHDEFAULT + #ifdef AMOEBA + #define XFILESEARCHPATHDEFAULT "/profile/module/x11r5/%L/%T/%N%S:/profile/module/x11r5/%l/%T/%N%S:/profile/module/x11r5/%T/%N%S" + #else /* !AMOEBA */ #define XFILESEARCHPATHDEFAULT "/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S" + #endif /* AMOEBA */ #endif /* the following two were both "X Toolkit " prior to R4 */ *************** *** 161,167 **** --- 166,176 ---- #endif #ifndef ERRORDB + #ifdef AMOEBA + #define ERRORDB "/profile/module/x11/XtErrorDB" + #else #define ERRORDB "/usr/lib/X11/XtErrorDB" + #endif #endif extern String XtCXtToolkitError; diff -c mit/lib/Xt/NextEvent.c:1.1.1.2 mit/lib/Xt/NextEvent.c:2.1 *** mit/lib/Xt/NextEvent.c:1.1.1.2 Sat Mar 12 00:39:16 1994 --- mit/lib/Xt/NextEvent.c Sat Mar 12 00:39:16 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/NextEvent.c,v 2.1 1993/09/22 15:33:01 dawes Exp $ */ /* $XConsortium: NextEvent.c,v 1.110 93/02/10 15:47:39 converse Exp $ */ /*********************************************************** *************** *** 27,32 **** --- 28,37 ---- #include "IntrinsicI.h" #include #include + #ifdef _MINIX + #include + #include + #endif extern int errno; *************** *** 33,38 **** --- 38,52 ---- static TimerEventRec* freeTimerRecs; static WorkProcRec* freeWorkRecs; + #ifdef AMOEBA + #define fd_set Fd_set + #define event __event + #define interval __interval + #include + #undef event + #undef interval + #endif + /* Some systems running NTP daemons are known to return strange usec * values from gettimeofday. At present (3/90) this has only been * reported on SunOS... *************** *** 91,96 **** --- 105,166 ---- #define IS_AT_OR_AFTER(t1, t2) (((t2).tv_sec > (t1).tv_sec) \ || (((t2).tv_sec == (t1).tv_sec)&& ((t2).tv_usec >= (t1).tv_usec))) + #ifdef SVR4 + /* This is a fix for the difference between BSD's select() and + * some SVR4's select(). Some SVR4 select() implementations can neve + * return a value larger than the total number of file descriptors being + * checked. So, if you select for read and write on one file descriptor, + * and both are true, those implementations of select() will only return 1. + * BSD select in the same situation will return 2. + * + * Additionally, BSD select() on timing out, will zero the masks, + * while SVR4 does not. This is fixed here as well. + * + * Jerry Whelan, guru@bradley.edu, June 12th, 1993 + */ + + #ifdef __STDC__ + static int BSDselect(int, fd_set *, fd_set *, fd_set *, struct timeval *); + #endif + + static int + BSDselect(nfds, readfds, writefds, exceptfds, timeout) + int nfds; + fd_set *readfds, *writefds, *exceptfds; + struct timeval *timeout; + { + int rval, i; + + rval = select(nfds, readfds, writefds, exceptfds, timeout); + + switch(rval) { + case -1: return(rval); + break; + + case 0: if(readfds != NULL) + FD_ZERO(readfds); + if(writefds != NULL) + FD_ZERO(writefds); + if(exceptfds != NULL) + FD_ZERO(exceptfds); + + return(rval); + break; + + default: for(i=0, rval=0; i < nfds; i++) { + if((readfds != NULL) && FD_ISSET(i, readfds)) rval++; + if((writefds != NULL) && FD_ISSET(i, writefds)) rval++; + if((writefds != NULL) && FD_ISSET(i, exceptfds)) rval++; + } + return(rval); + } + /* Should never get here */ + } + + #define select(a,b,c,d,e) BSDselect(a,b,c,d,e) + + #endif /* SVR4 */ + static void QueueTimerEvent(app, ptr) XtAppContext app; TimerEventRec *ptr; *************** *** 107,112 **** --- 177,203 ---- *tt = ptr; } + #ifdef AMOEBA + static int + gettimeofday(tvp, tzp) + struct timeval *tvp; + struct timezone *tzp; + { + static unsigned long lasttime, timedelta; + unsigned long curtime; + long time(); + + curtime = sys_milli(); + if (lasttime == 0 || lasttime > curtime) { + /* re-init timer */ + timedelta = time(0) - curtime/1000; + } + lasttime = curtime; + tvp->tv_sec = timedelta + curtime/1000; + tvp->tv_usec = 1000 * (curtime%1000); + } + #endif /* AMOEBA */ + /* * Routine to block in the toolkit. This should be the only call to select. * *************** *** 139,144 **** --- 230,236 ---- * makes little sense to do this regardless of the value of howlong * (bottom line is, we don't bother checking here). */ + #ifndef _MINIX #if NeedFunctionPrototypes int _XtwaitForSomething( _XtBoolean ignoreTimers, *************** *** 167,174 **** --- 259,270 ---- struct timeval max_wait_time; static struct timeval zero_time = { 0 , 0}; register struct timeval *wait_time_ptr; + #ifndef AMOEBA Fd_set rmaskfd, wmaskfd, emaskfd; static Fd_set zero_fd = { 0 }; + #else + int timout; + #endif int nfound, i, d; if (block) { *************** *** 200,205 **** --- 296,302 ---- } } else wait_time_ptr = &zero_time; } + #ifndef AMOEBA if( !ignoreInputs ) { rmaskfd = app->fds.rmask; wmaskfd = app->fds.wmask; *************** *** 211,221 **** } if (!ignoreEvents) { for (d = 0; d < app->count; d++) { ! FD_SET (ConnectionNumber(app->list[d]), &rmaskfd); } } ! nfound = select (app->fds.nfds, (int *) &rmaskfd, ! (int *) &wmaskfd, (int *) &emaskfd, wait_time_ptr); if (nfound == -1) { /* * interrupt occured recalculate time value and select --- 308,363 ---- } if (!ignoreEvents) { for (d = 0; d < app->count; d++) { ! FD_SET (ConnectionNumber(app->list[d]), ! (fd_set *)&rmaskfd); } } ! nfound = select (app->fds.nfds, (fd_set *) &rmaskfd, ! (fd_set *) &wmaskfd, (fd_set *) &emaskfd, ! wait_time_ptr); ! #else ! /* ! * Unfortunately we cannot use select when using the ! * amoeba protocol. We call _XAmSelect to wait for the ! * display to produce input (or until the timer runs ! * out). ! * This has two disadvantages: ! * - We cannot wait for multiple displays. ! * (this is handled in Display.c, by not allowing more ! * than one to be opened) ! * - We cannot wait for other file descriptors. ! * (I know no solution for this. Let's hope it doesn't ! * matter). ! * However, this should at least enable us to handle most ! * applications (i.e. with one display and no files). ! * ! * There is a workaround, however, in the form of ! * XamSetSema and XamBlock, which allow you to wait for ! * X events or other things. ! */ ! if (wait_time_ptr == 0 && ignoreEvents) { ! fprintf(stderr, "XtWaitForSomething: infinite wait\n"); ! abort(); ! } ! if (app->count != 1) ! XtErrorMsg("xxx", "XtwaitForSomething", "XtToolkitError", ! "No display", (String *)NULL, (Cardinal *)NULL); ! if (wait_time_ptr) ! timout = wait_time_ptr->tv_sec*1000 + ! (wait_time_ptr->tv_usec+999)/1000; ! else ! timout = -1; ! if (ignoreEvents) { ! mutex mu; ! ! mu_init(&mu); ! mu_lock(&mu); ! mu_trylock(&mu, timout); ! nfound = 0; ! } else { ! nfound = _XAmSelect(ConnectionNumber(app->list[0]), timout); ! } ! #endif /* AMOEBA */ if (nfound == -1) { /* * interrupt occured recalculate time value and select *************** *** 276,285 **** else *howlong -= (time_spent.tv_sec*1000+time_spent.tv_usec/1000); } if(ignoreInputs) { if (ignoreEvents) return -1; /* then only doing timers */ for (d = 0; d < app->count; d++) { ! if (FD_ISSET(ConnectionNumber(app->list[d]), &rmaskfd)) { if (XEventsQueued( app->list[d], QueuedAfterReading )) return d; /* --- 418,428 ---- else *howlong -= (time_spent.tv_sec*1000+time_spent.tv_usec/1000); } + #ifndef AMOEBA if(ignoreInputs) { if (ignoreEvents) return -1; /* then only doing timers */ for (d = 0; d < app->count; d++) { ! if (FD_ISSET(ConnectionNumber(app->list[d]), (fd_set *)&rmaskfd)) { if (XEventsQueued( app->list[d], QueuedAfterReading )) return d; /* *************** *** 301,307 **** for (i = 0; i < app->fds.nfds && nfound > 0; i++) { XtInputMask condition = 0; ! if (FD_ISSET (i, &rmaskfd)) { nfound--; if (!ignoreEvents) { for (d = 0; d < app->count; d++) { --- 444,450 ---- for (i = 0; i < app->fds.nfds && nfound > 0; i++) { XtInputMask condition = 0; ! if (FD_ISSET (i, (fd_set *)&rmaskfd)) { nfound--; if (!ignoreEvents) { for (d = 0; d < app->count; d++) { *************** *** 326,336 **** } condition = XtInputReadMask; } ! if (FD_ISSET (i, &wmaskfd)) { condition |= XtInputWriteMask; nfound--; } ! if (FD_ISSET (i, &emaskfd)) { condition |= XtInputExceptMask; nfound--; } --- 469,479 ---- } condition = XtInputReadMask; } ! if (FD_ISSET (i, (fd_set *)&wmaskfd)) { condition |= XtInputWriteMask; nfound--; } ! if (FD_ISSET (i, (fd_set *)&emaskfd)) { condition |= XtInputExceptMask; nfound--; } *************** *** 350,356 **** --- 493,656 ---- return ret; goto WaitLoop; /* must have been only error events */ } + #else + return nfound ? 0 : -1; + #endif + } + #else /* _MINIX */ + #if NeedFunctionPrototypes + int _XtwaitForSomething( + _XtBoolean ignoreTimers, + _XtBoolean ignoreInputs, + _XtBoolean ignoreEvents, + _XtBoolean block, + unsigned long *howlong, + XtAppContext app + ) + #else + int _XtwaitForSomething(ignoreTimers, ignoreInputs, ignoreEvents, + block, howlong, app) + Boolean ignoreTimers; + Boolean ignoreInputs; + Boolean ignoreEvents; + Boolean block; + unsigned long *howlong; + XtAppContext app; + #endif + { + /* MINIX version. Inputs are not supported. */ + + struct timeval cur_time; + struct timeval start_time; + struct timeval wait_time; + struct timeval new_time; + struct timeval time_spent; + struct timeval max_wait_time; + static struct timeval zero_time = { 0 , 0}; + register struct timeval *wait_time_ptr; + int r, i, d, fd; + asio_fd_set_t asio_bits; + struct fwait fw; + + if (block) { + (void) gettimeofday (&cur_time, NULL); + FIXUP_TIMEVAL(cur_time); + start_time = cur_time; + if(howlong == NULL) { /* special case for ever */ + wait_time_ptr = 0; + } else { /* block until at most */ + max_wait_time.tv_sec = *howlong/1000; + max_wait_time.tv_usec = (*howlong %1000)*1000; + wait_time_ptr = &max_wait_time; + } + } else { /* don't block */ + max_wait_time = zero_time; + wait_time_ptr = &max_wait_time; + } + + WaitLoop: + while (1) { + ASIO_FD_ZERO(&asio_bits); + if (app->timerQueue != NULL && !ignoreTimers && block) { + if(IS_AFTER(cur_time, app->timerQueue->te_timer_value)) { + TIMEDELTA (wait_time, app->timerQueue->te_timer_value, + cur_time); + if(howlong==NULL || IS_AFTER(wait_time,max_wait_time)){ + wait_time_ptr = &wait_time; + } else { + wait_time_ptr = &max_wait_time; + } + } else wait_time_ptr = &zero_time; + } + if (!ignoreEvents) { + for (d = 0; d < app->count; d++) { + if (XEventsQueued(app->list[d], QueuedAfterReading)) + return d; + fd= MNX_XConnectionNumber(app->list[d]); + assert(fd != -1); + ASIO_FD_SET (fd, ASIO_READ, &asio_bits); + } + } + fw.fw_flags= 0; + fw.fw_bits= asio_bits.afds_bits; + fw.fw_maxfd= ASIO_FD_SETSIZE; + if (wait_time_ptr) + r= timed_fwait(&fw, wait_time_ptr); + else + r= fwait(&fw); + if (r == -1) { + /* + * interrupt occured recalculate time value and select + * again. + */ + if (errno == EINTR) { + errno = 0; /* errno is not self reseting */ + if (block) { + if (wait_time_ptr == NULL) /*howlong == NULL*/ + continue; + (void)gettimeofday (&new_time, NULL); + FIXUP_TIMEVAL(new_time); + TIMEDELTA(time_spent, new_time, cur_time); + cur_time = new_time; + if(IS_AFTER(time_spent, *wait_time_ptr)) { + TIMEDELTA(wait_time, *wait_time_ptr, + time_spent); + wait_time_ptr = &wait_time; + continue; + } + /* time is up */ + } + } else { + char Errno[12]; + String param = Errno; + Cardinal param_count = 1; + + sprintf( Errno, "%d", errno); + XtAppWarningMsg(app, "communicationError","fwait", + XtCXtToolkitError,"Select failed; error code %s", + ¶m, ¶m_count); + return -1; + } + } /* timed out or input available */ + break; + } + + if (r == -1) { + if(howlong) *howlong = (unsigned long)0; /* Timed out */ + return -1; + } + assert(!ignoreEvents); + if(block && howlong != NULL) { /* adjust howlong */ + (void) gettimeofday (&new_time, NULL); + FIXUP_TIMEVAL(new_time); + TIMEDELTA(time_spent, new_time, start_time); + if(*howlong <= (time_spent.tv_sec*1000+time_spent.tv_usec/1000)) + *howlong = (unsigned long)0; /* Timed out */ + else + *howlong -= (time_spent.tv_sec*1000+time_spent.tv_usec/1000); + } + + for (d = 0; d < app->count; d++) { + fd= MNX_XConnectionNumber(app->list[d]); + if (fw.fw_fd != fd) + continue; + assert(fw.fw_operation == ASIO_READ); + XReplyReadStatus(app->list[d], fw.fw_result, fw.fw_errno); + if (XEventsQueued( app->list[d], QueuedAfterReading )) + return d; + /* + * An error event could have arrived + * without any real events, or events + * could have been swallowed by Xlib, + * or the connection may be broken. + * We can't tell the difference, so + * ssume Xlib will eventually discover + * a broken connection. + */ + } + goto WaitLoop; /* must have been only error events */ } + #endif /* _MINIX */ #define IeCallProc(ptr) \ (*ptr->ie_proc) (ptr->ie_closure, &ptr->ie_source, (XtInputId*)&ptr); *************** *** 483,488 **** --- 783,789 ---- XtInputCallbackProc proc; XtPointer closure; { + #ifndef _MINIX InputEvent* sptr; XtInputMask condition = (XtInputMask) Condition; *************** *** 510,528 **** sptr->ie_next = app->input_list[source]; app->input_list[source] = sptr; ! if (condition & XtInputReadMask) FD_SET(source, &app->fds.rmask); ! if (condition & XtInputWriteMask) FD_SET(source, &app->fds.wmask); ! if (condition & XtInputExceptMask) FD_SET(source, &app->fds.emask); if (app->fds.nfds < (source+1)) app->fds.nfds = source+1; app->fds.count++; return((XtInputId)sptr); } void XtRemoveInput( id ) register XtInputId id; { register InputEvent *sptr, *lptr; XtAppContext app = ((InputEvent *)id)->app; register int source = ((InputEvent *)id)->ie_source; --- 811,834 ---- sptr->ie_next = app->input_list[source]; app->input_list[source] = sptr; ! if (condition & XtInputReadMask) FD_SET(source, (fd_set *)&app->fds.rmask); ! if (condition & XtInputWriteMask) FD_SET(source, (fd_set *)&app->fds.wmask); ! if (condition & XtInputExceptMask) FD_SET(source, (fd_set *)&app->fds.emask); if (app->fds.nfds < (source+1)) app->fds.nfds = source+1; app->fds.count++; return((XtInputId)sptr); + #else /* _MINIX */ + printf("XtAppAddInput not implemented\n"); + abort(); + #endif /* _MINIX */ } void XtRemoveInput( id ) register XtInputId id; { + #ifndef _MINIX register InputEvent *sptr, *lptr; XtAppContext app = ((InputEvent *)id)->app; register int source = ((InputEvent *)id)->ie_source; *************** *** 552,564 **** condition |= lptr->ie_condition; if ((sptr->ie_condition & XtInputReadMask) && !(condition & XtInputReadMask)) ! FD_CLR(source, &app->fds.rmask); if ((sptr->ie_condition & XtInputWriteMask) && !(condition & XtInputWriteMask)) ! FD_CLR(source, &app->fds.wmask); if ((sptr->ie_condition & XtInputExceptMask) && !(condition & XtInputExceptMask)) ! FD_CLR(source, &app->fds.emask); XtFree((char *) sptr); found = True; break; --- 858,870 ---- condition |= lptr->ie_condition; if ((sptr->ie_condition & XtInputReadMask) && !(condition & XtInputReadMask)) ! FD_CLR(source, (fd_set *)&app->fds.rmask); if ((sptr->ie_condition & XtInputWriteMask) && !(condition & XtInputWriteMask)) ! FD_CLR(source, (fd_set *)&app->fds.wmask); if ((sptr->ie_condition & XtInputExceptMask) && !(condition & XtInputExceptMask)) ! FD_CLR(source, (fd_set *)&app->fds.emask); XtFree((char *) sptr); found = True; break; *************** *** 573,578 **** --- 879,888 ---- XtAppWarningMsg(app, "invalidProcedure","inputHandler",XtCXtToolkitError, "XtRemoveInput: Input handler not found", (String *)NULL, (Cardinal *)NULL); + #else /* _MINIX */ + printf("XtRemoveInput not implemented\n"); + abort(); + #endif /* _MINIX */ } void _XtRemoveAllInputs(app) *************** *** 934,936 **** --- 1244,1310 ---- event->xany.window = 0; return FALSE; } + + #ifdef _MINIX + #include + + void sig_func(sig) + int sig; + { + signal(SIGALRM, sig_func); + alarm(1); + } + + int timed_fwait(fwp, tvp) + struct fwait *fwp; + struct timeval *tvp; + { + struct timeval end_tim, curr_tim, diff_tim; + time_t start_time, alarm_time, curr_time; + void (*sigf) _ARGS(( int sig )); + int r, err; + + gettimeofday(&curr_tim, NULL); + ADD_TIME(end_tim, *tvp, curr_tim); + start_time= time(NULL); + sigf= signal(SIGALRM, sig_func); + alarm_time= alarm(0); + for(;;) + { + if (IS_AT_OR_AFTER(end_tim, curr_tim)) + { + err = EINTR; + r = -1; + break; + } + TIMEDELTA(diff_tim, end_tim, curr_tim); + if (diff_tim.tv_usec) + diff_tim.tv_sec++; + assert(diff_tim.tv_sec > 0); + alarm(diff_tim.tv_sec); + r= fwait(fwp); + if (r == -1 && errno == EINTR) { + gettimeofday(&curr_tim, NULL); + } else { + err= errno; + break; + } + } + + /* Restore alarm pending when timed_fwait was called */ + alarm(0); + signal(SIGALRM, sigf); + if (alarm_time) + { + curr_time= time(NULL); + if (curr_time < start_time + alarm_time) + alarm((start_time + alarm_time) - curr_time); + else + alarm(1); /* best we can do */ + } + + errno= err; + return r; + } + + #endif /* _MINIX */ diff -c mit/lib/Xt/Object.c:1.1.1.1 mit/lib/Xt/Object.c:1.3 *** mit/lib/Xt/Object.c:1.1.1.1 Sat Mar 12 00:39:17 1994 --- mit/lib/Xt/Object.c Sat Mar 12 00:39:19 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Object.c,v 1.3 1993/03/27 09:12:35 dawes Exp $ */ /* $XConsortium: Object.c,v 1.19 91/06/10 15:08:05 converse Exp $ */ /*********************************************************** *************** *** 75,82 **** --- 76,87 ---- } }; + #ifndef SVR3SHLIB externaldef(objectClass) WidgetClass objectClass = (WidgetClass)&objectClassRec; + #else + externalref WidgetClass objectClass; + #endif /* * Start of object routines. diff -c mit/lib/Xt/RectObj.c:1.1.1.1 mit/lib/Xt/RectObj.c:1.3 *** mit/lib/Xt/RectObj.c:1.1.1.1 Sat Mar 12 00:39:19 1994 --- mit/lib/Xt/RectObj.c Sat Mar 12 00:39:19 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/RectObj.c,v 1.3 1993/03/27 09:12:37 dawes Exp $ */ /* $XConsortium: RectObj.c,v 1.14 91/06/11 20:11:45 converse Exp $ */ /*********************************************************** *************** *** 62,68 **** --- 63,73 ---- externaldef(rectobjclassrec) RectObjClassRec rectObjClassRec = { { + #ifndef SVR3SHLIB /* superclass */ (WidgetClass)&objectClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "Rect", /* widget_size */ sizeof(RectObjRec), /* class_initialize */ NULL, *************** *** 97,104 **** --- 102,114 ---- } }; + #ifndef SVR3SHLIB externaldef(rectObjClass) WidgetClass rectObjClass = (WidgetClass)&rectObjClassRec; + #else + externalref WidgetClass rectObjClass; + #define _XtInherit (*_libXt__XtInherit) + #endif /*ARGSUSED*/ static void XtCopyAncestorSensitive(widget, offset, value) diff -c mit/lib/Xt/Shell.c:1.1.1.3 mit/lib/Xt/Shell.c:1.4 *** mit/lib/Xt/Shell.c:1.1.1.3 Sat Mar 12 00:39:20 1994 --- mit/lib/Xt/Shell.c Sat Mar 12 00:39:21 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Shell.c,v 1.4 1993/05/26 02:12:42 dawes Exp $ */ /* $XConsortium: Shell.c,v 1.134 93/05/25 10:38:24 kaleb Exp $ */ /*********************************************************** *************** *** 131,137 **** --- 132,142 ---- externaldef(shellclassrec) ShellClassRec shellClassRec = { { /* Core */ + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &compositeClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "Shell", /* size */ sizeof(ShellRec), /* Class Initializer */ NULL, *************** *** 174,180 **** --- 179,189 ---- } }; + #ifndef SVR3SHLIB externaldef(shellwidgetclass) WidgetClass shellWidgetClass = (WidgetClass) (&shellClassRec); + #else + externalref WidgetClass shellWidgetClass; + #endif /*************************************************************************** * *************** *** 238,245 **** --- 247,258 ---- } }; + #ifndef SVR3SHLIB externaldef(overrideshellwidgetclass) WidgetClass overrideShellWidgetClass = (WidgetClass) (&overrideShellClassRec); + #else + externalref WidgetClass overrideShellWidgetClass; + #endif /*************************************************************************** * *************** *** 383,389 **** --- 396,406 ---- } }; + #ifndef SVR3SHLIB externaldef(wmshellwidgetclass) WidgetClass wmShellWidgetClass = (WidgetClass) (&wmShellClassRec); + #else + externalref WidgetClass wmShellWidgetClass; + #endif /*************************************************************************** * *************** *** 409,415 **** --- 426,436 ---- externaldef(transientshellclassrec) TransientShellClassRec transientShellClassRec = { { + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &vendorShellClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "TransientShell", /* size */ sizeof(TransientShellRec), /* Class Initializer */ NULL, *************** *** 458,465 **** --- 479,490 ---- } }; + #ifndef SVR3SHLIB externaldef(transientshellwidgetclass) WidgetClass transientShellWidgetClass = (WidgetClass) (&transientShellClassRec); + #else + externalref WidgetClass transientShellWidgetClass; + #endif /*************************************************************************** * *************** *** 487,493 **** --- 512,522 ---- externaldef(toplevelshellclassrec) TopLevelShellClassRec topLevelShellClassRec = { { + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &vendorShellClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "TopLevelShell", /* size */ sizeof(TopLevelShellRec), /* Class Initializer */ NULL, *************** *** 536,543 **** --- 565,576 ---- } }; + #ifndef SVR3SHLIB externaldef(toplevelshellwidgetclass) WidgetClass topLevelShellWidgetClass = (WidgetClass) (&topLevelShellClassRec); + #else + externalref WidgetClass topLevelShellWidgetClass; + #endif /*************************************************************************** * *************** *** 623,630 **** --- 656,668 ---- } }; + #ifndef SVR3SHLIB externaldef(applicationshellwidgetclass) WidgetClass applicationShellWidgetClass = (WidgetClass) (&applicationShellClassRec); + #else + externalref WidgetClass applicationShellWidgetClass; + #define _XtInherit (*_libXt__XtInherit) + #endif /**************************************************************************** * Whew! diff -c mit/lib/Xt/TMgrab.c:1.1.1.2 mit/lib/Xt/TMgrab.c:1.5 *** mit/lib/Xt/TMgrab.c:1.1.1.2 Sat Mar 12 00:39:22 1994 --- mit/lib/Xt/TMgrab.c Sat Mar 12 00:39:22 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/TMgrab.c,v 1.5 1993/05/19 05:30:29 dawes Exp $ */ /* $XConsortium: TMgrab.c,v 1.9 92/12/24 10:41:47 converse Exp $ */ /*LINTLIBRARY*/ diff -c mit/lib/Xt/TMparse.c:1.1.1.3 mit/lib/Xt/TMparse.c:2.0 *** mit/lib/Xt/TMparse.c:1.1.1.3 Sat Mar 12 00:39:23 1994 --- mit/lib/Xt/TMparse.c Sat Mar 12 00:39:23 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/TMparse.c,v 2.0 1993/11/13 04:23:38 dawes Exp $ */ /* $XConsortium: TMparse.c,v 1.135 93/08/05 11:54:10 kaleb Exp $ */ /*********************************************************** *************** *** 23,28 **** --- 24,33 ---- SOFTWARE. ******************************************************************/ + + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif #include "IntrinsicI.h" #include "StringDefs.h" diff -c mit/lib/Xt/TMstate.c:1.1.1.2 mit/lib/Xt/TMstate.c:1.4 *** mit/lib/Xt/TMstate.c:1.1.1.2 Sat Mar 12 00:39:24 1994 --- mit/lib/Xt/TMstate.c Sat Mar 12 00:39:24 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/TMstate.c,v 1.4 1993/05/19 05:30:34 dawes Exp $ */ /* $XConsortium: TMstate.c,v 1.164 93/02/05 16:47:46 converse Exp $ */ /*LINTLIBRARY*/ *************** *** 42,48 **** --- 43,51 ---- static String XtNtranslationError = "translationError"; + #ifndef SVR3SHLIB TMGlobalRec _XtGlobalTM; /* initialized to zero K&R */ + #endif #define MatchIncomingEvent(tmEvent, typeMatch, modMatch) \ (typeMatch->eventType == tmEvent->event.eventType && \ diff -c mit/lib/Xt/VarCreate.c:1.1.1.2 mit/lib/Xt/VarCreate.c:1.4 *** mit/lib/Xt/VarCreate.c:1.1.1.2 Sat Mar 12 00:39:25 1994 --- mit/lib/Xt/VarCreate.c Sat Mar 12 00:39:25 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/VarCreate.c,v 1.4 1993/05/19 05:30:37 dawes Exp $ */ /* $XConsortium: VarCreate.c,v 1.26 93/05/13 16:20:25 kaleb Exp $ */ /* *************** *** 18,23 **** --- 19,28 ---- without express or implied warranty. */ + + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif #include "IntrinsicI.h" #include "StringDefs.h" diff -c mit/lib/Xt/VarGet.c:1.1.1.1 mit/lib/Xt/VarGet.c:1.3 *** mit/lib/Xt/VarGet.c:1.1.1.1 Sat Mar 12 00:39:25 1994 --- mit/lib/Xt/VarGet.c Sat Mar 12 00:39:25 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/VarGet.c,v 1.3 1993/03/27 09:12:53 dawes Exp $ */ /* $XConsortium: VarGet.c,v 1.17 91/06/13 18:07:07 converse Exp $ */ /* *************** *** 17,22 **** --- 18,27 ---- without express or implied warranty. */ + + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif #include "IntrinsicI.h" #include "VarargsI.h" diff -c mit/lib/Xt/Vendor.c:1.1.1.1 mit/lib/Xt/Vendor.c:1.3 *** mit/lib/Xt/Vendor.c:1.1.1.1 Sat Mar 12 00:39:26 1994 --- mit/lib/Xt/Vendor.c Sat Mar 12 00:39:26 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/Xt/Vendor.c,v 1.3 1993/03/27 09:12:54 dawes Exp $ */ /* $XConsortium: Vendor.c,v 1.43 91/07/23 16:10:30 converse Exp $ */ /*********************************************************** *************** *** 42,48 **** --- 43,53 ---- externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { { + #ifndef SVR3SHLIB /* superclass */ (WidgetClass) &wmShellClassRec, + #else + /* superclass */ NULL, /* binded on runtime */ + #endif /* class_name */ "VendorShell", /* size */ sizeof(VendorShellRec), /* Class Initializer */ NULL, *************** *** 89,95 **** } }; ! #if !defined(AIXSHLIB) || !defined(SHAREDCODE) externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (&vendorShellClassRec); #endif --- 94,100 ---- } }; ! #if (!defined(AIXSHLIB) || !defined(SHAREDCODE)) && !defined(SVR3SHLIB) externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = (WidgetClass) (&vendorShellClassRec); #endif diff -c mit/lib/Xt/Xtos.h:1.1.1.2 mit/lib/Xt/Xtos.h:1.2 *** mit/lib/Xt/Xtos.h:1.1.1.2 Sat Mar 12 00:39:26 1994 --- mit/lib/Xt/Xtos.h Sat Mar 12 00:39:26 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xt/Xtos.h,v 1.2 1993/06/03 15:27:48 dawes Exp $ * $XConsortium: Xtos.h,v 1.11 91/11/08 17:55:15 gildea Exp $ */ *************** *** 50,56 **** #if HCVERSION < 21003 #define ALLOCATE_LOCAL(size) alloca((int)(size)) ! pragma on(alloca); #else /* HCVERSION >= 21003 */ #define ALLOCATE_LOCAL(size) _Alloca((int)(size)) #endif /* HCVERSION < 21003 */ --- 51,57 ---- #if HCVERSION < 21003 #define ALLOCATE_LOCAL(size) alloca((int)(size)) ! #pragma on(alloca); #else /* HCVERSION >= 21003 */ #define ALLOCATE_LOCAL(size) _Alloca((int)(size)) #endif /* HCVERSION < 21003 */ diff -c /dev/null mit/lib/Xt/dummyBind.c:1.2 *** /dev/null Sat Mar 12 00:39:27 1994 --- mit/lib/Xt/dummyBind.c Sat Mar 12 00:39:27 1994 *************** *** 0 **** --- 1,16 ---- + /* libXt: dummyBind.c + * + * This dummy function is only linked to the client if the client + * doesn't supply one + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/dummyBind.c,v 1.2 1993/03/27 09:12:56 dawes Exp $ + */ + + void _bind_to_sv3shlib_() + { + /* do nothing */ + + } + diff -c mit/lib/Xt/fd.h:1.1.1.2 mit/lib/Xt/fd.h:2.1 *** mit/lib/Xt/fd.h:1.1.1.2 Sat Mar 12 00:39:27 1994 --- mit/lib/Xt/fd.h Sat Mar 12 00:39:27 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/lib/Xt/fd.h,v 2.1 1993/11/13 04:23:41 dawes Exp $ * $XConsortium: fd.h,v 1.15 93/07/08 13:29:55 kaleb Exp $ * $oHeader: fd.h,v 1.4 88/08/26 14:49:54 asente Exp $ */ *************** *** 34,39 **** --- 35,42 ---- #include /* defines FD stuff except howmany() */ #endif + #ifndef _MINIX + #ifndef NBBY #define NBBY 8 /* number of bits in a byte */ #endif *************** *** 71,75 **** --- 74,86 ---- #ifndef FD_ZERO #define FD_ZERO(p) bzero((char *)(p), sizeof(*(p))) #endif + + #else /* _MINIX */ + + /* Minix has it own set manipulation stuff in which is incompatible + * with standard the fd_sets used for select. + */ + + #endif /* !_MINIX */ #endif /*_Xt_fd_set*/ diff -c /dev/null mit/lib/Xt/globals.c:1.3 *** /dev/null Sat Mar 12 00:39:27 1994 --- mit/lib/Xt/globals.c Sat Mar 12 00:39:27 1994 *************** *** 0 **** --- 1,147 ---- + /* libXt : libXt.c + * exported data + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived partially from work of Thomas Roell + * + * $XFree86: mit/lib/Xt/globals.c,v 1.3 1993/03/20 03:40:55 dawes Exp $ + */ + + #include "IntrinsicI.h" /* to get XrmQuark, */ + /* TMGlobalRec, String */ + + #ifdef SVR3SHLIB + + #ifdef __STDC__ + #define Const const + #else + #define Const /**/ + #endif + + #define VoidInit(var) void *var = 0 + + Const char *_shared_libXt_version = SOXTREV; char __libXt__sp1__[16] = ""; + + String XtCXtToolkitError = "XtToolkitError"; char __libXt__sp2__[32] = ""; + TMGlobalRec _XtGlobalTM = {0}; + int _XtInheritTranslations = 0; + XrmQuark _XtQString = 0; + + VoidInit(_libXt__aux__); + VoidInit(_libXt__ctype); + VoidInit(_libXt__iob); + VoidInit(_libXt_access); + VoidInit(_libXt_atof); + VoidInit(_libXt_calloc); + VoidInit(_libXt_errno); + VoidInit(_libXt_exit); + VoidInit(_libXt_fclose); + VoidInit(_libXt_fopen); + VoidInit(_libXt_fprintf); + VoidInit(_libXt_free); + VoidInit(_libXt_getenv); + VoidInit(_libXt_gethostname); + VoidInit(_libXt_getpwnam); + VoidInit(_libXt_getpwuid); + VoidInit(_libXt_gettimeofday); + VoidInit(_libXt_getuid); + VoidInit(_libXt_malloc); + VoidInit(_libXt_memset); + VoidInit(_libXt_printf); + VoidInit(_libXt_qsort); + VoidInit(_libXt_realloc); + VoidInit(_libXt_select); + VoidInit(_libXt_sprintf); + VoidInit(_libXt_stat); + VoidInit(_libXt_strcat); + VoidInit(_libXt_strchr); + VoidInit(_libXt_strcmp); + VoidInit(_libXt_strcpy); + VoidInit(_libXt_strncpy); + VoidInit(_libXt_strrchr); + VoidInit(_libXt__XtInherit); /* must be imported */ + VoidInit(_libXt__XtCXtToolkitError); + VoidInit(_libXt__XtGlobalTM); + /* VoidInit(_libXt__XtInheritTranslations); */ + VoidInit(_libXt__XtQString); + /* + VoidInit(_libXt_XtShellStrings); + VoidInit(_libXt_XtStrings); + */ + + /* + * Composite.c + */ + VoidInit(_libXt_compositeWidgetClass); + + /* + * Constraint.c + */ + VoidInit(_libXt_constraintWidgetClass); + + /* + * Core.c + */ + VoidInit(_libXt_coreWidgetClass); + + /* + * Object.c + */ + /* objectClass not referenced in .text section of any libXt Source */ + + /* + * RectObj.c + */ + VoidInit(_libXt_rectObjClass); + + /* + * Shell.c + */ + VoidInit(_libXt_shellWidgetClass); + VoidInit(_libXt_overrideShellWidgetClass); + VoidInit(_libXt_wmShellWidgetClass); + VoidInit(_libXt_transientShellWidgetClass); + VoidInit(_libXt_topLevelShellWidgetClass); + VoidInit(_libXt_applicationShellWidgetClass); + + /* + * Vendor.c + */ + VoidInit(_libXt_vendorShellWidgetClass); + + + + #ifndef __GNUC__ + /* + * If we are working with floating point aritmetic, stock AT&T cc generates + * an unresolved reference to __fltused. But we want to make a shared lib from + * this here and don't want to reference /lib/libc_s.a, just define this sym as + * (shared lib) static. + * The trick is that while building the shared lib all references to this + * symbol are resolved internally. But the symbol will be outside only visible + * as a static one, so preventing a name conflict with other shared libs. + */ + long __fltused = 0; + #endif + + /* A dummy function for free branchtab-slots. + * This would be a great place for an error-check mechanism for shared libs. + * (Print error message if not existent function is called.) + */ + extern void _libXt_dummy() {}; + + /* + * This function is for future versions of the library which could + * want initialize pointers to default values, which clients linked with + * the old version don't initialize. It's called from inside the + * .init section of the clients. + */ + void __default_libXt_init_() + { + + } + + #endif + + diff -c /dev/null mit/lib/Xt/import.h:2.0 *** /dev/null Sat Mar 12 00:39:28 1994 --- mit/lib/Xt/import.h Sat Mar 12 00:39:28 1994 *************** *** 0 **** --- 1,207 ---- + /* libXt : import.h + * indirection defines + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived partially from work of Thomas Roell + * + * $XFree86: mit/lib/Xt/import.h,v 2.0 1993/09/22 15:33:05 dawes Exp $ + */ + + #ifndef _libXt_import + #define _libXt_import + #ifdef SVR3SHLIB + + #define _ctype (*_libXt__ctype) + #define _iob (*_libXt__iob) + #define access (*_libXt_access) + #define atof (*_libXt_atof) + #define calloc (*_libXt_calloc) + #define errno (*_libXt_errno) + #define exit (*_libXt_exit) + #define fclose (*_libXt_fclose) + #define fopen (*_libXt_fopen) + #define fprintf (*_libXt_fprintf) + /* prevent name conflict with member free of XFontSetMethods */ + #define free(ptr) (*_libXt_free)(ptr) + #define getenv (*_libXt_getenv) + #define gethostname (*_libXt_gethostname) + #define getpwnam (*_libXt_getpwnam) + #define getpwuid (*_libXt_getpwuid) + #define gettimeofday (*_libXt_gettimeofday) + #define getuid (*_libXt_getuid) + #define malloc (*_libXt_malloc) + #define memset (*_libXt_memset) + #define printf (*_libXt_printf) + #define qsort (*_libXt_qsort) + #define realloc (*_libXt_realloc) + /* prevent name conflict with bitfield select of _XtEventRec */ + #define select(max, rd, wr, ex, to) (*_libXt_select)(max, rd, wr, ex, to) + #define sprintf (*_libXt_sprintf) + /* prevent name conflict with struct stat */ + #define stat(path, buf) (*_libXt_stat)(path, buf) + #define strcat (*_libXt_strcat) + #define strchr (*_libXt_strchr) + #define strcmp (*_libXt_strcmp) + #define strcpy (*_libXt_strcpy) + #define strncpy (*_libXt_strncpy) + #define strrchr (*_libXt_strrchr) + /* #define _XtInherit (*_libXt__XtInherit) /* must be imported */ + #define XtCXtToolkitError (*_libXt__XtCXtToolkitError) + #define _XtGlobalTM (*_libXt__XtGlobalTM) + /* #define _XtInheritTranslations (*_libXt__XtInheritTranslations) */ + #define _XtQString (*_libXt__XtQString) + /* + #define XtShellStrings (*_libXt_XtShellStrings) + #define XtStrings (*_libXt_XtStrings) + */ + + /* + * Composite.c + */ + #define compositeWidgetClass (*_libXt_compositeWidgetClass) + + /* + * Constraint.c + */ + #define constraintWidgetClass (*_libXt_constraintWidgetClass) + + /* + * Core.c + */ + #define coreWidgetClass (*_libXt_coreWidgetClass) + + /* + * Object.c + */ + + /* + * RectObj.c + */ + #define rectObjClass (*_libXt_rectObjClass) + + /* + * Shell.c + */ + #define shellWidgetClass (*_libXt_shellWidgetClass) + #define overrideShellWidgetClass (*_libXt_overrideShellWidgetClass) + #define wmShellWidgetClass (*_libXt_wmShellWidgetClass) + #define transientShellWidgetClass (*_libXt_transientShellWidgetClass) + #define topLevelShellWidgetClass (*_libXt_topLevelShellWidgetClass) + #define applicationShellWidgetClass (*_libXt_applicationShellWidgetClass) + + /* + * Vendor.c + */ + #define vendorShellWidgetClass (*_libXt_vendorShellWidgetClass) + + + /* Imported functions declarations + * Why declaring some imported functions here? + * This should be done gracefully through including of the systems + * header files. Unfortunatly there are some source files don't + * include all headers they should include, there are also some functions + * nowhere declared in the systems headers and some are declared + * without extern and cause problems since the names are redefined + * and these declarations then become undesired false pointer definitions. + */ + + /* This section needs editing! It's only an example for the X libs. */ + + #ifdef __STDC__ + extern int creat(char const *, unsigned short); + extern void exit(int); + #ifndef SCO + extern int printf(char const *, ...); + extern int sprintf(char *, char const *, ...); + extern int sscanf(char *, char const *, ...); + #endif + extern int atoi(char const *); + extern int access(char const *, int); + extern unsigned int alarm(unsigned int); + extern unsigned int sleep(unsigned int); + extern int close(int); + extern int read(int, char *, unsigned int); + extern int write(int, char const *, unsigned int); + extern int grantpt(int); + extern char *ptsname(int); + extern int unlockpt(int); + extern char *getenv(char const *); + #else + extern int creat(); + extern void exit(); + #ifndef SCO + extern int printf(); + extern int sprintf(); + extern int sscanf(); + #endif + extern int atoi(); + extern int access(); + extern unsigned int alarm(); + extern unsigned int sleep(); + extern int close(); + extern int read(); + extern int write(); + extern int grantpt(); + extern char *ptsname(); + extern int unlockpt(); + extern char *getenv(); + #endif + + /* use char * also for __STDC__, the sources want it */ + extern char *malloc(), *realloc(), *calloc(); + + #include + + extern char *sys_errlist[]; + extern int sys_nerr; + + extern void qsort(); + #ifndef ISC40 + extern int _flsbuf(); + extern int _filbuf(); + #endif + extern int ioctl(); + extern int getmsg(); + extern int putmsg(); + + extern unsigned short ntohs(), htons(); + extern unsigned long ntohl(), htonl(); + extern unsigned long inet_addr(); + extern int connect(); + extern int gethostname(); + extern int setsockopt(); + extern int socket(); + extern int writev(); + extern int gettimeofday(); + + #if defined(ISC202) || defined(ATT) + extern int (*_libXt_stat)(); + #endif + + /* Functions with ambiguous names */ + + #ifdef __STDC__ + extern int close(int); + extern void free(void *); + #include + #include + #ifdef SCO + #include + #endif /* SCO */ + extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); + #else + extern int (*_libXt_close)(); + extern void (*_libXt_free)(); + extern int (*_libXt_select)(); + #endif + + extern void (*_libXt__XtInherit)( + #if NeedFunctionPrototypes + void + #endif + ); + + #endif + #endif + diff -c /dev/null mit/lib/Xt/jump_funcs:2.0 *** /dev/null Sat Mar 12 00:39:28 1994 --- mit/lib/Xt/jump_funcs Sat Mar 12 00:39:29 1994 *************** *** 0 **** --- 1,585 ---- + # $XFree86: mit/lib/Xt/jump_funcs,v 2.0 1993/08/23 12:19:39 dawes Exp $ + # + 00000000 T _XtAppAddActionHook libXt ActionHook + 00000000 T _XtRemoveActionHook libXt ActionHook + 00000000 T __XtAllocError libXt Alloc + 00000000 T __XtHeapInit libXt Alloc + 00000000 T _XtMalloc libXt Alloc + 00000000 T _XtRealloc libXt Alloc + 00000000 T _XtCalloc libXt Alloc + 00000000 T _XtFree libXt Alloc + 00000000 T __XtHeapAlloc libXt Alloc + 00000000 T __XtHeapFree libXt Alloc + 00000000 T _XtMergeArgLists libXt ArgList + 00000000 T __XtAddCallback libXt Callback + 00000000 T __XtAddCallbackOnce libXt Callback + 00000000 T _XtAddCallback libXt Callback + 00000000 T _XtAddCallbacks libXt Callback + 00000000 T __XtRemoveCallback libXt Callback + 00000000 T _XtRemoveCallback libXt Callback + 00000000 T _XtRemoveCallbacks libXt Callback + 00000000 T __XtRemoveAllCallbacks libXt Callback + 00000000 T _XtRemoveAllCallbacks libXt Callback + 00000000 T __XtCompileCallbackList libXt Callback + 00000000 T __XtGetCallbackList libXt Callback + 00000000 T _XtCallCallbacks libXt Callback + 00000000 T _XtHasCallbacks libXt Callback + 00000000 T _XtCallCallbackList libXt Callback + 00000000 T _XtSetMultiClickTime libXt ClickTime + 00000000 T _XtGetMultiClickTime libXt ClickTime + 00000000 T __XtSetDefaultConverterTable libXt Convert + 00000000 T __XtFreeConverterTable libXt Convert + 00000000 T __XtTableAddConverter libXt Convert + 00000000 T _XtSetTypeConverter libXt Convert + 00000000 T _XtAppSetTypeConverter libXt Convert + 00000000 T _XtAddConverter libXt Convert + 00000000 T _XtAppAddConverter libXt Convert + 00000000 T __XtCacheFlushTag libXt Convert + 00000000 T _XtDirectConvert libXt Convert + 00000000 T _XtCallConverter libXt Convert + 00000000 T __XtConvert libXt Convert + 00000000 T _XtConvert libXt Convert + 00000000 T _XtConvertAndStore libXt Convert + 00000000 T _XtAppReleaseCacheRefs libXt Convert + 00000000 T _XtCallbackReleaseCacheRefList libXt Convert + 00000000 T _XtCallbackReleaseCacheRef libXt Convert + 00000000 T __XtConvertInitialize libXt Converters + 00000000 T _XtDisplayStringConversionWarning libXt Converters + 00000000 T _XtStringConversionWarning libXt Converters + 00000000 T _XtCvtIntToBoolean libXt Converters + 00000000 T _XtCvtIntToShort libXt Converters + 00000000 T _XtCvtStringToBoolean libXt Converters + 00000000 T _XtCvtIntToBool libXt Converters + 00000000 T _XtCvtStringToBool libXt Converters + 00000000 T _XtCvtIntToColor libXt Converters + 00000000 T _XtCvtStringToPixel libXt Converters + 00000000 T _XtCvtStringToCursor libXt Converters + 00000000 T _XtCvtStringToDisplay libXt Converters + 00000000 T _XtCvtStringToFile libXt Converters + 00000000 T _XtCvtIntToFloat libXt Converters + 00000000 T _XtCvtStringToFloat libXt Converters + 00000000 T _XtCvtStringToFont libXt Converters + 00000000 T _XtCvtIntToFont libXt Converters + 00000000 T _XtCvtStringToFontSet libXt Converters + 00000000 T _XtCvtStringToFontStruct libXt Converters + 00000000 T _XtCvtStringToInt libXt Converters + 00000000 T _XtCvtStringToShort libXt Converters + 00000000 T _XtCvtStringToDimension libXt Converters + 00000000 T _XtCvtIntToUnsignedChar libXt Converters + 00000000 T _XtCvtStringToUnsignedChar libXt Converters + 00000000 T _XtCvtColorToPixel libXt Converters + 00000000 T _XtCvtIntToPixel libXt Converters + 00000000 T _XtCvtIntToPixmap libXt Converters + 00000000 T _LowerCase libXt Converters + 00000000 T _XtCvtStringToInitialState libXt Converters + 00000000 T _XtCvtStringToVisual libXt Converters + 00000000 T _XtCvtStringToAtom libXt Converters + 00000000 T __XtAddDefaultConverters libXt Converters + 00000000 T _XtInitializeWidgetClass libXt Create + 00000000 T __XtCreateWidget libXt Create + 00000000 T _XtCreateWidget libXt Create + 00000000 T _XtCreateManagedWidget libXt Create + 00000000 T __XtCreatePopupShell libXt Create + 00000000 T _XtCreatePopupShell libXt Create + 00000000 T __XtAppCreateShell libXt Create + 00000000 T _XtAppCreateShell libXt Create + 00000000 T _XtCreateApplicationShell libXt Create + 00000000 T __XtDoPhase2Destroy libXt Destroy + 00000000 T _XtDestroyWidget libXt Destroy + 00000000 T __XtGetProcessContext libXt Display + 00000000 T __XtDefaultAppContext libXt Display + 00000000 T _XtOpenDisplay libXt Display + 00000000 T __XtAppInit libXt Display + 00000000 T _XtDisplayInitialize libXt Display + 00000000 T _XtCreateApplicationContext libXt Display + 00000000 T _XtDestroyApplicationContext libXt Display + 00000000 T __XtDestroyAppContexts libXt Display + 00000000 T _XtDatabase libXt Display + 00000000 T __XtSortPerDisplayList libXt Display + 00000000 T _XtDisplayToApplicationContext libXt Display + 00000000 T _XtCloseDisplay libXt Display + 00000000 T __XtCloseDisplays libXt Display + 00000000 T _XtWidgetToApplicationContext libXt Display + 00000000 T _XtGetApplicationNameAndClass libXt Display + 00000000 T _XtGetErrorDatabase libXt Error + 00000000 T _XtAppGetErrorDatabase libXt Error + 00000000 T _XtGetErrorDatabaseText libXt Error + 00000000 T _XtAppGetErrorDatabaseText libXt Error + 00000000 T __XtInitErrorHandling libXt Error + 00000000 T __XtDefaultErrorMsg libXt Error + 00000000 T __XtDefaultWarningMsg libXt Error + 00000000 T _XtErrorMsg libXt Error + 00000000 T _XtAppErrorMsg libXt Error + 00000000 T _XtWarningMsg libXt Error + 00000000 T _XtAppWarningMsg libXt Error + 00000000 T _XtSetErrorMsgHandler libXt Error + 00000000 T _XtAppSetErrorMsgHandler libXt Error + 00000000 T _XtSetWarningMsgHandler libXt Error + 00000000 T _XtAppSetWarningMsgHandler libXt Error + 00000000 T __XtDefaultError libXt Error + 00000000 T __XtDefaultWarning libXt Error + 00000000 T _XtError libXt Error + 00000000 T _XtAppError libXt Error + 00000000 T _XtWarning libXt Error + 00000000 T _XtAppWarning libXt Error + 00000000 T _XtSetErrorHandler libXt Error + 00000000 T _XtAppSetErrorHandler libXt Error + 00000000 T _XtSetWarningHandler libXt Error + 00000000 T _XtAppSetWarningHandler libXt Error + 00000000 T __XtSetDefaultErrorHandlers libXt Error + 00000000 T _XtBuildEventMask libXt Event + 00000000 T _XtRemoveEventHandler libXt Event + 00000000 T _XtAddEventHandler libXt Event + 00000000 T _XtInsertEventHandler libXt Event + 00000000 T _XtRemoveRawEventHandler libXt Event + 00000000 T _XtInsertRawEventHandler libXt Event + 00000000 T _XtAddRawEventHandler libXt Event + 00000000 T __XtRegisterWindow libXt Event + 00000000 T __XtUnregisterWindow libXt Event + 00000000 T _XtWindowToWidget libXt Event + 00000000 T __XtAllocWWTable libXt Event + 00000000 T __XtFreeWWTable libXt Event + 00000000 T __XtConvertTypeToMask libXt Event + 00000000 T __XtOnGrabList libXt Event + 00000000 T _XtDispatchEvent libXt Event + 00000000 T _XtAddGrab libXt Event + 00000000 T _XtRemoveGrab libXt Event + 00000000 T _XtMainLoop libXt Event + 00000000 T _XtAppMainLoop libXt Event + 00000000 T __XtEventInitialize libXt Event + 00000000 T _XtAddExposureToRegion libXt Event + 00000000 T __XtFreeEventTable libXt Event + 00000000 T _XtLastTimestampProcessed libXt Event + 00000000 T __XtSendFocusEvent libXt Event + 00000000 T __XtFreePerWidgetInput libXt EventUtil + 00000000 T __XtGetPerWidgetInput libXt EventUtil + 00000000 T __XtFillAncestorList libXt EventUtil + 00000000 T __XtFindRemapWidget libXt EventUtil + 00000000 T __XtUngrabBadGrabs libXt EventUtil + 00000000 T _XtIsRectObj libXt Functions + 00000000 T _XtIsWidget libXt Functions + 00000000 T _XtIsComposite libXt Functions + 00000000 T _XtIsConstraint libXt Functions + 00000000 T _XtIsShell libXt Functions + 00000000 T _XtIsOverrideShell libXt Functions + 00000000 T _XtIsWMShell libXt Functions + 00000000 T _XtIsVendorShell libXt Functions + 00000000 T _XtIsTransientShell libXt Functions + 00000000 T _XtIsTopLevelShell libXt Functions + 00000000 T _XtIsApplicationShell libXt Functions + 00000000 T _XtMapWidget libXt Functions + 00000000 T _XtUnmapWidget libXt Functions + 00000000 T _XtNewString libXt Functions + 00000000 T __XtGClistFree libXt GCManager + 00000000 T _XtAllocateGC libXt GCManager + 00000000 T _XtGetGC libXt GCManager + 00000000 T _XtReleaseGC libXt GCManager + 00000000 T _XtDestroyGC libXt GCManager + 00000000 T __XtMakeGeometryRequest libXt Geometry + 00000000 T _XtMakeGeometryRequest libXt Geometry + 00000000 T _XtMakeResizeRequest libXt Geometry + 00000000 T _XtResizeWindow libXt Geometry + 00000000 T _XtResizeWidget libXt Geometry + 00000000 T _XtConfigureWidget libXt Geometry + 00000000 T _XtMoveWidget libXt Geometry + 00000000 T _XtTranslateCoords libXt Geometry + 00000000 T _XtQueryGeometry libXt Geometry + 00000000 T _XtGetActionKeysym libXt GetActKey + 00000000 T _XtGetResourceList libXt GetResList + 00000000 T _XtGetConstraintResourceList libXt GetResList + 00000000 T _XtGetValues libXt GetValues + 00000000 T _XtGetSubvalues libXt GetValues + 00000000 T __XtInherit libXt Initialize + 00000000 T _XtToolkitInitialize libXt Initialize + 00000000 T _XtSetLanguageProc libXt Initialize + 00000000 T _XtScreenDatabase libXt Initialize + 00000000 T __XtPreparseCommandLine libXt Initialize + 00000000 T __XtDisplayInitialize libXt Initialize + 00000000 T _XtAppSetFallbackResources libXt Initialize + 00000000 T _XtAppInitialize libXt Initialize + 00000000 T _XtInitialize libXt Initialize + 00000000 T _XtIsSubclass libXt Intrinsic + 00000000 T __XtCheckSubclassFlag libXt Intrinsic + 00000000 T __XtIsSubclassOf libXt Intrinsic + 00000000 T _XtRealizeWidget libXt Intrinsic + 00000000 T _XtUnrealizeWidget libXt Intrinsic + 00000000 T _XtCreateWindow libXt Intrinsic + 00000000 T _XtNameToWidget libXt Intrinsic + 00000000 T _XtDisplayOfObject libXt Intrinsic + 00000000 T _XtDisplay libXt Intrinsic + 00000000 T _XtScreenOfObject libXt Intrinsic + 00000000 T _XtScreen libXt Intrinsic + 00000000 T _XtWindowOfObject libXt Intrinsic + 00000000 T _XtWindow libXt Intrinsic + 00000000 T _XtSuperclass libXt Intrinsic + 00000000 T _XtClass libXt Intrinsic + 00000000 T _XtIsManaged libXt Intrinsic + 00000000 T _XtIsRealized libXt Intrinsic + 00000000 T _XtIsSensitive libXt Intrinsic + 00000000 T __XtWindowedAncestor libXt Intrinsic + 00000000 T _XtParent libXt Intrinsic + 00000000 T _XtName libXt Intrinsic + 00000000 T _XtIsObject libXt Intrinsic + 00000000 T _XtFindFile libXt Intrinsic + 00000000 T _XtResolvePathname libXt Intrinsic + 00000000 T _XtCallAcceptFocus libXt Intrinsic + 00000000 T __XtProcessKeyboardEvent libXt Keyboard + 00000000 T __XtHandleFocus libXt Keyboard + 00000000 T _XtSetKeyboardFocus libXt Keyboard + 00000000 T _XtUnmanageChildren libXt Manage + 00000000 T _XtUnmanageChild libXt Manage + 00000000 T _XtManageChildren libXt Manage + 00000000 T _XtManageChild libXt Manage + 00000000 T _XtSetMappedWhenManaged libXt Manage + 00000000 T __XtwaitForSomething libXt NextEvent + 00000000 T _XtAddTimeOut libXt NextEvent + 00000000 T _XtAppAddTimeOut libXt NextEvent + 00000000 T _XtRemoveTimeOut libXt NextEvent + 00000000 T _XtAddWorkProc libXt NextEvent + 00000000 T _XtAppAddWorkProc libXt NextEvent + 00000000 T _XtRemoveWorkProc libXt NextEvent + 00000000 T _XtAddInput libXt NextEvent + 00000000 T _XtAppAddInput libXt NextEvent + 00000000 T _XtRemoveInput libXt NextEvent + 00000000 T __XtRemoveAllInputs libXt NextEvent + 00000000 T _XtNextEvent libXt NextEvent + 00000000 T __XtRefreshMapping libXt NextEvent + 00000000 T _XtAppNextEvent libXt NextEvent + 00000000 T _XtProcessEvent libXt NextEvent + 00000000 T _XtAppProcessEvent libXt NextEvent + 00000000 T _XtPending libXt NextEvent + 00000000 T _XtAppPending libXt NextEvent + 00000000 T _XtPeekEvent libXt NextEvent + 00000000 T _XtAppPeekEvent libXt NextEvent + 00000000 T __XtDestroyServerGrabs libXt PassivGrab + 00000000 T __XtCheckServerGrabsOnWidget libXt PassivGrab + 00000000 T _XtGrabKey libXt PassivGrab + 00000000 T _XtGrabButton libXt PassivGrab + 00000000 T _XtUngrabKey libXt PassivGrab + 00000000 T _XtUngrabButton libXt PassivGrab + 00000000 T _XtGrabKeyboard libXt PassivGrab + 00000000 T _XtUngrabKeyboard libXt PassivGrab + 00000000 T _XtGrabPointer libXt PassivGrab + 00000000 T _XtUngrabPointer libXt PassivGrab + 00000000 T __XtProcessPointerEvent libXt Pointer + 00000000 T __XtPopup libXt Popup + 00000000 T _XtPopup libXt Popup + 00000000 T _XtPopupSpringLoaded libXt Popup + 00000000 T _XtPopdown libXt Popup + 00000000 T _XtCallbackPopdown libXt Popup + 00000000 T _XtCallbackNone libXt PopupCB + 00000000 T _XtCallbackNonexclusive libXt PopupCB + 00000000 T _XtCallbackExclusive libXt PopupCB + 00000000 T __XtCopyFromParent libXt Resources + 00000000 T __XtCopyFromArg libXt Resources + 00000000 T __XtCopyToArg libXt Resources + 00000000 T __XtCompileResourceList libXt Resources + 00000000 T __XtDependencies libXt Resources + 00000000 T __XtResourceDependencies libXt Resources + 00000000 T __XtConstraintResDependencies libXt Resources + 00000000 T __XtCreateIndirectionTable libXt Resources + 00000000 T __XtGetResources libXt Resources + 00000000 T _XtGetSubresources libXt Resources + 00000000 T _XtGetApplicationResources libXt Resources + 00000000 T __XtResourceListInitialize libXt Resources + 00000000 T __XtSetDefaultSelectionTimeout libXt Selection + 00000000 T _XtSetSelectionTimeout libXt Selection + 00000000 T _XtAppSetSelectionTimeout libXt Selection + 00000000 T _XtGetSelectionTimeout libXt Selection + 00000000 T _XtAppGetSelectionTimeout libXt Selection + 00000000 T _XtOwnSelection libXt Selection + 00000000 T _XtOwnSelectionIncremental libXt Selection + 00000000 T _XtDisownSelection libXt Selection + 00000000 T _XtGetSelectionValue libXt Selection + 00000000 T _XtGetSelectionValueIncremental libXt Selection + 00000000 T _XtGetSelectionValues libXt Selection + 00000000 T _XtGetSelectionValuesIncremental libXt Selection + 00000000 T _XtGetSelectionRequest libXt Selection + 00000000 T _XtSetSensitive libXt SetSens + 00000000 T _XtSetSubvalues libXt SetValues + 00000000 T _XtSetValues libXt SetValues + 00000000 T _XtSetWMColormapWindows libXt SetWMCW + 00000000 T __XtShellGetCoordinates libXt Shell + 00000000 T __XtInitializeActionData libXt TMaction + 00000000 T __XtBindActions libXt TMaction + 00000000 T __XtUnbindActions libXt TMaction + 00000000 T __XtFreeActions libXt TMaction + 00000000 T _XtAddActions libXt TMaction + 00000000 T _XtAppAddActions libXt TMaction + 00000000 T _XtGetActionList libXt TMaction + 00000000 T _XtMenuPopupAction libXt TMaction + 00000000 T __XtActionInitialize libXt TMaction + 00000000 T _XtCallActionProc libXt TMaction + 00000000 T __XtRegisterGrabs libXt TMgrab + 00000000 T _XtRegisterGrabAction libXt TMgrab + 00000000 T __XtGrabInitialize libXt TMgrab + 00000000 T __XtComputeLateBindings libXt TMkey + 00000000 T __XtAllocTMContext libXt TMkey + 00000000 T __XtMatchUsingDontCareMods libXt TMkey + 00000000 T _XtConvertCase libXt TMkey + 00000000 T __XtMatchUsingStandardMods libXt TMkey + 00000000 T __XtBuildKeysymTables libXt TMkey + 00000000 T _XtTranslateKeycode libXt TMkey + 00000000 T _XtTranslateKey libXt TMkey + 00000000 T _XtSetKeyTranslator libXt TMkey + 00000000 T _XtRegisterCaseConverter libXt TMkey + 00000000 T _XtGetKeysymTable libXt TMkey + 00000000 T _XtKeysymToKeycodeList libXt TMkey + 00000000 T _XtCvtStringToAcceleratorTable libXt TMparse + 00000000 T _XtCvtStringToTranslationTable libXt TMparse + 00000000 T _XtParseAcceleratorTable libXt TMparse + 00000000 T _XtParseTranslationTable libXt TMparse + 00000000 T __XtTranslateInitialize libXt TMparse + 00000000 T __XtAddTMConverters libXt TMparse + 00000000 T __XtPrintXlations libXt TMprint + 00000000 T __XtDisplayTranslations libXt TMprint + 00000000 T __XtDisplayAccelerators libXt TMprint + 00000000 T __XtDisplayInstalledAccelerators libXt TMprint + 00000000 T __XtPrintActions libXt TMprint + 00000000 T __XtPrintState libXt TMprint + 00000000 T __XtPrintEventSeq libXt TMprint + 00000000 T __XtGetQuarkIndex libXt TMstate + 00000000 T __XtGetTypeIndex libXt TMstate + 00000000 T __XtGetModifierIndex libXt TMstate + 00000000 T __XtRegularMatch libXt TMstate + 00000000 T __XtMatchAtom libXt TMstate + 00000000 T __XtTranslateEvent libXt TMstate + 00000000 T __XtTraverseStateTree libXt TMstate + 00000000 T __XtInstallTranslations libXt TMstate + 00000000 T __XtRemoveTranslations libXt TMstate + 00000000 T __XtDestroyTMData libXt TMstate + 00000000 T _XtUninstallTranslations libXt TMstate + 00000000 T __XtCreateXlations libXt TMstate + 00000000 T __XtParseTreeToStateTree libXt TMstate + 00000000 T __XtAddEventSeqToStateTree libXt TMstate + 00000000 T __XtCvtMergeTranslations libXt TMstate + 00000000 T __XtGetTranslationValue libXt TMstate + 00000000 T __XtRemoveStateTreeByIndex libXt TMstate + 00000000 T __XtFreeTranslations libXt TMstate + 00000000 T _XtInstallAccelerators libXt TMstate + 00000000 T _XtInstallAllAccelerators libXt TMstate + 00000000 T _XtAugmentTranslations libXt TMstate + 00000000 T _XtOverrideTranslations libXt TMstate + 00000000 T __XtMergeTranslations libXt TMstate + 00000000 T __XtUnmergeTranslations libXt TMstate + 00000000 T __XtPopupInitialize libXt TMstate + 00000000 T _XtVaCreateWidget libXt VarCreate + 00000000 T _XtVaCreateManagedWidget libXt VarCreate + 00000000 T _XtVaAppCreateShell libXt VarCreate + 00000000 T _XtVaCreatePopupShell libXt VarCreate + 00000000 T _XtVaSetValues libXt VarCreate + 00000000 T _XtVaSetSubvalues libXt VarCreate + 00000000 T __XtVaAppInitialize libXt VarCreate + 00000000 T _XtVaAppInitialize libXt VarCreate + 00000000 T _XtVaGetSubresources libXt VarGet + 00000000 T _XtVaGetApplicationResources libXt VarGet + 00000000 T _XtVaGetValues libXt VarGet + 00000000 T _XtVaGetSubvalues libXt VarGet + 00000000 T __XtCountVaList libXt Varargs + 00000000 T _XtVaCreateArgsList libXt Varargs + 00000000 T __XtVaCreateTypedArgList libXt Varargs + 00000000 T __XtVaToArgList libXt Varargs + 00000000 T __XtVaToTypedArgList libXt Varargs + 00000000 T _XmuAllStandardColormaps libXmu AllCmap + 00000000 T _XmuMakeAtom libXmu Atoms + 00000000 T _XmuNameOfAtom libXmu Atoms + 00000000 T _XmuInternAtom libXmu Atoms + 00000000 T _XmuGetAtomName libXmu Atoms + 00000000 T _XmuInternStrings libXmu Atoms + 00000000 T _XmuClientWindow libXmu ClientWin + 00000000 T _XmuAddCloseDisplayHook libXmu CloseHook + 00000000 T _XmuRemoveCloseDisplayHook libXmu CloseHook + 00000000 T _XmuLookupCloseDisplayHook libXmu CloseHook + 00000000 T _XmuGetColormapAllocation libXmu CmapAlloc + 00000000 T _XmuCreateColormap libXmu CrCmap + 00000000 T _XmuCreatePixmapFromBitmap libXmu CrPixFBit + 00000000 T _XmuCursorNameToIndex libXmu CursorName + 00000000 T __XmuCCLookupDisplay libXmu CvtCache + 00000000 T _XmuConvertStandardSelection libXmu CvtStdSel + 00000000 T _XmuPrintDefaultErrorMessage libXmu DefErrMsg + 00000000 T _XmuSimpleErrorHandler libXmu DefErrMsg + 00000000 T _XmuDeleteStandardColormap libXmu DelCmap + 00000000 T _XmuDQCreate libXmu DisplayQue + 00000000 T _XmuDQDestroy libXmu DisplayQue + 00000000 T _XmuDQLookupDisplay libXmu DisplayQue + 00000000 T _XmuDQAddDisplay libXmu DisplayQue + 00000000 T _XmuDQRemoveDisplay libXmu DisplayQue + 00000000 T _XmuDistinguishableColors libXmu Distinct + 00000000 T _XmuDistinguishablePixels libXmu Distinct + 00000000 T _XmuDrawLogo libXmu DrawLogo + 00000000 T _XmuDrawRoundedRectangle libXmu DrRndRect + 00000000 T _XmuFillRoundedRectangle libXmu DrRndRect + 00000000 T __XEditResCheckMessages libXmu EditresCom + 00000000 T __XEditResPutString8 libXmu EditresCom + 00000000 T __XEditResPut8 libXmu EditresCom + 00000000 T __XEditResPut16 libXmu EditresCom + 00000000 T __XEditResPut32 libXmu EditresCom + 00000000 T __XEditResPutWidgetInfo libXmu EditresCom + 00000000 T __XEditResResetStream libXmu EditresCom + 00000000 T __XEditResGet8 libXmu EditresCom + 00000000 T __XEditResGet16 libXmu EditresCom + 00000000 T __XEditResGetSigned16 libXmu EditresCom + 00000000 T __XEditResGet32 libXmu EditresCom + 00000000 T __XEditResGetString8 libXmu EditresCom + 00000000 T __XEditResGetWidgetInfo libXmu EditresCom + 00000000 T _XmuCvtFunctionToCallback libXmu FToCback + 00000000 T _XmuGetHostname libXmu GetHost + 00000000 T _XmuCreateStippledPixmap libXmu GrayPixmap + 00000000 T _XmuReleaseStippledPixmap libXmu GrayPixmap + 00000000 T _XmuAddInitializer libXmu Initer + 00000000 T _XmuCallInitializers libXmu Initer + 00000000 T _XmuLocateBitmapFile libXmu LocBitmap + 00000000 T _XmuLocatePixmapFile libXmu LocBitmap + 00000000 T __XmuStringToBitmapInitCache libXmu LocBitmap + 00000000 T __XmuStringToBitmapFreeCache libXmu LocBitmap + 00000000 T _XmuLookupString libXmu Lookup + 00000000 T _XmuLookupLatin1 libXmu Lookup + 00000000 T _XmuLookupLatin2 libXmu Lookup + 00000000 T _XmuLookupLatin3 libXmu Lookup + 00000000 T _XmuLookupLatin4 libXmu Lookup + 00000000 T _XmuLookupKana libXmu Lookup + 00000000 T _XmuLookupJISX0201 libXmu Lookup + 00000000 T _XmuLookupArabic libXmu Lookup + 00000000 T _XmuLookupCyrillic libXmu Lookup + 00000000 T _XmuLookupGreek libXmu Lookup + 00000000 T _XmuLookupAPL libXmu Lookup + 00000000 T _XmuLookupHebrew libXmu Lookup + 00000000 T _XmuLookupStandardColormap libXmu LookupCmap + 00000000 T _XmuCopyISOLatin1Lowered libXmu Lower + 00000000 T _XmuCopyISOLatin1Uppered libXmu Lower + 00000000 T _XmuCompareISOLatin1 libXmu Lower + 00000000 T _XmuReadBitmapData libXmu RdBitF + 00000000 T _XmuReadBitmapDataFromFile libXmu RdBitF + 00000000 T _XmuScreenOfWindow libXmu ScrOfWin + 00000000 T _XmuReshapeWidget libXmu ShapeWidg + 00000000 T _XmuStandardColormap libXmu StdCmap + 00000000 T _XmuCvtStringToBackingStore libXmu StrToBS + 00000000 T _XmuCvtStringToBitmap libXmu StrToBmap + 00000000 T _XmuCvtStringToCursor libXmu StrToCurs + 00000000 T _XmuCvtStringToColorCursor libXmu StrToCurs + 00000000 T _XmuCvtStringToGravity libXmu StrToGrav + 00000000 T _XmuCvtStringToJustify libXmu StrToJust + 00000000 T _XmuCvtStringToLong libXmu StrToLong + 00000000 T _XmuCvtStringToOrientation libXmu StrToOrnt + 00000000 T _XmuCvtStringToShapeStyle libXmu StrToShap + 00000000 T _XmuCvtStringToWidget libXmu StrToWidg + 00000000 T _XmuNewCvtStringToWidget libXmu StrToWidg + 00000000 T _XmuUpdateMapHints libXmu UpdMapHint + 00000000 T _XmuVisualStandardColormaps libXmu VisCmap + 00000000 T _XmuWnInitializeNodes libXmu WidgetNode + 00000000 T _XmuWnFetchResources libXmu WidgetNode + 00000000 T _XmuWnCountOwnedResources libXmu WidgetNode + 00000000 T _XmuWnNameToNode libXmu WidgetNode + 00000000 T _XctCreate libXmu Xct + 00000000 T _XctReset libXmu Xct + 00000000 T _XctNextItem libXmu Xct + 00000000 T _XctFree libXmu Xct + 00000000 T _XextCreateExtension libXext extutil + 00000000 T _XextDestroyExtension libXext extutil + 00000000 T _XextAddDisplay libXext extutil + 00000000 T _XextRemoveDisplay libXext extutil + 00000000 T _XextFindDisplay libXext extutil + 00000000 T _XSetExtensionErrorHandler libXext extutil + 00000000 T _XMissingExtension libXext extutil + 00000000 T _XmbufQueryExtension libXext XMultibuf + 00000000 T _XmbufGetVersion libXext XMultibuf + 00000000 T _XmbufCreateBuffers libXext XMultibuf + 00000000 T _XmbufDestroyBuffers libXext XMultibuf + 00000000 T _XmbufDisplayBuffers libXext XMultibuf + 00000000 T _XmbufGetWindowAttributes libXext XMultibuf + 00000000 T _XmbufChangeWindowAttributes libXext XMultibuf + 00000000 T _XmbufGetBufferAttributes libXext XMultibuf + 00000000 T _XmbufChangeBufferAttributes libXext XMultibuf + 00000000 T _XmbufGetScreenInfo libXext XMultibuf + 00000000 T _XmbufCreateStereoWindow libXext XMultibuf + 00000000 T _XShapeQueryExtension libXext XShape + 00000000 T _XShapeQueryVersion libXext XShape + 00000000 T _XShapeCombineRegion libXext XShape + 00000000 T _XShapeCombineRectangles libXext XShape + 00000000 T _XShapeCombineMask libXext XShape + 00000000 T _XShapeCombineShape libXext XShape + 00000000 T _XShapeOffsetShape libXext XShape + 00000000 T _XShapeQueryExtents libXext XShape + 00000000 T _XShapeSelectInput libXext XShape + 00000000 T _XShapeInputSelected libXext XShape + 00000000 T _XShapeGetRectangles libXext XShape + 00000000 T _XMITMiscQueryExtension libXext MITMisc + 00000000 T _XMITMiscSetBugMode libXext MITMisc + 00000000 T _XMITMiscGetBugMode libXext MITMisc + 00000000 T _XTestFakeInput libXext XTestExt1 + 00000000 T _XTestGetInput libXext XTestExt1 + 00000000 T _XTestStopInput libXext XTestExt1 + 00000000 T _XTestReset libXext XTestExt1 + 00000000 T _XTestQueryInputSize libXext XTestExt1 + 00000000 T _XTestPressKey libXext XTestExt1 + 00000000 T _XTestPressButton libXext XTestExt1 + 00000000 T _XTestMovePointer libXext XTestExt1 + 00000000 T _XTestFlush libXext XTestExt1 + 00000000 T _XAllowDeviceEvents libXi XAllowDv + 00000000 T _XChangeDeviceControl libXi XChgDCtl + 00000000 T _XChangeFeedbackControl libXi XChgFCtl + 00000000 T _XChangeKeyboardDevice libXi XChgKbd + 00000000 T _XChangeDeviceKeyMapping libXi XChgKMap + 00000000 T _XChangePointerDevice libXi XChgPnt + 00000000 T _XChangeDeviceDontPropagateList libXi XChgProp + 00000000 T _XCloseDevice libXi XCloseDev + 00000000 T _XDeviceBell libXi XDevBell + 00000000 T _XInputEventToWire libXi XExtToWire + 00000000 T _XGetDeviceButtonMapping libXi XGetBMap + 00000000 T _XGetDeviceControl libXi XGetDCtl + 00000000 T _XFreeDeviceControl libXi XGetDCtl + 00000000 T _XGetFeedbackControl libXi XGetFCtl + 00000000 T _XFreeFeedbackList libXi XGetFCtl + 00000000 T _XGetDeviceKeyMapping libXi XGetKMap + 00000000 T _XGetDeviceModifierMapping libXi XGetMMap + 00000000 T _XGetDeviceDontPropagateList libXi XGetProp + 00000000 T _XGetExtensionVersion libXi XGetVers + 00000000 T _XGetDeviceMotionEvents libXi XGMotion + 00000000 T _XFreeDeviceMotionEvents libXi XGMotion + 00000000 T _XGrabDevice libXi XGrabDev + 00000000 T _XGrabDeviceButton libXi XGrDvBut + 00000000 T _XGrabDeviceKey libXi XGrDvKey + 00000000 T _XGetDeviceFocus libXi XGtFocus + 00000000 T _XGetSelectedExtensionEvents libXi XGtSelect + 00000000 T _XListInputDevices libXi XListDev + 00000000 T _XFreeDeviceList libXi XListDev + 00000000 T _XOpenDevice libXi XOpenDev + 00000000 T _XQueryDeviceState libXi XQueryDv + 00000000 T _XFreeDeviceState libXi XQueryDv + 00000000 T _XSelectExtensionEvent libXi XSelect + 00000000 T _XSetDeviceButtonMapping libXi XSetBMap + 00000000 T _XSetDeviceValuators libXi XSetDVal + 00000000 T _XSetDeviceModifierMapping libXi XSetMMap + 00000000 T _XSetDeviceMode libXi XSetMode + 00000000 T _XSendExtensionEvent libXi XSndExEv + 00000000 T _XSetDeviceFocus libXi XStFocus + 00000000 T _XUngrabDevice libXi XUngrDev + 00000000 T _XUngrabDeviceButton libXi XUngrDvB + 00000000 T _XUngrabDeviceKey libXi XUngrDvK + 00000000 T _XInput_find_display libXi XExtInt + 00000000 T __xibaddevice libXi XExtInt + 00000000 T __xibadclass libXi XExtInt + 00000000 T __xibadevent libXi XExtInt + 00000000 T __xibadmode libXi XExtInt + 00000000 T __xidevicebusy libXi XExtInt + 00000000 T _CheckExtInit libXi XExtInt + 00000000 T _XTestQueryExtension libXtst XTest + 00000000 T _XTestCompareCursorWithWindow libXtst XTest + 00000000 T _XTestCompareCurrentCursorWithWindow libXtst XTest + 00000000 T _XTestFakeKeyEvent libXtst XTest + 00000000 T _XTestFakeButtonEvent libXtst XTest + 00000000 T _XTestFakeMotionEvent libXtst XTest + 00000000 T _XTestFakeRelativeMotionEvent libXtst XTest + 00000000 T _XTestSetGContextOfGC libXtst XTest + 00000000 T _XTestSetVisualIDOfVisual libXtst XTest + 00000000 T _XTestDiscard libXtst XTest + 00000000 T _XShmQueryExtension libXext XShm + 00000000 T _XShmGetEventBase libXext XShm + 00000000 T _XShmQueryVersion libXext XShm + 00000000 T _XShmPixmapFormat libXext XShm + 00000000 T _XShmAttach libXext XShm + 00000000 T _XShmDetach libXext XShm + 00000000 T _XShmCreateImage libXext XShm + 00000000 T _XShmPutImage libXext XShm + 00000000 T _XShmGetImage libXext XShm + 00000000 T _XShmCreatePixmap libXext XShm diff -c /dev/null mit/lib/Xt/jump_ignore:1.1 *** /dev/null Sat Mar 12 00:39:30 1994 --- mit/lib/Xt/jump_ignore Sat Mar 12 00:39:30 1994 *************** *** 0 **** --- 1 ---- + # $XFree86: mit/lib/Xt/jump_ignore,v 1.1 1993/04/17 02:44:36 dawes Exp $ diff -c /dev/null mit/lib/Xt/jump_vars:1.1 *** /dev/null Sat Mar 12 00:39:30 1994 --- mit/lib/Xt/jump_vars Sat Mar 12 00:39:30 1994 *************** *** 0 **** --- 1,64 ---- + # $XFree86: mit/lib/Xt/jump_vars,v 1.1 1993/04/16 14:21:14 dawes Exp $ + # + 00000100 D _compositeClassRec libXt Composite + 00000004 D _compositeWidgetClass libXt Composite + 00000140 D _constraintClassRec libXt Constraint + 00000004 D _constraintWidgetClass libXt Constraint + 00000040 D _colorConvertArgs libXt Converters + 00000020 D _screenConvertArg libXt Converters + 00000004 D __XtQString libXt Converters + 00000004 D __XtInheritTranslations libXt Core + 00000100 D _widgetClassRec libXt Core + 00000004 D _widgetClass libXt Core + 00000004 D _coreWidgetClass libXt Core + 00000004 D __XtAppDestroyCount libXt Display + 00000004 D __XtperDisplayList libXt Display + 00000004 D __XtDpyDestroyCount libXt Display + 00000004 D _XtCXtToolkitError libXt Intrinsic + 00000100 D _objectClassRec libXt Object + 00000004 D _objectClass libXt Object + 00000100 D _rectObjClassRec libXt RectObj + 00000004 D _rectObjClass libXt RectObj + 00000100 D _shellClassRec libXt Shell + 00000004 D _shellWidgetClass libXt Shell + 00000100 D _overrideShellClassRec libXt Shell + 00000004 D _overrideShellWidgetClass libXt Shell + 00000100 D _wmShellClassRec libXt Shell + 00000004 D _wmShellWidgetClass libXt Shell + 00000100 D _transientShellClassRec libXt Shell + 00000004 D _transientShellWidgetClass libXt Shell + 00000100 D _topLevelShellClassRec libXt Shell + 00000004 D _topLevelShellWidgetClass libXt Shell + 00000100 D _applicationShellClassRec libXt Shell + 00000004 D _applicationShellWidgetClass libXt Shell + 00001000 D _XtStrings libXt StringDefs + 00000800 D _XtShellStrings libXt StringDefs + 00000040 D __XtGlobalTM libXt TMstate + 00000100 D _vendorShellClassRec libXt Vendor + 00000004 D _vendorShellWidgetClass libXt Vendor + 00000004 D __XA_ATOM_PAIR libXmu Atoms + 00000004 D __XA_CHARACTER_POSITION libXmu Atoms + 00000004 D __XA_CLASS libXmu Atoms + 00000004 D __XA_CLIENT_WINDOW libXmu Atoms + 00000004 D __XA_CLIPBOARD libXmu Atoms + 00000004 D __XA_COMPOUND_TEXT libXmu Atoms + 00000004 D __XA_DECNET_ADDRESS libXmu Atoms + 00000004 D __XA_DELETE libXmu Atoms + 00000004 D __XA_FILENAME libXmu Atoms + 00000004 D __XA_HOSTNAME libXmu Atoms + 00000004 D __XA_IP_ADDRESS libXmu Atoms + 00000004 D __XA_LENGTH libXmu Atoms + 00000004 D __XA_LIST_LENGTH libXmu Atoms + 00000004 D __XA_NAME libXmu Atoms + 00000004 D __XA_NET_ADDRESS libXmu Atoms + 00000004 D __XA_NULL libXmu Atoms + 00000004 D __XA_OWNER_OS libXmu Atoms + 00000004 D __XA_SPAN libXmu Atoms + 00000004 D __XA_TARGETS libXmu Atoms + 00000004 D __XA_TEXT libXmu Atoms + 00000004 D __XA_TIMESTAMP libXmu Atoms + 00000004 D __XA_USER libXmu Atoms + 00000004 D __XExtensionErrorFunction libXext globals + 00000004 D _XTestInputActionType libXext XTestExt1 + 00000004 D _XTestFakeAckType libXext XTestExt1 + 00000060 D _versions libXi XExtInt diff -c /dev/null mit/lib/Xt/libXt.def:1.3 *** /dev/null Sat Mar 12 00:39:30 1994 --- mit/lib/Xt/libXt.def Sat Mar 12 00:39:33 1994 *************** *** 0 **** --- 1,587 ---- + /* libXt : libXt.def + * shared library description file + * Template created by mkshtmpl.sh 1.4 + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived partially from work of Thomas Roell + * + * $XFree86: mit/lib/Xt/libXt.def,v 1.3 1993/03/20 03:40:57 dawes Exp $ + */ + + /**/#address .text 0xB0800000 + /**/#address .data 0xB0C00000 + + + /**/#objects noload + ../X/libX11_s.a + + /**/#branch + LowerCase 1 + XtAddActions 2 + XtAddCallback 3 + XtAddCallbacks 4 + XtAddConverter 5 + XtAddEventHandler 6 + XtAddExposureToRegion 7 + XtAddGrab 8 + XtAddInput 9 + XtAddRawEventHandler 10 + XtAddTimeOut 11 + XtAddWorkProc 12 + XtAllocateGC 13 + XtAppAddActionHook 14 + XtAppAddActions 15 + XtAppAddConverter 16 + XtAppAddInput 17 + XtAppAddTimeOut 18 + XtAppAddWorkProc 19 + XtAppCreateShell 20 + XtAppError 21 + XtAppErrorMsg 22 + XtAppGetErrorDatabase 23 + XtAppGetErrorDatabaseText 24 + XtAppGetSelectionTimeout 25 + XtAppInitialize 26 + XtAppMainLoop 27 + XtAppNextEvent 28 + XtAppPeekEvent 29 + XtAppPending 30 + XtAppProcessEvent 31 + XtAppReleaseCacheRefs 32 + XtAppSetErrorHandler 33 + XtAppSetErrorMsgHandler 34 + XtAppSetFallbackResources 35 + XtAppSetSelectionTimeout 36 + XtAppSetTypeConverter 37 + XtAppSetWarningHandler 38 + XtAppSetWarningMsgHandler 39 + XtAppWarning 40 + XtAppWarningMsg 41 + XtAugmentTranslations 42 + XtBuildEventMask 43 + XtCallAcceptFocus 44 + XtCallActionProc 45 + XtCallCallbackList 46 + XtCallCallbacks 47 + XtCallConverter 48 + XtCallbackExclusive 49 + XtCallbackNone 50 + XtCallbackNonexclusive 51 + XtCallbackPopdown 52 + XtCallbackReleaseCacheRef 53 + XtCallbackReleaseCacheRefList 54 + XtCalloc 55 + XtClass 56 + XtCloseDisplay 57 + XtConfigureWidget 58 + XtConvert 59 + XtConvertAndStore 60 + XtConvertCase 61 + XtCreateApplicationContext 62 + XtCreateApplicationShell 63 + XtCreateManagedWidget 64 + XtCreatePopupShell 65 + XtCreateWidget 66 + XtCreateWindow 67 + XtCvtColorToPixel 68 + XtCvtIntToBool 69 + XtCvtIntToBoolean 70 + XtCvtIntToColor 71 + XtCvtIntToFloat 72 + XtCvtIntToFont 73 + XtCvtIntToPixel 74 + XtCvtIntToPixmap 75 + XtCvtIntToShort 76 + XtCvtIntToUnsignedChar 77 + XtCvtStringToAcceleratorTable 78 + XtCvtStringToAtom 79 + XtCvtStringToBool 80 + XtCvtStringToBoolean 81 + XtCvtStringToCursor 82 + XtCvtStringToDimension 83 + XtCvtStringToDisplay 84 + XtCvtStringToFile 85 + XtCvtStringToFloat 86 + XtCvtStringToFont 87 + XtCvtStringToFontSet 88 + XtCvtStringToFontStruct 89 + XtCvtStringToInitialState 90 + XtCvtStringToInt 91 + XtCvtStringToPixel 92 + XtCvtStringToShort 93 + XtCvtStringToTranslationTable 94 + XtCvtStringToUnsignedChar 95 + XtCvtStringToVisual 96 + XtDatabase 97 + XtDestroyApplicationContext 98 + XtDestroyGC 99 + XtDestroyWidget 100 + XtDirectConvert 101 + XtDisownSelection 102 + XtDispatchEvent 103 + XtDisplay 104 + XtDisplayInitialize 105 + XtDisplayOfObject 106 + XtDisplayStringConversionWarning 107 + XtDisplayToApplicationContext 108 + XtError 109 + XtErrorMsg 110 + XtFindFile 111 + XtFree 112 + XtGetActionKeysym 113 + XtGetActionList 114 + XtGetApplicationNameAndClass 115 + XtGetApplicationResources 116 + XtGetConstraintResourceList 117 + XtGetErrorDatabase 118 + XtGetErrorDatabaseText 119 + XtGetGC 120 + XtGetKeysymTable 121 + XtGetMultiClickTime 122 + XtGetResourceList 123 + XtGetSelectionRequest 124 + XtGetSelectionTimeout 125 + XtGetSelectionValue 126 + XtGetSelectionValueIncremental 127 + XtGetSelectionValues 128 + XtGetSelectionValuesIncremental 129 + XtGetSubresources 130 + XtGetSubvalues 131 + XtGetValues 132 + XtGrabButton 133 + XtGrabKey 134 + XtGrabKeyboard 135 + XtGrabPointer 136 + XtHasCallbacks 137 + XtInitialize 138 + XtInitializeWidgetClass 139 + XtInsertEventHandler 140 + XtInsertRawEventHandler 141 + XtInstallAccelerators 142 + XtInstallAllAccelerators 143 + XtIsApplicationShell 144 + XtIsComposite 145 + XtIsConstraint 146 + XtIsManaged 147 + XtIsObject 148 + XtIsOverrideShell 149 + XtIsRealized 150 + XtIsRectObj 151 + XtIsSensitive 152 + XtIsShell 153 + XtIsSubclass 154 + XtIsTopLevelShell 155 + XtIsTransientShell 156 + XtIsVendorShell 157 + XtIsWMShell 158 + XtIsWidget 159 + XtKeysymToKeycodeList 160 + XtLastTimestampProcessed 161 + XtMainLoop 162 + XtMakeGeometryRequest 163 + XtMakeResizeRequest 164 + XtMalloc 165 + XtManageChild 166 + XtManageChildren 167 + XtMapWidget 168 + XtMenuPopupAction 169 + XtMergeArgLists 170 + XtMoveWidget 171 + XtName 172 + XtNameToWidget 173 + XtNewString 174 + XtNextEvent 175 + XtOpenDisplay 176 + XtOverrideTranslations 177 + XtOwnSelection 178 + XtOwnSelectionIncremental 179 + XtParent 180 + XtParseAcceleratorTable 181 + XtParseTranslationTable 182 + XtPeekEvent 183 + XtPending 184 + XtPopdown 185 + XtPopup 186 + XtPopupSpringLoaded 187 + XtProcessEvent 188 + XtQueryGeometry 189 + XtRealizeWidget 190 + XtRealloc 191 + XtRegisterCaseConverter 192 + XtRegisterGrabAction 193 + XtReleaseGC 194 + XtRemoveActionHook 195 + XtRemoveAllCallbacks 196 + XtRemoveCallback 197 + XtRemoveCallbacks 198 + XtRemoveEventHandler 199 + XtRemoveGrab 200 + XtRemoveInput 201 + XtRemoveRawEventHandler 202 + XtRemoveTimeOut 203 + XtRemoveWorkProc 204 + XtResizeWidget 205 + XtResizeWindow 206 + XtResolvePathname 207 + XtScreen 208 + XtScreenDatabase 209 + XtScreenOfObject 210 + XtSetErrorHandler 211 + XtSetErrorMsgHandler 212 + XtSetKeyTranslator 213 + XtSetKeyboardFocus 214 + XtSetLanguageProc 215 + XtSetMappedWhenManaged 216 + XtSetMultiClickTime 217 + XtSetSelectionTimeout 218 + XtSetSensitive 219 + XtSetSubvalues 220 + XtSetTypeConverter 221 + XtSetValues 222 + XtSetWMColormapWindows 223 + XtSetWarningHandler 224 + XtSetWarningMsgHandler 225 + XtStringConversionWarning 226 + XtSuperclass 227 + XtToolkitInitialize 228 + XtTranslateCoords 229 + XtTranslateKey 230 + XtTranslateKeycode 231 + XtUngrabButton 232 + XtUngrabKey 233 + XtUngrabKeyboard 234 + XtUngrabPointer 235 + XtUninstallTranslations 236 + XtUnmanageChild 237 + XtUnmanageChildren 238 + XtUnmapWidget 239 + XtUnrealizeWidget 240 + XtVaAppCreateShell 241 + XtVaAppInitialize 242 + XtVaCreateArgsList 243 + XtVaCreateManagedWidget 244 + XtVaCreatePopupShell 245 + XtVaCreateWidget 246 + XtVaGetApplicationResources 247 + XtVaGetSubresources 248 + XtVaGetSubvalues 249 + XtVaGetValues 250 + XtVaSetSubvalues 251 + XtVaSetValues 252 + XtWarning 253 + XtWarningMsg 254 + XtWidgetToApplicationContext 255 + XtWindow 256 + XtWindowOfObject 257 + XtWindowToWidget 258 + _XtActionInitialize 259 + _XtAddCallback 260 + _XtAddCallbackOnce 261 + _XtAddDefaultConverters 262 + _XtAddEventSeqToStateTree 263 + _XtAddTMConverters 264 + _XtAllocError 265 + _XtAllocTMContext 266 + _XtAllocWWTable 267 + _XtAppCreateShell 268 + _XtAppInit 269 + _XtBCopy 270 + _XtBindActions 271 + _XtBuildKeysymTables 272 + _XtCacheFlushTag 273 + _XtCheckServerGrabsOnWidget 274 + _XtCheckSubclassFlag 275 + _XtCloseDisplays 276 + _XtCompileCallbackList 277 + _XtCompileResourceList 278 + _XtComputeLateBindings 279 + _XtConstraintResDependencies 280 + _XtConvert 281 + _XtConvertInitialize 282 + _XtConvertTypeToMask 283 + _XtCopyFromArg 284 + _XtCopyFromParent 285 + _XtCopyToArg 286 + _XtCountVaList 287 + _XtCreateIndirectionTable 288 + _XtCreatePopupShell 289 + _XtCreateWidget 290 + _XtCreateXlations 291 + _XtCvtMergeTranslations 292 + _XtDefaultAppContext 293 + _XtDefaultError 294 + _XtDefaultErrorMsg 295 + _XtDefaultWarning 296 + _XtDefaultWarningMsg 297 + _XtDependencies 298 + _XtDestroyAppContexts 299 + _XtDestroyServerGrabs 300 + _XtDestroyTMData 301 + _XtDisplayAccelerators 302 + _XtDisplayInitialize 303 + _XtDisplayInstalledAccelerators 304 + _XtDisplayTranslations 305 + _XtDoPhase2Destroy 306 + _XtEventInitialize 307 + _XtFillAncestorList 308 + _XtFindRemapWidget 309 + _XtFreeActions 310 + _XtFreeConverterTable 311 + _XtFreeEventTable 312 + _XtFreePerWidgetInput 313 + _XtFreeTranslations 314 + _XtFreeWWTable 315 + _XtGClistFree 316 + _XtGetCallbackList 317 + _XtGetModifierIndex 318 + _XtGetPerWidgetInput 319 + _XtGetProcessContext 320 + _XtGetQuarkIndex 321 + _XtGetResources 322 + _XtGetTranslationValue 323 + _XtGetTypeIndex 324 + _XtGrabInitialize 325 + _XtHandleFocus 326 + _XtHeapAlloc 327 + _XtHeapFree 328 + _XtHeapInit 329 + _XtInherit 330 + _XtInitErrorHandling 331 + _XtInitializeActionData 332 + _XtInstallTranslations 333 + _XtIsSubclassOf 334 + _XtMakeGeometryRequest 335 + _XtMatchAtom 336 + _XtMatchUsingDontCareMods 337 + _XtMatchUsingStandardMods 338 + _XtMergeTranslations 339 + _XtOnGrabList 340 + _XtParseTreeToStateTree 341 + _XtPopup 342 + _XtPopupInitialize 343 + _XtPreparseCommandLine 344 + _XtPrintActions 345 + _XtPrintEventSeq 346 + _XtPrintState 347 + _XtPrintXlations 348 + _XtProcessKeyboardEvent 349 + _XtProcessPointerEvent 350 + _XtRefreshMapping 351 + _XtRegisterGrabs 352 + _XtRegisterWindow 353 + _XtRegularMatch 354 + _XtRemoveAllCallbacks 355 + _XtRemoveAllInputs 356 + _XtRemoveCallback 357 + _XtRemoveStateTreeByIndex 358 + _XtRemoveTranslations 359 + _XtResourceDependencies 360 + _XtResourceListInitialize 361 + _XtSendFocusEvent 362 + _XtSetDefaultConverterTable 363 + _XtSetDefaultErrorHandlers 364 + _XtSetDefaultSelectionTimeout 365 + _XtShellGetCoordinates 366 + _XtSortPerDisplayList 367 + _XtTableAddConverter 368 + _XtTranslateEvent 369 + _XtTranslateInitialize 370 + _XtTraverseStateTree 371 + _XtUnbindActions 372 + _XtUngrabBadGrabs 373 + _XtUnmergeTranslations 374 + _XtUnregisterWindow 375 + _XtVaAppInitialize 376 + _XtVaCreateTypedArgList 377 + _XtVaToArgList 378 + _XtVaToTypedArgList 379 + _XtWindowedAncestor 380 + _XtwaitForSomething 381 + __default_libXt_init_ 382 + + _libXt_dummy 383-450 + + + /**/#objects + DOWN/globals.o /* All objects with global data must be come at first!*/ + DOWN/pComposite.o + DOWN/pConstraint.o + DOWN/pCore.o + DOWN/pObject.o + DOWN/pRectObj.o + DOWN/pShell.o + DOWN/pVendor.o + /* + * StringDefs.o contains only 'const' data + */ + DOWN/StringDefs.o + /* + * Any additional global data must be inserted below this + * point to maintain the address in the objects before + */ + DOWN/Composite.o + DOWN/Constraint.o + DOWN/Core.o + DOWN/Object.o + DOWN/RectObj.o + DOWN/Shell.o + DOWN/Vendor.o + /* + */ + DOWN/ActionHook.o + DOWN/Alloc.o + DOWN/ArgList.o + DOWN/Callback.o + DOWN/ClickTime.o + DOWN/Convert.o + DOWN/Converters.o + DOWN/Create.o + DOWN/Destroy.o + DOWN/Display.o + DOWN/Error.o + DOWN/Event.o + DOWN/EventUtil.o + DOWN/Functions.o + DOWN/GCManager.o + DOWN/Geometry.o + DOWN/GetActKey.o + DOWN/GetResList.o + DOWN/GetValues.o + DOWN/Initialize.o + DOWN/Intrinsic.o + DOWN/Keyboard.o + DOWN/Manage.o + DOWN/NextEvent.o + DOWN/PassivGrab.o + DOWN/Pointer.o + DOWN/Popup.o + DOWN/PopupCB.o + DOWN/Resources.o + DOWN/Selection.o + DOWN/SetSens.o + DOWN/SetValues.o + DOWN/SetWMCW.o + DOWN/TMaction.o + DOWN/TMgrab.o + DOWN/TMkey.o + DOWN/TMparse.o + DOWN/TMprint.o + DOWN/TMstate.o + DOWN/VarCreate.o + DOWN/VarGet.o + DOWN/Varargs.o + + + /* init sections needs editing! + */ + + /**/#init globals.o + _libXt_getenv getenv + _libXt_memset memset + _libXt_sprintf sprintf + _libXt_strchr strchr + _libXt_strcmp strcmp + _libXt_strcpy strcpy + _libXt_strncpy strncpy + _libXt__XtInherit _XtInherit + _libXt__XtCXtToolkitError XtCXtToolkitError + _libXt__XtGlobalTM _XtGlobalTM + /* + _libXt__XtInheritTranslations _XtInheritTranslations + */ + _libXt__XtQString _XtQString + /* + _libXt_XtShellStrings XtShellStrings + _libXt_XtStrings XtStrings + */ + _libXt_compositeWidgetClass compositeWidgetClass + _libXt_constraintWidgetClass constraintWidgetClass + _libXt_coreWidgetClass coreWidgetClass + _libXt_rectObjClass rectObjClass + _libXt_shellWidgetClass shellWidgetClass + _libXt_overrideShellWidgetClass overrideShellWidgetClass + _libXt_wmShellWidgetClass wmShellWidgetClass + _libXt_transientShellWidgetClass transientShellWidgetClass + _libXt_topLevelShellWidgetClass topLevelShellWidgetClass + _libXt_applicationShellWidgetClass applicationShellWidgetClass + _libXt_vendorShellWidgetClass vendorShellWidgetClass + _libXt__aux__ __libXt_init_stub_ + + + /**/#init Alloc.o + _libXt_calloc calloc + _libXt_free free + _libXt_malloc malloc + _libXt_realloc realloc + + /**/#init Converters.o + _libXt_atof atof + _libXt_fclose fclose + _libXt_fopen fopen + + /**/#init Display.o + _libXt_strrchr strrchr + + /**/#init Error.o + _libXt__iob _iob + _libXt_exit exit + _libXt_fprintf fprintf + + /**/#init Initialize.o + _libXt_gethostname gethostname + _libXt_getpwnam getpwnam + _libXt_getpwuid getpwuid + _libXt_getuid getuid + _libXt_strcat strcat + + /**/#init Intrinsic.o + _libXt_access access + _libXt_stat stat + + /**/#init NextEvent.o + _libXt_errno errno + _libXt_gettimeofday gettimeofday + _libXt_select select + + /**/#init TMparse.o + _libXt__ctype _ctype + _libXt_qsort qsort + + /**/#init TMprint.o + _libXt_printf printf + + /**/#init Vendor.o + _libXt__aux__ __libXt_init_stub_ + + + + /**/#libraries + /* Here can objects be specified, which will extracted from + * an specified archive library and then linked to the shared + * library. This can avoid unwanted referencing of other + * shared libraries. + * NOTE: this objects must be listed also under #objects! + * e.g.: + /lib/libc.a memcpy.o + * or e.g.: + #ifdef __GNUC__ + GNULIB _fixdfsi.o + #endif + * + * NOT USED YET + * + */ + + /**/#externals + /* Here you can specify objects which will only linked to the + * host shared library. + * That are e.g. objects which contain only big data you want + * to seperate from the text section. (See mit/util/mksv3shlib/README.) + */ + InitLibStub.o + InitClnStub.o + DOWN/InitLib.o + DOWN/ChkShlibRev.o + DOWN/dummyBind.o + + /* There must be a comment as last line */ diff -c /dev/null mit/lib/Xt/pComposite.c:1.2 *** /dev/null Sat Mar 12 00:39:35 1994 --- mit/lib/Xt/pComposite.c Sat Mar 12 00:39:36 1994 *************** *** 0 **** --- 1,21 ---- + + /* pComposite.c + * ------------ + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/pComposite.c,v 1.2 1993/03/27 09:12:57 dawes Exp $ + */ + #define COMPOSITE + #include "IntrinsicI.h" + #include "StringDefs.h" + + #ifdef SVR3SHLIB + + #undef compositeWidgetClass + + externaldef(compositewidgetclass) WidgetClass compositeWidgetClass = (WidgetClass) &compositeClassRec; + + + #endif + diff -c /dev/null mit/lib/Xt/pConstraint.c:1.2 *** /dev/null Sat Mar 12 00:39:36 1994 --- mit/lib/Xt/pConstraint.c Sat Mar 12 00:39:36 1994 *************** *** 0 **** --- 1,22 ---- + + /* pConstraint.c + * ------------- + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/pConstraint.c,v 1.2 1993/03/27 09:12:59 dawes Exp $ + */ + #define CONSTRAINT + #include "IntrinsicI.h" + #include "StringDefs.h" + + #ifdef SVR3SHLIB + + #undef constraintWidgetClass + + externaldef(constraintwidgetclass) WidgetClass constraintWidgetClass = + (WidgetClass) &constraintClassRec; + + + #endif + diff -c /dev/null mit/lib/Xt/pCore.c:1.3 *** /dev/null Sat Mar 12 00:39:36 1994 --- mit/lib/Xt/pCore.c Sat Mar 12 00:39:36 1994 *************** *** 0 **** --- 1,35 ---- + + /* pCore.c + * ------- + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/pCore.c,v 1.3 1993/03/20 03:40:59 dawes Exp $ + */ + + #define _XT_CORE_C + + #include "IntrinsicP.h" + #include "EventI.h" + #include "TranslateI.h" + #include "ResourceI.h" + #include "RectObj.h" + #include "RectObjP.h" + #include "StringDefs.h" + + #ifdef SVR3SHLIB + + externalref WidgetClass _libXtCore_unNamedObjClassRec; + + #undef widgetClass + #undef coreWidgetClass + + externaldef(WidgetClass) WidgetClass _libXtCore_unNamedObjClass = + (WidgetClass) &_libXtCore_unNamedObjClassRec; + + externaldef (WidgetClass) WidgetClass widgetClass = &widgetClassRec; + + externaldef (WidgetClass) WidgetClass coreWidgetClass = &widgetClassRec; + + #endif + diff -c /dev/null mit/lib/Xt/pObject.c:1.2 *** /dev/null Sat Mar 12 00:39:36 1994 --- mit/lib/Xt/pObject.c Sat Mar 12 00:39:36 1994 *************** *** 0 **** --- 1,22 ---- + + /* pObject.c + * --------- + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/pObject.c,v 1.2 1993/03/27 09:13:00 dawes Exp $ + */ + + #define OBJECT + #include "IntrinsicI.h" + #include "StringDefs.h" + + #ifdef SVR3SHLIB + + #undef objectClass + + externaldef(objectClass) WidgetClass objectClass + = (WidgetClass)&objectClassRec; + + #endif + diff -c /dev/null mit/lib/Xt/pRectObj.c:1.2 *** /dev/null Sat Mar 12 00:39:37 1994 --- mit/lib/Xt/pRectObj.c Sat Mar 12 00:39:37 1994 *************** *** 0 **** --- 1,23 ---- + + /* pRectObj.c + * ---------- + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/pRectObj.c,v 1.2 1993/03/27 09:13:02 dawes Exp $ + */ + + #define RECTOBJ + #include "IntrinsicI.h" + #include "StringDefs.h" + + #ifdef SVR3SHLIB + + #undef rectObjClass + + externaldef(rectObjClass) + WidgetClass rectObjClass = (WidgetClass)&rectObjClassRec; + + + #endif + diff -c /dev/null mit/lib/Xt/pShell.c:1.2 *** /dev/null Sat Mar 12 00:39:37 1994 --- mit/lib/Xt/pShell.c Sat Mar 12 00:39:37 1994 *************** *** 0 **** --- 1,53 ---- + + /* pShell.c + * -------- + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/pShell.c,v 1.2 1993/03/27 09:13:04 dawes Exp $ + */ + + #define SHELL + + #ifndef DEFAULT_WM_TIMEOUT + #define DEFAULT_WM_TIMEOUT 5000 + #endif + + #include "IntrinsicI.h" + #include "StringDefs.h" + #include "Shell.h" + #include "ShellP.h" + #include "Vendor.h" + #include "VendorP.h" + #include + #include + #include + + #ifdef SVR3SHLIB + + #undef shellWidgetClass + #undef overrideShellWidgetClass + #undef wmShellWidgetClass + #undef transientShellWidgetClass + #undef topLevelShellWidgetClass + #undef applicationShellWidgetClass + + externaldef(shellwidgetclass) WidgetClass shellWidgetClass = + (WidgetClass) (&shellClassRec); + + externaldef(overrideshellwidgetclass) WidgetClass overrideShellWidgetClass = + (WidgetClass) (&overrideShellClassRec); + + externaldef(wmshellwidgetclass) WidgetClass wmShellWidgetClass = + (WidgetClass) (&wmShellClassRec); + + externaldef(transientshellwidgetclass) WidgetClass transientShellWidgetClass = + (WidgetClass) (&transientShellClassRec); + + externaldef(toplevelshellwidgetclass) WidgetClass topLevelShellWidgetClass = + (WidgetClass) (&topLevelShellClassRec); + + externaldef(applicationshellwidgetclass) WidgetClass applicationShellWidgetClass = + (WidgetClass) (&applicationShellClassRec); + + #endif diff -c /dev/null mit/lib/Xt/pVendor.c:1.2 *** /dev/null Sat Mar 12 00:39:37 1994 --- mit/lib/Xt/pVendor.c Sat Mar 12 00:39:37 1994 *************** *** 0 **** --- 1,26 ---- + + /* pVendor.c + * --------- + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * + * $XFree86: mit/lib/Xt/pVendor.c,v 1.2 1993/03/27 09:13:05 dawes Exp $ + */ + + #include "IntrinsicI.h" + #include "StringDefs.h" + #include "Shell.h" + #include "ShellP.h" + #include "Vendor.h" + #include "VendorP.h" + #include + + #ifdef SVR3SHLIB + + #undef vendorShellWidgetClass + + externaldef(vendorshellwidgetclass) WidgetClass vendorShellWidgetClass = + (WidgetClass) (&vendorShellClassRec); + + #endif + diff -c mit/lib/nls/Imakefile:1.1.1.1 mit/lib/nls/Imakefile:1.2 *** mit/lib/nls/Imakefile:1.1.1.1 Sat Mar 12 00:39:39 1994 --- mit/lib/nls/Imakefile Sat Mar 12 00:39:39 1994 *************** *** 1,4 **** --- 1,8 ---- + XCOMM $XFree86: mit/lib/nls/Imakefile,v 1.2 1993/03/20 03:42:55 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.8 91/07/16 22:44:07 gildea Exp $ + + #ifndef Amoeba + #define IHaveSubdirs #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)' *************** *** 23,25 **** --- 27,39 ---- MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) + + #else /* Amoeba */ + /* + * Do not install the nls libraries for Amoeba, since the parsing + * routines in the X library require a lot of stack space (256Kb) + * when parsing these files. This is only a temporary measure. + */ + all:; + depend:; + #endif /* Amoeba */ diff -c mit/lib/oldX/XDelAssoc.c:1.1.1.1 mit/lib/oldX/XDelAssoc.c:1.3 *** mit/lib/oldX/XDelAssoc.c:1.1.1.1 Sat Mar 12 00:39:49 1994 --- mit/lib/oldX/XDelAssoc.c Sat Mar 12 00:39:49 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/oldX/XDelAssoc.c,v 1.3 1993/03/27 09:06:52 dawes Exp $ */ /* $XConsortium: XDelAssoc.c,v 10.19 91/01/06 12:06:39 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ *************** *** 16,26 **** --- 17,29 ---- #include "Xlibint.h" #include "X10.h" void remque(); + #ifndef linux struct qelem { struct qelem *q_forw; struct qelem *q_back; char q_data[1]; }; + #endif /* * XDeleteAssoc - Delete an association in an XAssocTable keyed on diff -c mit/lib/oldX/XMakeAssoc.c:1.1.1.1 mit/lib/oldX/XMakeAssoc.c:1.5 *** mit/lib/oldX/XMakeAssoc.c:1.1.1.1 Sat Mar 12 00:39:50 1994 --- mit/lib/oldX/XMakeAssoc.c Sat Mar 12 00:39:50 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/lib/oldX/XMakeAssoc.c,v 1.5 1993/04/21 09:55:52 dawes Exp $ */ /* $XConsortium: XMakeAssoc.c,v 10.18 91/01/06 12:09:28 rws Exp $ */ /* Copyright Massachusetts Institute of Technology 1985 */ *************** *** 16,27 **** --- 17,34 ---- #include "Xlibint.h" #include "X10.h" + #ifdef ISC + #define insque _insque + #endif + void insque(); + #ifndef linux struct qelem { struct qelem *q_forw; struct qelem *q_back; char q_data[1]; }; + #endif /* * XMakeAssoc - Insert data into an XAssocTable keyed on an XId. * Data is inserted into the table only once. Redundant inserts are diff -c mit/rgb/Imakefile:1.1.1.2 mit/rgb/Imakefile:2.2 *** mit/rgb/Imakefile:1.1.1.2 Sat Mar 12 00:39:51 1994 --- mit/rgb/Imakefile Sat Mar 12 00:39:51 1994 *************** *** 1,20 **** XCOMM $XConsortium: Imakefile,v 1.23 91/09/09 16:09:09 rws Exp $ RGB_DB = DefaultRGBDatabase SITE_RGB_DB = -DRGB_DB=\"$(RGB_DB)\" DEPLIBS = DEFINES = NdbmDefines $(SITE_RGB_DB) - INCLUDES = -I$(SERVERSRC)/include - INSTALLFLAGS = $(INSTLIBFLAGS) SRCS1 = rgb.c OBJS1 = rgb.o SRCS2 = showrgb.c OBJS2 = showrgb.o SRCS = $(SRCS1) $(SRCS2) OBJS = $(OBJS1) $(OBJS2) PROGRAMS = rgb showrgb DATAFILES = rgb.pag rgb.dir DATADEP = rgb.dir /* just want one run of rgb */ ! #if !(defined(SGIArchitecture) || SystemV4) DBMLIB = -ldbm #endif #if defined(SparcArchitecture) && HasGcc --- 1,33 ---- + XCOMM $XFree86: mit/rgb/Imakefile,v 2.2 1993/11/07 14:07:09 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.23 91/09/09 16:09:09 rws Exp $ RGB_DB = DefaultRGBDatabase SITE_RGB_DB = -DRGB_DB=\"$(RGB_DB)\" DEPLIBS = + #ifdef XFree86Version + DEFINES = -DUSE_RGB_TXT $(SITE_RGB_DB) + #else DEFINES = NdbmDefines $(SITE_RGB_DB) SRCS1 = rgb.c OBJS1 = rgb.o + #endif + INCLUDES = -I$(SERVERSRC)/include + INSTALLFLAGS = $(INSTLIBFLAGS) SRCS2 = showrgb.c OBJS2 = showrgb.o SRCS = $(SRCS1) $(SRCS2) OBJS = $(OBJS1) $(OBJS2) + #ifdef XFree86Version + PROGRAMS = showrgb + #else /* !XFree86Version */ PROGRAMS = rgb showrgb + #if i386Bsd + DATAFILES = rgb.db + DATADEP = rgb.db + #else DATAFILES = rgb.pag rgb.dir DATADEP = rgb.dir /* just want one run of rgb */ ! #endif ! #if !(defined(SGIArchitecture) || SystemV4 || i386Bsd || Amoeba || Minix) DBMLIB = -ldbm #endif #if defined(SparcArchitecture) && HasGcc *************** *** 22,41 **** CCOPTIONS = /**/ EXTRA_LOAD_FLAGS = /**/ #endif ! #if defined(i386SVR4Architecture) ! DBMLIB = -ldbm -lucb #endif all:: $(PROGRAMS) $(DATADEP) SingleProgramTarget(rgb,$(OBJS1),NullParameter,$(DBMLIB)) SingleProgramTarget(showrgb,$(OBJS2),NullParameter,$(DBMLIB)) ! SpecialObjectRule(rgb.o,$(ICONFIGFILES),$(_NOOP_)) ! SpecialObjectRule(showrgb.o,$(ICONFIGFILES),$(_NOOP_)) InstallMultiple($(DATAFILES) rgb.txt,$(LIBDIR)) InstallProgramWithFlags(showrgb,$(BINDIR),) InstallManPage(showrgb,$(MANDIR)) $(DATADEP): rgb rgb.txt $(RM) $(DATAFILES) ./rgb rgb < rgb.txt --- 35,83 ---- CCOPTIONS = /**/ EXTRA_LOAD_FLAGS = /**/ #endif ! #if HasSdbm ! DBMLIB = -lsdbm #endif + #if Amoeba || Minix + DBMLIB = ../lib/sdbm/libsdbm.a + #endif + #endif /* !XFree86Version */ + #if !CrossCompiling all:: $(PROGRAMS) $(DATADEP) + #else + all:: showrgb + #endif + #ifdef XFree86Version + SingleProgramTarget(showrgb,$(OBJS2),NullParameter,NullParameter) + SpecialObjectRule(showrgb.o,showrgb.c $(ICONFIGFILES),$(_NOOP_)) + #else + #if Amoeba || Minix + SingleProgramTarget(rgb,$(OBJS1),$(DBMLIB),NullParameter) + SingleProgramTarget(showrgb,$(OBJS2),$(DBMLIB),NullParameter) + #else SingleProgramTarget(rgb,$(OBJS1),NullParameter,$(DBMLIB)) SingleProgramTarget(showrgb,$(OBJS2),NullParameter,$(DBMLIB)) ! #endif ! SpecialObjectRule(rgb.o,rgb.c $(ICONFIGFILES),$(_NOOP_)) ! SpecialObjectRule(showrgb.o,showrgb.c $(ICONFIGFILES),$(_NOOP_)) ! #endif ! #if !CrossCompiling InstallMultiple($(DATAFILES) rgb.txt,$(LIBDIR)) + #else + #if Amoeba + install:: + $(MKXDIRHIER) $(LIBDIR)/rgb/$(ARCH) + + InstallMultiple($(DATAFILES),$(LIBDIR)/rgb/$(ARCH)) + #endif + #endif InstallProgramWithFlags(showrgb,$(BINDIR),) InstallManPage(showrgb,$(MANDIR)) + #ifndef XFree86Version + #if !CrossCompiling $(DATADEP): rgb rgb.txt $(RM) $(DATAFILES) ./rgb rgb < rgb.txt *************** *** 42,46 **** --- 84,90 ---- clean:: $(RM) $(DATAFILES) + #endif + #endif DependTarget() diff -c mit/rgb/rgb.c:1.1.1.1 mit/rgb/rgb.c:2.1 *** mit/rgb/rgb.c:1.1.1.1 Sat Mar 12 00:39:51 1994 --- mit/rgb/rgb.c Sat Mar 12 00:39:51 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XFree86: mit/rgb/rgb.c,v 2.1 1994/02/10 21:24:09 dawes Exp $ */ /* Copyright 1985, Massachusetts Institute of Technology */ /* reads from standard input lines of the form: *************** *** 9,17 **** #endif #ifdef NDBM #include #else ! #ifdef SVR4 #include #else #include --- 10,22 ---- #endif #ifdef NDBM + #ifdef SDBM + #include + #else #include + #endif #else ! #if defined(SVR4) || defined(ISC) #include #else #include *************** *** 24,29 **** --- 29,39 ---- #undef NULL #include #include + + #if (BSD >= 199103) + #include + #endif + #include "rgb.h" #include "site.h" #include *************** *** 30,44 **** --- 40,68 ---- #include extern int errno; /* some systems are still stupid */ + #ifdef X_NO_STRERROR extern int sys_nerr; extern char *sys_errlist[]; + #else + #include + #endif + + #ifndef X_NOT_STDC_ENV + #include + #else + extern char *getenv(); + #endif char *ProgramName; + #ifdef X_NO_STRERROR char *SysError () { return ((errno >= 0 && errno < sys_nerr) ? sys_errlist[errno] : "?"); } + #else + #define SysError() strerror(errno) + #endif main(argc, argv) int argc; *************** *** 50,55 **** --- 74,81 ---- RGB rgb; datum key, content; char name[512]; + char dbpath[512]; + char *xwinhome = NULL; int items; int lineno; int i, n; *************** *** 64,72 **** if (argc == 2) dbname = argv[1]; ! else ! dbname = RGB_DB; strcpy (name, dbname); strcat (name, ".dir"); fd = open (name, O_WRONLY|O_CREAT, 0666); --- 90,106 ---- if (argc == 2) dbname = argv[1]; ! else { ! if ((xwinhome = getenv("XWINHOME")) != NULL) { ! sprintf(dbpath, "%s/lib/X11/rgb", xwinhome); ! dbname = dbpath; ! } ! else { ! dbname = RGB_DB; ! } ! } + #if !(BSD >= 199103) strcpy (name, dbname); strcat (name, ".dir"); fd = open (name, O_WRONLY|O_CREAT, 0666); *************** *** 90,95 **** --- 124,132 ---- (void) close (fd); rgb_dbm = dbm_open (dbname, O_RDWR, 0666); + #else + rgb_dbm = dbm_open (dbname, O_RDWR | O_CREAT, 0666); + #endif if (!rgb_dbm) { fprintf (stderr, "%s: unable to open dbm database \"%s\" (error %d, %s)\n", diff -c mit/rgb/showrgb.c:1.1.1.1 mit/rgb/showrgb.c:2.2 *** mit/rgb/showrgb.c:1.1.1.1 Sat Mar 12 00:39:52 1994 --- mit/rgb/showrgb.c Sat Mar 12 00:39:52 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/rgb/showrgb.c,v 2.2 1994/02/10 21:24:10 dawes Exp $ * $XConsortium: showrgb.c,v 1.8 91/06/30 16:39:03 rws Exp $ * * Copyright 1989 Massachusetts Institute of Technology *************** *** 23,32 **** * Author: Jim Fulton, MIT X Consortium */ #ifdef NDBM #include #else ! #ifdef SVR4 #include #else #include --- 24,38 ---- * Author: Jim Fulton, MIT X Consortium */ + #ifndef USE_RGB_TXT #ifdef NDBM + #ifdef SDBM + #include + #else #include + #endif #else ! #if defined(SVR4) || defined(ISC) #include #else #include *************** *** 36,49 **** --- 42,67 ---- #define dbm_fetch(db,key) (fetch(key)) #define dbm_close(db) dbmclose() #endif + #endif #undef NULL #include #include + + #if (BSD >= 199103) + #include + #endif + #include "rgb.h" /* off in server/include/ */ #include "site.h" #include + #ifndef X_NOT_STDC_ENV + #include + #else + extern char *getenv(); + #endif + char *ProgramName; main (argc, argv) *************** *** 51,65 **** char *argv[]; { char *dbname = RGB_DB; ProgramName = argv[0]; if (argc == 2) dbname = argv[1]; ! dumprgb (dbname); exit (0); } dumprgb (filename) char *filename; { --- 69,91 ---- char *argv[]; { char *dbname = RGB_DB; + char dbpath[512]; + char *xwinhome = NULL; ProgramName = argv[0]; if (argc == 2) dbname = argv[1]; ! else ! if ((xwinhome = getenv("XWINHOME")) != NULL) { ! sprintf(dbpath, "%s/lib/X11/rgb", xwinhome); ! dbname = dbpath; ! } dumprgb (dbname); exit (0); } + #ifndef USE_RGB_TXT + dumprgb (filename) char *filename; { *************** *** 107,109 **** --- 133,181 ---- dbm_close (rgb_dbm); } + + #else /* USE_RGB_TXT */ + + dumprgb (filename) + char *filename; + { + FILE *rgb; + char *path; + char line[BUFSIZ]; + char name[BUFSIZ]; + int lineno = 0; + int red, green, blue; + + path = (char *)malloc(strlen(filename) + 5); + strcpy(path, filename); + strcat(path, ".txt"); + + if (!(rgb = fopen(path, "r"))) { + fprintf (stderr, "%s: unable to open rgb database \"%s\"\n", + ProgramName, filename); + free(path); + exit (1); + } + + while(fgets(line, sizeof(line), rgb)) { + lineno++; + if (sscanf(line, "%d %d %d %[^\n]\n", &red, &green, &blue, name) == 4) { + if (red >= 0 && red <= 0xff && + green >= 0 && green <= 0xff && + blue >= 0 && blue <= 0xff) { + printf ("%3u %3u %3u\t\t%s\n", red, green, blue, name); + } else { + fprintf(stderr, "%s: value for \"%s\" out of range: %s:%d\n", + ProgramName, name, path, lineno); + } + } else if (*line && *line != '#') { + fprintf(stderr, "%s: syntax error: %s:%d\n", ProgramName, + path, lineno); + } + } + + free(path); + fclose(rgb); + } + + #endif /* USE_RGB_TXT */ diff -c mit/util/makedepend/Imakefile:1.1.1.1 mit/util/makedepend/Imakefile:2.0 *** mit/util/makedepend/Imakefile:1.1.1.1 Sat Mar 12 00:39:57 1994 --- mit/util/makedepend/Imakefile Sat Mar 12 00:39:57 1994 *************** *** 1,3 **** --- 1,4 ---- + XCOMM $XFree86: mit/util/makedepend/Imakefile,v 2.0 1993/07/28 11:59:44 dawes Exp $ XCOMM $XConsortium: Imakefile,v 1.15 91/12/02 08:48:08 rws Exp $ /* * NOTE: CppSourcesPresent IS NO LONGER TESTED OR SUPPORTED, *************** *** 24,29 **** --- 25,36 ---- OBJS = include.o main.o parse.o pr.o cppsetup.o #endif + #define INoCrossCompilation + + #if defined(AckToolset) && !defined(CrossCompiling) + LDOPTIONS = AckNoCrossLdFlags + #endif + INCLUDES = -I$(CONFIGSRC) DEFINES = $(CPPDEFS) '-DINCLUDEDIR="/usr/include"' $(SIGNAL_DEFINES) DEPLIBS = *************** *** 32,42 **** --- 39,61 ---- XBSDLIB = /**/ #endif + #if NeedBerklib + XBSDLIB = /**/ + #endif + + #if NeedInetEmulLib + XINETLIB = /**/ + #endif + all:: makedepend #undef InstallManPage #define InstallManPage(file,dest) /* as nothing */ + #if CrossCompiling + ComplexCrossProgramTarget(makedepend) + #else ComplexProgramTarget(makedepend) + #endif InstallManPageLong(mkdepend,$(MANDIR),makedepend) *************** *** 43,49 **** #if CppSourcesPresent cpy.c: cpy.y yylex.c ! yacc cpy.y sed -e '/^# *line/d' < y.tab.c > cpy.c $(RM) y.tab.c --- 62,68 ---- #if CppSourcesPresent cpy.c: cpy.y yylex.c ! $(YACC) $(YFLAGS) cpy.y sed -e '/^# *line/d' < y.tab.c > cpy.c $(RM) y.tab.c diff -c mit/util/makedepend/def.h:1.1.1.1 mit/util/makedepend/def.h:2.1 *** mit/util/makedepend/def.h:1.1.1.1 Sat Mar 12 00:39:57 1994 --- mit/util/makedepend/def.h Sat Mar 12 00:39:57 1994 *************** *** 1,14 **** /* * $XConsortium: def.h,v 1.17 91/05/13 10:23:29 rws Exp $ */ ! #include #include #include #ifndef X_NOT_POSIX #ifndef _POSIX_SOURCE #define _POSIX_SOURCE #endif #endif #include #include #include --- 1,17 ---- /* + * $XFree86: mit/util/makedepend/def.h,v 2.1 1994/02/10 21:27:52 dawes Exp $ * $XConsortium: def.h,v 1.17 91/05/13 10:23:29 rws Exp $ */ ! #include #include #include #ifndef X_NOT_POSIX #ifndef _POSIX_SOURCE + #if !(BSD >= 199103) #define _POSIX_SOURCE #endif #endif + #endif #include #include #include *************** *** 15,21 **** #define MAXDEFINES 512 #define MAXFILES 512 ! #define MAXDIRS 20 #define SYMTABINC 10 /* must be > 1 for define() to work right */ #define TRUE 1 #define FALSE 0 --- 18,24 ---- #define MAXDEFINES 512 #define MAXFILES 512 ! #define MAXDIRS 30 #define SYMTABINC 10 /* must be > 1 for define() to work right */ #define TRUE 1 #define FALSE 0 diff -c mit/util/makedepend/main.c:1.1.1.1 mit/util/makedepend/main.c:2.0 *** mit/util/makedepend/main.c:1.1.1.1 Sat Mar 12 00:39:57 1994 --- mit/util/makedepend/main.c Sat Mar 12 00:39:58 1994 *************** *** 1,4 **** --- 1,5 ---- /* + * $XFree86: mit/util/makedepend/main.c,v 2.0 1994/02/10 21:27:54 dawes Exp $ * $XConsortium: main.c,v 1.56 91/07/25 11:50:59 rws Exp $ */ #include "def.h" *************** *** 8,16 **** --- 9,19 ---- #ifndef X_NOT_POSIX #ifndef _POSIX_SOURCE + #if !(BSD >= 199103) #define _POSIX_SOURCE #endif #endif + #endif #include #ifdef DEBUG *************** *** 258,266 **** --- 261,273 ---- signal (SIGINT, catch); signal (SIGQUIT, catch); signal (SIGILL, catch); + #ifdef SIGBUS signal (SIGBUS, catch); + #endif signal (SIGSEGV, catch); + #ifdef SIGSYS signal (SIGSYS, catch); + #endif #else sig_act.sa_handler = catch; #ifdef _POSIX_SOURCE *************** *** 267,278 **** --- 274,289 ---- sigemptyset(&sig_act.sa_mask); sigaddset(&sig_act.sa_mask, SIGINT); sigaddset(&sig_act.sa_mask, SIGQUIT); + #ifdef SIGBUS sigaddset(&sig_act.sa_mask, SIGBUS); + #endif sigaddset(&sig_act.sa_mask, SIGILL); sigaddset(&sig_act.sa_mask, SIGSEGV); sigaddset(&sig_act.sa_mask, SIGHUP); sigaddset(&sig_act.sa_mask, SIGPIPE); + #ifdef SIGSYS sigaddset(&sig_act.sa_mask, SIGSYS); + #endif #else sig_act.sa_mask = ((1<<(SIGINT -1)) |(1<<(SIGQUIT-1)) *************** *** 288,296 **** --- 299,311 ---- sigaction(SIGINT, &sig_act, (struct sigaction *)0); sigaction(SIGQUIT, &sig_act, (struct sigaction *)0); sigaction(SIGILL, &sig_act, (struct sigaction *)0); + #ifdef SIGBUS sigaction(SIGBUS, &sig_act, (struct sigaction *)0); + #endif sigaction(SIGSEGV, &sig_act, (struct sigaction *)0); + #ifdef SIGSYS sigaction(SIGSYS, &sig_act, (struct sigaction *)0); + #endif #endif /* USGISH */ /* diff -c /dev/null mit/util/mksv3shlib/README:1.1 *** /dev/null Sat Mar 12 00:39:59 1994 --- mit/util/mksv3shlib/README Sat Mar 12 00:39:59 1994 *************** *** 0 **** --- 1,253 ---- + + SVR3 shared library building help kit version 1.4 + ---------------------------------------------------------------------------- + + Files + ---------------------------------------------------------------------------- + + filename purpose + ----------------------------------------------------------------------------- + mkshtmpl.sh This is a script to create the necessary description + XlibsMakefile files from the respective archive library version, + sv3ShlibAddr an auxiliary makefile used by the script and a file + containing the address range definitions for the + various X libraries. + + chkimports.sh This script is usefull to check a generated + shared library for (incorrect) differences of the + imported symbols to the archive version. + + datasize This is a small script which evaluates the size + of the .data section of an archiv library. + + libX11/addImports These files containg explicit imported symbols + libXt/addImports for libX11 and libXt. (They are examples.) + + libX11/constData These files containg data symbol definitions of + libXt/constData (ANSI-C) constant data, which goes to .text section. + To avoid that mkshtmpl.sh creates a bad branch + entry table for such symbols they must be putted + here. (The files are examples.) + + + + Creating a shared library + ----------------------------------------------------------------------------- + NOTE: 1. RTFM of your system!!! + + Mkshtmpl.sh script is not perfect. The files generated by mkshtmpl.sh + must be edited by hand. On simple libraries (e.g. libXext) less, on + complex libraries (e.g. libXaw) more. And more bad, in most cases + you must make changes in the library sources. + + in the following description stands for libXm, libxview + or whichever library do you want make shareable. + + + mkshtmpl.sh + ----------- + Before you running the script you must do some things. + First list the address ranges of the shared library in sv3ShlibAddr if + they doesn't already exist. + Second think over whether you want reference symbols from other + shared libraries directly via the #object noload directive. + Then you have to choices: you can write a auxilary makefile similar + the included XlibsMakefile. Then mkshtmpl.sh will use it (you must edit + mkshtmpl.sh to put your filename in) and such symbols are removed + automatically from the generated description files. + Or you must do this by hand after running mkshtmpl.sh. + + Third if you know some global "const"ant data symbols list them + in a file /constData. Check the sources for + E.g. the file libX11/constData contains: + + evtomask.o D _Xevent_to_mask + XStrKeysym.o D _XkeyTable + + The "D" stands for "D"ata. The problem is that ANSI C compilers + put "const" data to .text section and hence mkshtmpl.sh generates + a bad branch table entry. The file overrides these symbols. + + Second, if you want explicit import some symbols (e.g. from the + library itself) put these to a file /addImports. + E.g. the file libX11/addImports contains: + + 100 XauDisposeAuth globals.o + 100 XauFileName globals.o + 100 XauGetBestAuthByAddr globals.o + 100 XauReadAuth globals.o + + Although it is possible, you should not use something other than "100" + and "globals.o". + Then call with the path name of the respective archive library. + E.g. + cd mit/util/mksv3shlib + mkshtmpl.sh ../../lib/X/libX11.a + + This creates at first a directory and within that the files .def, + .h and .c. .def is the shared library description file in a + format to process it during building of the library with the preprocessor to + evaluate some defines (DOWN, __GNUC__) and it can contain two optional sections + "#externals" and "#libraries" which are used during the library built and + removed before mkshlib is called. (Compare with the rules in + mit/config/sv3Lib.rules.) .h contains contains indirection #define's + and .c the definitions of the pointers. + (In addition two files /exports.out and /imports.out are created. + These files are input files for chkimports.sh. See below.) + + NOTE: The generated files need editing! Not all things are right. See + also comments in the created files. + + Trying to build a shared library: + Copy .def, .h, .c in the source directory. Rename .h + to imports.h. If there is no other globals.c rename .c to globals.c, if + there is another globals.c put + + #include ".c" + + to it. Note, the needed guards: + #ifdef SVR3SHLIB + ... + #endif + are inside .c. This is to get a dependence in the Makefile. + List globals.c/globals.o in the Imakefile of the library under SRCS/OBJS or + whatever the respective variable names are called. + Put a special rule for globals.o in the Imakefile (best after + LibraryObjectRule(), Imakefile: + + ... + LibraryObjectRule() + + #if defined(i386SVR3Architecture) && DoSharedLib + SpecialLibObjectRule(globals.o,$(ICONFIGFILES),-D_libXext_import) + #endif + ... + + + Be aware that you must probably also change source files of the library. + (See Hints). + + + chkimports.sh + ------------- + + This scripts checks whether a created shared library imports other symbols + then the archive version and vice versa. I wrote it to find mean errors + caused by double used names (like syscall "stat" and structure "stat") + and a certain style of extern declarations, like: + ... + char * + XauFileName () + { + char *name, *malloc (), *getenv (); + char *strcat (), *strcpy (); + ... + Very bad if we want "#define malloc (*_libX11_malloc)" ... + Check the sources for that! All what you must do is putting the friendly + word "extern" before the function declaration. Otherwise this causes + mysterious core dumps. + + The script needs /exports.out and /imports.out previously generated + by mkshtmpl.sh and of course a created shared library. + E.g. + chkimports.sh ../../lib/X/libX11_s.a + + If there are errors printed out these are probably really errors. Probably you + get also a lot of warnings. Most of them come from globals.o, ignore them. + Check the others exactly. E.g. if our nice gcc 2.x.x optimizes it uses some- + times its in-built strcmp(3)/strcpy(3). But if it's redefined e.g. + "_libX11_strcmp" gcc don't do it and therefore there is difference between + the archive and the shared version. We could ignore it but for performance + its better to put following to the appropriate source file: + + (e.g.) + + #if defined(SVR3SHLIB) && (__GNUC__ == 2) && defined(__OPTIMIZE__) + #undef strcmp + #endif + + Other differences come from declarations of external functions without the + keyword "extern". Due to redefinition these symbols become pointer definitions. + They are uninitialized and hence the compiler create common symbols (which + cause the warnings of the script). But since they are common this is no + problem. Ignore them. Prime candidats are: gethostbyname and other stuff from + BSD style headers, XauDisposeAuth, XauFileName, XauGetBestAuthByAddr, + XauReadAuth. + + Remaining warnings could be real errors. + + + Hints + ----- + + If the library is simple and has less global data you don't must change + much in the automatically generated files. But you should care to put + global data to the top of the shared library, to avoid breaking + clients if you replace the target shared lib in the future. + + If you have big data in some less used objects in the library you can + seperate it from the code in put it only to the host shared library. + The advantage is that this data goes only to clients which really + needs it instead to the data section of the shared lib which is + copied for every client. + But there is also a big disadvantage. If a future library version changes + its internal data structures the client will break. (One example + for that is libXaw and libXaw3d.) + But to do it you must split the respective source file with #ifdefs. + There are predifined defines for that. + E.g. foo.c: + + ... + + #if !defined(SVR3SHLIB) || defined(SVR3SHDAT) + ... + struct HugeStruct huge_struct = {0}; + char mega[1024*1024] = ""; + + #endif + + #ifndef SVR3SHDAT + extern struct HugeStruct huge_struct; + extern char mega[]; + ... + + int foo() { + ... + }; + + ... + #endif + + The imake rules are prepared to compile such sources twice, if you are list + them in the Imakefile twice (one time with suffix .sd), Imakefile: + ... + OBJS = \ + foo.o \ + ... + foo.sd + ... + The .sd file will contain the data. To put it in the host shared library + you must list it in the #externals section of .def: + ... + /**/externals + foo.sd + + + Note, actually this method is not used with the X libraries, because + of the above mentioned disadvantage. + + + + + + + + + + + + + + + + diff -c /dev/null mit/util/mksv3shlib/XlibsMakefile:1.1 *** /dev/null Sat Mar 12 00:39:59 1994 --- mit/util/mksv3shlib/XlibsMakefile Sat Mar 12 00:39:59 1994 *************** *** 0 **** --- 1,71 ---- + ###################################################################### + # XlibsMakefile # + # ------------------------------------------------------------------ # + # Copyright (c) 1992 by Thomas Wolfram, Berlin, Germany # + # Auxiliary makefile for mkshtmpl.sh 1.4, version 1.2 # + # Author: Thomas Wolfram, thomas@aeon.in-berlin.de, # + # wolf@prz.tu-berlin.de # + ###################################################################### + # + # This makefile creates for a certain X library a file with symbols + # defined in other X libraries, which can be sorted out from the + # set of imported symbols, these references will resolved via + # the #object noload directive + # + # WARNING! This makefile don't work with ISC's make! + # GNU make 3.62 is strongly recommended! + + SHELL = /bin/sh + # Not really needed for GNU make, but looks better... + _NULLCMD_ = @echo -n + + all: + @echo "This file should be called only from \ + inside mkshtmpl.sh" >&2 + + # GNU make don't like empty rules, so give it $(_NULLCMD_) + libX11.A: independent + $(_NULLCMD_) + libXt.A: libX11.rule + $(_NULLCMD_) + libXmu.A: libX11.rule libXt.rule + $(_NULLCMD_) + libXaw.A: libX11.rule libXt.rule libXmu.rule + $(_NULLCMD_) + libXext.A: libX11.rule + $(_NULLCMD_) + libXi.A: libX11.rule libXext.rule + $(_NULLCMD_) + + independent: + @echo "$$LIB doesn't depend on another X lib... Nothing to do." + + .SUFFIXES: .rule + .DEFAULT: + @echo -n "$$LIB is dependent on $*... " + @(OBJNL=`echo "libX11 ../X libXt libXmu libXaw\n\ + libX11 ../../lib/X libXext\n\ + libX11 ../../../lib/X libXi\n\ + libXt ../Xt libXmu libXaw\n\ + libXmu ../Xmu libXaw\n\ + libXext .. libXi\n\ + " | nawk '$$1 == XLIB { print $$2, $$3, $$4, $$5 }' XLIB=$* | \ + grep $$LIB | cut -f1 -d' '`; \ + LIBPATH=`echo "\ + libX11 ../../lib/X\n\ + libXt ../../lib/Xt\n\ + libXmu ../../lib/Xmu\n\ + libXaw ../../lib/Xaw\n\ + libXext ../../extensions/lib\n\ + libXi ../../extensions/lib/xinput\n\ + " | grep $* | cut -f3 -d' '` ; \ + nm -ep $${LIBPATH}/$*.a | nawk '$$2 ~ /^[C|D|T]$$/ \ + { print LIB " A " $$3 }' LIB=$*.a >>$${TMPDIR}/$${LIB}.A ; \ + echo $${OBJNL}/$*_s.a >>$${TMPDIR}/$${LIB}.nol) + @echo Done. + + # to avoid undesired things... + .c.o: + $(_NULLCMD_) + .c: + $(_NULLCMD_) diff -c /dev/null mit/util/mksv3shlib/chkimports.sh:1.1 *** /dev/null Sat Mar 12 00:40:00 1994 --- mit/util/mksv3shlib/chkimports.sh Sat Mar 12 00:40:01 1994 *************** *** 0 **** --- 1,91 ---- + #!/bin/sh + ###################################################################### + # chkimports.sh 1.4 # + # ------------------------------------------------------------------ # + # Checking for incorrect differences of imported symbols between # + # the archive and shared version of a library # + # Copyright (c) 1992 by Thomas Wolfram, Berlin, Germany # + # (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de # + ###################################################################### + + if [ "$1" = "" -o "`echo $1 | cut -f2 -d_`" != "s.a" ] ; then + echo $0: no host shared library name specified. >&2 + exit 1 + fi + if [ ! -f $1 ] ; then + echo $0: named host shared library doesn\'t exist. >&2 + exit 1 + fi + + version="1.4" + LIB=`basename $1 | cut -f1 -d_` ; export LIB + TMPDIR=${TMPDIR:=/usr/tmp} ; export TMPDIR + + if [ ! -f ${LIB}/exports.out ] ; then + echo $0: ${LIB}/exports.out doesn\'t exist. Run mkshtmpl.sh first! >&2 + exit 1 + fi + if [ ! -f ${LIB}/imports.out ] ; then + echo $0: ${LIB}/imports.out doesn\'t exist. Run mkshtmpl.sh first! >&2 + exit 1 + fi + + echo Checking for incorrect differences of imported symbols between the + echo archive and shared version of ${LIB}... + + echo -n "Collecting all imported symbols of archive library... " + + # creating modified file with imported symbols + nawk '{ print "IMPORTED 0 " $2 }' LIB=$LIB \ + ${LIB}/imports.out >${TMPDIR}/${LIB}.imp2 + + # merge and sort by name and type + sort +2 +1 ${LIB}/exports.out ${TMPDIR}/${LIB}.imp2 >${TMPDIR}/${LIB}.oi + + # create file of imported symbols with object names of all library members + # for archive version + + nawk '{ if ($3 == IMP) print ; \ + else if ($1 == "IMPORTED") IMP=$3 ; \ + }' \ + ${TMPDIR}/${LIB}.oi >${TMPDIR}/${LIB}.aimp + + # sort by object and function + sort +0 +2 -o${TMPDIR}/${LIB}.aimp ${TMPDIR}/${LIB}.aimp + echo Done. + + + echo -n "Collecting all imported symbols of shared library... " + + # create file of imported symbols with object names of all library members + # for shared version + + nm -ep $1 | \ + nawk "\$1 ~ /lib.*\.a/ { OBJ=substr(\$1, index(\$1,\"[\")+1, \ + index(\$1,\"]\")-index(\$1,\"[\")-1) } ; \ + \$3 ~ /^_${LIB}_.*/ { print OBJ, \"0\", substr(\$3, length(\"_${LIB}_\")+1) }"\ + >${TMPDIR}/${LIB}.simp + + # sort by object and function + sort +0 +2 -o${TMPDIR}/${LIB}.simp ${TMPDIR}/${LIB}.simp + echo Done. + + echo "Comparing... " + + # merge and sort, then remove adjacent lines + sort +2 +0 +1 ${TMPDIR}/${LIB}.aimp ${TMPDIR}/${LIB}.simp | \ + nawk '{ print $2, $1, $3 }' | \ + uniq -c -1 | \ + nawk '$1 == 1 { if ($2 == "0") \ + print "WARNING: shared \"" $3 "\" imports \"" $4 \ + "\" not used in archive version" ; \ + else \ + print "ERROR: shared \"" $3 "\" DOES NOT import \"" $4 \ + "\" used in archive version" ; \ + }' >${LIB}/check.out + cat ${LIB}/check.out + echo " + These messages are recorded in ${LIB}/check.out. Check the sources and recompile + if necessary!" + echo READY. + diff -c /dev/null mit/util/mksv3shlib/datasize:1.1 *** /dev/null Sat Mar 12 00:40:01 1994 --- mit/util/mksv3shlib/datasize Sat Mar 12 00:40:01 1994 *************** *** 0 **** --- 1,34 ---- + #!/bin/sh + ###################################################################### + # datasize 1.4 # + # ------------------------------------------------------------------ # + # Compute size of .data and .bss section of an archive library # + # Copyright (c) 1992 by Thomas Wolfram, Berlin, Germany # + # (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de # + ###################################################################### + + if [ "$1" = "" ] ; then + echo $0: no archive library name specified. >&2 + exit 1 + fi + if [ ! -f $1 ] ; then + echo $0: named archive library doesn\'t exist. >&2 + exit 1 + fi + version="1.4" + LIB=`basename $1 | cut -f1 -d.` ; export LIB + TMPDIR=${TMPDIR:=/usr/tmp} ; export TMPDIR + + echo "objects in $LIB.a which data > 0:" + echo " object file = .data+.bss (.data, .bss)" + echo "--------------------------------------------" + size $1 | + nawk '$3 + $5 > 0 { printf "%15s = %10d (%5d, %5d)\n", substr($1, 1,\ + index($1, ":")-1), $3+$5, $3, $5 }' + + echo " + Summary for $LIB.a:" + size $1 | + nawk '{ DATA += $3 ; BSS += $5 }; END { print ".data=" DATA \ + ", .bss=" BSS ", .data+.bss=" DATA + BSS }' + diff -c /dev/null mit/util/mksv3shlib/mkshtmpl.sh:1.1 *** /dev/null Sat Mar 12 00:40:01 1994 --- mit/util/mksv3shlib/mkshtmpl.sh Sat Mar 12 00:40:01 1994 *************** *** 0 **** --- 1,416 ---- + #!/bin/sh + ###################################################################### + # mkshtmpl.sh 1.4 # + # ------------------------------------------------------------------ # + # Make shared library template files from archive library # + # Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany # + # (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de # + ###################################################################### + + if [ "$1" = "" ] ; then + echo $0: no archive library name specified. >&2 + exit 1 + fi + if [ ! -f $1 ] ; then + echo $0: named archive library doesn\'t exist. >&2 + exit 1 + fi + version="1.4" + LIB=`basename $1 | cut -f1 -d.` ; export LIB + TMPDIR=${TMPDIR:=/usr/tmp} ; export TMPDIR + SVR3SHLIBADDR=sv3ShlibAddr + DEPMAKEFILE=XlibsMakefile + + + if [ ! -d ${LIB} ] ; then + echo Making directory ${LIB}... + mkdir ${LIB} + fi + + echo Creating shared library description template files from archive ${LIB}.a... + + echo -n "Collecting all external references... " + # create file of all external symbols with object names + nm -ep $1 | \ + nawk '$1 ~ /lib.*\.a/ { OBJ=substr($1, index($1,"[")+1, \ + index($1,"]")-index($1,"[")-1) } ; \ + $2 ~ /^[C|D|T|U]$/ { print OBJ, $2, $3 }' >${LIB}/exports.out + echo "Done. + `cat ${LIB}/exports.out | wc -l` external references found" + + echo "Getting symbols from other libraries... " + > ${TMPDIR}/${LIB}.A + > ${TMPDIR}/${LIB}.nol + if [ -f ${DEPMAKEFILE} ] ; then + make ${LIB}.A -f ${DEPMAKEFILE} + cat ${TMPDIR}/${LIB}.A >> ${LIB}/exports.out + echo Done. + else + echo Makefile not found. + echo "****************************************************************" + echo Please check whether ${LIB}.a imports symbols you could resolve + echo via the \"#oject noload\" directive. If you want to do that + echo you must create an auxiliary makefile similar XlibsMakefile. + echo "****************************************************************" + fi + + echo -n "Getting explicit defined symbols from ${LIB}/constData... " + if [ -f ${LIB}/constData ] ; then + cat ${LIB}/constData >> ${LIB}/exports.out + echo Done. + else + echo Not found. + echo "****************************************************************" + echo WARNING! Check the library sources whether they use e.g. ANSI-C + echo style global \"const\"ant data! ANSI-C compilers place these to + echo the .text section, and this script generates then an incorrect + echo branch table entry. Hence you should create for such symbols + echo a file ${LIB}/constData containing explicit definitions like e.g.: + echo \"foo.o D size\" + echo "****************************************************************" + fi + + echo -n "Collecting all external, inside defined .text symbols... " + # sort bei name and type + sort +2 +1 -o${LIB}/exports.out ${LIB}/exports.out + # count and remove adjacent lines, counters later needed for #init table + uniq -2 -c ${LIB}/exports.out ${TMPDIR}/${LIB}.e + + nawk '$3 == "T" { print $4 }' ${TMPDIR}/${LIB}.e >${TMPDIR}/${LIB}.T + echo "Done. + `cat ${TMPDIR}/${LIB}.T | wc -l` inside defined .text symbols found" + + echo -n "Collecting all external, inside defined .data symbols... " + nawk '$3 == "C" { print $2, $4 }' ${TMPDIR}/${LIB}.e >${LIB}/common.out + if [ -s ${LIB}/common.out ] ; then + echo "" + echo "****************************************************************" + echo WARNING! Following symbols are \"common\": + echo "" + cat ${LIB}/common.out + echo "" + echo "(These names are recorded in ${LIB}/common.out)" + echo Probably you must change the appropriate source files to + echo initialize them explicitly, to force the compiler to put them + echo to the .data section!!! + echo "****************************************************************" + fi + nawk '$3 ~ /[C|D]/ { print $4 }' ${TMPDIR}/${LIB}.e >${TMPDIR}/${LIB}.CD + echo "Done. + `cat ${TMPDIR}/${LIB}.CD | wc -l` inside defined .data symbols found" + + echo "Collecting all outside references (imported symbols)... " + nawk '$3 == "U" { print $1, $4, $2 }' ${TMPDIR}/${LIB}.e >${LIB}/imports.out + + echo -n "Getting additional imported symbols from ${LIB}/addImports... " + if [ -f ${LIB}/addImports ] ; then + cat ${LIB}/addImports >> ${LIB}/imports.out + echo Done. + else + echo File not found. + fi + echo "Done. + `cat ${LIB}/imports.out | wc -l` imported symbols found" + + # create import.h + # ------------------------------------------------------------------- + + echo -n "Creating ${LIB}/${LIB}.h (this is import.h)... " + echo "/* ${LIB} : import.h + * indirection defines + * Template created by $0 $version + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + */ + + #ifndef _${LIB}_import + #define _${LIB}_import + #if defined(SVR3SHLIB) && !defined(SVR3SHDAT) + " > ${LIB}/${LIB}.h + nawk ' + { if ($2 == "stat") { + print "/* prevent name conflict with struct stat */" ; + print "#define " $2 "(path, buf) (*_" LIB "_" $2 ")(path, buf)" + } + else { + if ($2 == "free") { + print "/* prevent name conflict with member free of XFontSetMethods */" ; + print "#define " $2 "(ptr) (*_" LIB "_" $2 ")(ptr)" + } + else { + if ($2 == "close") { + print "/* prevent name conflict with member close of XIM */" ; + print "#define " $2 "(fd) (*_" LIB "_" $2 ")(fd)" + } + else { + if ($2 == "select") { + print "/* prevent name conflict with bitfield select of _XtEventRec */" ; + print "#define " $2 "(max, rd, wr, ex, to) (*_" LIB "_" $2 ")(max, rd, wr, ex, to)" + } + else print "#define " $2 " (*_" LIB "_" $2 ")" + } + } + } + }' LIB=${LIB} ${LIB}/imports.out >>${LIB}/${LIB}.h + + echo " + + /* Imported functions declarations + * Why declaring some imported functions here? + * This should be done gracefully through including of the systems + * header files. Unfortunatly there are some source files don't + * include all headers they should include, there are also some functions + * nowhere declared in the systems headers and some are declared + * without "extern" and cause problems since the names are redefined + * and these declarations then become undesired false pointer definitions. + */ + + /* This section needs editing! It's only an example for the X libs. */ + + #ifdef __STDC__ + extern int creat(char const *, unsigned short); + extern void exit(int); + extern int printf(char const *, ...); + extern int sprintf(char *, char const *, ...); + extern int sscanf(char *, char const *, ...); + extern int atoi(char const *); + extern int access(char const *, int); + extern unsigned int alarm(unsigned int); + extern unsigned int sleep(unsigned int); + extern int close(int); + extern int read(int, char *, unsigned int); + extern int write(int, char const *, unsigned int); + extern int grantpt(int); + extern char *ptsname(int); + extern int unlockpt(int); + extern char *getenv(char const *); + #else + extern int creat(); + extern void exit(); + extern int printf(); + extern int sprintf(); + extern int sscanf(); + extern int atoi(); + extern int access(); + extern unsigned int alarm(); + extern unsigned int sleep(); + extern int close(); + extern int read(); + extern int write(); + extern int grantpt(); + extern char *ptsname(); + extern int unlockpt(); + extern char *getenv(); + #endif + + /* use char * also for __STDC__, the sources want it */ + extern char *malloc(), *realloc(), *calloc(); + + #include + + extern char *sys_errlist[]; + extern int sys_nerr; + + extern void qsort(); + extern int _flsbuf(); + extern int _filbuf(); + extern int ioctl(); + extern int getmsg(); + extern int putmsg(); + + extern unsigned short ntohs(), htons(); + extern unsigned long ntohl(), htonl(); + extern unsigned long inet_addr(); + extern int connect(); + extern int gethostname(); + extern int setsockopt(); + extern int socket(); + extern int writev(); + extern int gettimeofday(); + " >> ${LIB}/${LIB}.h + + echo " + /* Functions with ambiguous names */ + + #ifdef __STDC__ + extern int close(int); + extern void free(void *); + #include + #include + extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); + #else + extern int (*_${LIB}_close)(); + extern void (*_${LIB}_free)(); + extern int (*_${LIB}_select)(); + #endif + + #endif + #endif + " >> ${LIB}/${LIB}.h + echo Done. + + + # create globals.c + # ------------------------------------------------------------------- + + echo -n "Creating ${LIB}/${LIB}.c (this is globals.c or part of globals.c)... " + echo "/* ${LIB} : ${LIB}.c + * exported data + * Template created by $0 $version + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + */ + + #ifdef SVR3SHLIB + + #define VoidInit(var) void *var = 0 + " >${LIB}/${LIB}.c + nawk '{ print "VoidInit(_" LIB "_" $2 ");" }' LIB=${LIB} \ + ${LIB}/imports.out >>${LIB}/${LIB}.c + echo " + + #ifndef __GNUC__ + /* + * If we are working with floating point aritmetic, stock AT&T cc generates + * an unresolved reference to __fltused. But we want to make a shared lib from + * this here and don't want to reference /lib/libc_s.a, just define this sym as + * (shared lib) static. + * The trick is that while building the shared lib all references to this + * symbol are resolved internally. But the symbol will be outside only visible + * as a static one, so preventing a name conflict with other shared libs. + */ + long __fltused = 0; + #endif + + /* + * A free place for free branchtab-slots. + * + * This would be a great place for an error-check mechanism for shared libs ... + */ + extern void _${LIB}_dummy() {}; + + #endif + + " >>${LIB}/${LIB}.c + echo Done. + + + # create lib*.def + # ------------------------------------------------------------------- + + echo Creating ${LIB}/${LIB}.def... + echo -n "Creating #address statements... " + TEXT_ADR=`grep ${LIB} ${SVR3SHLIBADDR} | cut -f2 -d:` + DATA_ADR=`grep ${LIB} ${SVR3SHLIBADDR} | cut -f3 -d:` + echo "/* ${LIB} : ${LIB}.def + * shared library description file + * Template created by $0 $version + * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany + * (thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de) + * Conception derived from work of Thomas Roell + */ + + /**/#address .text 0x${TEXT_ADR} + /**/#address .data 0x${DATA_ADR} + + " > ${LIB}/${LIB}.def + + if [ -s ${TMPDIR}/${LIB}.nol ] ; then + echo "/**/#objects noload" >> ${LIB}/${LIB}.def + cat ${TMPDIR}/${LIB}.nol >> ${LIB}/${LIB}.def + fi + + echo " + /**/#branch" >> ${LIB}/${LIB}.def + echo Done. + + echo -n "Creating #branch table from exported .text symbols... " + nawk '{ print $1, ++BRANCH }; END { print ; \ + print "_" LIB "_dummy " ++BRANCH "-???" }' LIB=${LIB} ${TMPDIR}/${LIB}.T >> ${LIB}/${LIB}.def + echo "/* ^^^must be edited^^^ */" >> ${LIB}/${LIB}.def + echo Done. + + echo -n "Creating #objects table... " + echo " + + /**/#objects + DOWN/globals.o /* All objects with global data must be at come first!*/" \ + >> ${LIB}/${LIB}.def + ar t $1 | egrep -v '^globals.o$' | sort >${TMPDIR}/${LIB}.objs + nawk '{ print "DOWN/" $1 }' ${TMPDIR}/${LIB}.objs >> ${LIB}/${LIB}.def + echo Done. + + # put initialization code of indirection defines to global.o if it is + # used more than once, if only once put it to respective object + # file (arbitrary algorithm) + echo -n "Creating #init tables... " + echo " + + /* init sections needs editing! + */ + + /**/#init globals.o" >> ${LIB}/${LIB}.def + nawk '$1 > 1 { print "_" LIB "_" $2 " " $2 }' LIB=${LIB} \ + ${LIB}/imports.out >> ${LIB}/${LIB}.def + # sort by object name + sort +2 -o${LIB}/imports.out ${LIB}/imports.out + nawk '$1 == 1 { if ($3 != OBJ) { OBJ=$3 ; print "" ; \ + print "/**/#init " $3 } ; print "_" LIB "_" $2 " " $2 }' \ + LIB=${LIB} ${LIB}/imports.out >> ${LIB}/${LIB}.def + echo Done. + + # here just guess... + echo -n "Creating #hide/#export linker section... " + echo " + + /* This section needs editing! Check which + * symbols must be really extern. + */ + + /**/#hide linker * + /**/#export linker" >> ${LIB}/${LIB}.def + cat ${TMPDIR}/${LIB}.CD >>${LIB}/${LIB}.def + echo Done. + + + echo -n "Creating dummy trailer... " + echo " + + /**/#libraries + /* Here can objects be specified, which will extracted from + * an specified archive library and then linked to the shared + * library. This can avoid unwanted referencin