*** xc/include/extensions/Imakefile.link Thu Apr 7 15:03:20 1994 --- xc/include/extensions/Imakefile Mon Feb 6 10:18:37 1995 *************** *** 1,8 **** XCOMM $XConsortium: Imakefile,v 1.37 94/04/07 15:03:02 rws Exp $ HEADERS = Xext.h multibuf.h shape.h XShm.h MITMisc.h XI.h XInput.h XIproto.h \ XTest.h xtestext1.h XIE.h XIEproto.h XIEprotost.h \ ! sync.h XKB.h XKBproto.h XKBstr.h all:: --- 1,12 ---- XCOMM $XConsortium: Imakefile,v 1.37 94/04/07 15:03:02 rws Exp $ + #ifdef i386Architecture + XVGAHELPHEADERS = VGAHelp.h VGAHelpstr.h + #endif + HEADERS = Xext.h multibuf.h shape.h XShm.h MITMisc.h XI.h XInput.h XIproto.h \ XTest.h xtestext1.h XIE.h XIEproto.h XIEprotost.h \ ! sync.h XKB.h XKBproto.h XKBstr.h $(XVGAHELPHEADERS) all:: *** /dev/null Mon Jan 9 15:32:05 1995 --- xc/include/extensions/VGAHelp.h Mon Feb 6 10:57:55 1995 *************** *** 0 **** --- 1,92 ---- + + /* + + Copyright (c) 1995 Kaleb S. KEITHLEY + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES + OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the Kaleb S. KEITHLEY + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + from the Kaleb S. KEITHLEY + + */ + /* THIS IS NOT AN X CONSORTIUM STANDARD */ + + #ifndef _XVGAHELP_H_ + #define _XVGAHELP_H_ + + #include + + #define X_VGAHelpQueryVersion 0 + #define X_VGAHelpGetModeLine 1 + #define X_VGAHelpModModeLine 2 + + #define VGAHelpNumberEvents 0 + + #define BadClock 0 + #define VGAHelpNumberErrors (BadClock + 1) + + #ifndef _XVGAHELP_SERVER_ + + typedef struct { + unsigned short hdisplay; + unsigned short hsyncstart; + unsigned short hsyncend; + unsigned short htotal; + unsigned short vdisplay; + unsigned short vsyncstart; + unsigned short vsyncend; + unsigned short vtotal; + unsigned int flags; + } XVGAHelpModeLine; + + _XFUNCPROTOBEGIN + + Bool XVGAHelpQueryVersion( + #if NeedFunctionPrototypes + Display* /* dpy */, + int* /* majorVersion */, + int* /* minorVersion */ + #endif + ); + + Status XVGAHelpGetModeLine( + #if NeedFunctionPrototypes + Display* /* dpy */, + int /* screen */, + int* /* dotclock */, + XVGAHelpModeLine* /* modeline */ + #endif + ); + + Status XVGAHelpModModeLine( + #if NeedFunctionPrototypes + Display* /* dpy */, + int /* screen */, + XVGAHelpModeLine* /* modeline */ + #endif + ); + + _XFUNCPROTOEND + + #endif + + #endif *** /dev/null Mon Jan 9 15:32:05 1995 --- xc/include/extensions/VGAHelpstr.h Mon Feb 6 10:57:59 1995 *************** *** 0 **** --- 1,110 ---- + + /* + + Copyright (c) 1995 Kaleb S. KEITHLEY + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES + OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the Kaleb S. KEITHLEY + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + from the Kaleb S. KEITHLEY + + */ + /* THIS IS NOT AN X CONSORTIUM STANDARD */ + + #ifndef _XVGASTR_H_ + #define _XVGASTR_H_ + + #include "VGAHelp.h" + + #define VGAHELPNAME "VGAHELP" + + #define VGAHELP_MAJOR_VERSION 0 /* current version numbers */ + #define VGAHELP_MINOR_VERSION 0 + + typedef struct _VGAHelpQueryVersion { + CARD8 reqType; /* always VgaHelpReqCode */ + CARD8 vgahelpReqType; /* always X_VGAHelpQueryVersion */ + CARD16 length B16; + } xVGAHelpQueryVersionReq; + #define sz_xVGAHelpQueryVersionReq 4 + + typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of VGAHelp protocol */ + CARD16 minorVersion B16; /* minor version of VGAHelp protocol */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + } xVGAHelpQueryVersionReply; + #define sz_xVGAHelpQueryVersionReply 32 + + typedef struct _VGAHelpGetModeLine { + CARD8 reqType; /* always VgaHelpReqCode */ + CARD8 vgahelpReqType; /* always X_VGAHelpGetModeLine */ + CARD16 length B16; + CARD16 screen B16; + CARD16 pad B16; + } xVGAHelpGetModeLineReq; + #define sz_xVGAHelpGetModeLineReq 8 + + typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 dotclock B32; + CARD16 hdisplay B16; + CARD16 hsyncstart B16; + CARD16 hsyncend B16; + CARD16 htotal B16; + CARD16 vdisplay B16; + CARD16 vsyncstart B16; + CARD16 vsyncend B16; + CARD16 vtotal B16; + CARD32 flags B32; + } xVGAHelpGetModeLineReply; + #define sz_xVGAHelpGetModeLineReply 32 + + typedef struct _VGAHelpModModeLine { + CARD8 reqType; /* always VgaHelpReqCode */ + CARD8 vgahelpReqType; /* always X_VGAHelpModModeLine */ + CARD16 length B16; + CARD32 screen B32; + CARD16 hdisplay B16; + CARD16 hsyncstart B16; + CARD16 hsyncend B16; + CARD16 htotal B16; + CARD16 vdisplay B16; + CARD16 vsyncstart B16; + CARD16 vsyncend B16; + CARD16 vtotal B16; + CARD32 flags B32; + CARD32 pad B32; + } xVGAHelpModModeLineReq; + #define sz_xVGAHelpModModeLineReq 32 + + #endif /* _XVGASTR_H_ */ *** xc/lib/Xext/Imakefile.link Thu Apr 7 15:05:42 1994 --- xc/lib/Xext/Imakefile Mon Feb 6 10:18:37 1995 *************** *** 17,22 **** --- 17,26 ---- SHMSRCS = XShm.c SHMOBJS = XShm.o #endif + #if BuildVGAHelp + VGAHELPSRCS = VGAHelp.c + VGAHELPOBJS = VGAHelp.o + #endif #if Malloc0ReturnsNull ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL *************** *** 25,33 **** DEFINES = $(ALLOC_DEFINES) INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = globals.c extutil.c XMultibuf.c XShape.c $(SHMSRCS) \ ! MITMisc.c XTestExt1.c XSync.c OBJS = globals.o extutil.o XMultibuf.o XShape.o $(SHMOBJS) \ ! MITMisc.o XTestExt1.o XSync.o LINTLIBS = $(LINTXLIB) #include --- 29,37 ---- DEFINES = $(ALLOC_DEFINES) INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) SRCS = globals.c extutil.c XMultibuf.c XShape.c $(SHMSRCS) \ ! MITMisc.c XTestExt1.c XSync.c $(VGAHELPSRCS) OBJS = globals.o extutil.o XMultibuf.o XShape.o $(SHMOBJS) \ ! MITMisc.o XTestExt1.o XSync.o $(VGAHELPOBJS) LINTLIBS = $(LINTXLIB) #include *** /dev/null Mon Jan 9 15:32:05 1995 --- xc/lib/Xext/VGAHelp.c Mon Feb 6 10:58:19 1995 *************** *** 0 **** --- 1,188 ---- + + /* + + Copyright (c) 1995 Kaleb S. KEITHLEY + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES + OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the Kaleb S. KEITHLEY + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + from the Kaleb S. KEITHLEY. + + */ + /* THIS IS NOT AN X CONSORTIUM STANDARD */ + + #define NEED_EVENTS + #define NEED_REPLIES + #include "Xlibint.h" + #include "VGAHelpstr.h" + #include "Xext.h" + #include "extutil.h" + + static XExtensionInfo _vgahelp_info_data; + static XExtensionInfo *vgahelp_info = &_vgahelp_info_data; + static char *vgahelp_extension_name = VGAHELPNAME; + + #define VGAHelpCheckExtension(dpy,i,val) \ + XextCheckExtension (dpy, i, vgahelp_extension_name, val) + + /***************************************************************************** + * * + * private utility routines * + * * + *****************************************************************************/ + + static int close_display(); + static /* const */ XExtensionHooks vgahelp_extension_hooks = { + NULL, /* create_gc */ + NULL, /* copy_gc */ + NULL, /* flush_gc */ + NULL, /* free_gc */ + NULL, /* create_font */ + NULL, /* free_font */ + close_display, /* close_display */ + NULL, /* wire_to_event */ + NULL, /* event_to_wire */ + NULL, /* error */ + NULL, /* error_string */ + }; + + static XEXT_GENERATE_FIND_DISPLAY (find_display, vgahelp_info, + vgahelp_extension_name, + &vgahelp_extension_hooks, + 0, NULL) + + static XEXT_GENERATE_CLOSE_DISPLAY (close_display, vgahelp_info) + + + /***************************************************************************** + * * + * public Shared Memory Extension routines * + * * + *****************************************************************************/ + + Bool XVGAHelpQueryExtension (dpy /* event_basep, error_basep */) + Display *dpy; + /* int *event_basep, *error_basep; */ + { + XExtDisplayInfo *info = find_display (dpy); + + if (XextHasExtension(info)) { + /* *event_basep = info->codes->first_event; + *error_basep = info->codes->error_event; */ + return True; + } else { + return False; + } + } + + Bool XVGAHelpQueryVersion(dpy, majorVersion, minorVersion) + Display* dpy; + int* majorVersion; + int* minorVersion; + { + XExtDisplayInfo *info = find_display (dpy); + xVGAHelpQueryVersionReply rep; + xVGAHelpQueryVersionReq *req; + + VGAHelpCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VGAHelpQueryVersion, req); + req->reqType = info->codes->major_opcode; + req->vgahelpReqType = X_VGAHelpQueryVersion; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + *majorVersion = rep.majorVersion; + *minorVersion = rep.minorVersion; + UnlockDisplay(dpy); + SyncHandle(); + return True; + } + + Bool XVGAHelpGetModeLine(dpy, screen, dotclock, modeline) + Display* dpy; + int screen; + int* dotclock; + XVGAHelpModeLine* modeline; + { + XExtDisplayInfo *info = find_display (dpy); + xVGAHelpGetModeLineReply rep; + xVGAHelpGetModeLineReq *req; + + VGAHelpCheckExtension (dpy, info, False); + + LockDisplay(dpy); + GetReq(VGAHelpGetModeLine, req); + req->reqType = info->codes->major_opcode; + req->vgahelpReqType = X_VGAHelpGetModeLine; + req->screen = screen; + if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) { + UnlockDisplay(dpy); + SyncHandle(); + return False; + } + *dotclock = rep.dotclock; + modeline->hdisplay = rep.hdisplay; + modeline->hsyncstart = rep.hsyncstart; + modeline->hsyncend = rep.hsyncend; + modeline->htotal = rep.htotal; + modeline->vdisplay = rep.vdisplay; + modeline->vsyncstart = rep.vsyncstart; + modeline->vsyncend = rep.vsyncend; + modeline->vtotal = rep.vtotal; + modeline->flags = rep.flags; + UnlockDisplay(dpy); + SyncHandle(); + return True; + } + + Bool XVGAHelpModModeLine (dpy, screen, modeline) + Display *dpy; + int screen; + XVGAHelpModeLine* modeline; + { + XExtDisplayInfo *info = find_display (dpy); + xVGAHelpModModeLineReq *req; + + VGAHelpCheckExtension (dpy, info, 0); + + LockDisplay(dpy); + GetReq(VGAHelpModModeLine, req); + req->reqType = info->codes->major_opcode; + req->vgahelpReqType = X_VGAHelpModModeLine; + req->screen = screen; + req->hdisplay = modeline->hdisplay; + req->hsyncstart = modeline->hsyncstart; + req->hsyncend = modeline->hsyncend; + req->htotal = modeline->htotal; + req->vdisplay = modeline->vdisplay; + req->vsyncstart = modeline->vsyncstart; + req->vsyncend = modeline->vsyncend; + req->vtotal = modeline->vtotal; + req->flags = modeline->flags; + UnlockDisplay(dpy); + SyncHandle(); + return True; + } *** xc/programs/Xserver/Xext/Imakefile.link Mon Nov 21 13:30:18 1994 --- xc/programs/Xserver/Xext/Imakefile Mon Feb 6 10:18:37 1995 *************** *** 5,16 **** SHMSRCS = shm.c SHMOBJS = shm.o #endif SRCS = shape.c $(SHMSRCS) mbuf.c mbufpx.c mbufbf.c \ mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ ! bigreq.c sync.c xcmisc.c OBJS = shape.o $(SHMOBJS) mbuf.o mbufpx.o mbufbf.o \ mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ ! bigreq.o sync.o xcmisc.o INCLUDES = -I../include -I$(INCLUDESRC) -I$(EXTINCSRC) LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln --- 5,20 ---- SHMSRCS = shm.c SHMOBJS = shm.o #endif + #ifdef i386Architecture + VGAHELPSRCS = vgahelp.c + VGAHELPOBJS = vgahelp.o + #endif SRCS = shape.c $(SHMSRCS) mbuf.c mbufpx.c mbufbf.c \ mitmisc.c xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ ! bigreq.c sync.c xcmisc.c $(VGAHELPSRCS) OBJS = shape.o $(SHMOBJS) mbuf.o mbufpx.o mbufbf.o \ mitmisc.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ ! bigreq.o sync.o xcmisc.o $(VGAHELPOBJS) INCLUDES = -I../include -I$(INCLUDESRC) -I$(EXTINCSRC) LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln *** /dev/null Mon Jan 9 15:32:05 1995 --- xc/programs/Xserver/Xext/vgahelp.c Tue Feb 14 10:23:49 1995 *************** *** 0 **** --- 1,290 ---- + + /* + + Copyright (c) 1995 Kaleb S. KEITHLEY + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES + OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + Except as contained in this notice, the name of the Kaleb S. KEITHLEY + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + from the Kaleb S. KEITHLEY + + */ + /* THIS IS NOT AN X CONSORTIUM STANDARD */ + + #define NEED_REPLIES + #define NEED_EVENTS + #include "X.h" + #include "Xproto.h" + #include "misc.h" + #include "dixstruct.h" + #include "extnsionst.h" + #include "scrnintstr.h" + #include "servermd.h" + #define _XVGAHELP_SERVER_ + #include "VGAHelpstr.h" + #include "Xfuncproto.h" + #include "../hw/xfree86/common/xf86.h" + + extern int xf86ScreenIndex; + + static int ProcVGAHelpDispatch(), SProcVGAHelpDispatch(); + static void VGAHelpResetProc(); + + static unsigned char VGAHelpReqCode; + + void + VGAHelpExtensionInit(argc, argv) + int argc; + char** argv; + { + ExtensionEntry* extEntry; + int i; + + for (i = 1; i < argc; i++) { + if (strcmp (argv[i], "+vgahelp") == 0) { + if (extEntry = AddExtension(VGAHELPNAME, + VGAHelpNumberEvents, + VGAHelpNumberErrors, + ProcVGAHelpDispatch, + SProcVGAHelpDispatch, + VGAHelpResetProc, + StandardMinorOpcode)) { + VGAHelpReqCode = (unsigned char)extEntry->base; + } + } + } + } + + /*ARGSUSED*/ + static void + VGAHelpResetProc (extEntry) + ExtensionEntry* extEntry; + { + } + + static int + ProcVGAHelpQueryVersion(client) + register ClientPtr client; + { + REQUEST(xVGAHelpQueryVersionReq); + xVGAHelpQueryVersionReply rep; + register int n; + + REQUEST_SIZE_MATCH(xVGAHelpQueryVersionReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = VGAHELP_MAJOR_VERSION; + rep.minorVersion = VGAHELP_MINOR_VERSION; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + } + WriteToClient(client, sizeof(xVGAHelpQueryVersionReply), (char *)&rep); + return (client->noClientException); + } + + static int + ProcVGAHelpGetModeLine(client) + register ClientPtr client; + { + REQUEST(xVGAHelpGetModeLineReq); + xVGAHelpGetModeLineReply rep; + register int n; + ScrnInfoPtr vptr; + DisplayModePtr mptr; + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; + mptr = vptr->modes; + + REQUEST_SIZE_MATCH(xVGAHelpGetModeLineReq); + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.dotclock = vptr->clock[mptr->Clock]; + rep.hdisplay = mptr->HDisplay; + rep.hsyncstart = mptr->HSyncStart; + rep.hsyncend = mptr->HSyncEnd; + rep.htotal = mptr->HTotal; + rep.vdisplay = mptr->VDisplay; + rep.vsyncstart = mptr->VSyncStart; + rep.vsyncend = mptr->VSyncEnd; + rep.vtotal = mptr->VTotal; + rep.flags = mptr->Flags; + if (client->swapped) { + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swapl(&rep.dotclock, n); + swaps(&rep.hdisplay, n); + swaps(&rep.hsyncstart, n); + swaps(&rep.hsyncend, n); + swaps(&rep.htotal, n); + swaps(&rep.vdisplay, n); + swaps(&rep.vsyncstart, n); + swaps(&rep.vsyncend, n); + swaps(&rep.vtotal, n); + swapl(&rep.flags, n); + } + WriteToClient(client, sizeof(xVGAHelpGetModeLineReply), (char *)&rep); + return (client->noClientException); + } + + static int + ProcVGAHelpModModeLine(client) + register ClientPtr client; + { + register int n; + REQUEST(xVGAHelpModModeLineReq); + ScrnInfoPtr vptr; + DisplayModePtr mptr; + + if (stuff->screen > screenInfo.numScreens) + return BadValue; + + vptr = (ScrnInfoPtr) screenInfo.screens[stuff->screen]->devPrivates[xf86ScreenIndex].ptr; + mptr = vptr->modes; + + REQUEST_SIZE_MATCH(xVGAHelpModModeLineReq); + + if (stuff->hsyncstart < stuff->hdisplay || + stuff->hsyncend < stuff->hsyncstart || + stuff->htotal < stuff->hsyncend || + stuff->vsyncstart < stuff->vdisplay || + stuff->vsyncend < stuff->vsyncstart || + stuff->vtotal < stuff->vsyncend) + return BadValue; + + mptr->HDisplay = stuff->hdisplay; + mptr->HSyncStart = stuff->hsyncstart; + mptr->HSyncEnd = stuff->hsyncend; + mptr->HTotal = stuff->htotal; + mptr->VDisplay = stuff->vdisplay; + mptr->VSyncStart = stuff->vsyncstart; + mptr->VSyncEnd = stuff->vsyncend; + mptr->VTotal = stuff->vtotal; + /* Should call ValidMode */ + mptr->CrtcHDisplay = stuff->hdisplay; + mptr->CrtcHSyncStart = stuff->hsyncstart; + mptr->CrtcHSyncEnd = stuff->hsyncend; + mptr->CrtcHTotal = stuff->htotal; + mptr->CrtcVDisplay = stuff->vdisplay; + mptr->CrtcVSyncStart = stuff->vsyncstart; + mptr->CrtcVSyncEnd = stuff->vsyncend; + mptr->CrtcVTotal = stuff->vtotal; + mptr->CrtcVAdjusted = FALSE; + mptr->CrtcHAdjusted = FALSE; + mptr->Flags = stuff->flags; + if (mptr->Flags & V_DBLSCAN) + { + mptr->CrtcVDisplay *= 2; + mptr->CrtcVSyncStart *= 2; + mptr->CrtcVSyncEnd *= 2; + mptr->CrtcVTotal *= 2; + mptr->CrtcVAdjusted = TRUE; + } + + (vptr->SwitchMode)(mptr); + + return(client->noClientException); + } + + static int + ProcVGAHelpDispatch (client) + register ClientPtr client; + { + REQUEST(xReq); + switch (stuff->data) + { + case X_VGAHelpQueryVersion: + return ProcVGAHelpQueryVersion(client); + case X_VGAHelpGetModeLine: + return ProcVGAHelpGetModeLine(client); + case X_VGAHelpModModeLine: + return ProcVGAHelpModModeLine(client); + default: + return BadRequest; + } + } + + static int + SProcVGAHelpQueryVersion(client) + register ClientPtr client; + { + register int n; + REQUEST(xVGAHelpQueryVersionReq); + swaps(&stuff->length, n); + return ProcVGAHelpQueryVersion(client); + } + + static int + SProcVGAHelpGetModeLine(client) + ClientPtr client; + { + register int n; + REQUEST(xVGAHelpGetModeLineReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xVGAHelpGetModeLineReq); + swapl(&stuff->screen, n); + return ProcVGAHelpGetModeLine(client); + } + + static int + SProcVGAHelpModModeLine(client) + ClientPtr client; + { + register int n; + REQUEST(xVGAHelpModModeLineReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xVGAHelpModModeLineReq); + swapl(&stuff->screen, n); + swaps(&stuff->hdisplay, n); + swaps(&stuff->hsyncstart, n); + swaps(&stuff->hsyncend, n); + swaps(&stuff->htotal, n); + swaps(&stuff->vdisplay, n); + swaps(&stuff->vsyncstart, n); + swaps(&stuff->vsyncend, n); + swaps(&stuff->vtotal, n); + swapl(&stuff->flags, n); + return ProcVGAHelpModModeLine(client); + } + + static int + SProcVGAHelpDispatch (client) + register ClientPtr client; + { + REQUEST(xReq); + switch (stuff->data) + { + case X_VGAHelpQueryVersion: + return SProcVGAHelpQueryVersion(client); + case X_VGAHelpGetModeLine: + return SProcVGAHelpGetModeLine(client); + case X_VGAHelpModModeLine: + return SProcVGAHelpModModeLine(client); + default: + return BadRequest; + } + } *** xc/programs/Xserver/mi/miinitext.c.link Tue Aug 2 11:02:17 1994 --- xc/programs/Xserver/mi/miinitext.c Tue Feb 14 10:24:59 1995 *************** *** 118,123 **** --- 118,131 ---- #ifdef LBX extern void LbxExtensionInit(); #endif + #ifdef VGAHELP + extern void VGAHelpExtensionInit( + #if NeedFunctionPrototypes + int /* argc */, + char** /* argv */ + #endif + ); + #endif /*ARGSUSED*/ void *************** *** 184,188 **** --- 192,199 ---- #endif #ifdef LBX LbxExtensionInit(); + #endif + #ifdef VGAHELP + VGAHelpExtensionInit(argc, argv); #endif } *** xc/programs/Xserver/hw/xfree86/commonxf86Init.c.link Mon Jan 16 12:14:28 1995 --- xc/programs/Xserver/hw/xfree86/commonxf86Init.c Tue Mar 28 11:16:53 1995 *************** *** 455,460 **** --- 455,464 ---- xf86Verbose = FALSE; return 1; } + if (!strcmp(argv[i],"+vgahelp")) + { + return 1; + } if (!strcmp(argv[i],"-showconfig")) { xf86PrintConfig();