diff options
author | marha <marha@users.sourceforge.net> | 2012-04-16 09:17:34 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-04-16 09:17:34 +0200 |
commit | d6d3999ccb2cb72d55820770260172eccbbb68d7 (patch) | |
tree | 568ce82dd1a8e2edbbe8cd4cb5ab5b14157f34f6 /xorg-server/hw | |
parent | fffd436e9c2ec6f5aa501ee57d0e4ade7293ee60 (diff) | |
download | vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.gz vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.tar.bz2 vcxsrv-d6d3999ccb2cb72d55820770260172eccbbb68d7.zip |
libX11 xserver pixman mesa git update 16 Apr 2012
Diffstat (limited to 'xorg-server/hw')
167 files changed, 5905 insertions, 5820 deletions
diff --git a/xorg-server/hw/dmx/config/Canvas.h b/xorg-server/hw/dmx/config/Canvas.h index fe9a57f21..d516faf93 100644 --- a/xorg-server/hw/dmx/config/Canvas.h +++ b/xorg-server/hw/dmx/config/Canvas.h @@ -47,9 +47,9 @@ typedef struct _CanvasRec *CanvasWidget; extern WidgetClass canvasWidgetClass; typedef struct _CanvasExposeDataRec { - Widget w; - XEvent *event; - Region region; + Widget w; + XEvent *event; + Region region; } CanvasExposeDataRec, *CanvasExposeDataPtr; -#endif /* _Canvas_h */ +#endif /* _Canvas_h */ diff --git a/xorg-server/hw/dmx/config/CanvasP.h b/xorg-server/hw/dmx/config/CanvasP.h index cf43710f1..b1ccf2497 100644 --- a/xorg-server/hw/dmx/config/CanvasP.h +++ b/xorg-server/hw/dmx/config/CanvasP.h @@ -45,8 +45,8 @@ typedef struct { } CanvasClassPart; typedef struct _CanvasClassRec { - CoreClassPart core_class; - CanvasClassPart canvas_class; + CoreClassPart core_class; + CanvasClassPart canvas_class; } CanvasClassRec; extern CanvasClassRec canvasClassRec; @@ -58,8 +58,8 @@ typedef struct { } CanvasPart; typedef struct _CanvasRec { - CorePart core; - CanvasPart canvas; + CorePart core; + CanvasPart canvas; } CanvasRec; -#endif /* _CanvasP_h */ +#endif /* _CanvasP_h */ diff --git a/xorg-server/hw/dmx/config/dmxconfig.h b/xorg-server/hw/dmx/config/dmxconfig.h index 91a6662e3..deb293cc0 100644 --- a/xorg-server/hw/dmx/config/dmxconfig.h +++ b/xorg-server/hw/dmx/config/dmxconfig.h @@ -40,8 +40,8 @@ #include <xkb-config.h> extern void dmxConfigStoreDisplay(const char *display); -extern void dmxConfigStoreInput(const char *input); /* Core devices */ -extern void dmxConfigStoreXInput(const char *input); /* Non-core devices */ +extern void dmxConfigStoreInput(const char *input); /* Core devices */ +extern void dmxConfigStoreXInput(const char *input); /* Non-core devices */ extern void dmxConfigStoreFile(const char *file); extern void dmxConfigStoreConfig(const char *config); extern void dmxConfigConfigure(void); diff --git a/xorg-server/hw/dmx/config/dmxprint.h b/xorg-server/hw/dmx/config/dmxprint.h index d162dea95..d77bafce2 100644 --- a/xorg-server/hw/dmx/config/dmxprint.h +++ b/xorg-server/hw/dmx/config/dmxprint.h @@ -37,7 +37,7 @@ #ifndef _DMXPRINT_H_ #define _DMXPRINT_H_ -void dmxConfigPrint(FILE *str, DMXConfigEntryPtr entry); -void dmxConfigVirtualPrint(FILE *str, DMXConfigVirtualPtr p); +void dmxConfigPrint(FILE * str, DMXConfigEntryPtr entry); +void dmxConfigVirtualPrint(FILE * str, DMXConfigVirtualPtr p); #endif diff --git a/xorg-server/hw/dmx/dmx-config.h b/xorg-server/hw/dmx/dmx-config.h index 1fda69f45..c435ece2e 100644 --- a/xorg-server/hw/dmx/dmx-config.h +++ b/xorg-server/hw/dmx/dmx-config.h @@ -72,4 +72,4 @@ /* Enable the DMX extension */ #define DMXEXT -#endif /* DMX_CONFIG_H */ +#endif /* DMX_CONFIG_H */ diff --git a/xorg-server/hw/dmx/dmx.h b/xorg-server/hw/dmx/dmx.h index dc5d25e16..d7c620467 100644 --- a/xorg-server/hw/dmx/dmx.h +++ b/xorg-server/hw/dmx/dmx.h @@ -1,388 +1,410 @@ -/*
- * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * 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 on 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 (including the
- * next paragraph) 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- * David H. Dawes <dawes@xfree86.org>
- * Rickard E. (Rik) Faith <faith@redhat.com>
- *
- */
-
-/** \file
- * Main header file included by all other DMX-related files.
- */
-
-/** \mainpage
- * - <a href="http://dmx.sourceforge.net">DMX Home Page</a>
- * - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on
- * Source Forge)</a>
- * - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead
- * X design</a>, the design document for DMX
- * - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server
- * DMX Extension to the X Protocol</a>
- */
-
-#ifndef DMX_H
-#define DMX_H
-
-#if HAVE_DMX_CONFIG_H
-#include <dmx-config.h>
-#endif
-
-#include "gcstruct.h"
-
-/* Handle client-side include files in one place. */
-#include "dmxclient.h"
-
-#include "globals.h"
-#include "scrnintstr.h"
-
-#include "picturestr.h"
-
-#ifdef GLXEXT
-#include <GL/glx.h>
-#include <GL/glxint.h>
-#endif
-
-typedef enum {
- PosNone = -1,
- PosAbsolute = 0,
- PosRightOf,
- PosLeftOf,
- PosAbove,
- PosBelow,
- PosRelative
-} PositionType;
-
-/** Provide the typedef globally, but keep the contents opaque outside
- * of the input routines. \see dmxinput.h */
-typedef struct _DMXInputInfo DMXInputInfo;
-
-/** Provide the typedef globally, but keep the contents opaque outside
- * of the XSync statistic routines. \see dmxstat.c */
-typedef struct _DMXStatInfo DMXStatInfo;
-
-/** Global structure containing information about each backend screen. */
-typedef struct _DMXScreenInfo {
- const char *name; /**< Name from command line or config file */
- int index; /**< Index into dmxScreens global */
-
- /*---------- Back-end X server information ----------*/
-
- Display *beDisplay; /**< Back-end X server's display */
- int beWidth; /**< Width of BE display */
- int beHeight; /**< Height of BE display */
- int beDepth; /**< Depth of BE display */
- int beBPP; /**< Bits per pixel of BE display */
- int beXDPI; /**< Horizontal dots per inch of BE */
- int beYDPI; /**< Vertical dots per inch of BE */
-
- int beNumDepths; /**< Number of depths on BE server */
- int *beDepths; /**< Depths from BE server */
-
- int beNumPixmapFormats; /**< Number of pixmap formats on BE */
- XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */
-
- int beNumVisuals; /**< Number of visuals on BE */
- XVisualInfo *beVisuals; /**< Visuals from BE server */
- int beDefVisualIndex; /**< Default visual index of BE */
-
- int beNumDefColormaps; /**< Number of default colormaps */
- Colormap *beDefColormaps; /**< Default colormaps for DMX server */
-
- Pixel beBlackPixel; /**< Default black pixel for BE */
- Pixel beWhitePixel; /**< Default white pixel for BE */
-
- /*---------- Screen window information ----------*/
-
- Window scrnWin; /**< "Screen" window on backend display */
- int scrnX; /**< X offset of "screen" WRT BE display */
- int scrnY; /**< Y offset of "screen" WRT BE display */
- int scrnWidth; /**< Width of "screen" */
- int scrnHeight; /**< Height of "screen" */
- int scrnXSign; /**< X offset sign of "screen" */
- int scrnYSign; /**< Y offset sign of "screen" */
-
- /** Default drawables for "screen" */
- Drawable scrnDefDrawables[MAXFORMATS];
-
- struct _DMXScreenInfo *next; /**< List of "screens" on same display */
- struct _DMXScreenInfo *over; /**< List of "screens" that overlap */
-
- /*---------- Root window information ----------*/
-
- Window rootWin; /**< "Root" window on backend display */
- int rootX; /**< X offset of "root" window WRT "screen"*/
- int rootY; /**< Y offset of "root" window WRT "screen"*/
- int rootWidth; /**< Width of "root" window */
- int rootHeight; /**< Height of "root" window */
-
- int rootXOrigin; /**< Global X origin of "root" window */
- int rootYOrigin; /**< Global Y origin of "root" window */
-
- /*---------- Shadow framebuffer information ----------*/
-
- void *shadow; /**< Shadow framebuffer data (if enabled) */
- XlibGC shadowGC; /**< Default GC used by shadow FB code */
- XImage *shadowFBImage; /**< Screen image used by shadow FB code */
-
- /*---------- Other related information ----------*/
-
- int shared; /**< Non-zero if another Xdmx is running */
-
- Bool WMRunningOnBE;
-
- Cursor noCursor;
- Cursor curCursor;
- /* Support for cursors on overlapped
- * backend displays. */
- CursorPtr cursor;
- int cursorVisible;
- int cursorNotShared; /* for overlapping screens on a backend */
-
- PositionType where; /**< Relative layout information */
- int whereX; /**< Relative layout information */
- int whereY; /**< Relative layout information */
- int whereRefScreen; /**< Relative layout information */
-
- int savedTimeout; /**< Original screen saver timeout */
- int dpmsCapable; /**< Non-zero if backend is DPMS capable */
- int dpmsEnabled; /**< Non-zero if DPMS enabled */
- int dpmsStandby; /**< Original DPMS standby value */
- int dpmsSuspend; /**< Original DPMS suspend value */
- int dpmsOff; /**< Original DPMS off value */
-
- DMXStatInfo *stat; /**< Statistics about XSync */
- Bool needsSync; /**< True if an XSync is pending */
-
-#ifdef GLXEXT
- /** Visual information for glxProxy */
- int numGlxVisuals;
- __GLXvisualConfig *glxVisuals;
- int glxMajorOpcode;
- int glxErrorBase;
-
- /** FB config information for glxProxy */
- __GLXFBConfig *fbconfigs;
- int numFBConfigs;
-#endif
-
- /** Function pointers to wrapped screen
- * functions */
- CloseScreenProcPtr CloseScreen;
- SaveScreenProcPtr SaveScreen;
-
- CreateGCProcPtr CreateGC;
-
- CreateWindowProcPtr CreateWindow;
- DestroyWindowProcPtr DestroyWindow;
- PositionWindowProcPtr PositionWindow;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
- RealizeWindowProcPtr RealizeWindow;
- UnrealizeWindowProcPtr UnrealizeWindow;
- RestackWindowProcPtr RestackWindow;
- WindowExposuresProcPtr WindowExposures;
- CopyWindowProcPtr CopyWindow;
-
- ResizeWindowProcPtr ResizeWindow;
- ReparentWindowProcPtr ReparentWindow;
-
- ChangeBorderWidthProcPtr ChangeBorderWidth;
-
- GetImageProcPtr GetImage;
- GetSpansProcPtr GetSpans;
-
- CreatePixmapProcPtr CreatePixmap;
- DestroyPixmapProcPtr DestroyPixmap;
- BitmapToRegionProcPtr BitmapToRegion;
-
- RealizeFontProcPtr RealizeFont;
- UnrealizeFontProcPtr UnrealizeFont;
-
- CreateColormapProcPtr CreateColormap;
- DestroyColormapProcPtr DestroyColormap;
- InstallColormapProcPtr InstallColormap;
- StoreColorsProcPtr StoreColors;
-
- SetShapeProcPtr SetShape;
-
- CreatePictureProcPtr CreatePicture;
- DestroyPictureProcPtr DestroyPicture;
- ChangePictureClipProcPtr ChangePictureClip;
- DestroyPictureClipProcPtr DestroyPictureClip;
-
- ChangePictureProcPtr ChangePicture;
- ValidatePictureProcPtr ValidatePicture;
-
- CompositeProcPtr Composite;
- GlyphsProcPtr Glyphs;
- CompositeRectsProcPtr CompositeRects;
-
- InitIndexedProcPtr InitIndexed;
- CloseIndexedProcPtr CloseIndexed;
- UpdateIndexedProcPtr UpdateIndexed;
-
- TrapezoidsProcPtr Trapezoids;
- TrianglesProcPtr Triangles;
-} DMXScreenInfo;
-
-/* Global variables available to all Xserver/hw/dmx routines. */
-extern int dmxNumScreens; /**< Number of dmxScreens */
-extern DMXScreenInfo *dmxScreens; /**< List of outputs */
-extern int dmxShadowFB; /**< Non-zero if using
- * shadow frame-buffer
- * (deprecated) */
-extern XErrorEvent dmxLastErrorEvent; /**< Last error that
- * occurred */
-extern Bool dmxErrorOccurred; /**< True if an error
- * occurred */
-extern Bool dmxOffScreenOpt; /**< True if using off
- * screen
- * optimizations */
-extern Bool dmxSubdividePrimitives; /**< True if using the
- * primitive subdivision
- * optimization */
-extern Bool dmxLazyWindowCreation; /**< True if using the
- * lazy window creation
- * optimization */
-extern Bool dmxUseXKB; /**< True if the XKB
- * extension should be
- * used with the backend
- * servers */
-extern int dmxDepth; /**< Requested depth if
- * non-zero */
-#ifdef GLXEXT
-extern Bool dmxGLXProxy; /**< True if glxProxy
- * support is enabled */
-extern Bool dmxGLXSwapGroupSupport; /**< True if glxProxy
- * support for swap
- * groups and barriers
- * is enabled */
-extern Bool dmxGLXSyncSwap; /**< True if glxProxy
- * should force an XSync
- * request after each
- * swap buffers call */
-extern Bool dmxGLXFinishSwap; /**< True if glxProxy
- * should force a
- * glFinish request
- * after each swap
- * buffers call */
-#endif
-extern char *dmxFontPath; /**< NULL if no font
- * path is set on the
- * command line;
- * otherwise, a string
- * of comma separated
- * paths built from the
- * command line
- * specified font
- * paths */
-extern Bool dmxIgnoreBadFontPaths; /**< True if bad font
- * paths should be
- * ignored during server
- * init */
-extern Bool dmxAddRemoveScreens; /**< True if add and
- * remove screens support
- * is enabled */
-
-/** Wrap screen or GC function pointer */
-#define DMX_WRAP(_entry, _newfunc, _saved, _actual) \
-do { \
- (_saved)->_entry = (_actual)->_entry; \
- (_actual)->_entry = (_newfunc); \
-} while (0)
-
-/** Unwrap screen or GC function pointer */
-#define DMX_UNWRAP(_entry, _saved, _actual) \
-do { \
- (_actual)->_entry = (_saved)->_entry; \
-} while (0)
-
-/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not
- * been applied to sources. */
-#ifdef MAXSCREENS
-#define MAXSCREEN_MAKECONSTSTR1(x) #x
-#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x)
-
-#define MAXSCREEN_FAILED_TXT "Failed at [" \
- MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: "
-
-#define _MAXSCREENSALLOCF(o,size,fatal) \
- do { \
- if (!o) { \
- o = calloc((size), sizeof(*(o))); \
- if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \
- } \
- } while (0)
-#define _MAXSCREENSALLOCR(o,size,retval) \
- do { \
- if (!o) { \
- o = calloc((size), sizeof(*(o))); \
- if (!o) return retval; \
- } \
- } while (0)
-
-#define MAXSCREENSFREE(o) \
- do { \
- free(o); \
- o = NULL; \
- } while (0)
-
-#define MAXSCREENSALLOC(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 0)
-#define MAXSCREENSALLOC_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 1)
-#define MAXSCREENSALLOC_RETURN(o,r) _MAXSCREENSALLOCR(o,MAXSCREENS, (r))
-#define MAXSCREENSALLOCPLUSONE(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,0)
-#define MAXSCREENSALLOCPLUSONE_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,1)
-#define MAXSCREENSCALLOC(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),0)
-#define MAXSCREENSCALLOC_FATAL(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1)
-#endif
-
-extern DevPrivateKeyRec dmxGCPrivateKeyRec;
-#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs */
-
-extern DevPrivateKeyRec dmxWinPrivateKeyRec;
-#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows */
-
-extern DevPrivateKeyRec dmxPixPrivateKeyRec;
-#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps */
-
-extern int dmxFontPrivateIndex; /**< Private index for Fonts */
-
-extern DevPrivateKeyRec dmxScreenPrivateKeyRec;
-#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens */
-
-extern DevPrivateKeyRec dmxColormapPrivateKeyRec;
-#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */
-
-extern DevPrivateKeyRec dmxPictPrivateKeyRec;
-#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts */
-
-extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec;
-#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */
-
-#endif /* DMX_H */
+/* + * Copyright 2001-2003 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * 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 on 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 (including the + * next paragraph) 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 + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * 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. + */ + +/* + * Authors: + * Kevin E. Martin <kem@redhat.com> + * David H. Dawes <dawes@xfree86.org> + * Rickard E. (Rik) Faith <faith@redhat.com> + * + */ + +/** \file + * Main header file included by all other DMX-related files. + */ + +/** \mainpage + * - <a href="http://dmx.sourceforge.net">DMX Home Page</a> + * - <a href="http://sourceforge.net/projects/dmx">DMX Project Page (on + * Source Forge)</a> + * - <a href="http://dmx.sourceforge.net/dmx.html">Distributed Multihead + * X design</a>, the design document for DMX + * - <a href="http://dmx.sourceforge.net/DMXSpec.txt">Client-to-Server + * DMX Extension to the X Protocol</a> + */ + +#ifndef DMX_H +#define DMX_H + +#if HAVE_DMX_CONFIG_H +#include <dmx-config.h> +#endif + +#include "gcstruct.h" + +/* Handle client-side include files in one place. */ +#include "dmxclient.h" + +#include "globals.h" +#include "scrnintstr.h" + +#include "picturestr.h" + +#ifdef GLXEXT +#include <GL/glx.h> +#include <GL/glxint.h> +#endif + +typedef enum { + PosNone = -1, + PosAbsolute = 0, + PosRightOf, + PosLeftOf, + PosAbove, + PosBelow, + PosRelative +} PositionType; + +/** Provide the typedef globally, but keep the contents opaque outside + * of the input routines. \see dmxinput.h */ +typedef struct _DMXInputInfo DMXInputInfo; + +/** Provide the typedef globally, but keep the contents opaque outside + * of the XSync statistic routines. \see dmxstat.c */ +typedef struct _DMXStatInfo DMXStatInfo; + +/** Global structure containing information about each backend screen. */ +typedef struct _DMXScreenInfo { + const char *name; /**< Name from command line or config file */ + int index; /**< Index into dmxScreens global */ + + /*---------- Back-end X server information ----------*/ + + Display *beDisplay; /**< Back-end X server's display */ + int beWidth; /**< Width of BE display */ + int beHeight; /**< Height of BE display */ + int beDepth; /**< Depth of BE display */ + int beBPP; /**< Bits per pixel of BE display */ + int beXDPI; /**< Horizontal dots per inch of BE */ + int beYDPI; /**< Vertical dots per inch of BE */ + + int beNumDepths; /**< Number of depths on BE server */ + int *beDepths; /**< Depths from BE server */ + + int beNumPixmapFormats; /**< Number of pixmap formats on BE */ + XPixmapFormatValues *bePixmapFormats; /**< Pixmap formats on BE */ + + int beNumVisuals; /**< Number of visuals on BE */ + XVisualInfo *beVisuals; /**< Visuals from BE server */ + int beDefVisualIndex; /**< Default visual index of BE */ + + int beNumDefColormaps; /**< Number of default colormaps */ + Colormap *beDefColormaps; /**< Default colormaps for DMX server */ + + Pixel beBlackPixel; /**< Default black pixel for BE */ + Pixel beWhitePixel; /**< Default white pixel for BE */ + + /*---------- Screen window information ----------*/ + + Window scrnWin; /**< "Screen" window on backend display */ + int scrnX; /**< X offset of "screen" WRT BE display */ + int scrnY; /**< Y offset of "screen" WRT BE display */ + int scrnWidth; /**< Width of "screen" */ + int scrnHeight; /**< Height of "screen" */ + int scrnXSign; /**< X offset sign of "screen" */ + int scrnYSign; /**< Y offset sign of "screen" */ + + /** Default drawables for "screen" */ + Drawable scrnDefDrawables[MAXFORMATS]; + + struct _DMXScreenInfo *next; /**< List of "screens" on same display */ + struct _DMXScreenInfo *over; /**< List of "screens" that overlap */ + + /*---------- Root window information ----------*/ + + Window rootWin; /**< "Root" window on backend display */ + int rootX; /**< X offset of "root" window WRT "screen"*/ + int rootY; /**< Y offset of "root" window WRT "screen"*/ + int rootWidth; /**< Width of "root" window */ + int rootHeight; /**< Height of "root" window */ + + int rootXOrigin; /**< Global X origin of "root" window */ + int rootYOrigin; /**< Global Y origin of "root" window */ + + /*---------- Shadow framebuffer information ----------*/ + + void *shadow; /**< Shadow framebuffer data (if enabled) */ + XlibGC shadowGC; /**< Default GC used by shadow FB code */ + XImage *shadowFBImage; /**< Screen image used by shadow FB code */ + + /*---------- Other related information ----------*/ + + int shared; /**< Non-zero if another Xdmx is running */ + + Bool WMRunningOnBE; + + Cursor noCursor; + Cursor curCursor; + /* Support for cursors on overlapped + * backend displays. */ + CursorPtr cursor; + int cursorVisible; + int cursorNotShared; /* for overlapping screens on a backend */ + + PositionType where; /**< Relative layout information */ + int whereX; /**< Relative layout information */ + int whereY; /**< Relative layout information */ + int whereRefScreen; /**< Relative layout information */ + + int savedTimeout; /**< Original screen saver timeout */ + int dpmsCapable; /**< Non-zero if backend is DPMS capable */ + int dpmsEnabled; /**< Non-zero if DPMS enabled */ + int dpmsStandby; /**< Original DPMS standby value */ + int dpmsSuspend; /**< Original DPMS suspend value */ + int dpmsOff; /**< Original DPMS off value */ + + DMXStatInfo *stat; /**< Statistics about XSync */ + Bool needsSync; /**< True if an XSync is pending */ + +#ifdef GLXEXT + /** Visual information for glxProxy */ + int numGlxVisuals; + __GLXvisualConfig *glxVisuals; + int glxMajorOpcode; + int glxErrorBase; + + /** FB config information for glxProxy */ + __GLXFBConfig *fbconfigs; + int numFBConfigs; +#endif + + /** Function pointers to wrapped screen + * functions */ + CloseScreenProcPtr CloseScreen; + SaveScreenProcPtr SaveScreen; + + CreateGCProcPtr CreateGC; + + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + PositionWindowProcPtr PositionWindow; + ChangeWindowAttributesProcPtr ChangeWindowAttributes; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + RestackWindowProcPtr RestackWindow; + WindowExposuresProcPtr WindowExposures; + CopyWindowProcPtr CopyWindow; + + ResizeWindowProcPtr ResizeWindow; + ReparentWindowProcPtr ReparentWindow; + + ChangeBorderWidthProcPtr ChangeBorderWidth; + + GetImageProcPtr GetImage; + GetSpansProcPtr GetSpans; + + CreatePixmapProcPtr CreatePixmap; + DestroyPixmapProcPtr DestroyPixmap; + BitmapToRegionProcPtr BitmapToRegion; + + RealizeFontProcPtr RealizeFont; + UnrealizeFontProcPtr UnrealizeFont; + + CreateColormapProcPtr CreateColormap; + DestroyColormapProcPtr DestroyColormap; + InstallColormapProcPtr InstallColormap; + StoreColorsProcPtr StoreColors; + + SetShapeProcPtr SetShape; + + CreatePictureProcPtr CreatePicture; + DestroyPictureProcPtr DestroyPicture; + ChangePictureClipProcPtr ChangePictureClip; + DestroyPictureClipProcPtr DestroyPictureClip; + + ChangePictureProcPtr ChangePicture; + ValidatePictureProcPtr ValidatePicture; + + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; + CompositeRectsProcPtr CompositeRects; + + InitIndexedProcPtr InitIndexed; + CloseIndexedProcPtr CloseIndexed; + UpdateIndexedProcPtr UpdateIndexed; + + TrapezoidsProcPtr Trapezoids; + TrianglesProcPtr Triangles; +} DMXScreenInfo; + +/* Global variables available to all Xserver/hw/dmx routines. */ +extern int dmxNumScreens; /**< Number of dmxScreens */ +extern DMXScreenInfo *dmxScreens; /**< List of outputs */ +extern int dmxShadowFB; /**< Non-zero if using + + * shadow frame-buffer + * (deprecated) */ +extern XErrorEvent dmxLastErrorEvent; /**< Last error that + + * occurred */ +extern Bool dmxErrorOccurred; /**< True if an error + + * occurred */ +extern Bool dmxOffScreenOpt; /**< True if using off + + * screen + * optimizations */ +extern Bool dmxSubdividePrimitives; /**< True if using the + + * primitive subdivision + * optimization */ +extern Bool dmxLazyWindowCreation; /**< True if using the + + * lazy window creation + * optimization */ +extern Bool dmxUseXKB; /**< True if the XKB + + * extension should be + * used with the backend + * servers */ +extern int dmxDepth; /**< Requested depth if + + * non-zero */ +#ifdef GLXEXT +extern Bool dmxGLXProxy; /**< True if glxProxy + + * support is enabled */ +extern Bool dmxGLXSwapGroupSupport; /**< True if glxProxy + + * support for swap + * groups and barriers + * is enabled */ +extern Bool dmxGLXSyncSwap; /**< True if glxProxy + + * should force an XSync + * request after each + * swap buffers call */ +extern Bool dmxGLXFinishSwap; /**< True if glxProxy + + * should force a + * glFinish request + * after each swap + * buffers call */ +#endif +extern char *dmxFontPath; /**< NULL if no font + + * path is set on the + * command line; + * otherwise, a string + * of comma separated + * paths built from the + * command line + * specified font + * paths */ +extern Bool dmxIgnoreBadFontPaths; /**< True if bad font + + * paths should be + * ignored during server + * init */ +extern Bool dmxAddRemoveScreens; /**< True if add and + + * remove screens support + * is enabled */ + +/** Wrap screen or GC function pointer */ +#define DMX_WRAP(_entry, _newfunc, _saved, _actual) \ +do { \ + (_saved)->_entry = (_actual)->_entry; \ + (_actual)->_entry = (_newfunc); \ +} while (0) + +/** Unwrap screen or GC function pointer */ +#define DMX_UNWRAP(_entry, _saved, _actual) \ +do { \ + (_actual)->_entry = (_saved)->_entry; \ +} while (0) + +/* Define the MAXSCREENSALLOC/FREE macros, when MAXSCREENS patch has not + * been applied to sources. */ +#ifdef MAXSCREENS +#define MAXSCREEN_MAKECONSTSTR1(x) #x +#define MAXSCREEN_MAKECONSTSTR2(x) MAXSCREEN_MAKECONSTSTR1(x) + +#define MAXSCREEN_FAILED_TXT "Failed at [" \ + MAXSCREEN_MAKECONSTSTR2(__LINE__) ":" __FILE__ "] to allocate object: " + +#define _MAXSCREENSALLOCF(o,size,fatal) \ + do { \ + if (!o) { \ + o = calloc((size), sizeof(*(o))); \ + if (!o && fatal) FatalError(MAXSCREEN_FAILED_TXT #o); \ + } \ + } while (0) +#define _MAXSCREENSALLOCR(o,size,retval) \ + do { \ + if (!o) { \ + o = calloc((size), sizeof(*(o))); \ + if (!o) return retval; \ + } \ + } while (0) + +#define MAXSCREENSFREE(o) \ + do { \ + free(o); \ + o = NULL; \ + } while (0) + +#define MAXSCREENSALLOC(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 0) +#define MAXSCREENSALLOC_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS, 1) +#define MAXSCREENSALLOC_RETURN(o,r) _MAXSCREENSALLOCR(o,MAXSCREENS, (r)) +#define MAXSCREENSALLOCPLUSONE(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,0) +#define MAXSCREENSALLOCPLUSONE_FATAL(o) _MAXSCREENSALLOCF(o,MAXSCREENS+1,1) +#define MAXSCREENSCALLOC(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),0) +#define MAXSCREENSCALLOC_FATAL(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1) +#endif + +extern DevPrivateKeyRec dmxGCPrivateKeyRec; + +#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs */ + +extern DevPrivateKeyRec dmxWinPrivateKeyRec; + +#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows */ + +extern DevPrivateKeyRec dmxPixPrivateKeyRec; + +#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps */ + +extern int dmxFontPrivateIndex; /**< Private index for Fonts */ + +extern DevPrivateKeyRec dmxScreenPrivateKeyRec; + +#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens */ + +extern DevPrivateKeyRec dmxColormapPrivateKeyRec; + +#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */ + +extern DevPrivateKeyRec dmxPictPrivateKeyRec; + +#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts */ + +extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec; + +#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */ + +#endif /* DMX_H */ diff --git a/xorg-server/hw/dmx/dmxcb.h b/xorg-server/hw/dmx/dmxcb.h index fa334dbe8..ca8a2566d 100644 --- a/xorg-server/hw/dmx/dmxcb.h +++ b/xorg-server/hw/dmx/dmxcb.h @@ -38,7 +38,7 @@ #ifndef _DMXCB_H_ #define _DMXCB_H_ /** The cursor position, in global coordinates. */ -extern int dmxGlobalWidth, dmxGlobalHeight; +extern int dmxGlobalWidth, dmxGlobalHeight; /** #dmxComputeWidthHeight can either recompute the global bounding box * or not. */ diff --git a/xorg-server/hw/dmx/dmxclient.h b/xorg-server/hw/dmx/dmxclient.h index f0f235f61..19dfdbe16 100644 --- a/xorg-server/hw/dmx/dmxclient.h +++ b/xorg-server/hw/dmx/dmxclient.h @@ -51,19 +51,21 @@ typedef unsigned long Mask64; typedef unsigned long Atom64; typedef unsigned long VisualID64; typedef unsigned long Time64; + #define XID XID64 #define Mask Mask64 #define Atom Atom64 #define VisualID VisualID64 #define Time Time64 -typedef XID Window64; -typedef XID Drawable64; -typedef XID Font64; -typedef XID Pixmap64; -typedef XID Cursor64; -typedef XID Colormap64; -typedef XID GContext64; -typedef XID KeySym64; +typedef XID Window64; +typedef XID Drawable64; +typedef XID Font64; +typedef XID Pixmap64; +typedef XID Cursor64; +typedef XID Colormap64; +typedef XID GContext64; +typedef XID KeySym64; + #define Window Window64 #define Drawable Drawable64 #define Font Font64 @@ -94,7 +96,7 @@ typedef XID KeySym64; #include <X11/extensions/XI.h> /* Always include these, since we query them even if we don't export XINPUT. */ -#include <X11/extensions/XInput.h> /* For XDevice */ +#include <X11/extensions/XInput.h> /* For XDevice */ #include <X11/extensions/Xext.h> #undef GC diff --git a/xorg-server/hw/dmx/dmxcmap.h b/xorg-server/hw/dmx/dmxcmap.h index 499ca7f66..29318b586 100644 --- a/xorg-server/hw/dmx/dmxcmap.h +++ b/xorg-server/hw/dmx/dmxcmap.h @@ -1,66 +1,65 @@ -/*
- * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * 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 on 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 (including the
- * next paragraph) 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Header file for colormap support. \see dmxcmap.c. */
-
-#ifndef DMXCMAP_H
-#define DMXCMAP_H
-
-#include "colormapst.h"
-
-/** Colormap private area. */
-typedef struct _dmxColormapPriv {
- Colormap cmap;
-} dmxColormapPrivRec, *dmxColormapPrivPtr;
-
-
-extern Bool dmxCreateColormap(ColormapPtr pColormap);
-extern void dmxDestroyColormap(ColormapPtr pColormap);
-extern void dmxInstallColormap(ColormapPtr pColormap);
-extern void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem *pdef);
-
-extern Bool dmxCreateDefColormap(ScreenPtr pScreen);
-
-extern Bool dmxBECreateColormap(ColormapPtr pColormap);
-extern Bool dmxBEFreeColormap(ColormapPtr pColormap);
-
-/** Set colormap private structure. */
-#define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \
- dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv)
-
-/** Get colormap private structure. */
-#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr) \
- dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey)
-
-#endif /* DMXCMAP_H */
+/* + * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * 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 on 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 (including the + * next paragraph) 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 + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * 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. + */ + +/* + * Authors: + * Kevin E. Martin <kem@redhat.com> + * + */ + +/** \file + * Header file for colormap support. \see dmxcmap.c. */ + +#ifndef DMXCMAP_H +#define DMXCMAP_H + +#include "colormapst.h" + +/** Colormap private area. */ +typedef struct _dmxColormapPriv { + Colormap cmap; +} dmxColormapPrivRec, *dmxColormapPrivPtr; + +extern Bool dmxCreateColormap(ColormapPtr pColormap); +extern void dmxDestroyColormap(ColormapPtr pColormap); +extern void dmxInstallColormap(ColormapPtr pColormap); +extern void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef); + +extern Bool dmxCreateDefColormap(ScreenPtr pScreen); + +extern Bool dmxBECreateColormap(ColormapPtr pColormap); +extern Bool dmxBEFreeColormap(ColormapPtr pColormap); + +/** Set colormap private structure. */ +#define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \ + dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv) + +/** Get colormap private structure. */ +#define DMX_GET_COLORMAP_PRIV(_pCMap) (dmxColormapPrivPtr) \ + dixLookupPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey) + +#endif /* DMXCMAP_H */ diff --git a/xorg-server/hw/dmx/dmxcursor.h b/xorg-server/hw/dmx/dmxcursor.h index fc2e118e0..2b55b4e86 100644 --- a/xorg-server/hw/dmx/dmxcursor.h +++ b/xorg-server/hw/dmx/dmxcursor.h @@ -43,11 +43,12 @@ /** Cursor private area. */ typedef struct _dmxCursorPriv { - Cursor cursor; + Cursor cursor; } dmxCursorPrivRec, *dmxCursorPrivPtr; /** Cursor functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */ extern miPointerScreenFuncRec dmxPointerCursorFuncs; + /** Sprite functions for mi layer. \see dmxcursor.c \see dmxscrinit.c */ extern miPointerSpriteFuncRec dmxPointerSpriteFuncs; @@ -57,8 +58,8 @@ extern void dmxInitOverlap(void); extern void dmxCursorNoMulti(void); extern void dmxMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); extern void dmxCheckCursor(void); -extern int dmxOnScreen(int x, int y, DMXScreenInfo *dmxScreen); -extern void dmxHideCursor(DMXScreenInfo *dmxScreen); +extern int dmxOnScreen(int x, int y, DMXScreenInfo * dmxScreen); +extern void dmxHideCursor(DMXScreenInfo * dmxScreen); extern void dmxBECreateCursor(ScreenPtr pScreen, CursorPtr pCursor); extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor); @@ -69,4 +70,4 @@ extern Bool dmxBEFreeCursor(ScreenPtr pScreen, CursorPtr pCursor); #define DMX_SET_CURSOR_PRIV(_pCursor, _pScreen, v) \ dixSetScreenPrivate(&(_pCursor)->devPrivates, CursorScreenKey, _pScreen, v) -#endif /* DMXCURSOR_H */ +#endif /* DMXCURSOR_H */ diff --git a/xorg-server/hw/dmx/dmxdpms.h b/xorg-server/hw/dmx/dmxdpms.h index e3eee983a..772fa2f11 100644 --- a/xorg-server/hw/dmx/dmxdpms.h +++ b/xorg-server/hw/dmx/dmxdpms.h @@ -36,7 +36,7 @@ #ifndef _DMXDPMS_H_ #define _DMXDPMS_H_ -extern void dmxDPMSInit(DMXScreenInfo *dmxScreen); -extern void dmxDPMSTerm(DMXScreenInfo *dmxScreen); -extern void dmxDPMSWakeup(void); /* Call when input is processed */ +extern void dmxDPMSInit(DMXScreenInfo * dmxScreen); +extern void dmxDPMSTerm(DMXScreenInfo * dmxScreen); +extern void dmxDPMSWakeup(void); /* Call when input is processed */ #endif diff --git a/xorg-server/hw/dmx/dmxfont.h b/xorg-server/hw/dmx/dmxfont.h index 086e71b59..8575ca953 100644 --- a/xorg-server/hw/dmx/dmxfont.h +++ b/xorg-server/hw/dmx/dmxfont.h @@ -41,7 +41,7 @@ /** Font private area. */ typedef struct _dmxFontPriv { - int refcnt; + int refcnt; XFontStruct **font; } dmxFontPrivRec, *dmxFontPrivPtr; @@ -56,4 +56,4 @@ extern Bool dmxBEFreeFont(ScreenPtr pScreen, FontPtr pFont); extern int dmxFontPrivateIndex; -#endif /* DMXFONT_H */ +#endif /* DMXFONT_H */ diff --git a/xorg-server/hw/dmx/dmxgc.h b/xorg-server/hw/dmx/dmxgc.h index 43a6296af..7b99d88c6 100644 --- a/xorg-server/hw/dmx/dmxgc.h +++ b/xorg-server/hw/dmx/dmxgc.h @@ -1,86 +1,85 @@ -/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * 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 on 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 (including the
- * next paragraph) 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for GC support. \see dmxgc.c */
-
-#ifndef DMXGC_H
-#define DMXGC_H
-
-#include "gcstruct.h"
-
-/** GC private area. */
-typedef struct _dmxGCPriv {
- GCOps *ops;
- GCFuncs *funcs;
- XlibGC gc;
- Bool msc;
-} dmxGCPrivRec, *dmxGCPrivPtr;
-
-
-extern Bool dmxInitGC(ScreenPtr pScreen);
-
-extern Bool dmxCreateGC(GCPtr pGC);
-extern void dmxValidateGC(GCPtr pGC, unsigned long changes,
- DrawablePtr pDrawable);
-extern void dmxChangeGC(GCPtr pGC, unsigned long mask);
-extern void dmxCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst);
-extern void dmxDestroyGC(GCPtr pGC);
-extern void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects);
-extern void dmxDestroyClip(GCPtr pGC);
-extern void dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc);
-
-extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC);
-extern Bool dmxBEFreeGC(GCPtr pGC);
-
-/** Get private. */
-#define DMX_GET_GC_PRIV(_pGC) \
- (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey)
-
-#define DMX_GC_FUNC_PROLOGUE(_pGC) \
-do { \
- dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \
- DMX_UNWRAP(funcs, _pGCPriv, (_pGC)); \
- if (_pGCPriv->ops) \
- DMX_UNWRAP(ops, _pGCPriv, (_pGC)); \
-} while (0)
-
-#define DMX_GC_FUNC_EPILOGUE(_pGC) \
-do { \
- dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \
- DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \
- if (_pGCPriv->ops) \
- DMX_WRAP(ops, &dmxGCOps, _pGCPriv, (_pGC)); \
-} while (0)
-
-#endif /* DMXGC_H */
+/* + * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * 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 on 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 (including the + * next paragraph) 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 + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * 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. + */ + +/* + * Authors: + * Kevin E. Martin <kem@redhat.com> + * + */ + +/** \file + * Interface for GC support. \see dmxgc.c */ + +#ifndef DMXGC_H +#define DMXGC_H + +#include "gcstruct.h" + +/** GC private area. */ +typedef struct _dmxGCPriv { + GCOps *ops; + GCFuncs *funcs; + XlibGC gc; + Bool msc; +} dmxGCPrivRec, *dmxGCPrivPtr; + +extern Bool dmxInitGC(ScreenPtr pScreen); + +extern Bool dmxCreateGC(GCPtr pGC); +extern void dmxValidateGC(GCPtr pGC, unsigned long changes, + DrawablePtr pDrawable); +extern void dmxChangeGC(GCPtr pGC, unsigned long mask); +extern void dmxCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst); +extern void dmxDestroyGC(GCPtr pGC); +extern void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects); +extern void dmxDestroyClip(GCPtr pGC); +extern void dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc); + +extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC); +extern Bool dmxBEFreeGC(GCPtr pGC); + +/** Get private. */ +#define DMX_GET_GC_PRIV(_pGC) \ + (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey) + +#define DMX_GC_FUNC_PROLOGUE(_pGC) \ +do { \ + dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \ + DMX_UNWRAP(funcs, _pGCPriv, (_pGC)); \ + if (_pGCPriv->ops) \ + DMX_UNWRAP(ops, _pGCPriv, (_pGC)); \ +} while (0) + +#define DMX_GC_FUNC_EPILOGUE(_pGC) \ +do { \ + dmxGCPrivPtr _pGCPriv = DMX_GET_GC_PRIV(_pGC); \ + DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \ + if (_pGCPriv->ops) \ + DMX_WRAP(ops, &dmxGCOps, _pGCPriv, (_pGC)); \ +} while (0) + +#endif /* DMXGC_H */ diff --git a/xorg-server/hw/dmx/dmxgcops.h b/xorg-server/hw/dmx/dmxgcops.h index da14d4d94..4ba0ad500 100644 --- a/xorg-server/hw/dmx/dmxgcops.h +++ b/xorg-server/hw/dmx/dmxgcops.h @@ -38,58 +38,58 @@ #define DMXGCOPS_H extern void dmxFillSpans(DrawablePtr pDrawable, GCPtr pGC, - int nInit, DDXPointPtr pptInit, int *pwidthInit, - int fSorted); + int nInit, DDXPointPtr pptInit, int *pwidthInit, + int fSorted); extern void dmxSetSpans(DrawablePtr pDrawable, GCPtr pGC, - char *psrc, DDXPointPtr ppt, int *pwidth, int nspans, - int fSorted); + char *psrc, DDXPointPtr ppt, int *pwidth, int nspans, + int fSorted); extern void dmxPutImage(DrawablePtr pDrawable, GCPtr pGC, - int depth, int x, int y, int w, int h, - int leftPad, int format, char *pBits); + int depth, int x, int y, int w, int h, + int leftPad, int format, char *pBits); extern RegionPtr dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, - int srcx, int srcy, int w, int h, - int dstx, int dsty); + int srcx, int srcy, int w, int h, + int dstx, int dsty); extern RegionPtr dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, - int srcx, int srcy, int width, int height, - int dstx, int dsty, unsigned long bitPlane); + int srcx, int srcy, int width, int height, + int dstx, int dsty, unsigned long bitPlane); extern void dmxPolyPoint(DrawablePtr pDrawable, GCPtr pGC, - int mode, int npt, DDXPointPtr pptInit); + int mode, int npt, DDXPointPtr pptInit); extern void dmxPolylines(DrawablePtr pDrawable, GCPtr pGC, - int mode, int npt, DDXPointPtr pptInit); + int mode, int npt, DDXPointPtr pptInit); extern void dmxPolySegment(DrawablePtr pDrawable, GCPtr pGC, - int nseg, xSegment *pSegs); + int nseg, xSegment * pSegs); extern void dmxPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, - int nrects, xRectangle *pRects); + int nrects, xRectangle *pRects); extern void dmxPolyArc(DrawablePtr pDrawable, GCPtr pGC, - int narcs, xArc *parcs); + int narcs, xArc * parcs); extern void dmxFillPolygon(DrawablePtr pDrawable, GCPtr pGC, - int shape, int mode, int count, DDXPointPtr pPts); + int shape, int mode, int count, DDXPointPtr pPts); extern void dmxPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, - int nrectFill, xRectangle *prectInit); + int nrectFill, xRectangle *prectInit); extern void dmxPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, - int narcs, xArc *parcs); + int narcs, xArc * parcs); extern int dmxPolyText8(DrawablePtr pDrawable, GCPtr pGC, - int x, int y, int count, char *chars); + int x, int y, int count, char *chars); extern int dmxPolyText16(DrawablePtr pDrawable, GCPtr pGC, - int x, int y, int count, unsigned short *chars); + int x, int y, int count, unsigned short *chars); extern void dmxImageText8(DrawablePtr pDrawable, GCPtr pGC, - int x, int y, int count, char *chars); + int x, int y, int count, char *chars); extern void dmxImageText16(DrawablePtr pDrawable, GCPtr pGC, - int x, int y, int count, unsigned short *chars); + int x, int y, int count, unsigned short *chars); extern void dmxImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, - int x, int y, unsigned int nglyph, - CharInfoPtr *ppci, pointer pglyphBase); + int x, int y, unsigned int nglyph, + CharInfoPtr * ppci, pointer pglyphBase); extern void dmxPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, - int x, int y, unsigned int nglyph, - CharInfoPtr *ppci, pointer pglyphBase); + int x, int y, unsigned int nglyph, + CharInfoPtr * ppci, pointer pglyphBase); extern void dmxPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst, - int w, int h, int x, int y); + int w, int h, int x, int y); extern void dmxGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, - unsigned int format, unsigned long planeMask, - char *pdstLine); + unsigned int format, unsigned long planeMask, + char *pdstLine); extern void dmxGetSpans(DrawablePtr pDrawable, int wMax, - DDXPointPtr ppt, int *pwidth, int nspans, - char *pdstStart); + DDXPointPtr ppt, int *pwidth, int nspans, + char *pdstStart); -#endif /* DMXGCOPS_H */ +#endif /* DMXGCOPS_H */ diff --git a/xorg-server/hw/dmx/dmxinit.h b/xorg-server/hw/dmx/dmxinit.h index 7d166fd85..ce4e2ff4b 100644 --- a/xorg-server/hw/dmx/dmxinit.h +++ b/xorg-server/hw/dmx/dmxinit.h @@ -39,12 +39,12 @@ #include "scrnintstr.h" -extern Bool dmxOpenDisplay(DMXScreenInfo *dmxScreen); -extern void dmxSetErrorHandler(DMXScreenInfo *dmxScreen); -extern void dmxCheckForWM(DMXScreenInfo *dmxScreen); -extern void dmxGetScreenAttribs(DMXScreenInfo *dmxScreen); -extern Bool dmxGetVisualInfo(DMXScreenInfo *dmxScreen); -extern void dmxGetColormaps(DMXScreenInfo *dmxScreen); -extern void dmxGetPixmapFormats(DMXScreenInfo *dmxScreen); +extern Bool dmxOpenDisplay(DMXScreenInfo * dmxScreen); +extern void dmxSetErrorHandler(DMXScreenInfo * dmxScreen); +extern void dmxCheckForWM(DMXScreenInfo * dmxScreen); +extern void dmxGetScreenAttribs(DMXScreenInfo * dmxScreen); +extern Bool dmxGetVisualInfo(DMXScreenInfo * dmxScreen); +extern void dmxGetColormaps(DMXScreenInfo * dmxScreen); +extern void dmxGetPixmapFormats(DMXScreenInfo * dmxScreen); -#endif /* DMXINIT_H */ +#endif /* DMXINIT_H */ diff --git a/xorg-server/hw/dmx/dmxlog.h b/xorg-server/hw/dmx/dmxlog.h index 7b614bd73..4d4cd269a 100644 --- a/xorg-server/hw/dmx/dmxlog.h +++ b/xorg-server/hw/dmx/dmxlog.h @@ -55,20 +55,20 @@ typedef enum { /* Logging functions used by Xserver/hw/dmx routines. */ extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel); extern dmxLogLevel dmxGetLogLevel(void); -extern void dmxLog(dmxLogLevel logLevel, const char *format, ...); -extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...); -extern const char *dmxEventName(int type); +extern void dmxLog(dmxLogLevel logLevel, const char *format, ...); +extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...); +extern const char *dmxEventName(int type); #ifndef DMX_LOG_STANDALONE -extern void dmxLogOutput(DMXScreenInfo *dmxScreen, const char *format, ...); -extern void dmxLogOutputCont(DMXScreenInfo *dmxScreen, const char *format, +extern void dmxLogOutput(DMXScreenInfo * dmxScreen, const char *format, ...); +extern void dmxLogOutputCont(DMXScreenInfo * dmxScreen, const char *format, ...); -extern void dmxLogOutputWarning(DMXScreenInfo *dmxScreen, const char *format, +extern void dmxLogOutputWarning(DMXScreenInfo * dmxScreen, const char *format, ...); -extern void dmxLogInput(DMXInputInfo *dmxInput, const char *format, ...); -extern void dmxLogInputCont(DMXInputInfo *dmxInput, const char *format, ...); +extern void dmxLogInput(DMXInputInfo * dmxInput, const char *format, ...); +extern void dmxLogInputCont(DMXInputInfo * dmxInput, const char *format, ...); extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv); -extern void dmxLogVisual(DMXScreenInfo *dmxScreen, XVisualInfo *vi, +extern void dmxLogVisual(DMXScreenInfo * dmxScreen, XVisualInfo * vi, int defaultVisual); extern const char *dmxXInputEventName(int type); #endif diff --git a/xorg-server/hw/dmx/dmxpixmap.h b/xorg-server/hw/dmx/dmxpixmap.h index a41918ce4..30bb666d5 100644 --- a/xorg-server/hw/dmx/dmxpixmap.h +++ b/xorg-server/hw/dmx/dmxpixmap.h @@ -1,64 +1,63 @@ -/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * 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 on 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 (including the
- * next paragraph) 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- *
- */
-
-/** \file
- * Interface for pixmap support. \see dmxpixmap.c */
-
-#ifndef DMXPIXMAP_H
-#define DMXPIXMAP_H
-
-#include "pixmapstr.h"
-
-/** Pixmap private area. */
-typedef struct _dmxPixPriv {
- Pixmap pixmap;
- XImage *detachedImage;
-} dmxPixPrivRec, *dmxPixPrivPtr;
-
-
-extern Bool dmxInitPixmap(ScreenPtr pScreen);
-
-extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen,
- int width, int height, int depth,
- unsigned usage_hint);
-extern Bool dmxDestroyPixmap(PixmapPtr pPixmap);
-extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap);
-
-extern void dmxBECreatePixmap(PixmapPtr pPixmap);
-extern Bool dmxBEFreePixmap(PixmapPtr pPixmap);
-
-/** Get pixmap private pointer. */
-#define DMX_GET_PIXMAP_PRIV(_pPix) \
- (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey)
-
-#endif /* DMXPIXMAP_H */
+/* + * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * 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 on 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 (including the + * next paragraph) 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 + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * 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. + */ + +/* + * Authors: + * Kevin E. Martin <kem@redhat.com> + * + */ + +/** \file + * Interface for pixmap support. \see dmxpixmap.c */ + +#ifndef DMXPIXMAP_H +#define DMXPIXMAP_H + +#include "pixmapstr.h" + +/** Pixmap private area. */ +typedef struct _dmxPixPriv { + Pixmap pixmap; + XImage *detachedImage; +} dmxPixPrivRec, *dmxPixPrivPtr; + +extern Bool dmxInitPixmap(ScreenPtr pScreen); + +extern PixmapPtr dmxCreatePixmap(ScreenPtr pScreen, + int width, int height, int depth, + unsigned usage_hint); +extern Bool dmxDestroyPixmap(PixmapPtr pPixmap); +extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap); + +extern void dmxBECreatePixmap(PixmapPtr pPixmap); +extern Bool dmxBEFreePixmap(PixmapPtr pPixmap); + +/** Get pixmap private pointer. */ +#define DMX_GET_PIXMAP_PRIV(_pPix) \ + (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey) + +#endif /* DMXPIXMAP_H */ diff --git a/xorg-server/hw/dmx/dmxscrinit.h b/xorg-server/hw/dmx/dmxscrinit.h index 328e33272..5c0bfacce 100644 --- a/xorg-server/hw/dmx/dmxscrinit.h +++ b/xorg-server/hw/dmx/dmxscrinit.h @@ -1,48 +1,48 @@ -/*
- * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina.
- *
- * All Rights Reserved.
- *
- * 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 on 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 (including the
- * next paragraph) 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
- * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
- * 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.
- */
-
-/*
- * Authors:
- * Kevin E. Martin <kem@redhat.com>
- * David H. Dawes <dawes@xfree86.org>
- *
- */
-
-/** \file
- * Interface for screen initialization. \see dmxscrinit.c */
-
-#ifndef DMXSCRINIT_H
-#define DMXSCRINIT_H
-
-#include "scrnintstr.h"
-
-extern Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]);
-
-extern void dmxBEScreenInit(int idx, ScreenPtr pScreen);
-extern void dmxBECloseScreen(ScreenPtr pScreen);
-
-#endif /* DMXSCRINIT_H */
+/* + * Copyright 2001-2004 Red Hat Inc., Durham, North Carolina. + * + * All Rights Reserved. + * + * 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 on 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 (including the + * next paragraph) 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 + * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS + * 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. + */ + +/* + * Authors: + * Kevin E. Martin <kem@redhat.com> + * David H. Dawes <dawes@xfree86.org> + * + */ + +/** \file + * Interface for screen initialization. \see dmxscrinit.c */ + +#ifndef DMXSCRINIT_H +#define DMXSCRINIT_H + +#include "scrnintstr.h" + +extern Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]); + +extern void dmxBEScreenInit(int idx, ScreenPtr pScreen); +extern void dmxBECloseScreen(ScreenPtr pScreen); + +#endif /* DMXSCRINIT_H */ diff --git a/xorg-server/hw/dmx/dmxshadow.h b/xorg-server/hw/dmx/dmxshadow.h index cafe87900..081b4d1dc 100644 --- a/xorg-server/hw/dmx/dmxshadow.h +++ b/xorg-server/hw/dmx/dmxshadow.h @@ -43,4 +43,4 @@ extern void dmxShadowUpdateProc(ScreenPtr pScreen, shadowBufPtr pBuf); -#endif /* DMXSHADOW_H */ +#endif /* DMXSHADOW_H */ diff --git a/xorg-server/hw/dmx/dmxstat.h b/xorg-server/hw/dmx/dmxstat.h index 04c88d3c9..8c8d7bae5 100644 --- a/xorg-server/hw/dmx/dmxstat.h +++ b/xorg-server/hw/dmx/dmxstat.h @@ -43,13 +43,13 @@ #define DMX_STAT_BIN0 10000 /**< us for bin[0] */ #define DMX_STAT_BINMULT 100 /**< multiplier for next bin[] */ -extern int dmxStatInterval; /**< Only for dmxstat.c and dmxsync.c */ -extern void dmxStatActivate(const char *interval, const char *displays); +extern int dmxStatInterval; /**< Only for dmxstat.c and dmxsync.c */ +extern void dmxStatActivate(const char *interval, const char *displays); extern DMXStatInfo *dmxStatAlloc(void); -extern void dmxStatFree(DMXStatInfo *); -extern void dmxStatInit(void); -extern void dmxStatSync(DMXScreenInfo *dmxScreen, - struct timeval *stop, struct timeval *start, - unsigned long pending); +extern void dmxStatFree(DMXStatInfo *); +extern void dmxStatInit(void); +extern void dmxStatSync(DMXScreenInfo * dmxScreen, + struct timeval *stop, struct timeval *start, + unsigned long pending); #endif diff --git a/xorg-server/hw/dmx/dmxsync.h b/xorg-server/hw/dmx/dmxsync.h index b80f54af2..d67ae09c6 100644 --- a/xorg-server/hw/dmx/dmxsync.h +++ b/xorg-server/hw/dmx/dmxsync.h @@ -39,5 +39,5 @@ extern void dmxSyncActivate(const char *interval); extern void dmxSyncInit(void); -extern void dmxSync(DMXScreenInfo *dmxScreen, Bool now); +extern void dmxSync(DMXScreenInfo * dmxScreen, Bool now); #endif diff --git a/xorg-server/hw/dmx/dmxvisual.h b/xorg-server/hw/dmx/dmxvisual.h index bcb54cd0e..4d97df927 100644 --- a/xorg-server/hw/dmx/dmxvisual.h +++ b/xorg-server/hw/dmx/dmxvisual.h @@ -39,9 +39,9 @@ #include "scrnintstr.h" -extern Visual *dmxLookupVisual(ScreenPtr pScreen, VisualPtr pVisual); -extern Visual *dmxLookupVisualFromID(ScreenPtr pScreen, VisualID vid); -extern Colormap dmxColormapFromDefaultVisual(ScreenPtr pScreen, - Visual *visual); +extern Visual *dmxLookupVisual(ScreenPtr pScreen, VisualPtr pVisual); +extern Visual *dmxLookupVisualFromID(ScreenPtr pScreen, VisualID vid); +extern Colormap dmxColormapFromDefaultVisual(ScreenPtr pScreen, + Visual * visual); -#endif /* DMXVISUAL_H */ +#endif /* DMXVISUAL_H */ diff --git a/xorg-server/hw/dmx/glxProxy/compsize.h b/xorg-server/hw/dmx/glxProxy/compsize.h index 856c6f5ad..360966233 100644 --- a/xorg-server/hw/dmx/glxProxy/compsize.h +++ b/xorg-server/hw/dmx/glxProxy/compsize.h @@ -48,4 +48,4 @@ extern GLint __glTexGeniv_size(GLenum e); extern GLint __glTexParameterfv_size(GLenum e); extern GLint __glTexParameteriv_size(GLenum e); -#endif /* !__compsize_h__ */ +#endif /* !__compsize_h__ */ diff --git a/xorg-server/hw/dmx/glxProxy/global.c b/xorg-server/hw/dmx/glxProxy/global.c index 9cf8c11c3..6d4612deb 100644 --- a/xorg-server/hw/dmx/glxProxy/global.c +++ b/xorg-server/hw/dmx/glxProxy/global.c @@ -64,7 +64,7 @@ xGLXSingleReply __glXReply; ** A set of state for each client. The 0th one is unused because client ** indices start at 1, not 0. */ -__GLXclientState *__glXClients[MAXCLIENTS+1]; +__GLXclientState *__glXClients[MAXCLIENTS + 1]; int __glXVersionMajor; int __glXVersionMinor; diff --git a/xorg-server/hw/dmx/glxProxy/glxcmds.h b/xorg-server/hw/dmx/glxProxy/glxcmds.h index ae866be29..b0745927e 100644 --- a/xorg-server/hw/dmx/glxProxy/glxcmds.h +++ b/xorg-server/hw/dmx/glxProxy/glxcmds.h @@ -28,10 +28,10 @@ #ifndef __GLX_cmds_h__ #define __GLX_cmds_h__ -extern int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc); -extern int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); -extern int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc); -extern int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc); -extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc); +extern int __glXBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc); +extern int __glXCreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc); +extern int __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc); +extern int __glXMakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc); +extern int __glXQueryMaxSwapBarriersSGIX(__GLXclientState * cl, GLbyte * pc); -#endif /* !__GLX_cmds_h__ */ +#endif /* !__GLX_cmds_h__ */ diff --git a/xorg-server/hw/dmx/glxProxy/glxcontext.h b/xorg-server/hw/dmx/glxProxy/glxcontext.h index f88093bc7..ac8c0573d 100644 --- a/xorg-server/hw/dmx/glxProxy/glxcontext.h +++ b/xorg-server/hw/dmx/glxProxy/glxcontext.h @@ -37,68 +37,68 @@ typedef struct __GLXcontextRec __GLXcontext; struct __GLXcontextRec { /* - ** list of context structs - */ + ** list of context structs + */ struct __GLXcontextRec *last; struct __GLXcontextRec *next; /* - ** Pointer to screen info data for this context. This is set - ** when the context is created. - */ + ** Pointer to screen info data for this context. This is set + ** when the context is created. + */ ScreenPtr pScreen; __GLXscreenInfo *pGlxScreen; /* - ** This context is created with respect to this visual. - */ + ** This context is created with respect to this visual. + */ VisualRec *pVisual; __GLXvisualConfig *pGlxVisual; __GLXFBConfig *pFBConfig; /* - ** The XID of this context. - */ + ** The XID of this context. + */ XID id; XID *real_ids; /* - ** The XID of the shareList context. - */ + ** The XID of the shareList context. + */ XID share_id; /* - ** Visual id. - */ + ** Visual id. + */ VisualID vid; VisualID *real_vids; /* - ** screen number. - */ + ** screen number. + */ GLint screen; /* - ** Whether this context's ID still exists. - */ + ** Whether this context's ID still exists. + */ GLboolean idExists; - + /* - ** Whether this context is current for some client. - */ + ** Whether this context is current for some client. + */ GLboolean isCurrent; - + /* - ** Buffers for feedback and selection. - */ + ** Buffers for feedback and selection. + */ GLfloat *feedbackBuf; - GLint feedbackBufSize; /* number of elements allocated */ + GLint feedbackBufSize; /* number of elements allocated */ GLuint *selectBuf; - GLint selectBufSize; /* number of elements allocated */ + GLint selectBufSize; /* number of elements allocated */ /* - ** Set only if current drawable is a glx pixmap. - */ + ** Set only if current drawable is a glx pixmap. + */ __GLXpixmap *pGlxPixmap; __GLXpixmap *pGlxReadPixmap; __glXWindow *pGlxWindow; @@ -108,4 +108,4 @@ struct __GLXcontextRec { }; -#endif /* !__GLX_context_h__ */ +#endif /* !__GLX_context_h__ */ diff --git a/xorg-server/hw/dmx/glxProxy/glxdrawable.h b/xorg-server/hw/dmx/glxProxy/glxdrawable.h index 8f2d81e26..0340896e5 100644 --- a/xorg-server/hw/dmx/glxProxy/glxdrawable.h +++ b/xorg-server/hw/dmx/glxProxy/glxdrawable.h @@ -48,12 +48,11 @@ typedef struct { DrawablePtr pDraw; int type; Bool idExists; - int refcnt; /* contexts bound */ + int refcnt; /* contexts bound */ __GLXFBConfig *pGlxFBConfig; ScreenPtr pScreen; } __glXWindow; - typedef struct { __GLXscreenInfo *pGlxScreen; __GLXFBConfig *pFBConfig; @@ -63,4 +62,4 @@ typedef struct { XID *be_xids; } __glXPbuffer; -#endif /* !__GLX_drawable_h__ */ +#endif /* !__GLX_drawable_h__ */ diff --git a/xorg-server/hw/dmx/glxProxy/glxerror.h b/xorg-server/hw/dmx/glxProxy/glxerror.h index d84ec4457..26492d2d4 100644 --- a/xorg-server/hw/dmx/glxProxy/glxerror.h +++ b/xorg-server/hw/dmx/glxProxy/glxerror.h @@ -48,5 +48,4 @@ extern int __glXUnsupportedPrivateRequest; extern int __glXBadFBConfig; extern int __glXBadPbuffer; - #endif diff --git a/xorg-server/hw/dmx/glxProxy/glxscreens.h b/xorg-server/hw/dmx/glxProxy/glxscreens.h index da50bdc85..a9fe2a9db 100644 --- a/xorg-server/hw/dmx/glxProxy/glxscreens.h +++ b/xorg-server/hw/dmx/glxProxy/glxscreens.h @@ -33,8 +33,6 @@ #include "GL/internal/glcore.h" - - typedef struct { __GLXvisualConfig *pGlxVisual; @@ -47,10 +45,9 @@ typedef struct { } __GLXscreenInfo; - extern void __glXScreenInit(GLint); extern void __glXScreenReset(void); -extern char *__glXGetServerString( unsigned int name ); +extern char *__glXGetServerString(unsigned int name); -#endif /* !__GLX_screens_h__ */ +#endif /* !__GLX_screens_h__ */ diff --git a/xorg-server/hw/dmx/glxProxy/glxsingle.h b/xorg-server/hw/dmx/glxProxy/glxsingle.h index 7c23537e8..32a9d4921 100644 --- a/xorg-server/hw/dmx/glxProxy/glxsingle.h +++ b/xorg-server/hw/dmx/glxProxy/glxsingle.h @@ -31,24 +31,24 @@ #ifndef __GLXSINGLE_H #define __GLXSINGLE_H -extern int __glXForwardSingleReq( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc ); +extern int __glXForwardSingleReq(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardPipe0WithReply(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardAllWithReply(__GLXclientState * cl, GLbyte * pc); -extern int __glXForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc ); +extern int __glXForwardSingleReqSwap(__GLXclientState * cl, GLbyte * pc); -extern int __glXForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc ); +extern int __glXForwardPipe0WithReplySwap(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardPipe0WithReplySwapsv(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardPipe0WithReplySwapiv(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardPipe0WithReplySwapdv(__GLXclientState * cl, GLbyte * pc); -extern int __glXForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc ); -extern int __glXForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc ); +extern int __glXForwardAllWithReplySwap(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardAllWithReplySwapsv(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardAllWithReplySwapiv(__GLXclientState * cl, GLbyte * pc); +extern int __glXForwardAllWithReplySwapdv(__GLXclientState * cl, GLbyte * pc); -extern int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc); -extern int __glXDispSwap_GetTexImage(__GLXclientState *cl, GLbyte *pc); -extern int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc); +extern int __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc); +extern int __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc); +extern int __glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc); #endif diff --git a/xorg-server/hw/dmx/glxProxy/glxswap.h b/xorg-server/hw/dmx/glxProxy/glxswap.h index 08e38df7b..1e1fea14f 100644 --- a/xorg-server/hw/dmx/glxProxy/glxswap.h +++ b/xorg-server/hw/dmx/glxProxy/glxswap.h @@ -34,13 +34,13 @@ #ifndef __GLX_swap_h__ #define __GLX_swap_h__ -extern int JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember); -extern int SGSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag, - DrawablePtr pDraw); +extern int JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember); +extern int SGSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag, + DrawablePtr pDraw); extern void SwapBarrierInit(void); extern void SwapBarrierReset(void); -extern int QueryMaxSwapBarriersSGIX(int screen); -extern int BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier); +extern int QueryMaxSwapBarriersSGIX(int screen); +extern int BindSwapBarrierSGIX(DrawablePtr pDraw, int barrier); -#endif /* !__GLX_swap_h__ */ +#endif /* !__GLX_swap_h__ */ diff --git a/xorg-server/hw/dmx/glxProxy/unpack.h b/xorg-server/hw/dmx/glxProxy/unpack.h index c592c3d92..b4b73580c 100644 --- a/xorg-server/hw/dmx/glxProxy/unpack.h +++ b/xorg-server/hw/dmx/glxProxy/unpack.h @@ -1,230 +1,223 @@ -#ifndef __GLX_unpack_h__
-#define __GLX_unpack_h__
-
-/*
- * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
- * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
- *
- * 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 including the dates of first publication and
- * either this permission notice or a reference to
- * http://oss.sgi.com/projects/FreeB/
- * 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
- * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc.
- * shall not be used in advertising or otherwise to promote the sale, use or
- * other dealings in this Software without prior written authorization from
- * Silicon Graphics, Inc.
- */
-
-#define __GLX_PAD(s) (((s)+3) & (GLuint)~3)
-
-/*
-** Fetch the context-id out of a SingleReq request pointed to by pc.
-*/
-#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag)
-#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag)
-
-/*
-** Fetch a double from potentially unaligned memory.
-*/
-#ifdef __GLX_ALIGN64
-#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n)
-#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8)
-#else
-#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src))
-#endif
-
-extern void __glXMemInit(void);
-
-extern xGLXSingleReply __glXReply;
-
-#define __GLX_BEGIN_REPLY(size) \
- __glXReply.length = __GLX_PAD(size) >> 2; \
- __glXReply.type = X_Reply; \
- __glXReply.sequenceNumber = client->sequence;
-
-#define __GLX_SEND_HEADER() \
- WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply);
-
-#define __GLX_PUT_RETVAL(a) \
- __glXReply.retval = (a);
-
-#define __GLX_PUT_SIZE(a) \
- __glXReply.size = (a);
-
-#define __GLX_PUT_RENDERMODE(m) \
- __glXReply.pad3 = (m)
-
-/*
-** Get a buffer to hold returned data, with the given alignment. If we have
-** to realloc, allocate size+align, in case the pointer has to be bumped for
-** alignment. The answerBuffer should already be aligned.
-**
-** NOTE: the cast (long)res below assumes a long is large enough to hold a
-** pointer.
-*/
-#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \
- if ((size) > sizeof(answerBuffer)) { \
- int bump; \
- if ((cl)->returnBufSize < (size)+(align)) { \
- (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \
- (size)+(align)); \
- if (!(cl)->returnBuf) { \
- return BadAlloc; \
- } \
- (cl)->returnBufSize = (size)+(align); \
- } \
- res = (char*)cl->returnBuf; \
- bump = (long)(res) % (align); \
- if (bump) res += (align) - (bump); \
- } else { \
- res = (char *)answerBuffer; \
- }
-
-#define __GLX_PUT_BYTE() \
- *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer
-
-#define __GLX_PUT_SHORT() \
- *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer
-
-#define __GLX_PUT_INT() \
- *(GLint *)&__glXReply.pad3 = *(GLint *)answer
-
-#define __GLX_PUT_FLOAT() \
- *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer
-
-#define __GLX_PUT_DOUBLE() \
- *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer
-
-#define __GLX_SEND_BYTE_ARRAY(len) \
- WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer)
-
-#define __GLX_SEND_SHORT_ARRAY(len) \
- WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer)
-
-#define __GLX_SEND_INT_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer)
-
-#define __GLX_SEND_FLOAT_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer)
-
-#define __GLX_SEND_DOUBLE_ARRAY(len) \
- WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer)
-
-
-#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len)
-#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len)
-#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len)
-
-/*
-** PERFORMANCE NOTE:
-** Machine dependent optimizations abound here; these swapping macros can
-** conceivably be replaced with routines that do the job faster.
-*/
-#define __GLX_DECLARE_SWAP_VARIABLES \
- GLbyte sw
-
-#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \
- GLbyte *swapPC; \
- GLbyte *swapEnd
-
-
-#define __GLX_SWAP_INT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_SHORT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = sw;
-
-#define __GLX_SWAP_DOUBLE(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \
- ((GLbyte *)(pc))[7] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \
- ((GLbyte *)(pc))[6] = sw; \
- sw = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \
- ((GLbyte *)(pc))[5] = sw; \
- sw = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \
- ((GLbyte *)(pc))[4] = sw;
-
-#define __GLX_SWAP_FLOAT(pc) \
- sw = ((GLbyte *)(pc))[0]; \
- ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \
- ((GLbyte *)(pc))[3] = sw; \
- sw = ((GLbyte *)(pc))[1]; \
- ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \
- ((GLbyte *)(pc))[2] = sw;
-
-#define __GLX_SWAP_INT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_INT(swapPC); \
- swapPC += __GLX_SIZE_INT32; \
- }
-
-#define __GLX_SWAP_SHORT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_SHORT(swapPC); \
- swapPC += __GLX_SIZE_INT16; \
- }
-
-#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_DOUBLE(swapPC); \
- swapPC += __GLX_SIZE_FLOAT64; \
- }
-
-#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \
- swapPC = ((GLbyte *)(pc)); \
- swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\
- while (swapPC < swapEnd) { \
- __GLX_SWAP_FLOAT(swapPC); \
- swapPC += __GLX_SIZE_FLOAT32; \
- }
-
-#define __GLX_SWAP_REPLY_HEADER() \
- __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \
- __GLX_SWAP_INT(&__glXReply.length);
-
-#define __GLX_SWAP_REPLY_RETVAL() \
- __GLX_SWAP_INT(&__glXReply.retval)
-
-#define __GLX_SWAP_REPLY_SIZE() \
- __GLX_SWAP_INT(&__glXReply.size)
-
-#endif /* !__GLX_unpack_h__ */
-
-
-
-
-
+#ifndef __GLX_unpack_h__ +#define __GLX_unpack_h__ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * 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 including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * 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 + * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#define __GLX_PAD(s) (((s)+3) & (GLuint)~3) + +/* +** Fetch the context-id out of a SingleReq request pointed to by pc. +*/ +#define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag) +#define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag) + +/* +** Fetch a double from potentially unaligned memory. +*/ +#ifdef __GLX_ALIGN64 +#define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n) +#define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8) +#else +#define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) +#endif + +extern void __glXMemInit(void); + +extern xGLXSingleReply __glXReply; + +#define __GLX_BEGIN_REPLY(size) \ + __glXReply.length = __GLX_PAD(size) >> 2; \ + __glXReply.type = X_Reply; \ + __glXReply.sequenceNumber = client->sequence; + +#define __GLX_SEND_HEADER() \ + WriteToClient( client, sz_xGLXSingleReply, (char *)&__glXReply); + +#define __GLX_PUT_RETVAL(a) \ + __glXReply.retval = (a); + +#define __GLX_PUT_SIZE(a) \ + __glXReply.size = (a); + +#define __GLX_PUT_RENDERMODE(m) \ + __glXReply.pad3 = (m) + +/* +** Get a buffer to hold returned data, with the given alignment. If we have +** to realloc, allocate size+align, in case the pointer has to be bumped for +** alignment. The answerBuffer should already be aligned. +** +** NOTE: the cast (long)res below assumes a long is large enough to hold a +** pointer. +*/ +#define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \ + if ((size) > sizeof(answerBuffer)) { \ + int bump; \ + if ((cl)->returnBufSize < (size)+(align)) { \ + (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ + (size)+(align)); \ + if (!(cl)->returnBuf) { \ + return BadAlloc; \ + } \ + (cl)->returnBufSize = (size)+(align); \ + } \ + res = (char*)cl->returnBuf; \ + bump = (long)(res) % (align); \ + if (bump) res += (align) - (bump); \ + } else { \ + res = (char *)answerBuffer; \ + } + +#define __GLX_PUT_BYTE() \ + *(GLbyte *)&__glXReply.pad3 = *(GLbyte *)answer + +#define __GLX_PUT_SHORT() \ + *(GLshort *)&__glXReply.pad3 = *(GLshort *)answer + +#define __GLX_PUT_INT() \ + *(GLint *)&__glXReply.pad3 = *(GLint *)answer + +#define __GLX_PUT_FLOAT() \ + *(GLfloat *)&__glXReply.pad3 = *(GLfloat *)answer + +#define __GLX_PUT_DOUBLE() \ + *(GLdouble *)&__glXReply.pad3 = *(GLdouble *)answer + +#define __GLX_SEND_BYTE_ARRAY(len) \ + WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), (char *)answer) + +#define __GLX_SEND_SHORT_ARRAY(len) \ + WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), (char *)answer) + +#define __GLX_SEND_INT_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_INT32, (char *)answer) + +#define __GLX_SEND_FLOAT_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, (char *)answer) + +#define __GLX_SEND_DOUBLE_ARRAY(len) \ + WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, (char *)answer) + +#define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) +#define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) +#define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len) +#define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len) + +/* +** PERFORMANCE NOTE: +** Machine dependent optimizations abound here; these swapping macros can +** conceivably be replaced with routines that do the job faster. +*/ +#define __GLX_DECLARE_SWAP_VARIABLES \ + GLbyte sw + +#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \ + GLbyte *swapPC; \ + GLbyte *swapEnd + +#define __GLX_SWAP_INT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = sw; + +#define __GLX_SWAP_SHORT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = sw; + +#define __GLX_SWAP_DOUBLE(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \ + ((GLbyte *)(pc))[7] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \ + ((GLbyte *)(pc))[6] = sw; \ + sw = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \ + ((GLbyte *)(pc))[5] = sw; \ + sw = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \ + ((GLbyte *)(pc))[4] = sw; + +#define __GLX_SWAP_FLOAT(pc) \ + sw = ((GLbyte *)(pc))[0]; \ + ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ + ((GLbyte *)(pc))[3] = sw; \ + sw = ((GLbyte *)(pc))[1]; \ + ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ + ((GLbyte *)(pc))[2] = sw; + +#define __GLX_SWAP_INT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_INT(swapPC); \ + swapPC += __GLX_SIZE_INT32; \ + } + +#define __GLX_SWAP_SHORT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_SHORT(swapPC); \ + swapPC += __GLX_SIZE_INT16; \ + } + +#define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_DOUBLE(swapPC); \ + swapPC += __GLX_SIZE_FLOAT64; \ + } + +#define __GLX_SWAP_FLOAT_ARRAY(pc, count) \ + swapPC = ((GLbyte *)(pc)); \ + swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\ + while (swapPC < swapEnd) { \ + __GLX_SWAP_FLOAT(swapPC); \ + swapPC += __GLX_SIZE_FLOAT32; \ + } + +#define __GLX_SWAP_REPLY_HEADER() \ + __GLX_SWAP_SHORT(&__glXReply.sequenceNumber); \ + __GLX_SWAP_INT(&__glXReply.length); + +#define __GLX_SWAP_REPLY_RETVAL() \ + __GLX_SWAP_INT(&__glXReply.retval) + +#define __GLX_SWAP_REPLY_SIZE() \ + __GLX_SWAP_INT(&__glXReply.size) + +#endif /* !__GLX_unpack_h__ */ diff --git a/xorg-server/hw/dmx/input/ChkNotMaskEv.h b/xorg-server/hw/dmx/input/ChkNotMaskEv.h index f79075e1d..78ad51f91 100644 --- a/xorg-server/hw/dmx/input/ChkNotMaskEv.h +++ b/xorg-server/hw/dmx/input/ChkNotMaskEv.h @@ -36,5 +36,5 @@ #ifndef _CHKNOTMASKEV_H_ #define _CHKNOTMASKEV_H_ -extern Bool XCheckNotMaskEvent (Display *dpy, long mask, XEvent *event); +extern Bool XCheckNotMaskEvent(Display * dpy, long mask, XEvent * event); #endif diff --git a/xorg-server/hw/dmx/input/atKeynames.h b/xorg-server/hw/dmx/input/atKeynames.h index 551a9e1b0..68e2eb31d 100644 --- a/xorg-server/hw/dmx/input/atKeynames.h +++ b/xorg-server/hw/dmx/input/atKeynames.h @@ -1,292 +1,292 @@ -/*
- * 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.
- *
- */
-/*
- * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
- *
- * 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
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s)
- * and author(s) 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 copyright holder(s) and author(s).
- */
-
-#ifndef _ATKEYNAMES_H
-#define _ATKEYNAMES_H
-
-#define XK_TECHNICAL
-#define XK_KATAKANA
-#include <X11/keysym.h>
-#include <X11/XF86keysym.h>
-
-#define GLYPHS_PER_KEY 4
-#define NUM_KEYCODES 248
-#define MIN_KEYCODE 8
-#define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1)
-
-#define AltMask Mod1Mask
-#define NumLockMask Mod2Mask
-#define AltLangMask Mod3Mask
-#define KanaMask Mod4Mask
-#define ScrollLockMask Mod5Mask
-
-/*
- * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
- * sets of scancodes. Set3 can only be generated by a MF keyboard.
- * Set2 sends a makecode for keypress, and the same code prefixed by a
- * F0 for keyrelease. This is a little bit ugly to handle. Thus we use
- * here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
- * Bit 7 ist set if the key is released. The code E0 switches to a
- * different meaning to add the new MF cursorkeys, while not breaking old
- * applications. E1 is another special prefix. Since I assume that there
- * will be further versions of PC/XT scancode compatible keyboards, we
- * may be in trouble one day.
- *
- * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3.
- * 2) Use the keyboards native set and translate it to common keysyms.
- */
-
-/*
- * definition of the AT84/MF101/MF102 Keyboard:
- * ============================================================
- * Defined Key Cap Glyphs Pressed value
- * Key Name Main Also (hex) (dec)
- * ---------------- ---------- ------- ------ ------
- */
-
-#define KEY_Escape /* Escape 0x01 */ 1
-#define KEY_1 /* 1 ! 0x02 */ 2
-#define KEY_2 /* 2 @ 0x03 */ 3
-#define KEY_3 /* 3 # 0x04 */ 4
-#define KEY_4 /* 4 $ 0x05 */ 5
-#define KEY_5 /* 5 % 0x06 */ 6
-#define KEY_6 /* 6 ^ 0x07 */ 7
-#define KEY_7 /* 7 & 0x08 */ 8
-#define KEY_8 /* 8 * 0x09 */ 9
-#define KEY_9 /* 9 ( 0x0a */ 10
-#define KEY_0 /* 0 ) 0x0b */ 11
-#define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12
-#define KEY_Equal /* = (Equal) + 0x0d */ 13
-#define KEY_BackSpace /* Back Space 0x0e */ 14
-#define KEY_Tab /* Tab 0x0f */ 15
-#define KEY_Q /* Q 0x10 */ 16
-#define KEY_W /* W 0x11 */ 17
-#define KEY_E /* E 0x12 */ 18
-#define KEY_R /* R 0x13 */ 19
-#define KEY_T /* T 0x14 */ 20
-#define KEY_Y /* Y 0x15 */ 21
-#define KEY_U /* U 0x16 */ 22
-#define KEY_I /* I 0x17 */ 23
-#define KEY_O /* O 0x18 */ 24
-#define KEY_P /* P 0x19 */ 25
-#define KEY_LBrace /* [ { 0x1a */ 26
-#define KEY_RBrace /* ] } 0x1b */ 27
-#define KEY_Enter /* Enter 0x1c */ 28
-#define KEY_LCtrl /* Ctrl(left) 0x1d */ 29
-#define KEY_A /* A 0x1e */ 30
-#define KEY_S /* S 0x1f */ 31
-#define KEY_D /* D 0x20 */ 32
-#define KEY_F /* F 0x21 */ 33
-#define KEY_G /* G 0x22 */ 34
-#define KEY_H /* H 0x23 */ 35
-#define KEY_J /* J 0x24 */ 36
-#define KEY_K /* K 0x25 */ 37
-#define KEY_L /* L 0x26 */ 38
-#define KEY_SemiColon /* ;(SemiColon) :(Colon) 0x27 */ 39
-#define KEY_Quote /* ' (Apostr) " (Quote) 0x28 */ 40
-#define KEY_Tilde /* ` (Accent) ~ (Tilde) 0x29 */ 41
-#define KEY_ShiftL /* Shift(left) 0x2a */ 42
-#define KEY_BSlash /* \(BckSlash) |(VertBar)0x2b */ 43
-#define KEY_Z /* Z 0x2c */ 44
-#define KEY_X /* X 0x2d */ 45
-#define KEY_C /* C 0x2e */ 46
-#define KEY_V /* V 0x2f */ 47
-#define KEY_B /* B 0x30 */ 48
-#define KEY_N /* N 0x31 */ 49
-#define KEY_M /* M 0x32 */ 50
-#define KEY_Comma /* , (Comma) < (Less) 0x33 */ 51
-#define KEY_Period /* . (Period) >(Greater)0x34 */ 52
-#define KEY_Slash /* / (Slash) ? 0x35 */ 53
-#define KEY_ShiftR /* Shift(right) 0x36 */ 54
-#define KEY_KP_Multiply /* * 0x37 */ 55
-#define KEY_Alt /* Alt(left) 0x38 */ 56
-#define KEY_Space /* (SpaceBar) 0x39 */ 57
-#define KEY_CapsLock /* CapsLock 0x3a */ 58
-#define KEY_F1 /* F1 0x3b */ 59
-#define KEY_F2 /* F2 0x3c */ 60
-#define KEY_F3 /* F3 0x3d */ 61
-#define KEY_F4 /* F4 0x3e */ 62
-#define KEY_F5 /* F5 0x3f */ 63
-#define KEY_F6 /* F6 0x40 */ 64
-#define KEY_F7 /* F7 0x41 */ 65
-#define KEY_F8 /* F8 0x42 */ 66
-#define KEY_F9 /* F9 0x43 */ 67
-#define KEY_F10 /* F10 0x44 */ 68
-#define KEY_NumLock /* NumLock 0x45 */ 69
-#define KEY_ScrollLock /* ScrollLock 0x46 */ 70
-#define KEY_KP_7 /* 7 Home 0x47 */ 71
-#define KEY_KP_8 /* 8 Up 0x48 */ 72
-#define KEY_KP_9 /* 9 PgUp 0x49 */ 73
-#define KEY_KP_Minus /* - (Minus) 0x4a */ 74
-#define KEY_KP_4 /* 4 Left 0x4b */ 75
-#define KEY_KP_5 /* 5 0x4c */ 76
-#define KEY_KP_6 /* 6 Right 0x4d */ 77
-#define KEY_KP_Plus /* + (Plus) 0x4e */ 78
-#define KEY_KP_1 /* 1 End 0x4f */ 79
-#define KEY_KP_2 /* 2 Down 0x50 */ 80
-#define KEY_KP_3 /* 3 PgDown 0x51 */ 81
-#define KEY_KP_0 /* 0 Insert 0x52 */ 82
-#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83
-#define KEY_SysReqest /* SysReqest 0x54 */ 84
- /* NOTUSED 0x55 */
-#define KEY_Less /* < (Less) >(Greater) 0x56 */ 86
-#define KEY_F11 /* F11 0x57 */ 87
-#define KEY_F12 /* F12 0x58 */ 88
-
-#define KEY_Prefix0 /* special 0x60 */ 96
-#define KEY_Prefix1 /* specail 0x61 */ 97
-
-/*
- * The 'scancodes' below are generated by the server, because the MF101/102
- * keyboard sends them as sequence of other scancodes
- */
-#define KEY_Home /* Home 0x59 */ 89
-#define KEY_Up /* Up 0x5a */ 90
-#define KEY_PgUp /* PgUp 0x5b */ 91
-#define KEY_Left /* Left 0x5c */ 92
-#define KEY_Begin /* Begin 0x5d */ 93
-#define KEY_Right /* Right 0x5e */ 94
-#define KEY_End /* End 0x5f */ 95
-#define KEY_Down /* Down 0x60 */ 96
-#define KEY_PgDown /* PgDown 0x61 */ 97
-#define KEY_Insert /* Insert 0x62 */ 98
-#define KEY_Delete /* Delete 0x63 */ 99
-#define KEY_KP_Enter /* Enter 0x64 */ 100
-#define KEY_RCtrl /* Ctrl(right) 0x65 */ 101
-#define KEY_Pause /* Pause 0x66 */ 102
-#define KEY_Print /* Print 0x67 */ 103
-#define KEY_KP_Divide /* Divide 0x68 */ 104
-#define KEY_AltLang /* AtlLang(right) 0x69 */ 105
-#define KEY_Break /* Break 0x6a */ 106
-#define KEY_LMeta /* Left Meta 0x6b */ 107
-#define KEY_RMeta /* Right Meta 0x6c */ 108
-#define KEY_Menu /* Menu 0x6d */ 109
-#define KEY_F13 /* F13 0x6e */ 110
-#define KEY_F14 /* F14 0x6f */ 111
-#define KEY_F15 /* F15 0x70 */ 112
-#define KEY_HKTG /* Hirugana/Katakana tog 0x70 */ 112
-#define KEY_F16 /* F16 0x71 */ 113
-#define KEY_F17 /* F17 0x72 */ 114
-#define KEY_KP_DEC /* KP_DEC 0x73 */ 115
-#define KEY_BSlash2 /* \ _ 0x73 */ 115
-#define KEY_KP_Equal /* Equal (Keypad) 0x76 */ 118
-#define KEY_XFER /* Kanji Transfer 0x79 */ 121
-#define KEY_NFER /* No Kanji Transfer 0x7b */ 123
-#define KEY_Yen /* Yen 0x7d */ 125
-
-#define KEY_Power /* Power Key 0x84 */ 132
-#define KEY_Mute /* Audio Mute 0x85 */ 133
-#define KEY_AudioLower /* Audio Lower 0x86 */ 134
-#define KEY_AudioRaise /* Audio Raise 0x87 */ 135
-#define KEY_Help /* Help 0x88 */ 136
-#define KEY_L1 /* Stop 0x89 */ 137
-#define KEY_L2 /* Again 0x8a */ 138
-#define KEY_L3 /* Props 0x8b */ 139
-#define KEY_L4 /* Undo 0x8c */ 140
-#define KEY_L5 /* Front 0x8d */ 141
-#define KEY_L6 /* Copy 0x8e */ 142
-#define KEY_L7 /* Open 0x8f */ 143
-#define KEY_L8 /* Paste 0x90 */ 144
-#define KEY_L9 /* Find 0x91 */ 145
-#define KEY_L10 /* Cut 0x92 */ 146
-
-/*
- * Fake 'scancodes' in the following ranges are generated for 2-byte
- * codes not handled elsewhere. These correspond to most extended keys
- * on so-called "Internet" keyboards:
- *
- * 0x79-0x93
- * 0x96-0xa1
- * 0xa3-0xac
- * 0xb1-0xb4
- * 0xba-0xbd
- * 0xc2
- * 0xcc-0xd2
- * 0xd6-0xf7
- */
-
-/*
- * Remapped 'scancodes' are generated for single-byte codes in the range
- * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards.
- */
-
-#define KEY_0x59 0x95
-#define KEY_0x5A 0xA2
-#define KEY_0x5B 0xAD
-#define KEY_0x5C KEY_KP_EQUAL
-#define KEY_0x5D 0xAE
-#define KEY_0x5E 0xAF
-#define KEY_0x5F 0xB0
-#define KEY_0x62 0xB5
-#define KEY_0x63 0xB6
-#define KEY_0x64 0xB7
-#define KEY_0x65 0xB8
-#define KEY_0x66 0xB9
-#define KEY_0x67 0xBE
-#define KEY_0x68 0xBF
-#define KEY_0x69 0xC0
-#define KEY_0x6A 0xC1
-#define KEY_0x6B 0xC3
-#define KEY_0x6C 0xC4
-#define KEY_0x6D 0xC5
-#define KEY_0x6E 0xC6
-#define KEY_0x6F 0xC7
-#define KEY_0x70 0xC8
-#define KEY_0x71 0xC9
-#define KEY_0x72 0xCA
-#define KEY_0x73 0xCB
-#define KEY_0x74 0xD3
-#define KEY_0x75 0xD4
-#define KEY_0x76 0xD5
-
-/* These are for "notused" and "unknown" entries in translation maps. */
-#define KEY_NOTUSED 0
-#define KEY_UNKNOWN 255
-
-#endif /* _ATKEYNAMES_H */
+/* + * 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. + * + */ +/* + * Copyright (c) 1994-2003 by The XFree86 Project, Inc. + * + * 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 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) + * and author(s) 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 copyright holder(s) and author(s). + */ + +#ifndef _ATKEYNAMES_H +#define _ATKEYNAMES_H + +#define XK_TECHNICAL +#define XK_KATAKANA +#include <X11/keysym.h> +#include <X11/XF86keysym.h> + +#define GLYPHS_PER_KEY 4 +#define NUM_KEYCODES 248 +#define MIN_KEYCODE 8 +#define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1) + +#define AltMask Mod1Mask +#define NumLockMask Mod2Mask +#define AltLangMask Mod3Mask +#define KanaMask Mod4Mask +#define ScrollLockMask Mod5Mask + +/* + * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three) + * sets of scancodes. Set3 can only be generated by a MF keyboard. + * Set2 sends a makecode for keypress, and the same code prefixed by a + * F0 for keyrelease. This is a little bit ugly to handle. Thus we use + * here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes. + * Bit 7 ist set if the key is released. The code E0 switches to a + * different meaning to add the new MF cursorkeys, while not breaking old + * applications. E1 is another special prefix. Since I assume that there + * will be further versions of PC/XT scancode compatible keyboards, we + * may be in trouble one day. + * + * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3. + * 2) Use the keyboards native set and translate it to common keysyms. + */ + +/* + * definition of the AT84/MF101/MF102 Keyboard: + * ============================================================ + * Defined Key Cap Glyphs Pressed value + * Key Name Main Also (hex) (dec) + * ---------------- ---------- ------- ------ ------ + */ + +#define KEY_Escape /* Escape 0x01 */ 1 +#define KEY_1 /* 1 ! 0x02 */ 2 +#define KEY_2 /* 2 @ 0x03 */ 3 +#define KEY_3 /* 3 # 0x04 */ 4 +#define KEY_4 /* 4 $ 0x05 */ 5 +#define KEY_5 /* 5 % 0x06 */ 6 +#define KEY_6 /* 6 ^ 0x07 */ 7 +#define KEY_7 /* 7 & 0x08 */ 8 +#define KEY_8 /* 8 * 0x09 */ 9 +#define KEY_9 /* 9 ( 0x0a */ 10 +#define KEY_0 /* 0 ) 0x0b */ 11 +#define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12 +#define KEY_Equal /* = (Equal) + 0x0d */ 13 +#define KEY_BackSpace /* Back Space 0x0e */ 14 +#define KEY_Tab /* Tab 0x0f */ 15 +#define KEY_Q /* Q 0x10 */ 16 +#define KEY_W /* W 0x11 */ 17 +#define KEY_E /* E 0x12 */ 18 +#define KEY_R /* R 0x13 */ 19 +#define KEY_T /* T 0x14 */ 20 +#define KEY_Y /* Y 0x15 */ 21 +#define KEY_U /* U 0x16 */ 22 +#define KEY_I /* I 0x17 */ 23 +#define KEY_O /* O 0x18 */ 24 +#define KEY_P /* P 0x19 */ 25 +#define KEY_LBrace /* [ { 0x1a */ 26 +#define KEY_RBrace /* ] } 0x1b */ 27 +#define KEY_Enter /* Enter 0x1c */ 28 +#define KEY_LCtrl /* Ctrl(left) 0x1d */ 29 +#define KEY_A /* A 0x1e */ 30 +#define KEY_S /* S 0x1f */ 31 +#define KEY_D /* D 0x20 */ 32 +#define KEY_F /* F 0x21 */ 33 +#define KEY_G /* G 0x22 */ 34 +#define KEY_H /* H 0x23 */ 35 +#define KEY_J /* J 0x24 */ 36 +#define KEY_K /* K 0x25 */ 37 +#define KEY_L /* L 0x26 */ 38 +#define KEY_SemiColon /* ;(SemiColon) :(Colon) 0x27 */ 39 +#define KEY_Quote /* ' (Apostr) " (Quote) 0x28 */ 40 +#define KEY_Tilde /* ` (Accent) ~ (Tilde) 0x29 */ 41 +#define KEY_ShiftL /* Shift(left) 0x2a */ 42 +#define KEY_BSlash /* \(BckSlash) |(VertBar)0x2b */ 43 +#define KEY_Z /* Z 0x2c */ 44 +#define KEY_X /* X 0x2d */ 45 +#define KEY_C /* C 0x2e */ 46 +#define KEY_V /* V 0x2f */ 47 +#define KEY_B /* B 0x30 */ 48 +#define KEY_N /* N 0x31 */ 49 +#define KEY_M /* M 0x32 */ 50 +#define KEY_Comma /* , (Comma) < (Less) 0x33 */ 51 +#define KEY_Period /* . (Period) >(Greater)0x34 */ 52 +#define KEY_Slash /* / (Slash) ? 0x35 */ 53 +#define KEY_ShiftR /* Shift(right) 0x36 */ 54 +#define KEY_KP_Multiply /* * 0x37 */ 55 +#define KEY_Alt /* Alt(left) 0x38 */ 56 +#define KEY_Space /* (SpaceBar) 0x39 */ 57 +#define KEY_CapsLock /* CapsLock 0x3a */ 58 +#define KEY_F1 /* F1 0x3b */ 59 +#define KEY_F2 /* F2 0x3c */ 60 +#define KEY_F3 /* F3 0x3d */ 61 +#define KEY_F4 /* F4 0x3e */ 62 +#define KEY_F5 /* F5 0x3f */ 63 +#define KEY_F6 /* F6 0x40 */ 64 +#define KEY_F7 /* F7 0x41 */ 65 +#define KEY_F8 /* F8 0x42 */ 66 +#define KEY_F9 /* F9 0x43 */ 67 +#define KEY_F10 /* F10 0x44 */ 68 +#define KEY_NumLock /* NumLock 0x45 */ 69 +#define KEY_ScrollLock /* ScrollLock 0x46 */ 70 +#define KEY_KP_7 /* 7 Home 0x47 */ 71 +#define KEY_KP_8 /* 8 Up 0x48 */ 72 +#define KEY_KP_9 /* 9 PgUp 0x49 */ 73 +#define KEY_KP_Minus /* - (Minus) 0x4a */ 74 +#define KEY_KP_4 /* 4 Left 0x4b */ 75 +#define KEY_KP_5 /* 5 0x4c */ 76 +#define KEY_KP_6 /* 6 Right 0x4d */ 77 +#define KEY_KP_Plus /* + (Plus) 0x4e */ 78 +#define KEY_KP_1 /* 1 End 0x4f */ 79 +#define KEY_KP_2 /* 2 Down 0x50 */ 80 +#define KEY_KP_3 /* 3 PgDown 0x51 */ 81 +#define KEY_KP_0 /* 0 Insert 0x52 */ 82 +#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83 +#define KEY_SysReqest /* SysReqest 0x54 */ 84 + /* NOTUSED 0x55 */ +#define KEY_Less /* < (Less) >(Greater) 0x56 */ 86 +#define KEY_F11 /* F11 0x57 */ 87 +#define KEY_F12 /* F12 0x58 */ 88 + +#define KEY_Prefix0 /* special 0x60 */ 96 +#define KEY_Prefix1 /* specail 0x61 */ 97 + +/* + * The 'scancodes' below are generated by the server, because the MF101/102 + * keyboard sends them as sequence of other scancodes + */ +#define KEY_Home /* Home 0x59 */ 89 +#define KEY_Up /* Up 0x5a */ 90 +#define KEY_PgUp /* PgUp 0x5b */ 91 +#define KEY_Left /* Left 0x5c */ 92 +#define KEY_Begin /* Begin 0x5d */ 93 +#define KEY_Right /* Right 0x5e */ 94 +#define KEY_End /* End 0x5f */ 95 +#define KEY_Down /* Down 0x60 */ 96 +#define KEY_PgDown /* PgDown 0x61 */ 97 +#define KEY_Insert /* Insert 0x62 */ 98 +#define KEY_Delete /* Delete 0x63 */ 99 +#define KEY_KP_Enter /* Enter 0x64 */ 100 +#define KEY_RCtrl /* Ctrl(right) 0x65 */ 101 +#define KEY_Pause /* Pause 0x66 */ 102 +#define KEY_Print /* Print 0x67 */ 103 +#define KEY_KP_Divide /* Divide 0x68 */ 104 +#define KEY_AltLang /* AtlLang(right) 0x69 */ 105 +#define KEY_Break /* Break 0x6a */ 106 +#define KEY_LMeta /* Left Meta 0x6b */ 107 +#define KEY_RMeta /* Right Meta 0x6c */ 108 +#define KEY_Menu /* Menu 0x6d */ 109 +#define KEY_F13 /* F13 0x6e */ 110 +#define KEY_F14 /* F14 0x6f */ 111 +#define KEY_F15 /* F15 0x70 */ 112 +#define KEY_HKTG /* Hirugana/Katakana tog 0x70 */ 112 +#define KEY_F16 /* F16 0x71 */ 113 +#define KEY_F17 /* F17 0x72 */ 114 +#define KEY_KP_DEC /* KP_DEC 0x73 */ 115 +#define KEY_BSlash2 /* \ _ 0x73 */ 115 +#define KEY_KP_Equal /* Equal (Keypad) 0x76 */ 118 +#define KEY_XFER /* Kanji Transfer 0x79 */ 121 +#define KEY_NFER /* No Kanji Transfer 0x7b */ 123 +#define KEY_Yen /* Yen 0x7d */ 125 + +#define KEY_Power /* Power Key 0x84 */ 132 +#define KEY_Mute /* Audio Mute 0x85 */ 133 +#define KEY_AudioLower /* Audio Lower 0x86 */ 134 +#define KEY_AudioRaise /* Audio Raise 0x87 */ 135 +#define KEY_Help /* Help 0x88 */ 136 +#define KEY_L1 /* Stop 0x89 */ 137 +#define KEY_L2 /* Again 0x8a */ 138 +#define KEY_L3 /* Props 0x8b */ 139 +#define KEY_L4 /* Undo 0x8c */ 140 +#define KEY_L5 /* Front 0x8d */ 141 +#define KEY_L6 /* Copy 0x8e */ 142 +#define KEY_L7 /* Open 0x8f */ 143 +#define KEY_L8 /* Paste 0x90 */ 144 +#define KEY_L9 /* Find 0x91 */ 145 +#define KEY_L10 /* Cut 0x92 */ 146 + +/* + * Fake 'scancodes' in the following ranges are generated for 2-byte + * codes not handled elsewhere. These correspond to most extended keys + * on so-called "Internet" keyboards: + * + * 0x79-0x93 + * 0x96-0xa1 + * 0xa3-0xac + * 0xb1-0xb4 + * 0xba-0xbd + * 0xc2 + * 0xcc-0xd2 + * 0xd6-0xf7 + */ + +/* + * Remapped 'scancodes' are generated for single-byte codes in the range + * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards. + */ + +#define KEY_0x59 0x95 +#define KEY_0x5A 0xA2 +#define KEY_0x5B 0xAD +#define KEY_0x5C KEY_KP_EQUAL +#define KEY_0x5D 0xAE +#define KEY_0x5E 0xAF +#define KEY_0x5F 0xB0 +#define KEY_0x62 0xB5 +#define KEY_0x63 0xB6 +#define KEY_0x64 0xB7 +#define KEY_0x65 0xB8 +#define KEY_0x66 0xB9 +#define KEY_0x67 0xBE +#define KEY_0x68 0xBF +#define KEY_0x69 0xC0 +#define KEY_0x6A 0xC1 +#define KEY_0x6B 0xC3 +#define KEY_0x6C 0xC4 +#define KEY_0x6D 0xC5 +#define KEY_0x6E 0xC6 +#define KEY_0x6F 0xC7 +#define KEY_0x70 0xC8 +#define KEY_0x71 0xC9 +#define KEY_0x72 0xCA +#define KEY_0x73 0xCB +#define KEY_0x74 0xD3 +#define KEY_0x75 0xD4 +#define KEY_0x76 0xD5 + +/* These are for "notused" and "unknown" entries in translation maps. */ +#define KEY_NOTUSED 0 +#define KEY_UNKNOWN 255 + +#endif /* _ATKEYNAMES_H */ diff --git a/xorg-server/hw/dmx/input/dmxarg.h b/xorg-server/hw/dmx/input/dmxarg.h index ca76f9272..acd8805b6 100644 --- a/xorg-server/hw/dmx/input/dmxarg.h +++ b/xorg-server/hw/dmx/input/dmxarg.h @@ -39,11 +39,11 @@ typedef struct _dmxArg *dmxArg; -extern dmxArg dmxArgCreate(void); -extern void dmxArgFree(dmxArg a); -extern void dmxArgAdd(dmxArg a, const char *string); +extern dmxArg dmxArgCreate(void); +extern void dmxArgFree(dmxArg a); +extern void dmxArgAdd(dmxArg a, const char *string); extern const char *dmxArgV(dmxArg a, int item); -extern int dmxArgC(dmxArg a); -extern dmxArg dmxArgParse(const char *string); +extern int dmxArgC(dmxArg a); +extern dmxArg dmxArgParse(const char *string); #endif diff --git a/xorg-server/hw/dmx/input/dmxbackend.h b/xorg-server/hw/dmx/input/dmxbackend.h index ee78f0014..6a49a56d6 100644 --- a/xorg-server/hw/dmx/input/dmxbackend.h +++ b/xorg-server/hw/dmx/input/dmxbackend.h @@ -39,18 +39,18 @@ #define _DMXBACKEND_H_ extern pointer dmxBackendCreatePrivate(DeviceIntPtr pDevice); -extern void dmxBackendDestroyPrivate(pointer private); -extern void dmxBackendInit(DevicePtr pDev); -extern void dmxBackendLateReInit(DevicePtr pDev); -extern void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern void dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern void dmxBackendCollectEvents(DevicePtr pDev, - dmxMotionProcPtr motion, - dmxEnqueueProcPtr enqueue, - dmxCheckSpecialProcPtr checkspecial, - DMXBlockType block); -extern void dmxBackendProcessInput(pointer private); -extern int dmxBackendFunctions(pointer private, DMXFunctionType function); -extern void dmxBackendUpdatePosition(pointer private, int x, int y); +extern void dmxBackendDestroyPrivate(pointer private); +extern void dmxBackendInit(DevicePtr pDev); +extern void dmxBackendLateReInit(DevicePtr pDev); +extern void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern void dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern void dmxBackendCollectEvents(DevicePtr pDev, + dmxMotionProcPtr motion, + dmxEnqueueProcPtr enqueue, + dmxCheckSpecialProcPtr checkspecial, + DMXBlockType block); +extern void dmxBackendProcessInput(pointer private); +extern int dmxBackendFunctions(pointer private, DMXFunctionType function); +extern void dmxBackendUpdatePosition(pointer private, int x, int y); #endif diff --git a/xorg-server/hw/dmx/input/dmxcommon.h b/xorg-server/hw/dmx/input/dmxcommon.h index 68f2b520d..d4f8d3c89 100644 --- a/xorg-server/hw/dmx/input/dmxcommon.h +++ b/xorg-server/hw/dmx/input/dmxcommon.h @@ -98,27 +98,27 @@ #define DMX_POINTER_EVENT_MASK \ (ButtonPressMask | ButtonReleaseMask | PointerMotionMask) -extern void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern void dmxCommonKbdGetMap(DevicePtr pDev, - KeySymsPtr pKeySyms, CARD8 *pModMap); -extern void dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl *ctrl); -extern void dmxCommonKbdBell(DevicePtr pDev, int percent, - int volume, int pitch, int duration); -extern int dmxCommonKbdOn(DevicePtr pDev); -extern void dmxCommonKbdOff(DevicePtr pDev); -extern void dmxCommonMouGetMap(DevicePtr pDev, - unsigned char *map, int *nButtons); -extern void dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl *ctrl); -extern int dmxCommonMouOn(DevicePtr pDev); -extern void dmxCommonMouOff(DevicePtr pDev); -extern int dmxFindPointerScreen(int x, int y); - -extern int dmxCommonOthOn(DevicePtr pDev); -extern void dmxCommonOthOff(DevicePtr pDev); -extern void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern void dmxCommonKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern void dmxCommonKbdGetMap(DevicePtr pDev, + KeySymsPtr pKeySyms, CARD8 *pModMap); +extern void dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl * ctrl); +extern void dmxCommonKbdBell(DevicePtr pDev, int percent, + int volume, int pitch, int duration); +extern int dmxCommonKbdOn(DevicePtr pDev); +extern void dmxCommonKbdOff(DevicePtr pDev); +extern void dmxCommonMouGetMap(DevicePtr pDev, + unsigned char *map, int *nButtons); +extern void dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl * ctrl); +extern int dmxCommonMouOn(DevicePtr pDev); +extern void dmxCommonMouOff(DevicePtr pDev); +extern int dmxFindPointerScreen(int x, int y); + +extern int dmxCommonOthOn(DevicePtr pDev); +extern void dmxCommonOthOff(DevicePtr pDev); +extern void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); /* helper functions */ extern pointer dmxCommonCopyPrivate(DeviceIntPtr pDevice); -extern void dmxCommonSaveState(pointer private); -extern void dmxCommonRestoreState(pointer private); +extern void dmxCommonSaveState(pointer private); +extern void dmxCommonRestoreState(pointer private); #endif diff --git a/xorg-server/hw/dmx/input/dmxconsole.h b/xorg-server/hw/dmx/input/dmxconsole.h index cd545d39b..1c5261101 100644 --- a/xorg-server/hw/dmx/input/dmxconsole.h +++ b/xorg-server/hw/dmx/input/dmxconsole.h @@ -38,22 +38,22 @@ #define _DMXCONSOLE_H_ extern pointer dmxConsoleCreatePrivate(DeviceIntPtr pDevice); -extern void dmxConsoleDestroyPrivate(pointer private); -extern void dmxConsoleInit(DevicePtr pDev); -extern void dmxConsoleReInit(DevicePtr pDev); -extern void dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern void dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern void dmxConsoleCollectEvents(DevicePtr pDev, - dmxMotionProcPtr motion, - dmxEnqueueProcPtr enqueue, - dmxCheckSpecialProcPtr checkspecial, - DMXBlockType block); -extern int dmxConsoleFunctions(pointer private, DMXFunctionType function); -extern void dmxConsoleUpdatePosition(pointer private, int x, int y); -extern void dmxConsoleKbdSetCtrl(pointer private, KeybdCtrl *ctrl); -extern void dmxConsoleCapture(DMXInputInfo *dmxInput); -extern void dmxConsoleUncapture(DMXInputInfo *dmxInput); -extern void dmxConsoleUpdateInfo(pointer private, - DMXUpdateType, WindowPtr pWindow); +extern void dmxConsoleDestroyPrivate(pointer private); +extern void dmxConsoleInit(DevicePtr pDev); +extern void dmxConsoleReInit(DevicePtr pDev); +extern void dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern void dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern void dmxConsoleCollectEvents(DevicePtr pDev, + dmxMotionProcPtr motion, + dmxEnqueueProcPtr enqueue, + dmxCheckSpecialProcPtr checkspecial, + DMXBlockType block); +extern int dmxConsoleFunctions(pointer private, DMXFunctionType function); +extern void dmxConsoleUpdatePosition(pointer private, int x, int y); +extern void dmxConsoleKbdSetCtrl(pointer private, KeybdCtrl * ctrl); +extern void dmxConsoleCapture(DMXInputInfo * dmxInput); +extern void dmxConsoleUncapture(DMXInputInfo * dmxInput); +extern void dmxConsoleUpdateInfo(pointer private, + DMXUpdateType, WindowPtr pWindow); #endif diff --git a/xorg-server/hw/dmx/input/dmxevents.h b/xorg-server/hw/dmx/input/dmxevents.h index fe8712ebe..4877cf49c 100644 --- a/xorg-server/hw/dmx/input/dmxevents.h +++ b/xorg-server/hw/dmx/input/dmxevents.h @@ -40,7 +40,7 @@ extern void dmxMotion(DevicePtr pDev, int *v, int firstAxis, int axesCount, DMXMotionType type, DMXBlockType block); extern void dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, - XEvent *e, DMXBlockType block); -extern int dmxCheckSpecialKeys(DevicePtr pDev, KeySym keySym); + XEvent * e, DMXBlockType block); +extern int dmxCheckSpecialKeys(DevicePtr pDev, KeySym keySym); extern void dmxInvalidateGlobalPosition(void); #endif diff --git a/xorg-server/hw/dmx/input/dmxmap.h b/xorg-server/hw/dmx/input/dmxmap.h index aad30d1bd..62da1ed36 100644 --- a/xorg-server/hw/dmx/input/dmxmap.h +++ b/xorg-server/hw/dmx/input/dmxmap.h @@ -38,5 +38,5 @@ extern void dmxMapInsert(DMXLocalInputInfoPtr dmxLocal, int remoteEvent, int serverEvent); extern void dmxMapClear(DMXLocalInputInfoPtr dmxLocal); -extern int dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent); +extern int dmxMapLookup(DMXLocalInputInfoPtr dmxLocal, int remoteEvent); #endif diff --git a/xorg-server/hw/dmx/input/dmxsigio.h b/xorg-server/hw/dmx/input/dmxsigio.h index 83f8060ae..4e4874929 100644 --- a/xorg-server/hw/dmx/input/dmxsigio.h +++ b/xorg-server/hw/dmx/input/dmxsigio.h @@ -40,6 +40,6 @@ extern void dmxSigioBlock(void); extern void dmxSigioUnblock(void); extern void dmxSigioEnableInput(void); extern void dmxSigioDisableInput(void); -extern void dmxSigioRegister(DMXInputInfo *dmxInput, int fd); -extern void dmxSigioUnregister(DMXInputInfo *dmxInput); +extern void dmxSigioRegister(DMXInputInfo * dmxInput, int fd); +extern void dmxSigioUnregister(DMXInputInfo * dmxInput); #endif diff --git a/xorg-server/hw/dmx/input/lnx-keyboard.h b/xorg-server/hw/dmx/input/lnx-keyboard.h index e36a50499..891c6a9a4 100644 --- a/xorg-server/hw/dmx/input/lnx-keyboard.h +++ b/xorg-server/hw/dmx/input/lnx-keyboard.h @@ -38,26 +38,26 @@ #define _LNX_KEYBOARD_H_ extern pointer kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard); -extern void kbdLinuxDestroyPrivate(pointer private); - -extern void kbdLinuxInit(DevicePtr pDev); -extern void kbdLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern int kbdLinuxOn(DevicePtr pDev); -extern void kbdLinuxOff(DevicePtr pDev); - -extern void kbdLinuxVTPreSwitch(pointer p); -extern void kbdLinuxVTPostSwitch(pointer p); -extern int kbdLinuxVTSwitch(pointer p, int vt, - dmxVTSwitchReturnProcPtr switch_return, - pointer switch_return_data); - -extern void kbdLinuxRead(DevicePtr pDev, - dmxMotionProcPtr motion, - dmxEnqueueProcPtr enqueue, - dmxCheckSpecialProcPtr checkspecial, - DMXBlockType block); - -extern void kbdLinuxCtrl(DevicePtr pDev, KeybdCtrl *ctrl); -extern void kbdLinuxBell(DevicePtr pDev, int percent, - int volume, int pitch, int duration); +extern void kbdLinuxDestroyPrivate(pointer private); + +extern void kbdLinuxInit(DevicePtr pDev); +extern void kbdLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern int kbdLinuxOn(DevicePtr pDev); +extern void kbdLinuxOff(DevicePtr pDev); + +extern void kbdLinuxVTPreSwitch(pointer p); +extern void kbdLinuxVTPostSwitch(pointer p); +extern int kbdLinuxVTSwitch(pointer p, int vt, + dmxVTSwitchReturnProcPtr switch_return, + pointer switch_return_data); + +extern void kbdLinuxRead(DevicePtr pDev, + dmxMotionProcPtr motion, + dmxEnqueueProcPtr enqueue, + dmxCheckSpecialProcPtr checkspecial, + DMXBlockType block); + +extern void kbdLinuxCtrl(DevicePtr pDev, KeybdCtrl * ctrl); +extern void kbdLinuxBell(DevicePtr pDev, int percent, + int volume, int pitch, int duration); #endif diff --git a/xorg-server/hw/dmx/input/lnx-ms.h b/xorg-server/hw/dmx/input/lnx-ms.h index 9042fc293..28ed09557 100644 --- a/xorg-server/hw/dmx/input/lnx-ms.h +++ b/xorg-server/hw/dmx/input/lnx-ms.h @@ -38,18 +38,18 @@ #define _LNX_MS_H_ extern pointer msLinuxCreatePrivate(DeviceIntPtr pMouse); -extern void msLinuxDestroyPrivate(pointer priv); -extern void msLinuxRead(DevicePtr pDev, - dmxMotionProcPtr motion, - dmxEnqueueProcPtr enqueue, - dmxCheckSpecialProcPtr checkspecial, - DMXBlockType block); -extern void msLinuxInit(DevicePtr pDev); -extern void msLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern int msLinuxOn(DevicePtr pDev); -extern void msLinuxOff(DevicePtr pDev); -extern void msLinuxCtrl(DevicePtr pDev, PtrCtrl *ctrl); -extern void msLinuxVTPreSwitch(pointer p); -extern void msLinuxVTPostSwitch(pointer p); +extern void msLinuxDestroyPrivate(pointer priv); +extern void msLinuxRead(DevicePtr pDev, + dmxMotionProcPtr motion, + dmxEnqueueProcPtr enqueue, + dmxCheckSpecialProcPtr checkspecial, + DMXBlockType block); +extern void msLinuxInit(DevicePtr pDev); +extern void msLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern int msLinuxOn(DevicePtr pDev); +extern void msLinuxOff(DevicePtr pDev); +extern void msLinuxCtrl(DevicePtr pDev, PtrCtrl * ctrl); +extern void msLinuxVTPreSwitch(pointer p); +extern void msLinuxVTPostSwitch(pointer p); #endif diff --git a/xorg-server/hw/dmx/input/lnx-ps2.h b/xorg-server/hw/dmx/input/lnx-ps2.h index 5772e03d0..93f0f0219 100644 --- a/xorg-server/hw/dmx/input/lnx-ps2.h +++ b/xorg-server/hw/dmx/input/lnx-ps2.h @@ -38,18 +38,18 @@ #define _LNX_PS2_H_ extern pointer ps2LinuxCreatePrivate(DeviceIntPtr pMouse); -extern void ps2LinuxDestroyPrivate(pointer priv); -extern void ps2LinuxRead(DevicePtr pDev, - dmxMotionProcPtr motion, - dmxEnqueueProcPtr enqueue, - dmxCheckSpecialProcPtr checkspecial, - DMXBlockType block); -extern void ps2LinuxInit(DevicePtr pDev); -extern void ps2LinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); -extern int ps2LinuxOn(DevicePtr pDev); -extern void ps2LinuxOff(DevicePtr pDev); -extern void ps2LinuxCtrl(DevicePtr pDev, PtrCtrl *ctrl); -extern void ps2LinuxVTPreSwitch(pointer p); -extern void ps2LinuxVTPostSwitch(pointer p); +extern void ps2LinuxDestroyPrivate(pointer priv); +extern void ps2LinuxRead(DevicePtr pDev, + dmxMotionProcPtr motion, + dmxEnqueueProcPtr enqueue, + dmxCheckSpecialProcPtr checkspecial, + DMXBlockType block); +extern void ps2LinuxInit(DevicePtr pDev); +extern void ps2LinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); +extern int ps2LinuxOn(DevicePtr pDev); +extern void ps2LinuxOff(DevicePtr pDev); +extern void ps2LinuxCtrl(DevicePtr pDev, PtrCtrl * ctrl); +extern void ps2LinuxVTPreSwitch(pointer p); +extern void ps2LinuxVTPostSwitch(pointer p); #endif diff --git a/xorg-server/hw/dmx/input/usb-private.h b/xorg-server/hw/dmx/input/usb-private.h index c70668ce5..096607a34 100644 --- a/xorg-server/hw/dmx/input/usb-private.h +++ b/xorg-server/hw/dmx/input/usb-private.h @@ -98,20 +98,20 @@ /* Private area for USB devices. */ typedef struct _myPrivate { - DeviceIntPtr pDevice; /**< Device (mouse or other) */ - int fd; /**< File descriptor */ - unsigned char mask[EV_MAX/8 + 1]; /**< Mask */ - int numRel, numAbs, numLeds; /**< Counts */ - int relmap[DMX_MAX_AXES]; /**< Relative axis map */ - int absmap[DMX_MAX_AXES]; /**< Absolute axis map */ + DeviceIntPtr pDevice; /**< Device (mouse or other) */ + int fd; /**< File descriptor */ + unsigned char mask[EV_MAX / 8 + 1]; /**< Mask */ + int numRel, numAbs, numLeds; /**< Counts */ + int relmap[DMX_MAX_AXES]; /**< Relative axis map */ + int absmap[DMX_MAX_AXES]; /**< Absolute axis map */ - CARD32 kbdState[NUM_STATE_ENTRIES]; /**< Keyboard state */ - DeviceIntPtr pKeyboard; /** Keyboard device */ + CARD32 kbdState[NUM_STATE_ENTRIES]; /**< Keyboard state */ + DeviceIntPtr pKeyboard; /** Keyboard device */ - int pitch; /**< Bell pitch */ - unsigned long duration; /**< Bell duration */ + int pitch; /**< Bell pitch */ + unsigned long duration; /**< Bell duration */ /* FIXME: dmxInput is never initialized */ - DMXInputInfo *dmxInput; /**< For pretty-printing */ + DMXInputInfo *dmxInput; /**< For pretty-printing */ } myPrivate; #endif diff --git a/xorg-server/hw/kdrive/ephyr/ephyrglxext.h b/xorg-server/hw/kdrive/ephyr/ephyrglxext.h index 22ea605d7..053f8d303 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrglxext.h +++ b/xorg-server/hw/kdrive/ephyr/ephyrglxext.h @@ -29,7 +29,6 @@ #define __EPHYR_GLXEXT_H__ #include <X11/Xdefs.h> -Bool ephyrHijackGLXExtension (void) ; +Bool ephyrHijackGLXExtension(void); #endif /*__EPHYR_GLXEXT_H__*/ - diff --git a/xorg-server/hw/kdrive/ephyr/ephyrlog.h b/xorg-server/hw/kdrive/ephyr/ephyrlog.h index a07a0a097..0da0a2518 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrlog.h +++ b/xorg-server/hw/kdrive/ephyr/ephyrlog.h @@ -35,7 +35,7 @@ /*we are not in debug mode*/ #define EPHYR_LOG(...) #define EPHYR_LOG_ERROR(...) -#endif /*!DEBUG*/ +#endif /*!DEBUG */ #define ERROR_LOG_LEVEL 3 #define INFO_LOG_LEVEL 4 @@ -45,23 +45,23 @@ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, "in %s:%d:%s: ",\ __FILE__, __LINE__, __func__) ; \ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, __VA_ARGS__) -#endif /*nomadik_log*/ +#endif /*nomadik_log */ #ifndef EPHYR_LOG_ERROR #define EPHYR_LOG_ERROR(...) \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, "Error:in %s:%d:%s: ",\ __FILE__, __LINE__, __func__) ; \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, __VA_ARGS__) -#endif /*EPHYR_LOG_ERROR*/ +#endif /*EPHYR_LOG_ERROR */ #ifndef EPHYR_RETURN_IF_FAIL #define EPHYR_RETURN_IF_FAIL(cond) \ if (!(cond)) {EPHYR_LOG_ERROR("condition %s failed\n", #cond);return;} -#endif /*nomadik_return_if_fail*/ +#endif /*nomadik_return_if_fail */ #ifndef EPHYR_RETURN_VAL_IF_FAIL #define EPHYR_RETURN_VAL_IF_FAIL(cond,val) \ if (!(cond)) {EPHYR_LOG_ERROR("condition %s failed\n", #cond);return val;} -#endif /*nomadik_return_val_if_fail*/ +#endif /*nomadik_return_val_if_fail */ #endif /*__EPHYRLOG_H__*/ diff --git a/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h b/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h index e52f8d887..018b69b34 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h +++ b/xorg-server/hw/kdrive/ephyr/ephyrproxyext.h @@ -28,7 +28,6 @@ #ifndef __EPHYRPROXYEXT_H__ #define __EPHYRPROXYEXT_H__ -Bool ephyrProxyExtensionInit (const char *a_extension_name) ; +Bool ephyrProxyExtensionInit(const char *a_extension_name); #endif /*__EPHYRPROXYEXT_H__*/ - diff --git a/xorg-server/hw/kdrive/fake/fakeinit.c b/xorg-server/hw/kdrive/fake/fakeinit.c index e25093fbf..0aae1ddc1 100644 --- a/xorg-server/hw/kdrive/fake/fakeinit.c +++ b/xorg-server/hw/kdrive/fake/fakeinit.c @@ -26,94 +26,94 @@ #include "fake.h" void -InitCard (char *name) +InitCard(char *name) { - KdCardInfoAdd (&fakeFuncs, 0); + KdCardInfoAdd(&fakeFuncs, 0); } void -InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) +InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) { - KdInitOutput (pScreenInfo, argc, argv); + KdInitOutput(pScreenInfo, argc, argv); } void -InitInput (int argc, char **argv) +InitInput(int argc, char **argv) { KdPointerInfo *pi; KdKeyboardInfo *ki; - pi = KdNewPointer (); + pi = KdNewPointer(); if (!pi) return; pi->driver = &FakePointerDriver; KdAddPointer(pi); - ki = KdNewKeyboard (); + ki = KdNewKeyboard(); if (!ki) return; ki->driver = &FakeKeyboardDriver; KdAddKeyboard(ki); - KdInitInput (); + KdInitInput(); } void -CloseInput (void) +CloseInput(void) { - KdCloseInput (); + KdCloseInput(); } #ifdef DDXBEFORERESET void -ddxBeforeReset (void) +ddxBeforeReset(void) { } #endif void -ddxUseMsg (void) +ddxUseMsg(void) { KdUseMsg(); } int -ddxProcessArgument (int argc, char **argv, int i) +ddxProcessArgument(int argc, char **argv, int i) { - return KdProcessArgument (argc, argv, i); + return KdProcessArgument(argc, argv, i); } void -OsVendorInit (void) +OsVendorInit(void) { - KdOsInit (&FakeOsFuncs); + KdOsInit(&FakeOsFuncs); } -KdCardFuncs fakeFuncs = { - fakeCardInit, /* cardinit */ - fakeScreenInit, /* scrinit */ - fakeInitScreen, /* initScreen */ - fakeFinishInitScreen, /* finishInitScreen */ - fakeCreateResources, /* createRes */ - fakePreserve, /* preserve */ - fakeEnable, /* enable */ - fakeDPMS, /* dpms */ - fakeDisable, /* disable */ - fakeRestore, /* restore */ - fakeScreenFini, /* scrfini */ - fakeCardFini, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - 0, /* initAccel */ - 0, /* enableAccel */ - 0, /* disableAccel */ - 0, /* finiAccel */ - - fakeGetColors, /* getColors */ - fakePutColors, /* putColors */ +KdCardFuncs fakeFuncs = { + fakeCardInit, /* cardinit */ + fakeScreenInit, /* scrinit */ + fakeInitScreen, /* initScreen */ + fakeFinishInitScreen, /* finishInitScreen */ + fakeCreateResources, /* createRes */ + fakePreserve, /* preserve */ + fakeEnable, /* enable */ + fakeDPMS, /* dpms */ + fakeDisable, /* disable */ + fakeRestore, /* restore */ + fakeScreenFini, /* scrfini */ + fakeCardFini, /* cardfini */ + + 0, /* initCursor */ + 0, /* enableCursor */ + 0, /* disableCursor */ + 0, /* finiCursor */ + 0, /* recolorCursor */ + + 0, /* initAccel */ + 0, /* enableAccel */ + 0, /* disableAccel */ + 0, /* finiAccel */ + + fakeGetColors, /* getColors */ + fakePutColors, /* putColors */ }; diff --git a/xorg-server/hw/kdrive/fake/kbd.c b/xorg-server/hw/kdrive/fake/kbd.c index 769730d64..83a3c66cf 100644 --- a/xorg-server/hw/kdrive/fake/kbd.c +++ b/xorg-server/hw/kdrive/fake/kbd.c @@ -29,7 +29,7 @@ #define FAKE_WIDTH 2 static Status -FakeKeyboardInit (KdKeyboardInfo *ki) +FakeKeyboardInit(KdKeyboardInfo * ki) { ki->minScanCode = 8; ki->maxScanCode = 255; @@ -37,29 +37,29 @@ FakeKeyboardInit (KdKeyboardInfo *ki) } static Status -FakeKeyboardEnable (KdKeyboardInfo *ki) +FakeKeyboardEnable(KdKeyboardInfo * ki) { return Success; } static void -FakeKeyboardDisable (KdKeyboardInfo *ki) +FakeKeyboardDisable(KdKeyboardInfo * ki) { return; } static void -FakeKeyboardFini (KdKeyboardInfo *ki) +FakeKeyboardFini(KdKeyboardInfo * ki) { } static void -FakeKeyboardLeds (KdKeyboardInfo *ki, int leds) +FakeKeyboardLeds(KdKeyboardInfo * ki, int leds) { } static void -FakeKeyboardBell (KdKeyboardInfo *ki, int volume, int frequency, int duration) +FakeKeyboardBell(KdKeyboardInfo * ki, int volume, int frequency, int duration) { } diff --git a/xorg-server/hw/kdrive/fake/mouse.c b/xorg-server/hw/kdrive/fake/mouse.c index 758f6cd22..bb4c25eeb 100644 --- a/xorg-server/hw/kdrive/fake/mouse.c +++ b/xorg-server/hw/kdrive/fake/mouse.c @@ -33,30 +33,29 @@ #include "kdrive.h" static Status -MouseInit (KdPointerInfo *pi) +MouseInit(KdPointerInfo * pi) { return Success; } static Status -MouseEnable (KdPointerInfo *pi) +MouseEnable(KdPointerInfo * pi) { return Success; } static void -MouseDisable (KdPointerInfo *pi) +MouseDisable(KdPointerInfo * pi) { return; } static void -MouseFini (KdPointerInfo *pi) +MouseFini(KdPointerInfo * pi) { return; } - KdPointerDriver FakePointerDriver = { "fake", MouseInit, diff --git a/xorg-server/hw/kdrive/fake/os.c b/xorg-server/hw/kdrive/fake/os.c index 76cd9e728..01bb37bd5 100644 --- a/xorg-server/hw/kdrive/fake/os.c +++ b/xorg-server/hw/kdrive/fake/os.c @@ -26,33 +26,33 @@ #include "fake.h" static int -FakeInit (void) +FakeInit(void) { return 1; } static void -FakeEnable (void) +FakeEnable(void) { } static Bool -FakeSpecialKey (KeySym sym) +FakeSpecialKey(KeySym sym) { return FALSE; } static void -FakeDisable (void) +FakeDisable(void) { } static void -FakeFini (void) +FakeFini(void) { } -KdOsFuncs FakeOsFuncs = { +KdOsFuncs FakeOsFuncs = { FakeInit, FakeEnable, FakeSpecialKey, @@ -60,4 +60,3 @@ KdOsFuncs FakeOsFuncs = { FakeFini, 0 }; - diff --git a/xorg-server/hw/kdrive/fbdev/fbdev.h b/xorg-server/hw/kdrive/fbdev/fbdev.h index ec53784af..0706f4e11 100644 --- a/xorg-server/hw/kdrive/fbdev/fbdev.h +++ b/xorg-server/hw/kdrive/fbdev/fbdev.h @@ -33,67 +33,67 @@ #endif typedef struct _fbdevPriv { - struct fb_var_screeninfo var; - struct fb_fix_screeninfo fix; - __u16 red[256]; - __u16 green[256]; - __u16 blue[256]; - int fd; - char *fb; - char *fb_base; + struct fb_var_screeninfo var; + struct fb_fix_screeninfo fix; + __u16 red[256]; + __u16 green[256]; + __u16 blue[256]; + int fd; + char *fb; + char *fb_base; } FbdevPriv; typedef struct _fbdevScrPriv { - Rotation randr; - Bool shadow; + Rotation randr; + Bool shadow; } FbdevScrPriv; -extern KdCardFuncs fbdevFuncs; -extern char* fbdevDevicePath; +extern KdCardFuncs fbdevFuncs; +extern char *fbdevDevicePath; Bool -fbdevCardInit (KdCardInfo *card); + fbdevCardInit(KdCardInfo * card); Bool -fbdevScreenInit (KdScreenInfo *screen); + fbdevScreenInit(KdScreenInfo * screen); Bool -fbdevInitScreen (ScreenPtr pScreen); + fbdevInitScreen(ScreenPtr pScreen); Bool -fbdevFinishInitScreen (ScreenPtr pScreen); + fbdevFinishInitScreen(ScreenPtr pScreen); Bool -fbdevCreateResources (ScreenPtr pScreen); + fbdevCreateResources(ScreenPtr pScreen); void -fbdevPreserve (KdCardInfo *card); + fbdevPreserve(KdCardInfo * card); Bool -fbdevEnable (ScreenPtr pScreen); + fbdevEnable(ScreenPtr pScreen); Bool -fbdevDPMS (ScreenPtr pScreen, int mode); + fbdevDPMS(ScreenPtr pScreen, int mode); void -fbdevDisable (ScreenPtr pScreen); + fbdevDisable(ScreenPtr pScreen); void -fbdevRestore (KdCardInfo *card); + fbdevRestore(KdCardInfo * card); void -fbdevScreenFini (KdScreenInfo *screen); + fbdevScreenFini(KdScreenInfo * screen); void -fbdevCardFini (KdCardInfo *card); + fbdevCardFini(KdCardInfo * card); void -fbdevGetColors (ScreenPtr pScreen, int n, xColorItem *pdefs); + fbdevGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs); void -fbdevPutColors (ScreenPtr pScreen, int n, xColorItem *pdefs); + fbdevPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs); Bool -fbdevMapFramebuffer (KdScreenInfo *screen); + fbdevMapFramebuffer(KdScreenInfo * screen); -#endif /* _FBDEV_H_ */ +#endif /* _FBDEV_H_ */ diff --git a/xorg-server/hw/kdrive/src/fourcc.h b/xorg-server/hw/kdrive/src/fourcc.h index 54be7ebe8..534ec452f 100644 --- a/xorg-server/hw/kdrive/src/fourcc.h +++ b/xorg-server/hw/kdrive/src/fourcc.h @@ -69,7 +69,6 @@ XvTopToBottom \ } - #define FOURCC_UYVY 0x59565955 #define XVIMAGE_UYVY \ { \ @@ -130,4 +129,4 @@ XvTopToBottom \ } -#endif /* _XF86_FOURCC_H_ */ +#endif /* _XF86_FOURCC_H_ */ diff --git a/xorg-server/hw/xfree86/common/fourcc.h b/xorg-server/hw/xfree86/common/fourcc.h index 853657e86..e6126b7fe 100644 --- a/xorg-server/hw/xfree86/common/fourcc.h +++ b/xorg-server/hw/xfree86/common/fourcc.h @@ -96,7 +96,6 @@ XvTopToBottom \ } - #define FOURCC_UYVY 0x59565955 #define XVIMAGE_UYVY \ { \ @@ -157,4 +156,4 @@ XvTopToBottom \ } -#endif /* _XF86_FOURCC_H_ */ +#endif /* _XF86_FOURCC_H_ */ diff --git a/xorg-server/hw/xfree86/common/xf86Bus.h b/xorg-server/hw/xfree86/common/xf86Bus.h index 0b2ebdb44..abf2efd1a 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.h +++ b/xorg-server/hw/xfree86/common/xf86Bus.h @@ -44,20 +44,20 @@ #endif typedef struct { - DriverPtr driver; - int chipset; - int entityProp; - EntityProc entityInit; - EntityProc entityEnter; - EntityProc entityLeave; - pointer private; - Bool active; - Bool inUse; - BusRec bus; - int lastScrnFlag; - DevUnion * entityPrivates; - int numInstances; - GDevPtr * devices; + DriverPtr driver; + int chipset; + int entityProp; + EntityProc entityInit; + EntityProc entityEnter; + EntityProc entityLeave; + pointer private; + Bool active; + Bool inUse; + BusRec bus; + int lastScrnFlag; + DevUnion *entityPrivates; + int numInstances; + GDevPtr *devices; } EntityRec, *EntityPtr; #define ACCEL_IS_SHARABLE 0x100 @@ -69,6 +69,6 @@ extern int xf86NumEntities; extern BusRec primaryBus; int xf86AllocateEntity(void); -BusType StringToBusType(const char* busID, const char **retID); +BusType StringToBusType(const char *busID, const char **retID); -#endif /* _XF86_BUS_H */ +#endif /* _XF86_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86Config.h b/xorg-server/hw/xfree86/common/xf86Config.h index 411fc2cc1..de06677c3 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.h +++ b/xorg-server/hw/xfree86/common/xf86Config.h @@ -59,14 +59,14 @@ typedef struct _ModuleDefault { /* * prototypes */ -char ** xf86ModulelistFromConfig(pointer **); -char ** xf86DriverlistFromConfig(void); -char ** xf86DriverlistFromCompile(void); -char ** xf86InputDriverlistFromConfig(void); +char **xf86ModulelistFromConfig(pointer **); +char **xf86DriverlistFromConfig(void); +char **xf86DriverlistFromCompile(void); +char **xf86InputDriverlistFromConfig(void); Bool xf86BuiltinInputDriver(const char *); ConfigStatus xf86HandleConfigFile(Bool); Bool xf86AutoConfig(void); GDevPtr autoConfigDevice(GDevPtr preconf_device); -#endif /* _xf86_config_h */ +#endif /* _xf86_config_h */ diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c index 613c7cf73..75f034239 100644 --- a/xorg-server/hw/xfree86/common/xf86DPMS.c +++ b/xorg-server/hw/xfree86/common/xf86DPMS.c @@ -53,7 +53,6 @@ static Bool DPMSClose(int i, ScreenPtr pScreen); static int DPMSCount = 0; #endif - Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) { @@ -65,28 +64,28 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) DPMSKey = &DPMSKeyRec; - if (!dixRegisterPrivateKey(&DPMSKeyRec, PRIVATE_SCREEN, sizeof (DPMSRec))) - return FALSE; + if (!dixRegisterPrivateKey(&DPMSKeyRec, PRIVATE_SCREEN, sizeof(DPMSRec))) + return FALSE; pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); pScrn->DPMSSet = set; pDPMS->Flags = flags; DPMSOpt = xf86FindOption(pScrn->options, "dpms"); if (DPMSDisabledSwitch) { - enabled_from = X_CMDLINE; - DPMSEnabled = FALSE; + enabled_from = X_CMDLINE; + DPMSEnabled = FALSE; } else if (DPMSOpt) { - enabled_from = X_CONFIG; - DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE); - xf86MarkOptionUsed(DPMSOpt); + enabled_from = X_CONFIG; + DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE); + xf86MarkOptionUsed(DPMSOpt); } else { - enabled_from = X_DEFAULT; - DPMSEnabled = TRUE; + enabled_from = X_DEFAULT; + DPMSEnabled = TRUE; } if (DPMSEnabled) - xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n"); + xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n"); pDPMS->Enabled = DPMSEnabled; pDPMS->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DPMSClose; @@ -97,7 +96,6 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) #endif } - #ifdef DPMSExtension static Bool @@ -107,13 +105,13 @@ DPMSClose(int i, ScreenPtr pScreen) /* This shouldn't happen */ if (DPMSKey == NULL) - return FALSE; + return FALSE; pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); /* This shouldn't happen */ if (!pDPMS) - return FALSE; + return FALSE; pScreen->CloseScreen = pDPMS->CloseScreen; @@ -124,15 +122,14 @@ DPMSClose(int i, ScreenPtr pScreen) * to deal with this internally. */ if (xf86Screens[i]->vtSema && xf86Screens[i]->DPMSSet) { - xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0); + xf86Screens[i]->DPMSSet(xf86Screens[i], DPMSModeOn, 0); } - + if (--DPMSCount == 0) - DPMSKey = NULL; + DPMSKey = NULL; return pScreen->CloseScreen(i, pScreen); } - /* * DPMSSet -- * Device dependent DPMS mode setting hook. This is called whenever @@ -148,28 +145,27 @@ DPMSSet(ClientPtr client, int level) DPMSPowerLevel = level; if (DPMSKey == NULL) - return Success; + return Success; if (level != DPMSModeOn) { - rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); - if (rc != Success) - return rc; + rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); + if (rc != Success) + return rc; } /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { - pScrn = xf86Screens[i]; - pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); - if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { - xf86VGAarbiterLock(pScrn); - pScrn->DPMSSet(pScrn, level, 0); - xf86VGAarbiterUnlock(pScrn); - } + pScrn = xf86Screens[i]; + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); + if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { + xf86VGAarbiterLock(pScrn); + pScrn->DPMSSet(pScrn, level, 0); + xf86VGAarbiterUnlock(pScrn); + } } return Success; } - /* * DPMSSupported -- * Return TRUE if any screen supports DPMS. @@ -182,17 +178,17 @@ DPMSSupported(void) ScrnInfoPtr pScrn; if (DPMSKey == NULL) { - return FALSE; + return FALSE; } /* For each screen, check if DPMS is supported */ for (i = 0; i < xf86NumScreens; i++) { - pScrn = xf86Screens[i]; - pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); - if (pDPMS && pScrn->DPMSSet) - return TRUE; + pScrn = xf86Screens[i]; + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); + if (pDPMS && pScrn->DPMSSet) + return TRUE; } return FALSE; } -#endif /* DPMSExtension */ +#endif /* DPMSExtension */ diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index 058057e92..5896f220c 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -449,6 +449,8 @@ xf86VTSwitch(void) xf86DisableInputHandler(ih); for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { if (pInfo->dev) { + if (!pInfo->dev->enabled) + pInfo->flags |= XI86_DEVICE_DISABLED; xf86ReleaseKeys(pInfo->dev); ProcessInputEvents(); DisableDevice(pInfo->dev, TRUE); @@ -482,8 +484,9 @@ xf86VTSwitch(void) pInfo = xf86InputDevs; while (pInfo) { - if (pInfo->dev) + if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0) EnableDevice(pInfo->dev, TRUE); + pInfo->flags &= ~XI86_DEVICE_DISABLED; pInfo = pInfo->next; } for (ih = InputHandlers; ih; ih = ih->next) @@ -537,8 +540,9 @@ xf86VTSwitch(void) pInfo = xf86InputDevs; while (pInfo) { - if (pInfo->dev) + if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0) EnableDevice(pInfo->dev, TRUE); + pInfo->flags &= ~XI86_DEVICE_DISABLED; pInfo = pInfo->next; } diff --git a/xorg-server/hw/xfree86/common/xf86InPriv.h b/xorg-server/hw/xfree86/common/xf86InPriv.h index 15fef4320..5826ac388 100644 --- a/xorg-server/hw/xfree86/common/xf86InPriv.h +++ b/xorg-server/hw/xfree86/common/xf86InPriv.h @@ -1,43 +1,43 @@ -
-/*
- * Copyright (c) 1999 by The XFree86 Project, Inc.
- *
- * 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
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s)
- * and author(s) 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 copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _xf86InPriv_h
-#define _xf86InPriv_h
-
-/* xf86Globals.c */
-extern InputDriverPtr *xf86InputDriverList;
-extern int xf86NumInputDrivers;
-
-/* xf86Helper.c */
-InputDriverPtr xf86LookupInputDriver(const char *name);
-
-#endif /* _xf86InPriv_h */
+ +/* + * Copyright (c) 1999 by The XFree86 Project, Inc. + * + * 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 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) + * and author(s) 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 copyright holder(s) and author(s). + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#ifndef _xf86InPriv_h +#define _xf86InPriv_h + +/* xf86Globals.c */ +extern InputDriverPtr *xf86InputDriverList; +extern int xf86NumInputDrivers; + +/* xf86Helper.c */ +InputDriverPtr xf86LookupInputDriver(const char *name); + +#endif /* _xf86InPriv_h */ diff --git a/xorg-server/hw/xfree86/common/xf86PciInfo.h b/xorg-server/hw/xfree86/common/xf86PciInfo.h index e2d78627b..d6450e25c 100644 --- a/xorg-server/hw/xfree86/common/xf86PciInfo.h +++ b/xorg-server/hw/xfree86/common/xf86PciInfo.h @@ -101,7 +101,6 @@ #define PCI_VENDOR_INTEL 0x8086 #define PCI_VENDOR_ARK 0xEDD8 - /* Generic */ #define PCI_CHIP_VGA 0x0000 #define PCI_CHIP_8514 0x0001 @@ -215,10 +214,10 @@ #define PCI_CHIP_R300_NE 0x4E45 #define PCI_CHIP_R300_NF 0x4E46 #define PCI_CHIP_R300_NG 0x4E47 -#define PCI_CHIP_R350_NH 0x4E48 -#define PCI_CHIP_R350_NI 0x4E49 -#define PCI_CHIP_R360_NJ 0x4E4A -#define PCI_CHIP_R350_NK 0x4E4B +#define PCI_CHIP_R350_NH 0x4E48 +#define PCI_CHIP_R350_NI 0x4E49 +#define PCI_CHIP_R360_NJ 0x4E4A +#define PCI_CHIP_R350_NK 0x4E4B #define PCI_CHIP_RV350_NP 0x4E50 #define PCI_CHIP_RV350_NQ 0x4E51 #define PCI_CHIP_RV350_NR 0x4E52 @@ -498,16 +497,16 @@ #define PCI_CHIP_SIS330 0x0330 #define PCI_CHIP_SIS630 0x6300 #define PCI_CHIP_SIS540 0x5300 -#define PCI_CHIP_SIS550 0x5315 -#define PCI_CHIP_SIS650 0x6325 +#define PCI_CHIP_SIS550 0x5315 +#define PCI_CHIP_SIS650 0x6325 #define PCI_CHIP_SIS730 0x7300 /* Hewlett-Packard */ #define PCI_CHIP_ELROY 0x1054 #define PCI_CHIP_ZX1_SBA 0x1229 #define PCI_CHIP_ZX1_IOC 0x122A -#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */ -#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */ +#define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */ +#define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */ #define PCI_CHIP_ZX2_LBA 0x12EE #define PCI_CHIP_ZX2_SBA 0x4030 #define PCI_CHIP_ZX2_IOC 0x4031 @@ -713,9 +712,9 @@ #define PCI_CHIP_I740_AGP 0x7800 #define PCI_CHIP_460GX_PXB 0x84CB #define PCI_CHIP_460GX_SAC 0x84E0 -#define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */ +#define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */ #define PCI_CHIP_460GX_WXB 0x84E6 -#define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */ +#define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */ /* Silicon Motion Inc. */ #define PCI_CHIP_SMI910 0x0910 @@ -730,4 +729,4 @@ #define PCI_CHIP_VMWARE0405 0x0405 #define PCI_CHIP_VMWARE0710 0x0710 -#endif /* _XF86_PCIINFO_H */ +#endif /* _XF86_PCIINFO_H */ diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h index 79bc8a084..e78cd407d 100644 --- a/xorg-server/hw/xfree86/common/xf86Privstr.h +++ b/xorg-server/hw/xfree86/common/xf86Privstr.h @@ -29,7 +29,7 @@ /* * This file contains definitions of the private XFree86 data structures/types. * None of the data structures here should be used by video drivers. - */ + */ #ifndef _XF86PRIVSTR_H #define _XF86PRIVSTR_H @@ -55,90 +55,90 @@ typedef enum { */ typedef struct { - int consoleFd; - int vtno; + int consoleFd; + int vtno; /* event handler part */ - int lastEventTime; - Bool vtRequestsPending; + int lastEventTime; + Bool vtRequestsPending; #ifdef sun - int vtPendingNum; + int vtPendingNum; #endif - Bool dontVTSwitch; - Bool autoVTSwitch; - Bool ShareVTs; - Bool dontZap; - Bool dontZoom; - Bool notrapSignals; /* don't exit cleanly - die at fault */ - Bool caughtSignal; + Bool dontVTSwitch; + Bool autoVTSwitch; + Bool ShareVTs; + Bool dontZap; + Bool dontZoom; + Bool notrapSignals; /* don't exit cleanly - die at fault */ + Bool caughtSignal; /* graphics part */ - ScreenPtr currentScreen; + ScreenPtr currentScreen; #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) - int consType; /* Which console driver? */ + int consType; /* Which console driver? */ #endif /* Other things */ - Bool allowMouseOpenFail; - Bool vidModeEnabled; /* VidMode extension enabled */ - Bool vidModeAllowNonLocal; /* allow non-local VidMode - * connections */ - Bool miscModInDevEnabled; /* Allow input devices to be - * changed */ - Bool miscModInDevAllowNonLocal; - Bool useSIGIO; /* Use SIGIO for handling - input device events */ - Pix24Flags pixmap24; - MessageType pix24From; - Bool pmFlag; - Log log; - Bool disableRandR; - MessageType randRFrom; - Bool aiglx; - MessageType aiglxFrom; - XF86_GlxVisuals glxVisuals; - MessageType glxVisualsFrom; - - Bool useDefaultFontPath; - MessageType useDefaultFontPathFrom; - Bool ignoreABI; - - Bool forceInputDevices; /* force xorg.conf or built-in input devices */ - Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */ - Bool autoEnableDevices; /* Whether to enable, or let the client - * control. */ - - Bool dri2; - MessageType dri2From; + Bool allowMouseOpenFail; + Bool vidModeEnabled; /* VidMode extension enabled */ + Bool vidModeAllowNonLocal; /* allow non-local VidMode + * connections */ + Bool miscModInDevEnabled; /* Allow input devices to be + * changed */ + Bool miscModInDevAllowNonLocal; + Bool useSIGIO; /* Use SIGIO for handling + input device events */ + Pix24Flags pixmap24; + MessageType pix24From; + Bool pmFlag; + Log log; + Bool disableRandR; + MessageType randRFrom; + Bool aiglx; + MessageType aiglxFrom; + XF86_GlxVisuals glxVisuals; + MessageType glxVisualsFrom; + + Bool useDefaultFontPath; + MessageType useDefaultFontPathFrom; + Bool ignoreABI; + + Bool forceInputDevices; /* force xorg.conf or built-in input devices */ + Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */ + Bool autoEnableDevices; /* Whether to enable, or let the client + * control. */ + + Bool dri2; + MessageType dri2From; } xf86InfoRec, *xf86InfoPtr; #ifdef DPMSExtension /* Private info for DPMS */ typedef struct { - CloseScreenProcPtr CloseScreen; - Bool Enabled; - int Flags; + CloseScreenProcPtr CloseScreen; + Bool Enabled; + int Flags; } DPMSRec, *DPMSPtr; #endif #ifdef XF86VIDMODE /* Private info for Video Mode Extentsion */ typedef struct { - DisplayModePtr First; - DisplayModePtr Next; - int Flags; - CloseScreenProcPtr CloseScreen; + DisplayModePtr First; + DisplayModePtr Next; + int Flags; + CloseScreenProcPtr CloseScreen; } VidModeRec, *VidModePtr; #endif /* Information for root window properties. */ typedef struct _RootWinProp { - struct _RootWinProp * next; - char * name; - Atom type; - short format; - long size; - pointer data; + struct _RootWinProp *next; + char *name; + Atom type; + short format; + long size; + pointer data; } RootWinProp, *RootWinPropPtr; /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ @@ -161,4 +161,4 @@ typedef struct _RootWinProp { #define WSCONS 32 #endif -#endif /* _XF86PRIVSTR_H */ +#endif /* _XF86PRIVSTR_H */ diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h index ae9c51dd2..bb52cf78a 100644 --- a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h @@ -1,48 +1,49 @@ -/*
- * Copyright (c) 2009 Tiago Vignatti
- *
- * 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 THE AUTHORS OR COPYRIGHT
- * HOLDERS 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.
- */
-
-#ifndef __XF86VGAARBITER_H
-#define __XF86VGAARBITER_H
-
-#include "screenint.h"
-#include "misc.h"
-#include "xf86.h"
-
-/* Functions */
-extern void xf86VGAarbiterInit(void);
-extern void xf86VGAarbiterFini(void);
-void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn);
-extern Bool xf86VGAarbiterWrapFunctions(void);
-extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn);
-extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn);
-
-/* allow a driver to remove itself from arbiter - really should be
- * done in the kernel though */
-extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc);
-/* DRI and arbiter are really not possible together,
- * you really want to remove the card from arbitration if you can */
-extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen);
-
-#endif /* __XF86VGAARBITER_H */
+/* + * Copyright (c) 2009 Tiago Vignatti + * + * 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 THE AUTHORS OR COPYRIGHT + * HOLDERS 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. + */ + +#ifndef __XF86VGAARBITER_H +#define __XF86VGAARBITER_H + +#include "screenint.h" +#include "misc.h" +#include "xf86.h" + +/* Functions */ +extern void xf86VGAarbiterInit(void); +extern void xf86VGAarbiterFini(void); +void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn); +extern Bool xf86VGAarbiterWrapFunctions(void); +extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn); +extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn); + +/* allow a driver to remove itself from arbiter - really should be + * done in the kernel though */ +extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc); + +/* DRI and arbiter are really not possible together, + * you really want to remove the card from arbitration if you can */ +extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen); + +#endif /* __XF86VGAARBITER_H */ diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index 3731a34d5..1d4363a50 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -61,6 +61,9 @@ #define XI86_ALWAYS_CORE 0x04 /* device always controls the pointer */ /* the device sends Xinput and core pointer events */ #define XI86_SEND_CORE_EVENTS XI86_ALWAYS_CORE +/* 0x08 is reserved for legacy XI86_SEND_DRAG_EVENTS, do not use for now */ +/* server-internal only */ +#define XI86_DEVICE_DISABLED 0x10 /* device was disabled before vt switch */ /* This holds the input driver entry and module information. */ typedef struct _InputDriverRec { diff --git a/xorg-server/hw/xfree86/common/xf86fbBus.c b/xorg-server/hw/xfree86/common/xf86fbBus.c index 45929804f..1e5162332 100644 --- a/xorg-server/hw/xfree86/common/xf86fbBus.c +++ b/xorg-server/hw/xfree86/common/xf86fbBus.c @@ -56,13 +56,13 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) #ifdef XSERVER_LIBPCIACCESS if (pciSlotClaimed) - return -1; + return -1; #endif #if defined(__sparc__) || defined (__sparc64__) if (sbusSlotClaimed) - return -1; + return -1; #endif - + num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; @@ -85,12 +85,12 @@ xf86GetFbInfoForScreen(int scrnIndex) int num = 0; int i; EntityPtr p; - + for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) { - p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]]; - if (p->bus.type == BUS_NONE) { - num++; - } + p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]]; + if (p->bus.type == BUS_NONE) { + num++; + } } return num; } diff --git a/xorg-server/hw/xfree86/common/xf86noBus.c b/xorg-server/hw/xfree86/common/xf86noBus.c index 0b9634918..4f55def7b 100644 --- a/xorg-server/hw/xfree86/common/xf86noBus.c +++ b/xorg-server/hw/xfree86/common/xf86noBus.c @@ -51,7 +51,7 @@ xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; int num; - + num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.h b/xorg-server/hw/xfree86/common/xf86pciBus.h index a631fbffb..56ec6e9e7 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.h +++ b/xorg-server/hw/xfree86/common/xf86pciBus.h @@ -1,45 +1,45 @@ -
-/*
- * Copyright (c) 1999-2003 by The XFree86 Project, Inc.
- *
- * 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
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s)
- * and author(s) 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 copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86_PCI_BUS_H
-#define _XF86_PCI_BUS_H
-
-void xf86PciProbe(void);
-Bool xf86PciAddMatchingDev(DriverPtr drvp);
-Bool xf86PciProbeDev(DriverPtr drvp);
-void xf86PciIsolateDevice(char *argument);
-int xf86PciMatchDriver(char* matches[], int nmatches);
-Bool xf86PciConfigure(void *busData, struct pci_device *pDev);
-void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
- GDevRec *GDev, int *chipset);
-
-#endif /* _XF86_PCI_BUS_H */
+ +/* + * Copyright (c) 1999-2003 by The XFree86 Project, Inc. + * + * 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 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) + * and author(s) 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 copyright holder(s) and author(s). + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#ifndef _XF86_PCI_BUS_H +#define _XF86_PCI_BUS_H + +void xf86PciProbe(void); +Bool xf86PciAddMatchingDev(DriverPtr drvp); +Bool xf86PciProbeDev(DriverPtr drvp); +void xf86PciIsolateDevice(char *argument); +int xf86PciMatchDriver(char *matches[], int nmatches); +Bool xf86PciConfigure(void *busData, struct pci_device *pDev); +void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, + GDevRec * GDev, int *chipset); + +#endif /* _XF86_PCI_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86xvpriv.h b/xorg-server/hw/xfree86/common/xf86xvpriv.h index 7eb46e51f..289ca5843 100644 --- a/xorg-server/hw/xfree86/common/xf86xvpriv.h +++ b/xorg-server/hw/xfree86/common/xf86xvpriv.h @@ -1,88 +1,88 @@ -
-/*
- * Copyright (c) 2003 by The XFree86 Project, Inc.
- *
- * 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
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s)
- * and author(s) 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 copyright holder(s) and author(s).
- */
-
-#ifndef _XF86XVPRIV_H_
-#define _XF86XVPRIV_H_
-
-#include "xf86xv.h"
-#include "privates.h"
-
-/*** These are DDX layer privates ***/
-
-extern _X_EXPORT DevPrivateKey XF86XvScreenKey;
-
-typedef struct {
- DestroyWindowProcPtr DestroyWindow;
- ClipNotifyProcPtr ClipNotify;
- WindowExposuresProcPtr WindowExposures;
- PostValidateTreeProcPtr PostValidateTree;
- void (*AdjustFrame)(int, int, int, int);
- Bool (*EnterVT)(int, int);
- void (*LeaveVT)(int, int);
- xf86ModeSetProc *ModeSet;
-} XF86XVScreenRec, *XF86XVScreenPtr;
-
-typedef struct {
- int flags;
- PutVideoFuncPtr PutVideo;
- PutStillFuncPtr PutStill;
- GetVideoFuncPtr GetVideo;
- GetStillFuncPtr GetStill;
- StopVideoFuncPtr StopVideo;
- SetPortAttributeFuncPtr SetPortAttribute;
- GetPortAttributeFuncPtr GetPortAttribute;
- QueryBestSizeFuncPtr QueryBestSize;
- PutImageFuncPtr PutImage;
- ReputImageFuncPtr ReputImage;
- QueryImageAttributesFuncPtr QueryImageAttributes;
- ClipNotifyFuncPtr ClipNotify;
-} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr;
-
-typedef struct {
- ScrnInfoPtr pScrn;
- DrawablePtr pDraw;
- unsigned char type;
- unsigned int subWindowMode;
- RegionPtr clientClip;
- RegionPtr ckeyFilled;
- RegionPtr pCompositeClip;
- Bool FreeCompositeClip;
- XvAdaptorRecPrivatePtr AdaptorRec;
- XvStatus isOn;
- Bool clipChanged;
- int vid_x, vid_y, vid_w, vid_h;
- int drw_x, drw_y, drw_w, drw_h;
- DevUnion DevPriv;
-} XvPortRecPrivate, *XvPortRecPrivatePtr;
-
-typedef struct _XF86XVWindowRec{
- XvPortRecPrivatePtr PortRec;
- struct _XF86XVWindowRec *next;
-} XF86XVWindowRec, *XF86XVWindowPtr;
-
-#endif /* _XF86XVPRIV_H_ */
+ +/* + * Copyright (c) 2003 by The XFree86 Project, Inc. + * + * 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 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) + * and author(s) 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 copyright holder(s) and author(s). + */ + +#ifndef _XF86XVPRIV_H_ +#define _XF86XVPRIV_H_ + +#include "xf86xv.h" +#include "privates.h" + +/*** These are DDX layer privates ***/ + +extern _X_EXPORT DevPrivateKey XF86XvScreenKey; + +typedef struct { + DestroyWindowProcPtr DestroyWindow; + ClipNotifyProcPtr ClipNotify; + WindowExposuresProcPtr WindowExposures; + PostValidateTreeProcPtr PostValidateTree; + void (*AdjustFrame) (int, int, int, int); + Bool (*EnterVT) (int, int); + void (*LeaveVT) (int, int); + xf86ModeSetProc *ModeSet; +} XF86XVScreenRec, *XF86XVScreenPtr; + +typedef struct { + int flags; + PutVideoFuncPtr PutVideo; + PutStillFuncPtr PutStill; + GetVideoFuncPtr GetVideo; + GetStillFuncPtr GetStill; + StopVideoFuncPtr StopVideo; + SetPortAttributeFuncPtr SetPortAttribute; + GetPortAttributeFuncPtr GetPortAttribute; + QueryBestSizeFuncPtr QueryBestSize; + PutImageFuncPtr PutImage; + ReputImageFuncPtr ReputImage; + QueryImageAttributesFuncPtr QueryImageAttributes; + ClipNotifyFuncPtr ClipNotify; +} XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr; + +typedef struct { + ScrnInfoPtr pScrn; + DrawablePtr pDraw; + unsigned char type; + unsigned int subWindowMode; + RegionPtr clientClip; + RegionPtr ckeyFilled; + RegionPtr pCompositeClip; + Bool FreeCompositeClip; + XvAdaptorRecPrivatePtr AdaptorRec; + XvStatus isOn; + Bool clipChanged; + int vid_x, vid_y, vid_w, vid_h; + int drw_x, drw_y, drw_w, drw_h; + DevUnion DevPriv; +} XvPortRecPrivate, *XvPortRecPrivatePtr; + +typedef struct _XF86XVWindowRec { + XvPortRecPrivatePtr PortRec; + struct _XF86XVWindowRec *next; +} XF86XVWindowRec, *XF86XVWindowPtr; + +#endif /* _XF86XVPRIV_H_ */ diff --git a/xorg-server/hw/xfree86/common/xorgHelper.c b/xorg-server/hw/xfree86/common/xorgHelper.c index 7a8e5167d..174ca6bb7 100644 --- a/xorg-server/hw/xfree86/common/xorgHelper.c +++ b/xorg-server/hw/xfree86/common/xorgHelper.c @@ -15,7 +15,6 @@ #include "xf86Priv.h" #include "xorgVersion.h" - CARD32 xorgGetVersion(void) { diff --git a/xorg-server/hw/xfree86/common/xorgVersion.h b/xorg-server/hw/xfree86/common/xorgVersion.h index f627e87a5..e34ddecdf 100644 --- a/xorg-server/hw/xfree86/common/xorgVersion.h +++ b/xorg-server/hw/xfree86/common/xorgVersion.h @@ -27,23 +27,23 @@ */ #ifndef XORG_VERSION_H -# define XORG_VERSION_H +#define XORG_VERSION_H -# ifndef XORG_VERSION_CURRENT -# error -# endif +#ifndef XORG_VERSION_CURRENT +#error +#endif -# define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \ +#define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \ (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap) -# define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000) -# define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000) -# define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000) -# define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000) +#define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000) +#define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000) +#define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000) +#define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000) -# define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT) -# define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT) -# define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT) -# define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT) +#define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT) +#define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT) +#define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT) +#define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT) #endif diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c index 955104679..97616c705 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c @@ -20,4 +20,3 @@ XvRegister(void) XvGetRTPortProc = XvGetRTPort; XvMCScreenInitProc = XvMCScreenInit; } - diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h index b39c915b4..be51e559d 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h +++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmodproc.h @@ -5,9 +5,9 @@ #include "xvmcext.h" -extern DevPrivateKey (*XvGetScreenKeyProc)(void); -extern unsigned long (*XvGetRTPortProc)(void); -extern int (*XvScreenInitProc)(ScreenPtr); -extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr); +extern DevPrivateKey (*XvGetScreenKeyProc) (void); +extern unsigned long (*XvGetRTPortProc) (void); +extern int (*XvScreenInitProc) (ScreenPtr); +extern int (*XvMCScreenInitProc) (ScreenPtr, int, XvMCAdaptorPtr); extern void XvRegister(void); diff --git a/xorg-server/hw/xfree86/dixmods/recordmod.c b/xorg-server/hw/xfree86/dixmods/recordmod.c index 63d340e75..b75cc3fdb 100644 --- a/xorg-server/hw/xfree86/dixmods/recordmod.c +++ b/xorg-server/hw/xfree86/dixmods/recordmod.c @@ -19,16 +19,16 @@ static ExtensionModule recordExt = { }; static XF86ModuleVersionInfo VersRec = { - "record", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 1, 13, 0, - ABI_CLASS_EXTENSION, - ABI_EXTENSION_VERSION, - MOD_CLASS_EXTENSION, - {0,0,0,0} + "record", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XORG_VERSION_CURRENT, + 1, 13, 0, + ABI_CLASS_EXTENSION, + ABI_EXTENSION_VERSION, + MOD_CLASS_EXTENSION, + {0, 0, 0, 0} }; _X_EXPORT XF86ModuleData recordModuleData = { &VersRec, recordSetup, NULL }; @@ -39,6 +39,5 @@ recordSetup(pointer module, pointer opts, int *errmaj, int *errmin) LoadExtension(&recordExt, FALSE); /* Need a non-NULL return value to indicate success */ - return (pointer)1; + return (pointer) 1; } - diff --git a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c index 0f4e25c0c..6dd21dd51 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c +++ b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c @@ -45,7 +45,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xf86.h" int -XkbDDXTerminateServer(DeviceIntPtr dev,KeyCode key,XkbAction *act) +XkbDDXTerminateServer(DeviceIntPtr dev, KeyCode key, XkbAction *act) { if (dev != inputInfo.keyboard) xf86ProcessActionEvent(ACTION_TERMINATE, NULL); diff --git a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c index 06d1c2b3d..574590f28 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c +++ b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c @@ -18,31 +18,32 @@ #include "xf86.h" int -XkbDDXPrivate(DeviceIntPtr dev,KeyCode key,XkbAction *act) +XkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act) { XkbAnyAction *xf86act = &(act->any); - char msgbuf[XkbAnyActionDataSize+1]; + char msgbuf[XkbAnyActionDataSize + 1]; if (xf86act->type == XkbSA_XFree86Private) { memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize); - msgbuf[XkbAnyActionDataSize]= '\0'; - if (strcasecmp(msgbuf, "-vmode")==0) + msgbuf[XkbAnyActionDataSize] = '\0'; + if (strcasecmp(msgbuf, "-vmode") == 0) xf86ProcessActionEvent(ACTION_PREV_MODE, NULL); - else if (strcasecmp(msgbuf, "+vmode")==0) + else if (strcasecmp(msgbuf, "+vmode") == 0) xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL); - else if (strcasecmp(msgbuf, "prgrbs")==0) { + else if (strcasecmp(msgbuf, "prgrbs") == 0) { DeviceIntPtr tmp; + xf86Msg(X_INFO, "Printing all currently active device grabs:\n"); for (tmp = inputInfo.devices; tmp; tmp = tmp->next) if (tmp->deviceGrab.grab) PrintDeviceGrabInfo(tmp); xf86Msg(X_INFO, "End list of active device grabs\n"); } - else if (strcasecmp(msgbuf, "ungrab")==0) + else if (strcasecmp(msgbuf, "ungrab") == 0) UngrabAllDevices(FALSE); - else if (strcasecmp(msgbuf, "clsgrb")==0) + else if (strcasecmp(msgbuf, "clsgrb") == 0) UngrabAllDevices(TRUE); - else if (strcasecmp(msgbuf, "prwins")==0) + else if (strcasecmp(msgbuf, "prwins") == 0) PrintWindowTree(); } diff --git a/xorg-server/hw/xfree86/dixmods/xkbVT.c b/xorg-server/hw/xfree86/dixmods/xkbVT.c index 13bd6f41e..4ca4451d0 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbVT.c +++ b/xorg-server/hw/xfree86/dixmods/xkbVT.c @@ -45,18 +45,18 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "xf86.h" int -XkbDDXSwitchScreen(DeviceIntPtr dev,KeyCode key,XkbAction *act) +XkbDDXSwitchScreen(DeviceIntPtr dev, KeyCode key, XkbAction *act) { int scrnnum = XkbSAScreen(&act->screen); if (act->screen.flags & XkbSA_SwitchApplication) { if (act->screen.flags & XkbSA_SwitchAbsolute) - xf86ProcessActionEvent(ACTION_SWITCHSCREEN,(void *) &scrnnum); + xf86ProcessActionEvent(ACTION_SWITCHSCREEN, (void *) &scrnnum); else { if (scrnnum < 0) - xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV,NULL); + xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV, NULL); else - xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT,NULL); + xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT, NULL); } } diff --git a/xorg-server/hw/xfree86/dri/sarea.h b/xorg-server/hw/xfree86/dri/sarea.h index 1528cc191..7a55b49d6 100644 --- a/xorg-server/hw/xfree86/dri/sarea.h +++ b/xorg-server/hw/xfree86/dri/sarea.h @@ -33,7 +33,6 @@ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - #ifndef _SAREA_H_ #define _SAREA_H_ @@ -43,7 +42,7 @@ #if defined(__alpha__) #define SAREA_MAX 0x2000 #elif defined(__ia64__) -#define SAREA_MAX 0x10000 /* 64kB */ +#define SAREA_MAX 0x10000 /* 64kB */ #else /* Intel 830M driver needs at least 8k SAREA */ #define SAREA_MAX 0x2000 @@ -59,8 +58,8 @@ * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREADrawable { - unsigned int stamp; - unsigned int flags; + unsigned int stamp; + unsigned int flags; } XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr; /** @@ -69,11 +68,11 @@ typedef struct _XF86DRISAREADrawable { * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREAFrame { - unsigned int x; - unsigned int y; - unsigned int width; - unsigned int height; - unsigned int fullscreen; + unsigned int x; + unsigned int y; + unsigned int width; + unsigned int height; + unsigned int fullscreen; } XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr; /** @@ -81,17 +80,17 @@ typedef struct _XF86DRISAREAFrame { */ typedef struct _XF86DRISAREA { /** first thing is always the DRM locking structure */ - drmLock lock; + drmLock lock; /** \todo Use readers/writer lock for drawable_lock */ - drmLock drawable_lock; - XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; - XF86DRISAREAFrameRec frame; - drm_context_t dummy_context; + drmLock drawable_lock; + XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; + XF86DRISAREAFrameRec frame; + drm_context_t dummy_context; } XF86DRISAREARec, *XF86DRISAREAPtr; -typedef struct _XF86DRILSAREA { - drmLock lock; - drmLock otherLocks[31]; +typedef struct _XF86DRILSAREA { + drmLock lock; + drmLock otherLocks[31]; } XF86DRILSAREARec, *XF86DRILSAREAPtr; #endif diff --git a/xorg-server/hw/xfree86/fbdevhw/fbpriv.h b/xorg-server/hw/xfree86/fbdevhw/fbpriv.h index 4c08ec15d..340a4428c 100644 --- a/xorg-server/hw/xfree86/fbdevhw/fbpriv.h +++ b/xorg-server/hw/xfree86/fbdevhw/fbpriv.h @@ -16,8 +16,8 @@ #define FB_MAJOR 29 -#define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */ -#define FB_NUM_MINORS 256 /* 256 Minors */ +#define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */ +#define FB_NUM_MINORS 256 /* 256 Minors */ #define FB_MAX (FB_NUM_MINORS / (1 << FB_MODES_SHIFT)) #define GET_FB_IDX(node) (MINOR(node) >> FB_MODES_SHIFT) @@ -37,75 +37,75 @@ #define FBIOPUT_CON2FBMAP 0x4610 #define FBIOBLANK 0x4611 -#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ -#define FB_TYPE_PLANES 1 /* Non interleaved planes */ -#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ -#define FB_TYPE_TEXT 3 /* Text/attributes */ - -#define FB_AUX_TEXT_MDA 0 /* Monochrome text */ -#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ -#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ -#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ -#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ - -#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ -#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ -#define FB_VISUAL_TRUECOLOR 2 /* True color */ -#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ -#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ -#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ - -#define FB_ACCEL_NONE 0 /* no hardware accelerator */ -#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ -#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ -#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */ -#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */ -#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ -#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */ -#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */ -#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */ -#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */ -#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */ -#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */ -#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */ -#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */ -#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */ -#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */ -#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */ -#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */ -#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */ -#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */ -#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */ -#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */ -#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */ -#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */ -#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */ -#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */ -#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */ -#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */ -#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */ -#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */ -#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */ -#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */ -#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */ +#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ +#define FB_TYPE_PLANES 1 /* Non interleaved planes */ +#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ +#define FB_TYPE_TEXT 3 /* Text/attributes */ + +#define FB_AUX_TEXT_MDA 0 /* Monochrome text */ +#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ +#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ +#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ +#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ + +#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ +#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ +#define FB_VISUAL_TRUECOLOR 2 /* True color */ +#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ +#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ +#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ + +#define FB_ACCEL_NONE 0 /* no hardware accelerator */ +#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ +#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ +#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */ +#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */ +#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ +#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */ +#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */ +#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */ +#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */ +#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */ +#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */ +#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */ +#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */ +#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */ +#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */ +#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */ +#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */ +#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */ +#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */ +#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */ +#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */ +#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */ +#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */ +#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */ +#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */ +#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */ +#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */ +#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */ +#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */ +#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */ +#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */ +#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */ struct fb_fix_screeninfo { - char id[16]; /* identification string eg "TT Builtin" */ - char *smem_start; /* Start of frame buffer mem */ - /* (physical address) */ - __u32 smem_len; /* Length of frame buffer mem */ - __u32 type; /* see FB_TYPE_* */ - __u32 type_aux; /* Interleave for interleaved Planes */ - __u32 visual; /* see FB_VISUAL_* */ - __u16 xpanstep; /* zero if no hardware panning */ - __u16 ypanstep; /* zero if no hardware panning */ - __u16 ywrapstep; /* zero if no hardware ywrap */ - __u32 line_length; /* length of a line in bytes */ - char *mmio_start; /* Start of Memory Mapped I/O */ - /* (physical address) */ - __u32 mmio_len; /* Length of Memory Mapped I/O */ - __u32 accel; /* Type of acceleration available */ - __u16 reserved[3]; /* Reserved for future compatibility */ + char id[16]; /* identification string eg "TT Builtin" */ + char *smem_start; /* Start of frame buffer mem */ + /* (physical address) */ + __u32 smem_len; /* Length of frame buffer mem */ + __u32 type; /* see FB_TYPE_* */ + __u32 type_aux; /* Interleave for interleaved Planes */ + __u32 visual; /* see FB_VISUAL_* */ + __u16 xpanstep; /* zero if no hardware panning */ + __u16 ypanstep; /* zero if no hardware panning */ + __u16 ywrapstep; /* zero if no hardware ywrap */ + __u32 line_length; /* length of a line in bytes */ + char *mmio_start; /* Start of Memory Mapped I/O */ + /* (physical address) */ + __u32 mmio_len; /* Length of Memory Mapped I/O */ + __u32 accel; /* Type of acceleration available */ + __u16 reserved[3]; /* Reserved for future compatibility */ }; /* Interpretation of offset for color fields: All offsets are from the right, @@ -115,101 +115,101 @@ struct fb_fix_screeninfo { * big-endian byte order if bits_per_pixel is greater than 8. */ struct fb_bitfield { - __u32 offset; /* beginning of bitfield */ - __u32 length; /* length of bitfield */ - __u32 msb_right; /* != 0 : Most significant bit is */ - /* right */ + __u32 offset; /* beginning of bitfield */ + __u32 length; /* length of bitfield */ + __u32 msb_right; /* != 0 : Most significant bit is */ + /* right */ }; -#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */ +#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */ -#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/ -#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */ -#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */ +#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl) */ +#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */ +#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */ #define FB_ACTIVATE_MASK 15 - /* values */ -#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ -#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ -#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ - -#define FB_ACCELF_TEXT 1 /* text mode acceleration */ - -#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ -#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ -#define FB_SYNC_EXT 4 /* external sync */ -#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */ -#define FB_SYNC_BROADCAST 16 /* broadcast video timings */ - /* vtotal = 144d/288n/576i => PAL */ - /* vtotal = 121d/242n/484i => NTSC */ -#define FB_SYNC_ON_GREEN 32 /* sync on green */ - -#define FB_VMODE_NONINTERLACED 0 /* non interlaced */ -#define FB_VMODE_INTERLACED 1 /* interlaced */ -#define FB_VMODE_DOUBLE 2 /* double scan */ + /* values */ +#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ +#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ +#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ + +#define FB_ACCELF_TEXT 1 /* text mode acceleration */ + +#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ +#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ +#define FB_SYNC_EXT 4 /* external sync */ +#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */ +#define FB_SYNC_BROADCAST 16 /* broadcast video timings */ + /* vtotal = 144d/288n/576i => PAL */ + /* vtotal = 121d/242n/484i => NTSC */ +#define FB_SYNC_ON_GREEN 32 /* sync on green */ + +#define FB_VMODE_NONINTERLACED 0 /* non interlaced */ +#define FB_VMODE_INTERLACED 1 /* interlaced */ +#define FB_VMODE_DOUBLE 2 /* double scan */ #define FB_VMODE_MASK 255 -#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */ -#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ -#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ +#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */ +#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ +#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ struct fb_var_screeninfo { - __u32 xres; /* visible resolution */ - __u32 yres; - __u32 xres_virtual; /* virtual resolution */ - __u32 yres_virtual; - __u32 xoffset; /* offset from virtual to visible */ - __u32 yoffset; /* resolution */ - - __u32 bits_per_pixel; /* guess what */ - __u32 grayscale; /* != 0 Graylevels instead of colors */ - - struct fb_bitfield red; /* bitfield in fb mem if true color, */ - struct fb_bitfield green; /* else only length is significant */ - struct fb_bitfield blue; - struct fb_bitfield transp; /* transparency */ - - __u32 nonstd; /* != 0 Non standard pixel format */ - - __u32 activate; /* see FB_ACTIVATE_* */ - - __u32 height; /* height of picture in mm */ - __u32 width; /* width of picture in mm */ - - __u32 accel_flags; /* acceleration flags (hints) */ - - /* Timing: All values in pixclocks, except pixclock (of course) */ - __u32 pixclock; /* pixel clock in ps (pico seconds) */ - __u32 left_margin; /* time from sync to picture */ - __u32 right_margin; /* time from picture to sync */ - __u32 upper_margin; /* time from sync to picture */ - __u32 lower_margin; - __u32 hsync_len; /* length of horizontal sync */ - __u32 vsync_len; /* length of vertical sync */ - __u32 sync; /* see FB_SYNC_* */ - __u32 vmode; /* see FB_VMODE_* */ - __u32 reserved[6]; /* Reserved for future compatibility */ + __u32 xres; /* visible resolution */ + __u32 yres; + __u32 xres_virtual; /* virtual resolution */ + __u32 yres_virtual; + __u32 xoffset; /* offset from virtual to visible */ + __u32 yoffset; /* resolution */ + + __u32 bits_per_pixel; /* guess what */ + __u32 grayscale; /* != 0 Graylevels instead of colors */ + + struct fb_bitfield red; /* bitfield in fb mem if true color, */ + struct fb_bitfield green; /* else only length is significant */ + struct fb_bitfield blue; + struct fb_bitfield transp; /* transparency */ + + __u32 nonstd; /* != 0 Non standard pixel format */ + + __u32 activate; /* see FB_ACTIVATE_* */ + + __u32 height; /* height of picture in mm */ + __u32 width; /* width of picture in mm */ + + __u32 accel_flags; /* acceleration flags (hints) */ + + /* Timing: All values in pixclocks, except pixclock (of course) */ + __u32 pixclock; /* pixel clock in ps (pico seconds) */ + __u32 left_margin; /* time from sync to picture */ + __u32 right_margin; /* time from picture to sync */ + __u32 upper_margin; /* time from sync to picture */ + __u32 lower_margin; + __u32 hsync_len; /* length of horizontal sync */ + __u32 vsync_len; /* length of vertical sync */ + __u32 sync; /* see FB_SYNC_* */ + __u32 vmode; /* see FB_VMODE_* */ + __u32 reserved[6]; /* Reserved for future compatibility */ }; struct fb_cmap { - __u32 start; /* First entry */ - __u32 len; /* Number of entries */ - __u16 *red; /* Red values */ - __u16 *green; - __u16 *blue; - __u16 *transp; /* transparency, can be NULL */ + __u32 start; /* First entry */ + __u32 len; /* Number of entries */ + __u16 *red; /* Red values */ + __u16 *green; + __u16 *blue; + __u16 *transp; /* transparency, can be NULL */ }; struct fb_con2fbmap { - __u32 console; - __u32 framebuffer; + __u32 console; + __u32 framebuffer; }; struct fb_monspecs { - __u32 hfmin; /* hfreq lower limit (Hz) */ - __u32 hfmax; /* hfreq upper limit (Hz) */ - __u16 vfmin; /* vfreq lower limit (Hz) */ - __u16 vfmax; /* vfreq upper limit (Hz) */ - unsigned dpms : 1; /* supports DPMS */ + __u32 hfmin; /* hfreq lower limit (Hz) */ + __u32 hfmax; /* hfreq upper limit (Hz) */ + __u16 vfmin; /* vfreq lower limit (Hz) */ + __u16 vfmax; /* vfreq upper limit (Hz) */ + unsigned dpms:1; /* supports DPMS */ }; #if 1 @@ -219,8 +219,7 @@ struct fb_monspecs { #endif - -#if 1 /* Preliminary */ +#if 1 /* Preliminary */ /* * Hardware Cursor @@ -232,34 +231,33 @@ struct fb_monspecs { #define FBIOGET_CURSORSTATE 0x460A #define FBIOPUT_CURSORSTATE 0x460B - struct fb_fix_cursorinfo { - __u16 crsr_width; /* width and height of the cursor in */ - __u16 crsr_height; /* pixels (zero if no cursor) */ - __u16 crsr_xsize; /* cursor size in display pixels */ - __u16 crsr_ysize; - __u16 crsr_color1; /* colormap entry for cursor color1 */ - __u16 crsr_color2; /* colormap entry for cursor color2 */ + __u16 crsr_width; /* width and height of the cursor in */ + __u16 crsr_height; /* pixels (zero if no cursor) */ + __u16 crsr_xsize; /* cursor size in display pixels */ + __u16 crsr_ysize; + __u16 crsr_color1; /* colormap entry for cursor color1 */ + __u16 crsr_color2; /* colormap entry for cursor color2 */ }; struct fb_var_cursorinfo { - __u16 width; - __u16 height; - __u16 xspot; - __u16 yspot; - __u8 data[1]; /* field with [height][width] */ + __u16 width; + __u16 height; + __u16 xspot; + __u16 yspot; + __u8 data[1]; /* field with [height][width] */ }; struct fb_cursorstate { - __s16 xoffset; - __s16 yoffset; - __u16 mode; + __s16 xoffset; + __s16 yoffset; + __u16 mode; }; #define FB_CURSOR_OFF 0 #define FB_CURSOR_ON 1 #define FB_CURSOR_FLASH 2 -#endif /* Preliminary */ +#endif /* Preliminary */ -#endif /* _LINUX_FB_H */ +#endif /* _LINUX_FB_H */ diff --git a/xorg-server/hw/xfree86/i2c/bt829.h b/xorg-server/hw/xfree86/i2c/bt829.h index 06e488f04..2709bee50 100644 --- a/xorg-server/hw/xfree86/i2c/bt829.h +++ b/xorg-server/hw/xfree86/i2c/bt829.h @@ -4,36 +4,36 @@ #include "xf86i2c.h" typedef struct { - int tunertype; /* Must be set before init */ - /* Private variables */ - I2CDevRec d; - - CARD8 brightness; - CARD8 ccmode; - CARD8 code; - CARD16 contrast; - CARD8 format; - int height; - CARD8 hue; - CARD8 len; - CARD8 mux; - CARD8 out_en; - CARD8 p_io; - CARD16 sat_u; - CARD16 sat_v; - CARD8 vbien; - CARD8 vbifmt; - int width; - - CARD16 hdelay; - CARD16 hscale; - CARD16 vactive; - CARD16 vdelay; - CARD16 vscale; - - CARD16 htotal; - CARD8 id; - CARD8 svideo_mux; + int tunertype; /* Must be set before init */ + /* Private variables */ + I2CDevRec d; + + CARD8 brightness; + CARD8 ccmode; + CARD8 code; + CARD16 contrast; + CARD8 format; + int height; + CARD8 hue; + CARD8 len; + CARD8 mux; + CARD8 out_en; + CARD8 p_io; + CARD16 sat_u; + CARD16 sat_v; + CARD8 vbien; + CARD8 vbifmt; + int width; + + CARD16 hdelay; + CARD16 hscale; + CARD16 vactive; + CARD16 vdelay; + CARD16 vscale; + + CARD16 htotal; + CARD8 id; + CARD8 svideo_mux; } BT829Rec, *BT829Ptr; #define xf86_bt829_Detect bt829_Detect @@ -46,20 +46,20 @@ extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr); #define xf86_bt829_ATIInit bt829_ATIInit extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt); -#define BT829_NTSC 1 /* NTSC-M */ -#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */ -#define BT829_PAL 3 /* PAL-B,D,G,H,I */ -#define BT829_PAL_M 4 /* PAL-M */ -#define BT829_PAL_N 5 /* PAL-N */ -#define BT829_SECAM 6 /* SECAM */ -#define BT829_PAL_N_COMB 7 /* PAL-N combination */ +#define BT829_NTSC 1 /* NTSC-M */ +#define BT829_NTSC_JAPAN 2 /* NTSC-Japan */ +#define BT829_PAL 3 /* PAL-B,D,G,H,I */ +#define BT829_PAL_M 4 /* PAL-M */ +#define BT829_PAL_N 5 /* PAL-N */ +#define BT829_SECAM 6 /* SECAM */ +#define BT829_PAL_N_COMB 7 /* PAL-N combination */ #define xf86_bt829_SetFormat bt829_SetFormat extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format); -#define BT829_MUX2 1 /* ATI -> composite video */ -#define BT829_MUX0 2 /* ATI -> tv tuner */ -#define BT829_MUX1 3 /* ATI -> s-video */ +#define BT829_MUX2 1 /* ATI -> composite video */ +#define BT829_MUX0 2 /* ATI -> tv tuner */ +#define BT829_MUX1 3 /* ATI -> s-video */ #define xf86_bt829_SetMux bt829_SetMux extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux); @@ -69,17 +69,21 @@ extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height); #define xf86_bt829_SetBrightness bt829_SetBrightness extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness); + #define xf86_bt829_SetContrast bt829_SetContrast extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast); + #define xf86_bt829_SetSaturation bt829_SetSaturation extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation); + #define xf86_bt829_SetTint bt829_SetTint -extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */ +extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */ #define xf86_bt829_SetOUT_EN bt829_SetOUT_EN -extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en);/* VPOLE register */ +extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en); /* VPOLE register */ + #define xf86_bt829_SetP_IO bt829_SetP_IO -extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */ +extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */ extern _X_EXPORT int bt829_SetCC(BT829Ptr bt); diff --git a/xorg-server/hw/xfree86/i2c/fi1236.h b/xorg-server/hw/xfree86/i2c/fi1236.h index 8dd7e4fdb..053089277 100644 --- a/xorg-server/hw/xfree86/i2c/fi1236.h +++ b/xorg-server/hw/xfree86/i2c/fi1236.h @@ -7,64 +7,63 @@ #undef NUM typedef struct { - CARD32 fcar; /* 16 * fcar_Mhz */ - CARD32 min_freq; /* 16 * min_freq_Mhz */ - CARD32 max_freq; /* 16 * max_freq_Mhz */ - - CARD32 threshold1; /* 16 * Value_Mhz */ - CARD32 threshold2; /* 16 * Value_Mhz */ - - CARD8 band_low; - CARD8 band_mid; - CARD8 band_high; - CARD8 control; - } FI1236_parameters; + CARD32 fcar; /* 16 * fcar_Mhz */ + CARD32 min_freq; /* 16 * min_freq_Mhz */ + CARD32 max_freq; /* 16 * max_freq_Mhz */ + CARD32 threshold1; /* 16 * Value_Mhz */ + CARD32 threshold2; /* 16 * Value_Mhz */ + + CARD8 band_low; + CARD8 band_mid; + CARD8 band_high; + CARD8 control; +} FI1236_parameters; typedef struct { - /* what we want */ - /* all frequencies are in Mhz */ - double f_rf; /* frequency to tune to */ - double f_if1; /* first intermediate frequency */ - double f_if2; /* second intermediate frequency */ - double f_ref; /* reference frequency */ - double f_ifbw; /* bandwidth */ - double f_step; /* step */ - - /* what we compute */ - double f_lo1; - double f_lo2; - int LO1I; - int LO2I; - int SEL; - int STEP; - int NUM; - } MT2032_parameters; + /* what we want */ + /* all frequencies are in Mhz */ + double f_rf; /* frequency to tune to */ + double f_if1; /* first intermediate frequency */ + double f_if2; /* second intermediate frequency */ + double f_ref; /* reference frequency */ + double f_ifbw; /* bandwidth */ + double f_step; /* step */ + + /* what we compute */ + double f_lo1; + double f_lo2; + int LO1I; + int LO2I; + int SEL; + int STEP; + int NUM; +} MT2032_parameters; typedef struct { - I2CDevRec d; - int type; - - void* afc_source; /* The AFC source may be another chip like TDA988x */ - - int afc_delta; - CARD32 original_frequency; - Bool afc_timer_installed; - int afc_count; - int last_afc_hint; - - double video_if; - FI1236_parameters parm; - int xogc; /* for MT2032 */ - - struct { - CARD8 div1; - CARD8 div2; - CARD8 control; - CARD8 band; - CARD8 aux; /* this is for MK3 tuners */ - } tuner_data; - } FI1236Rec, *FI1236Ptr; + I2CDevRec d; + int type; + + void *afc_source; /* The AFC source may be another chip like TDA988x */ + + int afc_delta; + CARD32 original_frequency; + Bool afc_timer_installed; + int afc_count; + int last_afc_hint; + + double video_if; + FI1236_parameters parm; + int xogc; /* for MT2032 */ + + struct { + CARD8 div1; + CARD8 div2; + CARD8 control; + CARD8 band; + CARD8 aux; /* this is for MK3 tuners */ + } tuner_data; +} FI1236Rec, *FI1236Ptr; #define TUNER_TYPE_FI1236 0 #define TUNER_TYPE_FI1216 1 @@ -86,7 +85,6 @@ typedef struct { #define TUNER_OFF 4 #define TUNER_STILL_TUNING 5 - void FI1236_tune(FI1236Ptr f, CARD32 frequency); #define FI1236SymbolsList \ @@ -96,15 +94,19 @@ void FI1236_tune(FI1236Ptr f, CARD32 frequency); #define xf86_Detect_FI1236 Detect_FI1236 extern _X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr); + #define xf86_FI1236_set_tuner_type FI1236_set_tuner_type extern _X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type); + #define xf86_TUNER_set_frequency TUNER_set_frequency extern _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency); #define xf86_FI1236_AFC FI1236_AFC extern _X_EXPORT int FI1236_AFC(FI1236Ptr f); + #define xf86_TUNER_get_afc_hint TUNER_get_afc_hint extern _X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f); + #define xf86_fi1236_dump_status fi1236_dump_status extern _X_EXPORT void fi1236_dump_status(FI1236Ptr f); diff --git a/xorg-server/hw/xfree86/i2c/msp3430.h b/xorg-server/hw/xfree86/i2c/msp3430.h index 8423d1411..ef66e1ed8 100644 --- a/xorg-server/hw/xfree86/i2c/msp3430.h +++ b/xorg-server/hw/xfree86/i2c/msp3430.h @@ -4,29 +4,28 @@ #include "xf86i2c.h" typedef struct { - I2CDevRec d; - - int standard; - int connector; - int mode; + I2CDevRec d; - CARD8 hardware_version, major_revision, product_code, rom_version; + int standard; + int connector; + int mode; + + CARD8 hardware_version, major_revision, product_code, rom_version; #ifdef MSP_DEBUG - CARD8 registers_present[256]; + CARD8 registers_present[256]; #endif - CARD16 chip_id; - CARD8 chip_family; - Bool recheck; /*reinitialization needed after channel change */ - CARD8 c_format; /*current state of audio format */ - CARD16 c_standard; /*current state of standard register */ - CARD8 c_source; /*current state of source register */ - CARD8 c_matrix; /*current state of matrix register */ - CARD8 c_fmmatrix; /*current state of fmmatrix register */ - int c_mode; /* current state of mode for autoswitchimg */ - CARD8 volume; - } MSP3430Rec, * MSP3430Ptr; - + CARD16 chip_id; + CARD8 chip_family; + Bool recheck; /*reinitialization needed after channel change */ + CARD8 c_format; /*current state of audio format */ + CARD16 c_standard; /*current state of standard register */ + CARD8 c_source; /*current state of source register */ + CARD8 c_matrix; /*current state of matrix register */ + CARD8 c_fmmatrix; /*current state of fmmatrix register */ + int c_mode; /* current state of mode for autoswitchimg */ + CARD8 volume; +} MSP3430Rec, *MSP3430Ptr; #define MSP3430_ADDR_1 0x80 #define MSP3430_ADDR_2 0x84 @@ -37,9 +36,9 @@ typedef struct { #define MSP3430_PAL_DK1 (0x100 | MSP3430_PAL) #define MSP3430_SECAM 3 -#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */ -#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */ -#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */ +#define MSP3430_CONNECTOR_1 1 /* tuner on AIW cards */ +#define MSP3430_CONNECTOR_2 2 /* SVideo on AIW cards */ +#define MSP3430_CONNECTOR_3 3 /* composite on AIW cards */ #define MSP3430_ADDR(a) ((a)->d.SlaveAddr) @@ -50,7 +49,7 @@ typedef struct { /*----------------------------------------------------------*/ /* MSP chip families */ -#define MSPFAMILY_UNKNOWN 0 +#define MSPFAMILY_UNKNOWN 0 #define MSPFAMILY_34x0D 1 #define MSPFAMILY_34x5D 2 #define MSPFAMILY_34x0G 3 @@ -94,14 +93,18 @@ typedef struct { #define xf86_InitMSP3430 InitMSP3430 extern _X_EXPORT void InitMSP3430(MSP3430Ptr m); + #define xf86_DetectMSP3430 DetectMSP3430 extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr); + #define xf86_ResetMSP3430 ResetMSP3430 extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m); + #define xf86_MSP3430SetVolume MSP3430SetVolume -extern _X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value); +extern _X_EXPORT void MSP3430SetVolume(MSP3430Ptr m, CARD8 value); + #define xf86_MSP3430SetSAP MSP3430SetSAP -extern _X_EXPORT void MSP3430SetSAP (MSP3430Ptr m, int mode); +extern _X_EXPORT void MSP3430SetSAP(MSP3430Ptr m, int mode); #define MSP3430SymbolsList \ "InitMSP3430", \ diff --git a/xorg-server/hw/xfree86/i2c/tda9850.h b/xorg-server/hw/xfree86/i2c/tda9850.h index d81679510..7d82095f0 100644 --- a/xorg-server/hw/xfree86/i2c/tda9850.h +++ b/xorg-server/hw/xfree86/i2c/tda9850.h @@ -4,27 +4,32 @@ #include "xf86i2c.h" typedef struct { - I2CDevRec d; - - int mux; - int stereo; - int sap; - Bool mute; - Bool sap_mute; - } TDA9850Rec, *TDA9850Ptr; + I2CDevRec d; + + int mux; + int stereo; + int sap; + Bool mute; + Bool sap_mute; +} TDA9850Rec, *TDA9850Ptr; #define TDA9850_ADDR_1 0xB4 #define xf86_Detect_tda9850 Detect_tda9850 extern _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr); + #define xf86_tda9850_init tda9850_init extern _X_EXPORT Bool tda9850_init(TDA9850Ptr t); + #define xf86_tda9850_setaudio tda9850_setaudio extern _X_EXPORT void tda9850_setaudio(TDA9850Ptr t); + #define xf86_tda9850_mute tda9850_mute extern _X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute); + #define xf86_tda9850_sap_mute tda9850_sap_mute extern _X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute); + #define xf86_tda9850_getstatus tda9850_getstatus extern _X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t); diff --git a/xorg-server/hw/xfree86/i2c/tda9885.h b/xorg-server/hw/xfree86/i2c/tda9885.h index 004f43d5c..2d8a8af15 100644 --- a/xorg-server/hw/xfree86/i2c/tda9885.h +++ b/xorg-server/hw/xfree86/i2c/tda9885.h @@ -4,35 +4,35 @@ #include "xf86i2c.h" typedef struct { - I2CDevRec d; - - /* write-only parameters */ - /* B DATA */ - CARD8 sound_trap; - CARD8 auto_mute_fm; - CARD8 carrier_mode; - CARD8 modulation; - CARD8 forced_mute_audio; - CARD8 port1; - CARD8 port2; - /* C DATA */ - CARD8 top_adjustment; - CARD8 deemphasis; - CARD8 audio_gain; - /* E DATA */ - CARD8 standard_sound_carrier; - CARD8 standard_video_if; - CARD8 minimum_gain; - CARD8 gating; - CARD8 vif_agc; - /* read-only values */ - - CARD8 after_reset; - CARD8 afc_status; - CARD8 vif_level; - CARD8 afc_win; - CARD8 fm_carrier; - } TDA9885Rec, *TDA9885Ptr; + I2CDevRec d; + + /* write-only parameters */ + /* B DATA */ + CARD8 sound_trap; + CARD8 auto_mute_fm; + CARD8 carrier_mode; + CARD8 modulation; + CARD8 forced_mute_audio; + CARD8 port1; + CARD8 port2; + /* C DATA */ + CARD8 top_adjustment; + CARD8 deemphasis; + CARD8 audio_gain; + /* E DATA */ + CARD8 standard_sound_carrier; + CARD8 standard_video_if; + CARD8 minimum_gain; + CARD8 gating; + CARD8 vif_agc; + /* read-only values */ + + CARD8 after_reset; + CARD8 afc_status; + CARD8 vif_level; + CARD8 afc_win; + CARD8 fm_carrier; +} TDA9885Rec, *TDA9885Ptr; #define TDA9885_ADDR_1 0x86 #define TDA9885_ADDR_2 0x84 @@ -41,12 +41,16 @@ typedef struct { #define xf86_Detect_tda9885 Detect_tda9885 extern _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr); + #define xf86_tda9885_init tda9885_init extern _X_EXPORT Bool tda9885_init(TDA9885Ptr t); + #define xf86_tda9885_setparameters tda9885_setparameters extern _X_EXPORT void tda9885_setparameters(TDA9885Ptr t); + #define xf86_tda9885_getstatus tda9885_getstatus extern _X_EXPORT void tda9885_getstatus(TDA9885Ptr t); + #define xf86_tda9885_dumpstatus tda9885_dumpstatus extern _X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t); diff --git a/xorg-server/hw/xfree86/i2c/uda1380.h b/xorg-server/hw/xfree86/i2c/uda1380.h index da232f90d..f0bc6167a 100644 --- a/xorg-server/hw/xfree86/i2c/uda1380.h +++ b/xorg-server/hw/xfree86/i2c/uda1380.h @@ -35,29 +35,36 @@ #include "xf86i2c.h" typedef struct { - I2CDevRec d; - - CARD16 analog_mixer_settings; /* register 0x03 */ - - } UDA1380Rec, *UDA1380Ptr; + I2CDevRec d; + + CARD16 analog_mixer_settings; /* register 0x03 */ + +} UDA1380Rec, *UDA1380Ptr; #define UDA1380_ADDR_1 0x30 #define UDA1380_ADDR_2 0x34 #define xf86_Detect_uda1380 Detect_uda1380 extern _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr); + #define xf86_uda1380_init uda1380_init extern _X_EXPORT Bool uda1380_init(UDA1380Ptr t); + #define xf86_uda1380_shutdown uda1380_shutdown extern _X_EXPORT void uda1380_shutdown(UDA1380Ptr t); + #define xf86_uda1380_setvolume uda1380_setvolume extern _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32); + #define xf86_uda1380_mute uda1380_mute extern _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool); + #define xf86_uda1380_setparameters uda1380_setparameters extern _X_EXPORT void uda1380_setparameters(UDA1380Ptr t); + #define xf86_uda1380_getstatus uda1380_getstatus extern _X_EXPORT void uda1380_getstatus(UDA1380Ptr t); + #define xf86_uda1380_dumpstatus uda1380_dumpstatus extern _X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t); diff --git a/xorg-server/hw/xfree86/int10/stub.c b/xorg-server/hw/xfree86/int10/stub.c index 58b65782c..8fd079069 100644 --- a/xorg-server/hw/xfree86/int10/stub.c +++ b/xorg-server/hw/xfree86/int10/stub.c @@ -38,7 +38,7 @@ xf86FreeInt10(xf86Int10InfoPtr pInt) } void * -xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off) +xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off) { *off = 0; return NULL; diff --git a/xorg-server/hw/xfree86/int10/xf86x86emu.c b/xorg-server/hw/xfree86/int10/xf86x86emu.c index 83663b0e6..0f8737b49 100644 --- a/xorg-server/hw/xfree86/int10/xf86x86emu.c +++ b/xorg-server/hw/xfree86/int10/xf86x86emu.c @@ -24,7 +24,7 @@ x86emu_do_int(int num) Int10Current->num = num; if (!int_handler(Int10Current)) { - X86EMU_halt_sys(); + X86EMU_halt_sys(); } } @@ -34,10 +34,10 @@ xf86ExecX86int10(xf86Int10InfoPtr pInt) int sig = setup_int(pInt); if (sig < 0) - return; + return; if (int_handler(pInt)) { - X86EMU_exec(); + X86EMU_exec(); } finish_int(pInt, sig); @@ -48,33 +48,34 @@ xf86Int10ExecSetup(xf86Int10InfoPtr pInt) { int i; X86EMU_intrFuncs intFuncs[256]; + X86EMU_pioFuncs pioFuncs = { - (&x_inb), - (&x_inw), - (&x_inl), - (&x_outb), - (&x_outw), - (&x_outl) + (&x_inb), + (&x_inw), + (&x_inl), + (&x_outb), + (&x_outw), + (&x_outl) }; X86EMU_memFuncs memFuncs = { - (&Mem_rb), - (&Mem_rw), - (&Mem_rl), - (&Mem_wb), - (&Mem_ww), - (&Mem_wl) + (&Mem_rb), + (&Mem_rw), + (&Mem_rl), + (&Mem_wb), + (&Mem_ww), + (&Mem_wl) }; X86EMU_setupMemFuncs(&memFuncs); pInt->cpuRegs = &M; M.mem_base = 0; - M.mem_size = 1024*1024 + 1024; + M.mem_size = 1024 * 1024 + 1024; X86EMU_setupPioFuncs(&pioFuncs); - for (i=0;i<256;i++) - intFuncs[i] = x86emu_do_int; + for (i = 0; i < 256; i++) + intFuncs[i] = x86emu_do_int; X86EMU_setupIntrFuncs(intFuncs); return TRUE; } @@ -83,6 +84,7 @@ void printk(const char *fmt, ...) { va_list argptr; + va_start(argptr, fmt); VErrorF(fmt, argptr); va_end(argptr); diff --git a/xorg-server/hw/xfree86/loader/loader.h b/xorg-server/hw/xfree86/loader/loader.h index a53970b6e..5cadd5ad6 100644 --- a/xorg-server/hw/xfree86/loader/loader.h +++ b/xorg-server/hw/xfree86/loader/loader.h @@ -1,76 +1,76 @@ -/*
- * Copyright 1995-1998 by Metro Link, Inc.
- *
- * 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 Metro Link, Inc. not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Metro Link, Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1997-2001 by The XFree86 Project, Inc.
- *
- * 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
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s)
- * and author(s) 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 copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _LOADER_H
-#define _LOADER_H
-
-#include <X11/Xosdefs.h>
-#include <X11/Xfuncproto.h>
-#include <X11/Xmd.h>
-
-/* Compiled-in version information */
-typedef struct {
- int xf86Version;
- int ansicVersion;
- int videodrvVersion;
- int xinputVersion;
- int extensionVersion;
- int fontVersion;
-} ModuleVersions;
-extern const ModuleVersions LoaderVersionInfo;
-
-extern unsigned long LoaderOptions;
-
-/* Internal Functions */
-void * LoaderOpen(const char *, int *, int *);
-
-#endif /* _LOADER_H */
+/* + * Copyright 1995-1998 by Metro Link, Inc. + * + * 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 Metro Link, Inc. not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Metro Link, Inc. makes no + * representations about the suitability of this software for any purpose. + * It is provided "as is" without express or implied warranty. + * + * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/* + * Copyright (c) 1997-2001 by The XFree86 Project, Inc. + * + * 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 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) + * and author(s) 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 copyright holder(s) and author(s). + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#ifndef _LOADER_H +#define _LOADER_H + +#include <X11/Xosdefs.h> +#include <X11/Xfuncproto.h> +#include <X11/Xmd.h> + +/* Compiled-in version information */ +typedef struct { + int xf86Version; + int ansicVersion; + int videodrvVersion; + int xinputVersion; + int extensionVersion; + int fontVersion; +} ModuleVersions; +extern const ModuleVersions LoaderVersionInfo; + +extern unsigned long LoaderOptions; + +/* Internal Functions */ +void *LoaderOpen(const char *, int *, int *); + +#endif /* _LOADER_H */ diff --git a/xorg-server/hw/xfree86/loader/loaderProcs.h b/xorg-server/hw/xfree86/loader/loaderProcs.h index 133d5aae9..a7b752b9a 100644 --- a/xorg-server/hw/xfree86/loader/loaderProcs.h +++ b/xorg-server/hw/xfree86/loader/loaderProcs.h @@ -1,94 +1,94 @@ -/*
- * Copyright 1995-1998 by Metro Link, Inc.
- *
- * 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 Metro Link, Inc. not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Metro Link, Inc. makes no
- * representations about the suitability of this software for any purpose.
- * It is provided "as is" without express or implied warranty.
- *
- * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- * PERFORMANCE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1997-2002 by The XFree86 Project, Inc.
- *
- * 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
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s)
- * and author(s) 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 copyright holder(s) and author(s).
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _LOADERPROCS_H
-#define _LOADERPROCS_H
-
-#include "xf86Module.h"
-
-typedef struct module_desc {
- struct module_desc *child;
- struct module_desc *sib;
- struct module_desc *parent;
- char *name;
- char *path;
- void *handle;
- ModuleSetupProc SetupProc;
- ModuleTearDownProc TearDownProc;
- void *TearDownData; /* returned from SetupProc */
- const XF86ModuleVersionInfo *VersionInfo;
-} ModuleDesc, *ModuleDescPtr;
-
-/* External API for the loader */
-
-void LoaderInit(void);
-
-ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *,
- int *);
-ModuleDescPtr LoadModule(const char *, const char *, const char **,
- const char **, pointer, const XF86ModReqInfo *,
- int *, int *);
-ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent);
-void UnloadDriver(ModuleDescPtr);
-void LoaderSetPath(const char *path);
-void LoaderSortExtensions(void);
-
-void LoaderUnload(const char *, void *);
-unsigned long LoaderGetModuleVersion(ModuleDescPtr mod);
-
-void LoaderResetOptions(void);
-void LoaderSetOptions(unsigned long);
-
-/* Options for LoaderSetOptions */
-#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001
-
-#endif /* _LOADERPROCS_H */
+/* + * Copyright 1995-1998 by Metro Link, Inc. + * + * 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 Metro Link, Inc. not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Metro Link, Inc. makes no + * representations about the suitability of this software for any purpose. + * It is provided "as is" without express or implied warranty. + * + * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL METRO LINK, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/* + * Copyright (c) 1997-2002 by The XFree86 Project, Inc. + * + * 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 + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) + * and author(s) 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 copyright holder(s) and author(s). + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#ifndef _LOADERPROCS_H +#define _LOADERPROCS_H + +#include "xf86Module.h" + +typedef struct module_desc { + struct module_desc *child; + struct module_desc *sib; + struct module_desc *parent; + char *name; + char *path; + void *handle; + ModuleSetupProc SetupProc; + ModuleTearDownProc TearDownProc; + void *TearDownData; /* returned from SetupProc */ + const XF86ModuleVersionInfo *VersionInfo; +} ModuleDesc, *ModuleDescPtr; + +/* External API for the loader */ + +void LoaderInit(void); + +ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *, + int *); +ModuleDescPtr LoadModule(const char *, const char *, const char **, + const char **, pointer, const XF86ModReqInfo *, + int *, int *); +ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent); +void UnloadDriver(ModuleDescPtr); +void LoaderSetPath(const char *path); +void LoaderSortExtensions(void); + +void LoaderUnload(const char *, void *); +unsigned long LoaderGetModuleVersion(ModuleDescPtr mod); + +void LoaderResetOptions(void); +void LoaderSetOptions(unsigned long); + +/* Options for LoaderSetOptions */ +#define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001 + +#endif /* _LOADERPROCS_H */ diff --git a/xorg-server/hw/xfree86/loader/os.c b/xorg-server/hw/xfree86/loader/os.c index 6b5ac7e86..e3a9ac448 100644 --- a/xorg-server/hw/xfree86/loader/os.c +++ b/xorg-server/hw/xfree86/loader/os.c @@ -66,7 +66,7 @@ void LoaderGetOS(const char **name, int *major, int *minor, int *teeny) { if (name) - *name = OSNAME; + *name = OSNAME; /* reporting runtime versions isn't supported yet */ } diff --git a/xorg-server/hw/xfree86/modes/xf86Rename.h b/xorg-server/hw/xfree86/modes/xf86Rename.h index e3418caad..46690a8f6 100644 --- a/xorg-server/hw/xfree86/modes/xf86Rename.h +++ b/xorg-server/hw/xfree86/modes/xf86Rename.h @@ -91,4 +91,4 @@ #define xf86SetSingleMode XF86NAME(xf86SetSingleMode) #define xf86SetDesiredModes XF86NAME(xf86SetDesiredModes) -#endif /* _XF86RENAME_H_ */ +#endif /* _XF86RENAME_H_ */ diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c index 15220d743..0ee51de2f 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_VTsw.c @@ -1,103 +1,103 @@ -/*
- * Derived from VTsw_usl.c which is
- * Copyright 1993 by David Wexelblat <dwex@goblin.org>
- * by S_ren Schmidt (sos@login.dkuug.dk)
- *
- * 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 David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT 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.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the bsd, sysv, sco, and linux subdirs).
- */
-
-/*
- * This function is the signal handler for the VT-switching signal. It
- * is only referenced inside the OS-support layer.
- */
-void
-xf86VTRequest(int sig)
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = TRUE;
- }
-#endif
- return;
-}
-
-Bool
-xf86VTSwitchPending()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- return xf86Info.vtRequestsPending ? TRUE : FALSE;
- }
-#endif
- return FALSE;
-}
-
-Bool
-xf86VTSwitchAway()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- return FALSE;
- else
- return TRUE;
- }
-#endif
- return FALSE;
-}
-
-Bool
-xf86VTSwitchTo()
-{
-#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
- if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- return FALSE;
- else
- return TRUE;
- }
-#endif
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return FALSE;
- }
- return TRUE;
-}
+/* + * Derived from VTsw_usl.c which is + * Copyright 1993 by David Wexelblat <dwex@goblin.org> + * by S_ren Schmidt (sos@login.dkuug.dk) + * + * 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 David Wexelblat not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. David Wexelblat makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL DAVID WEXELBLAT 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. + * + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> +#include "xf86.h" +#include "xf86Priv.h" +#include "xf86_OSlib.h" + +/* + * Handle the VT-switching interface for OSs that use USL-style ioctl()s + * (the bsd, sysv, sco, and linux subdirs). + */ + +/* + * This function is the signal handler for the VT-switching signal. It + * is only referenced inside the OS-support layer. + */ +void +xf86VTRequest(int sig) +{ +#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) + if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { + xf86Info.vtRequestsPending = TRUE; + } +#endif + return; +} + +Bool +xf86VTSwitchPending() +{ +#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) + if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { + return xf86Info.vtRequestsPending ? TRUE : FALSE; + } +#endif + return FALSE; +} + +Bool +xf86VTSwitchAway() +{ +#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) + if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { + xf86Info.vtRequestsPending = FALSE; + if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) + return FALSE; + else + return TRUE; + } +#endif + return FALSE; +} + +Bool +xf86VTSwitchTo() +{ +#if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) + if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { + xf86Info.vtRequestsPending = FALSE; + if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) + return FALSE; + else + return TRUE; + } +#endif + return TRUE; +} + +Bool +xf86VTActivate(int vtno) +{ + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) { + return FALSE; + } + return TRUE; +} diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c index 31b364df3..645377ed6 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c @@ -26,74 +26,74 @@ int readDense8(pointer Base, register unsigned long Offset); int readDense16(pointer Base, register unsigned long Offset); int readDense32(pointer Base, register unsigned long Offset); void -writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, pointer Base, register unsigned long Offset); void -writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, pointer Base, register unsigned long Offset); void -writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, pointer Base, register unsigned long Offset); void -writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, pointer Base, register unsigned long Offset); void -writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, pointer Base, register unsigned long Offset); void -writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, pointer Base, register unsigned long Offset); int readDense8(pointer Base, register unsigned long Offset) { mem_barrier(); - return (alpha_ldbu((pointer)((unsigned long)Base+(Offset)))); + return (alpha_ldbu((pointer) ((unsigned long) Base + (Offset)))); } int readDense16(pointer Base, register unsigned long Offset) { mem_barrier(); - return (alpha_ldwu((pointer)((unsigned long)Base+(Offset)))); + return (alpha_ldwu((pointer) ((unsigned long) Base + (Offset)))); } int readDense32(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD32*)((unsigned long)Base+(Offset)); + return *(volatile CARD32 *) ((unsigned long) Base + (Offset)); } void writeDenseNB8(int Value, pointer Base, register unsigned long Offset) { - alpha_stb((pointer)((unsigned long)Base+(Offset)), Value); + alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value); } void writeDenseNB16(int Value, pointer Base, register unsigned long Offset) { - alpha_stw((pointer)((unsigned long)Base + (Offset)), Value); + alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value); } void writeDenseNB32(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD32*)((unsigned long)Base+(Offset)) = Value; + *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; } void writeDense8(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - alpha_stb((pointer)((unsigned long)Base+(Offset)), Value); + alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value); } void writeDense16(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - alpha_stw((pointer)((unsigned long)Base + (Offset)), Value); + alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value); } void writeDense32(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value; + *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; } diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.c b/xorg-server/hw/xfree86/os-support/bus/Pci.c index 0362a00e3..52d142fbf 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.c +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.c @@ -129,7 +129,7 @@ Bool xf86scanpci(void) { - Bool success = FALSE; + Bool success = FALSE; success = (pci_system_init() == 0); diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.h b/xorg-server/hw/xfree86/os-support/bus/Pci.h index 5709bd841..776bb637c 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.h @@ -95,7 +95,6 @@ * authorization from the copyright holder(s) and author(s). */ - /* * This file has the private Pci definitions. The public ones are imported * from xf86Pci.h. Drivers should not use this file. @@ -119,7 +118,7 @@ #endif #ifndef PCI_DOM_MASK -# define PCI_DOM_MASK 0x0ffu +#define PCI_DOM_MASK 0x0ffu #endif #define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu) @@ -146,4 +145,4 @@ extern void osPciInit(void); #error No PCI support available for this architecture/OS combination #endif -#endif /* _PCI_H */ +#endif /* _PCI_H */ diff --git a/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h b/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h index cff5e808a..8a10d64fe 100644 --- a/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h +++ b/xorg-server/hw/xfree86/os-support/bus/xf86Sbus.h @@ -66,4 +66,4 @@ #define FBTYPE_CREATOR -1 #endif -#endif /* _XF86_SBUS_H */ +#endif /* _XF86_SBUS_H */ diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c index 5fad19451..d98efa247 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c @@ -14,7 +14,7 @@ #include <unistd.h> #include <fcntl.h> #include <errno.h> - + #define ACPI_SOCKET "/var/run/acpid.socket" #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 @@ -43,8 +43,8 @@ static CARD32 lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) { if (lnxACPIOpen()) { - TimerFree(timer); - return 0; + TimerFree(timer); + return 0; } return ACPI_REOPEN_DELAY; @@ -53,7 +53,7 @@ lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) #define LINE_LENGTH 80 static int -lnxACPIGetEventFromOs(int fd, pmEvent *events, int num) +lnxACPIGetEventFromOs(int fd, pmEvent * events, int num) { char ev[LINE_LENGTH]; int n; @@ -61,59 +61,59 @@ lnxACPIGetEventFromOs(int fd, pmEvent *events, int num) memset(ev, 0, LINE_LENGTH); do { - n = read( fd, ev, LINE_LENGTH ); + n = read(fd, ev, LINE_LENGTH); } while ((n == -1) && (errno == EAGAIN || errno == EINTR)); if (n <= 0) { - lnxCloseACPI(); - TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL); - return 0; + lnxCloseACPI(); + TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL); + return 0; } /* FIXME: this only processes the first read ACPI event & might break * with interrupted reads. */ - + /* Check that we have a video event */ if (!strncmp(ev, "video", 5)) { - char *video = NULL; - char *GFX = NULL; - char *notify = NULL; - char *data = NULL; /* doesn't appear to be used in the kernel */ - unsigned long int notify_l, data_l; + char *video = NULL; + char *GFX = NULL; + char *notify = NULL; + char *data = NULL; /* doesn't appear to be used in the kernel */ + unsigned long int notify_l, data_l; - video = strtok(ev, " "); + video = strtok(ev, " "); - GFX = strtok(NULL, " "); + GFX = strtok(NULL, " "); #if 0 - ErrorF("GFX: %s\n",GFX); + ErrorF("GFX: %s\n", GFX); #endif - notify = strtok(NULL, " "); - notify_l = strtoul(notify, NULL, 16); + notify = strtok(NULL, " "); + notify_l = strtoul(notify, NULL, 16); #if 0 - ErrorF("notify: 0x%lx\n",notify_l); + ErrorF("notify: 0x%lx\n", notify_l); #endif - data = strtok(NULL, " "); - data_l = strtoul(data, NULL, 16); + data = strtok(NULL, " "); + data_l = strtoul(data, NULL, 16); #if 0 - ErrorF("data: 0x%lx\n",data_l); + ErrorF("data: 0x%lx\n", data_l); #endif - /* Differentiate between events */ - switch (notify_l) { - case ACPI_VIDEO_NOTIFY_SWITCH: - case ACPI_VIDEO_NOTIFY_CYCLE: - case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: - case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: - events[0] = XF86_APM_CAPABILITY_CHANGED; - return 1; - case ACPI_VIDEO_NOTIFY_PROBE: - return 0; - default: - return 0; - } + /* Differentiate between events */ + switch (notify_l) { + case ACPI_VIDEO_NOTIFY_SWITCH: + case ACPI_VIDEO_NOTIFY_CYCLE: + case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: + case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: + events[0] = XF86_APM_CAPABILITY_CHANGED; + return 1; + case ACPI_VIDEO_NOTIFY_PROBE: + return 0; + default: + return 0; + } } - + return 0; } @@ -123,42 +123,42 @@ lnxACPIConfirmEventToOs(int fd, pmEvent event) /* No ability to send back to the kernel in ACPI */ switch (event) { default: - return PM_NONE; + return PM_NONE; } } PMClose lnxACPIOpen(void) { - int fd; + int fd; struct sockaddr_un addr; int r = -1; static int warned = 0; DebugF("ACPI: OSPMOpen called\n"); if (ACPIihPtr || !xf86Info.pmFlag) - return NULL; - + return NULL; + DebugF("ACPI: Opening device\n"); if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) { - memset(&addr, 0, sizeof(addr)); - addr.sun_family = AF_UNIX; - strcpy(addr.sun_path, ACPI_SOCKET); - if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) { - if (!warned) - xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", - ACPI_SOCKET, strerror(errno)); - warned = 1; - shutdown(fd, 2); - close(fd); - return NULL; - } + memset(&addr, 0, sizeof(addr)); + addr.sun_family = AF_UNIX; + strcpy(addr.sun_path, ACPI_SOCKET); + if ((r = connect(fd, (struct sockaddr *) &addr, sizeof(addr))) == -1) { + if (!warned) + xf86MsgVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n", + ACPI_SOCKET, strerror(errno)); + warned = 1; + shutdown(fd, 2); + close(fd); + return NULL; + } } xf86PMGetEventFromOs = lnxACPIGetEventFromOs; xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; - ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL); - xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", ACPI_SOCKET); + ACPIihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); + xf86MsgVerb(X_INFO, 3, "Open ACPI successful (%s)\n", ACPI_SOCKET); warned = 0; return lnxCloseACPI; @@ -171,9 +171,9 @@ lnxCloseACPI(void) DebugF("ACPI: Closing device\n"); if (ACPIihPtr) { - fd = xf86RemoveGeneralHandler(ACPIihPtr); - shutdown(fd, 2); - close(fd); - ACPIihPtr = NULL; + fd = xf86RemoveGeneralHandler(ACPIihPtr); + shutdown(fd, 2); + close(fd); + ACPIihPtr = NULL; } } diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c index 75cdd3ebc..e1d3cbf17 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c @@ -42,5 +42,5 @@ xf86OSRingBell(int loudness, int pitch, int duration) ioctl(xf86Info.consoleFd, KDMKTONE, ((1193190 / pitch) & 0xffff) | - (((unsigned long)duration * loudness / 50) << 16)); + (((unsigned long) duration * loudness / 50) << 16)); } diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c index cb3460d29..49950705a 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c @@ -10,74 +10,74 @@ int readDense8(pointer Base, register unsigned long Offset); int readDense16(pointer Base, register unsigned long Offset); int readDense32(pointer Base, register unsigned long Offset); void -writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, pointer Base, register unsigned long Offset); void -writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, pointer Base, register unsigned long Offset); void -writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, pointer Base, register unsigned long Offset); void -writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, pointer Base, register unsigned long Offset); void -writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, pointer Base, register unsigned long Offset); void -writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, pointer Base, register unsigned long Offset); int readDense8(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD8*) ((unsigned long)Base+(Offset)); + return *(volatile CARD8 *) ((unsigned long) Base + (Offset)); } int readDense16(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD16*) ((unsigned long)Base+(Offset)); + return *(volatile CARD16 *) ((unsigned long) Base + (Offset)); } int readDense32(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD32*)((unsigned long)Base+(Offset)); + return *(volatile CARD32 *) ((unsigned long) Base + (Offset)); } void writeDenseNB8(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD8*)((unsigned long)Base+(Offset)) = Value; + *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value; } void writeDenseNB16(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD16*)((unsigned long)Base + (Offset)) = Value; + *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value; } void writeDenseNB32(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD32*)((unsigned long)Base+(Offset)) = Value; + *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; } void writeDense8(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD8 *)((unsigned long)Base+(Offset)) = Value; + *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value; } void writeDense16(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD16 *)((unsigned long)Base+(Offset)) = Value; + *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value; } void writeDense32(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD32 *)((unsigned long)Base+(Offset)) = Value; + *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; } diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c index 0b9493d27..0a17c2a81 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c @@ -11,11 +11,9 @@ #include "xf86_OSlib.h" #include "xf86.h" - #define MODPROBE_PATH_FILE "/proc/sys/kernel/modprobe" #define MAX_PATH 1024 - #if 0 /* XFree86 #defines execl to be the xf86execl() function which does * a fork AND exec. We don't want that. We want the regular, @@ -26,7 +24,6 @@ #endif #endif - /* * Load a Linux kernel module. * This is used by the DRI/DRM to load a DRM kernel module when @@ -39,74 +36,76 @@ int xf86LoadKernelModule(const char *modName) { - char mpPath[MAX_PATH] = ""; - int fd = -1, status, n; - pid_t pid; + char mpPath[MAX_PATH] = ""; + int fd = -1, status, n; + pid_t pid; + + /* get the path to the modprobe program */ + fd = open(MODPROBE_PATH_FILE, O_RDONLY); + if (fd >= 0) { + int count = read(fd, mpPath, MAX_PATH - 1); + + if (count <= 0) { + mpPath[0] = 0; + } + else if (mpPath[count - 1] == '\n') { + mpPath[count - 1] = 0; /* replaces \n with \0 */ + } + close(fd); + /* if this worked, mpPath will be "/sbin/modprobe" or similar. */ + } - /* get the path to the modprobe program */ - fd = open(MODPROBE_PATH_FILE, O_RDONLY); - if (fd >= 0) { - int count = read(fd, mpPath, MAX_PATH - 1); - if (count <= 0) { - mpPath[0] = 0; - } - else if (mpPath[count - 1] == '\n') { - mpPath[count - 1] = 0; /* replaces \n with \0 */ - } - close(fd); - /* if this worked, mpPath will be "/sbin/modprobe" or similar. */ - } + if (mpPath[0] == 0) { + /* we failed to get the path from the system, use a default */ + strcpy(mpPath, "/sbin/modprobe"); + } - if (mpPath[0] == 0) { - /* we failed to get the path from the system, use a default */ - strcpy(mpPath, "/sbin/modprobe"); - } + /* now fork/exec the modprobe command */ + /* + * It would be good to capture stdout/stderr so that it can be directed + * to the log file. modprobe errors currently are missing from the log + * file. + */ + switch (pid = fork()) { + case 0: /* child */ + /* change real/effective user ID to 0/0 as we need to + * preinstall agpgart module for some DRM modules + */ + if (setreuid(0, 0)) { + xf86Msg(X_WARNING, "LoadKernelModule: " + "Setting of real/effective user Id to 0/0 failed"); + } + setenv("PATH", "/sbin", 1); + n = execl(mpPath, "modprobe", modName, NULL); + xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno)); + exit(EXIT_FAILURE); /* if we get here the child's exec failed */ + break; + case -1: /* fork failed */ + return 0; + default: /* fork worked */ + { + /* XXX we loop over waitpid() because it sometimes fails on + * the first attempt. Don't know why! + */ + int count = 0, p; - /* now fork/exec the modprobe command */ - /* - * It would be good to capture stdout/stderr so that it can be directed - * to the log file. modprobe errors currently are missing from the log - * file. - */ - switch (pid = fork()) { - case 0: /* child */ - /* change real/effective user ID to 0/0 as we need to - * preinstall agpgart module for some DRM modules - */ - if (setreuid(0,0)) { - xf86Msg(X_WARNING,"LoadKernelModule: " - "Setting of real/effective user Id to 0/0 failed"); - } - setenv("PATH","/sbin",1); - n = execl(mpPath, "modprobe", modName, NULL); - xf86Msg(X_WARNING,"LoadKernelModule %s\n",strerror(errno)); - exit(EXIT_FAILURE); /* if we get here the child's exec failed */ - break; - case -1: /* fork failed */ - return 0; - default: /* fork worked */ - { - /* XXX we loop over waitpid() because it sometimes fails on - * the first attempt. Don't know why! - */ - int count = 0, p; - do { + do { p = waitpid(pid, &status, 0); - } while (p == -1 && count++ < 4); + } while (p == -1 && count++ < 4); - if (p == -1) { + if (p == -1) { return 0; - } + } - if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { - return 1; /* success! */ - } - else { + if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { + return 1; /* success! */ + } + else { return 0; - } - } - } + } + } + } - /* never get here */ - return 0; + /* never get here */ + return 0; } diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c index be47cd681..a75d134b4 100644 --- a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c @@ -1,60 +1,60 @@ -/*
- * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
- *
- * 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 David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT 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.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * No-op functions for OSs without VTs
- */
-
-Bool
-xf86VTSwitchPending(void)
-{
- return FALSE;
-}
-
-Bool
-xf86VTSwitchAway(void)
-{
- return FALSE;
-}
-
-Bool
-xf86VTSwitchTo(void)
-{
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
- return TRUE;
-}
+/* + * Copyright 1993 by David Wexelblat <dwex@XFree86.org> + * + * 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 David Wexelblat not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. David Wexelblat makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL DAVID WEXELBLAT 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. + * + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> + +#include "xf86.h" +#include "xf86Priv.h" +#include "xf86_OSlib.h" + +/* + * No-op functions for OSs without VTs + */ + +Bool +xf86VTSwitchPending(void) +{ + return FALSE; +} + +Bool +xf86VTSwitchAway(void) +{ + return FALSE; +} + +Bool +xf86VTSwitchTo(void) +{ + return TRUE; +} + +Bool +xf86VTActivate(int vtno) +{ + return TRUE; +} diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c index 769fa009c..f20106c90 100644 --- a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c +++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c @@ -1,86 +1,86 @@ -/*
- * Copyright 1993 by David Wexelblat <dwex@XFree86.org>
- *
- * 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 David Wexelblat not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. David Wexelblat makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL DAVID WEXELBLAT 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.
- *
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include <X11/X.h>
-
-#include "xf86.h"
-#include "xf86Priv.h"
-#include "xf86_OSlib.h"
-
-/*
- * Handle the VT-switching interface for OSs that use USL-style ioctl()s
- * (the sysv, sco, and linux subdirs).
- */
-
-/*
- * This function is the signal handler for the VT-switching signal. It
- * is only referenced inside the OS-support layer.
- */
-void
-xf86VTRequest(int sig)
-{
- signal(sig, (void(*)(int))xf86VTRequest);
- xf86Info.vtRequestsPending = TRUE;
- return;
-}
-
-Bool
-xf86VTSwitchPending(void)
-{
- return xf86Info.vtRequestsPending ? TRUE : FALSE;
-}
-
-Bool
-xf86VTSwitchAway(void)
-{
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
- return FALSE;
- else
- return TRUE;
-}
-
-Bool
-xf86VTSwitchTo(void)
-{
- xf86Info.vtRequestsPending = FALSE;
- if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
- return FALSE;
- else
- return TRUE;
-}
-
-Bool
-xf86VTActivate(int vtno)
-{
-#ifdef VT_ACTIVATE
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) {
- return FALSE;
- }
-#endif
- return TRUE;
-}
+/* + * Copyright 1993 by David Wexelblat <dwex@XFree86.org> + * + * 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 David Wexelblat not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. David Wexelblat makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL DAVID WEXELBLAT 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. + * + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> + +#include "xf86.h" +#include "xf86Priv.h" +#include "xf86_OSlib.h" + +/* + * Handle the VT-switching interface for OSs that use USL-style ioctl()s + * (the sysv, sco, and linux subdirs). + */ + +/* + * This function is the signal handler for the VT-switching signal. It + * is only referenced inside the OS-support layer. + */ +void +xf86VTRequest(int sig) +{ + signal(sig, (void (*)(int)) xf86VTRequest); + xf86Info.vtRequestsPending = TRUE; + return; +} + +Bool +xf86VTSwitchPending(void) +{ + return xf86Info.vtRequestsPending ? TRUE : FALSE; +} + +Bool +xf86VTSwitchAway(void) +{ + xf86Info.vtRequestsPending = FALSE; + if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) + return FALSE; + else + return TRUE; +} + +Bool +xf86VTSwitchTo(void) +{ + xf86Info.vtRequestsPending = FALSE; + if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) + return FALSE; + else + return TRUE; +} + +Bool +xf86VTActivate(int vtno) +{ +#ifdef VT_ACTIVATE + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) { + return FALSE; + } +#endif + return TRUE; +} diff --git a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c index eda466a52..9c6ed4b8d 100644 --- a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c @@ -43,61 +43,60 @@ Bool xf86GARTCloseScreen(int screenNum) { - return FALSE; + return FALSE; } Bool xf86AgpGARTSupported() { - return FALSE; + return FALSE; } AgpInfoPtr xf86GetAGPInfo(int screenNum) { - return NULL; + return NULL; } Bool xf86AcquireGART(int screenNum) { - return FALSE; + return FALSE; } Bool xf86ReleaseGART(int screenNum) { - return FALSE; + return FALSE; } int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, - unsigned long *physical) + unsigned long *physical) { - return -1; + return -1; } Bool xf86DeallocateGARTMemory(int screenNum, int key) { - return FALSE; + return FALSE; } Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { - return FALSE; + return FALSE; } - Bool xf86UnbindGARTMemory(int screenNum, int key) { - return FALSE; + return FALSE; } Bool xf86EnableAGP(int screenNum, CARD32 mode) { - return FALSE; + return FALSE; } diff --git a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c index 805caccac..30688c0b5 100644 --- a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c @@ -38,12 +38,11 @@ Bool xf86EnableIO() { - return TRUE; + return TRUE; } void xf86DisableIO() { - return; + return; } - diff --git a/xorg-server/hw/xfree86/os-support/shared/pm_noop.c b/xorg-server/hw/xfree86/os-support/shared/pm_noop.c index bfac4b1c8..1d6f0789d 100644 --- a/xorg-server/hw/xfree86/os-support/shared/pm_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/pm_noop.c @@ -41,7 +41,5 @@ PMClose xf86OSPMOpen(void) { - return NULL; + return NULL; } - - diff --git a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c index cecec37f7..ba8e234f4 100644 --- a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c +++ b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c @@ -29,13 +29,13 @@ #include <xorg-config.h> #endif -# include <X11/X.h> -# include "xf86.h" -# include "xf86Priv.h" -# include "xf86_OSlib.h" +#include <X11/X.h> +#include "xf86.h" +#include "xf86Priv.h" +#include "xf86_OSlib.h" int -xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) +xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) { return 0; } @@ -47,25 +47,24 @@ xf86RemoveSIGIOHandler(int fd) } int -xf86BlockSIGIO (void) +xf86BlockSIGIO(void) { return 0; } void -xf86UnblockSIGIO (int wasset) +xf86UnblockSIGIO(int wasset) { } void -xf86AssertBlockedSIGIO (char *where) +xf86AssertBlockedSIGIO(char *where) { } /* XXX This is a quick hack for the benefit of xf86SetSilkenMouse() */ Bool -xf86SIGIOSupported () +xf86SIGIOSupported() { return FALSE; } - diff --git a/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h b/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h index 5e9d6284c..fded9d8c9 100644 --- a/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h +++ b/xorg-server/hw/xfree86/os-support/shared/xf86Axp.h @@ -6,29 +6,28 @@ #define _XF86_AXP_H_ typedef enum { - SYS_NONE, - TSUNAMI, - LCA, - APECS, - T2, - T2_GAMMA, - CIA, - MCPCIA, - JENSEN, - POLARIS, - PYXIS, - PYXIS_CIA, - IRONGATE + SYS_NONE, + TSUNAMI, + LCA, + APECS, + T2, + T2_GAMMA, + CIA, + MCPCIA, + JENSEN, + POLARIS, + PYXIS, + PYXIS_CIA, + IRONGATE } axpDevice; - + typedef struct { - axpDevice id; - unsigned long hae_thresh; - unsigned long hae_mask; - unsigned long size; + axpDevice id; + unsigned long hae_thresh; + unsigned long hae_mask; + unsigned long size; } axpParams; extern axpParams xf86AXPParams[]; #endif - diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c index 8c4e9f5c1..fb58eca81 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c @@ -51,6 +51,7 @@ static int gartFd = -1; static int acquiredScreen = -1; static Bool initDone = FALSE; + /* * Close /dev/agpgart. This frees all associated memory allocated during * this server generation. @@ -58,17 +59,17 @@ static Bool initDone = FALSE; Bool xf86GARTCloseScreen(int screenNum) { - if (gartFd != -1) { - close(gartFd); - acquiredScreen = -1; - gartFd = -1; - initDone = FALSE; + if (gartFd != -1) { + close(gartFd); + acquiredScreen = -1; + gartFd = -1; + initDone = FALSE; - xf86DrvMsg(screenNum, X_INFO, - "xf86GARTCloseScreen: device closed successfully\n"); + xf86DrvMsg(screenNum, X_INFO, + "xf86GARTCloseScreen: device closed successfully\n"); - } - return TRUE; + } + return TRUE; } /* @@ -77,251 +78,249 @@ xf86GARTCloseScreen(int screenNum) static Bool GARTInit(int screenNum) { - if (initDone) - return gartFd != -1; - - if (gartFd == -1) - gartFd = open(AGP_DEVICE, O_RDWR); - else - return FALSE; - - if (gartFd == -1) { - xf86DrvMsg(screenNum, X_ERROR, - "GARTInit: Unable to open " AGP_DEVICE " (%s)\n", - strerror(errno)); - return FALSE; - } - - initDone = TRUE; - xf86DrvMsg(screenNum, X_INFO, - "GARTInit: " AGP_DEVICE " opened successfully\n"); - - return TRUE; + if (initDone) + return gartFd != -1; + + if (gartFd == -1) + gartFd = open(AGP_DEVICE, O_RDWR); + else + return FALSE; + + if (gartFd == -1) { + xf86DrvMsg(screenNum, X_ERROR, + "GARTInit: Unable to open " AGP_DEVICE " (%s)\n", + strerror(errno)); + return FALSE; + } + + initDone = TRUE; + xf86DrvMsg(screenNum, X_INFO, + "GARTInit: " AGP_DEVICE " opened successfully\n"); + + return TRUE; } Bool xf86AgpGARTSupported(void) { - return (GARTInit(-1)); + return (GARTInit(-1)); } AgpInfoPtr xf86GetAGPInfo(int screenNum) { - agp_info_t agpinf; - AgpInfoPtr info; - - if (!GARTInit(screenNum)) - return NULL; - - if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { - xf86DrvMsg(screenNum, X_ERROR, - "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n", - strerror(errno)); - return NULL; - } - - if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) { - xf86DrvMsg(screenNum, X_ERROR, - "xf86GetAGPInfo: Failed to allocate AgpInfo\n"); - return NULL; - } - - info->bridgeId = agpinf.agpi_devid; - info->agpMode = agpinf.agpi_mode; - info->base = agpinf.agpi_aperbase; - info->size = agpinf.agpi_apersize; - info->totalPages = (unsigned long)agpinf.agpi_pgtotal; - info->systemPages = (unsigned long)agpinf.agpi_pgsystem; - info->usedPages = (unsigned long)agpinf.agpi_pgused; - - return info; + agp_info_t agpinf; + AgpInfoPtr info; + + if (!GARTInit(screenNum)) + return NULL; + + if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { + xf86DrvMsg(screenNum, X_ERROR, + "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n", + strerror(errno)); + return NULL; + } + + if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) { + xf86DrvMsg(screenNum, X_ERROR, + "xf86GetAGPInfo: Failed to allocate AgpInfo\n"); + return NULL; + } + + info->bridgeId = agpinf.agpi_devid; + info->agpMode = agpinf.agpi_mode; + info->base = agpinf.agpi_aperbase; + info->size = agpinf.agpi_apersize; + info->totalPages = (unsigned long) agpinf.agpi_pgtotal; + info->systemPages = (unsigned long) agpinf.agpi_pgsystem; + info->usedPages = (unsigned long) agpinf.agpi_pgused; + + return info; } Bool xf86AcquireGART(int screenNum) { - if (!GARTInit(screenNum)) - return FALSE; - - if (acquiredScreen != screenNum) { - if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) { - xf86DrvMsg(screenNum, X_WARNING, - "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n", - strerror(errno)); - return FALSE; - } - acquiredScreen = screenNum; - xf86DrvMsg(screenNum, X_INFO, - "xf86AcquireGART: AGPIOC_ACQUIRE succeeded\n"); - } - return TRUE; + if (!GARTInit(screenNum)) + return FALSE; + + if (acquiredScreen != screenNum) { + if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) { + xf86DrvMsg(screenNum, X_WARNING, + "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n", + strerror(errno)); + return FALSE; + } + acquiredScreen = screenNum; + xf86DrvMsg(screenNum, X_INFO, + "xf86AcquireGART: AGPIOC_ACQUIRE succeeded\n"); + } + return TRUE; } Bool xf86ReleaseGART(int screenNum) { - if (!GARTInit(screenNum)) - return FALSE; - - if (acquiredScreen == screenNum) { - /* - * The FreeBSD agp driver removes allocations on release. - * The Solaris driver doesn't. xf86ReleaseGART() is expected - * to give up access to the GART, but not to remove any - * allocations. - */ - - if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) { - xf86DrvMsg(screenNum, X_WARNING, - "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n", - strerror(errno)); - return FALSE; - } - acquiredScreen = -1; - xf86DrvMsg(screenNum, X_INFO, - "xf86ReleaseGART: AGPIOC_RELEASE succeeded\n"); - return TRUE; - } - return FALSE; + if (!GARTInit(screenNum)) + return FALSE; + + if (acquiredScreen == screenNum) { + /* + * The FreeBSD agp driver removes allocations on release. + * The Solaris driver doesn't. xf86ReleaseGART() is expected + * to give up access to the GART, but not to remove any + * allocations. + */ + + if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) { + xf86DrvMsg(screenNum, X_WARNING, + "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n", + strerror(errno)); + return FALSE; + } + acquiredScreen = -1; + xf86DrvMsg(screenNum, X_INFO, + "xf86ReleaseGART: AGPIOC_RELEASE succeeded\n"); + return TRUE; + } + return FALSE; } int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, - unsigned long *physical) + unsigned long *physical) { - agp_allocate_t alloc; - int pages; - - /* - * Allocates "size" bytes of GART memory (rounds up to the next - * page multiple) or type "type". A handle (key) for the allocated - * memory is returned. On error, the return value is -1. - * "size" should be larger than 0, or AGPIOC_ALLOCATE ioctl will - * return error. - */ - - if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) - return -1; - - pages = (size / AGP_PAGE_SIZE); - if (size % AGP_PAGE_SIZE != 0) - pages++; - - alloc.agpa_pgcount = pages; - alloc.agpa_type = type; - - if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) { - xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: " - "allocation of %d pages failed\n\t(%s)\n", pages, - strerror(errno)); - return -1; - } - - if (physical) - *physical = (unsigned long)alloc.agpa_physical; - - return alloc.agpa_key; + agp_allocate_t alloc; + int pages; + + /* + * Allocates "size" bytes of GART memory (rounds up to the next + * page multiple) or type "type". A handle (key) for the allocated + * memory is returned. On error, the return value is -1. + * "size" should be larger than 0, or AGPIOC_ALLOCATE ioctl will + * return error. + */ + + if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) + return -1; + + pages = (size / AGP_PAGE_SIZE); + if (size % AGP_PAGE_SIZE != 0) + pages++; + + alloc.agpa_pgcount = pages; + alloc.agpa_type = type; + + if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) { + xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: " + "allocation of %d pages failed\n\t(%s)\n", pages, + strerror(errno)); + return -1; + } + + if (physical) + *physical = (unsigned long) alloc.agpa_physical; + + return alloc.agpa_key; } Bool xf86DeallocateGARTMemory(int screenNum, int key) { - if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) - return FALSE; + if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) + return FALSE; - if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *)(uintptr_t)key) != 0) { - xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: " - "deallocation of gart memory with key %d failed\n" - "\t(%s)\n", key, strerror(errno)); - return FALSE; - } + if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *) (uintptr_t) key) != 0) { + xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: " + "deallocation of gart memory with key %d failed\n" + "\t(%s)\n", key, strerror(errno)); + return FALSE; + } - return TRUE; + return TRUE; } /* Bind GART memory with "key" at "offset" */ Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { - agp_bind_t bind; - int pageOffset; - - if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) - return FALSE; - - if (offset % AGP_PAGE_SIZE != 0) { - xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " - "offset (0x%lx) is not page-aligned (%d)\n", - offset, AGP_PAGE_SIZE); - return FALSE; - } - pageOffset = offset / AGP_PAGE_SIZE; - - xf86DrvMsgVerb(screenNum, X_INFO, 3, - "xf86BindGARTMemory: bind key %d at 0x%08lx " - "(pgoffset %d)\n", key, offset, pageOffset); - - bind.agpb_pgstart = pageOffset; - bind.agpb_key = key; - - if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) { - xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " - "binding of gart memory with key %d\n" - "\tat offset 0x%lx failed (%s)\n", - key, offset, strerror(errno)); - return FALSE; - } - - return TRUE; + agp_bind_t bind; + int pageOffset; + + if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) + return FALSE; + + if (offset % AGP_PAGE_SIZE != 0) { + xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " + "offset (0x%lx) is not page-aligned (%d)\n", + offset, AGP_PAGE_SIZE); + return FALSE; + } + pageOffset = offset / AGP_PAGE_SIZE; + + xf86DrvMsgVerb(screenNum, X_INFO, 3, + "xf86BindGARTMemory: bind key %d at 0x%08lx " + "(pgoffset %d)\n", key, offset, pageOffset); + + bind.agpb_pgstart = pageOffset; + bind.agpb_key = key; + + if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) { + xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " + "binding of gart memory with key %d\n" + "\tat offset 0x%lx failed (%s)\n", + key, offset, strerror(errno)); + return FALSE; + } + + return TRUE; } /* Unbind GART memory with "key" */ Bool xf86UnbindGARTMemory(int screenNum, int key) { - agp_unbind_t unbind; + agp_unbind_t unbind; - if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) - return FALSE; + if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) + return FALSE; - unbind.agpu_pri = 0; - unbind.agpu_key = key; + unbind.agpu_pri = 0; + unbind.agpu_key = key; - if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) { - xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: " - "unbinding of gart memory with key %d " - "failed (%s)\n", key, strerror(errno)); - return FALSE; - } + if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) { + xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: " + "unbinding of gart memory with key %d " + "failed (%s)\n", key, strerror(errno)); + return FALSE; + } - xf86DrvMsgVerb(screenNum, X_INFO, 3, - "xf86UnbindGARTMemory: unbind key %d\n", key); + xf86DrvMsgVerb(screenNum, X_INFO, 3, + "xf86UnbindGARTMemory: unbind key %d\n", key); - return TRUE; + return TRUE; } - /* XXX Interface may change. */ Bool xf86EnableAGP(int screenNum, CARD32 mode) { - agp_setup_t setup; + agp_setup_t setup; - if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) - return FALSE; + if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) + return FALSE; - setup.agps_mode = mode; - if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) { - xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: " - "AGPIOC_SETUP with mode %x failed (%s)\n", - (unsigned int) mode, strerror(errno)); - return FALSE; - } + setup.agps_mode = mode; + if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) { + xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: " + "AGPIOC_SETUP with mode %x failed (%s)\n", + (unsigned int) mode, strerror(errno)); + return FALSE; + } - return TRUE; + return TRUE; } - diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_bios.c b/xorg-server/hw/xfree86/os-support/stub/stub_bios.c index 8628316dd..dbc92fcdb 100644 --- a/xorg-server/hw/xfree86/os-support/stub/stub_bios.c +++ b/xorg-server/hw/xfree86/os-support/stub/stub_bios.c @@ -6,7 +6,7 @@ int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, - int Len) + int Len) { - return -1; + return -1; } diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_init.c b/xorg-server/hw/xfree86/os-support/stub/stub_init.c index 36fd2b818..629675d68 100644 --- a/xorg-server/hw/xfree86/os-support/stub/stub_init.c +++ b/xorg-server/hw/xfree86/os-support/stub/stub_init.c @@ -17,7 +17,7 @@ xf86CloseConsole() int xf86ProcessArgument(int argc, char *argv[], int i) { - return 0; + return 0; } void diff --git a/xorg-server/hw/xfree86/os-support/stub/stub_video.c b/xorg-server/hw/xfree86/os-support/stub/stub_video.c index 327496839..9771fcf6e 100644 --- a/xorg-server/hw/xfree86/os-support/stub/stub_video.c +++ b/xorg-server/hw/xfree86/os-support/stub/stub_video.c @@ -8,6 +8,6 @@ void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { - pVidMem->initialised = TRUE; - return; + pVidMem->initialised = TRUE; + return; } diff --git a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h index 754128de9..65769c16f 100644 --- a/xorg-server/hw/xfree86/os-support/xf86OSpriv.h +++ b/xorg-server/hw/xfree86/os-support/xf86OSpriv.h @@ -32,25 +32,25 @@ #ifndef _XF86OSPRIV_H #define _XF86OSPRIV_H -typedef pointer (*MapMemProcPtr)(int, unsigned long, unsigned long, int); -typedef void (*UnmapMemProcPtr)(int, pointer, unsigned long); -typedef pointer (*SetWCProcPtr)(int, unsigned long, unsigned long, Bool, - MessageType); -typedef void (*ProtectMemProcPtr)(int, pointer, unsigned long, Bool); -typedef void (*UndoWCProcPtr)(int, pointer); -typedef void (*ReadSideEffectsProcPtr)(int, pointer, unsigned long); +typedef pointer (*MapMemProcPtr) (int, unsigned long, unsigned long, int); +typedef void (*UnmapMemProcPtr) (int, pointer, unsigned long); +typedef pointer (*SetWCProcPtr) (int, unsigned long, unsigned long, Bool, + MessageType); +typedef void (*ProtectMemProcPtr) (int, pointer, unsigned long, Bool); +typedef void (*UndoWCProcPtr) (int, pointer); +typedef void (*ReadSideEffectsProcPtr) (int, pointer, unsigned long); typedef struct { - Bool initialised; - MapMemProcPtr mapMem; - UnmapMemProcPtr unmapMem; - ProtectMemProcPtr protectMem; - SetWCProcPtr setWC; - UndoWCProcPtr undoWC; - ReadSideEffectsProcPtr readSideEffects; - Bool linearSupported; + Bool initialised; + MapMemProcPtr mapMem; + UnmapMemProcPtr unmapMem; + ProtectMemProcPtr protectMem; + SetWCProcPtr setWC; + UndoWCProcPtr undoWC; + ReadSideEffectsProcPtr readSideEffects; + Bool linearSupported; } VidMemInfo, *VidMemInfoPtr; void xf86OSInitVidMem(VidMemInfoPtr); -#endif /* _XF86OSPRIV_H */ +#endif /* _XF86OSPRIV_H */ diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h index 45500dbdb..9161e181e 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h @@ -85,152 +85,150 @@ /**************************************************************************/ #if (defined(SYSV) || defined(SVR4)) && \ (defined(sun) || defined(__i386__)) -# include <sys/ioctl.h> -# include <signal.h> -# include <termio.h> -# include <sys/stat.h> -# include <sys/types.h> - - -# include <errno.h> - -# if defined(_NEED_SYSI86) -# if !(defined (sun) && defined (SVR4)) -# include <sys/immu.h> -# include <sys/region.h> -# include <sys/proc.h> -# endif -# include <sys/tss.h> -# include <sys/sysi86.h> -# if defined(SVR4) && !defined(sun) -# include <sys/seg.h> -# endif /* SVR4 && !sun */ +#include <sys/ioctl.h> +#include <signal.h> +#include <termio.h> +#include <sys/stat.h> +#include <sys/types.h> + +#include <errno.h> + +#if defined(_NEED_SYSI86) +#if !(defined (sun) && defined (SVR4)) +#include <sys/immu.h> +#include <sys/region.h> +#include <sys/proc.h> +#endif +#include <sys/tss.h> +#include <sys/sysi86.h> +#if defined(SVR4) && !defined(sun) +#include <sys/seg.h> +#endif /* SVR4 && !sun */ /* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */ -# if !defined(V86SC_IOPL) /* Solaris 7 or later? */ -# include <sys/v86.h> /* Nope */ -# endif -# if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4) -# include <sys/psw.h> -# endif -# endif /* _NEED_SYSI86 */ - -# if defined(HAS_SVR3_MMAPDRV) -# include <sys/sysmacros.h> -# if !defined(_NEED_SYSI86) -# include <sys/immu.h> -# include <sys/region.h> -# endif -# include <sys/mmap.h> /* MMAP driver header */ -# endif - -# if !defined(sun) || defined(HAVE_SYS_VT_H) -# define HAS_USL_VTS -# endif -# if !defined(sun) -# include <sys/emap.h> -# endif -# if defined(HAS_USL_VTS) -# if !defined(sun) -# include <sys/at_ansi.h> -# endif -# include <sys/kd.h> -# include <sys/vt.h> -# endif - -# if defined(sun) -# include <sys/fbio.h> -# include <sys/kbd.h> -# include <sys/kbio.h> - -/* undefine symbols from <sys/kbd.h> we don't need that conflict with enum - definitions in parser/xf86tokens.h */ -# undef STRING -# undef LEFTALT -# undef RIGHTALT +#if !defined(V86SC_IOPL) /* Solaris 7 or later? */ +#include <sys/v86.h> /* Nope */ +#endif +#if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4) +#include <sys/psw.h> +#endif +#endif /* _NEED_SYSI86 */ -# define LED_CAP LED_CAPS_LOCK -# define LED_NUM LED_NUM_LOCK -# define LED_SCR LED_SCROLL_LOCK -# define LED_COMP LED_COMPOSE -# endif /* sun */ +#if defined(HAS_SVR3_MMAPDRV) +#include <sys/sysmacros.h> +#if !defined(_NEED_SYSI86) +#include <sys/immu.h> +#include <sys/region.h> +#endif +#include <sys/mmap.h> /* MMAP driver header */ +#endif -# if !defined(VT_ACKACQ) -# define VT_ACKACQ 2 -# endif /* !VT_ACKACQ */ +#if !defined(sun) || defined(HAVE_SYS_VT_H) +#define HAS_USL_VTS +#endif +#if !defined(sun) +#include <sys/emap.h> +#endif +#if defined(HAS_USL_VTS) +#if !defined(sun) +#include <sys/at_ansi.h> +#endif +#include <sys/kd.h> +#include <sys/vt.h> +#endif +#if defined(sun) +#include <sys/fbio.h> +#include <sys/kbd.h> +#include <sys/kbio.h> -# if defined(SVR4) -# include <sys/mman.h> -# if !(defined(sun) && defined (SVR4)) -# define DEV_MEM "/dev/pmem" -# endif -# define CLEARDTR_SUPPORT -# define POSIX_TTY -# endif /* SVR4 */ +/* undefine symbols from <sys/kbd.h> we don't need that conflict with enum + definitions in parser/xf86tokens.h */ +#undef STRING +#undef LEFTALT +#undef RIGHTALT + +#define LED_CAP LED_CAPS_LOCK +#define LED_NUM LED_NUM_LOCK +#define LED_SCR LED_SCROLL_LOCK +#define LED_COMP LED_COMPOSE +#endif /* sun */ + +#if !defined(VT_ACKACQ) +#define VT_ACKACQ 2 +#endif /* !VT_ACKACQ */ + +#if defined(SVR4) +#include <sys/mman.h> +#if !(defined(sun) && defined (SVR4)) +#define DEV_MEM "/dev/pmem" +#endif +#define CLEARDTR_SUPPORT +#define POSIX_TTY +#endif /* SVR4 */ -#endif /* (SYSV || SVR4) */ +#endif /* (SYSV || SVR4) */ /**************************************************************************/ /* Linux or Glibc-based system */ /**************************************************************************/ #if defined(__linux__) || defined(__GLIBC__) -# include <sys/ioctl.h> -# include <signal.h> -# include <stdlib.h> -# include <sys/types.h> -# include <assert.h> - -# ifdef __linux__ -# include <termio.h> -# else /* __GLIBC__ */ -# include <termios.h> -# endif -# ifdef __sparc__ -# include <sys/param.h> -# endif - -# include <errno.h> - -# include <sys/stat.h> - -# include <sys/mman.h> -# ifdef __linux__ -# define HAS_USL_VTS -# include <sys/kd.h> -# include <sys/vt.h> -# define LDGMAP GIO_SCRNMAP -# define LDSMAP PIO_SCRNMAP -# define LDNMAP LDSMAP -# define CLEARDTR_SUPPORT -# endif - -# define POSIX_TTY - -#endif /* __linux__ || __GLIBC__ */ +#include <sys/ioctl.h> +#include <signal.h> +#include <stdlib.h> +#include <sys/types.h> +#include <assert.h> + +#ifdef __linux__ +#include <termio.h> +#else /* __GLIBC__ */ +#include <termios.h> +#endif +#ifdef __sparc__ +#include <sys/param.h> +#endif + +#include <errno.h> + +#include <sys/stat.h> + +#include <sys/mman.h> +#ifdef __linux__ +#define HAS_USL_VTS +#include <sys/kd.h> +#include <sys/vt.h> +#define LDGMAP GIO_SCRNMAP +#define LDSMAP PIO_SCRNMAP +#define LDNMAP LDSMAP +#define CLEARDTR_SUPPORT +#endif + +#define POSIX_TTY + +#endif /* __linux__ || __GLIBC__ */ /**************************************************************************/ /* 386BSD and derivatives, BSD/386 */ /**************************************************************************/ #if defined(__386BSD__) && (defined(__FreeBSD__) || defined(__NetBSD__)) -# undef __386BSD__ +#undef __386BSD__ #endif #ifdef CSRG_BASED -# include <sys/ioctl.h> -# include <signal.h> +#include <sys/ioctl.h> +#include <signal.h> -# include <termios.h> -# define termio termios -# define POSIX_TTY +#include <termios.h> +#define termio termios +#define POSIX_TTY -# include <errno.h> +#include <errno.h> -# include <sys/types.h> -# include <sys/mman.h> -# include <sys/stat.h> +#include <sys/types.h> +#include <sys/mman.h> +#include <sys/stat.h> -#endif /* CSRG_BASED */ +#endif /* CSRG_BASED */ /**************************************************************************/ /* Kernel of *BSD */ @@ -238,92 +236,92 @@ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -# include <sys/param.h> -# if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version) -# define __FreeBSD_kernel_version __FreeBSD_version -# endif +#include <sys/param.h> +#if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version) +#define __FreeBSD_kernel_version __FreeBSD_version +#endif -# if !defined(LINKKIT) +#if !defined(LINKKIT) /* Don't need this stuff for the Link Kit */ -# ifdef SYSCONS_SUPPORT -# define COMPAT_SYSCONS -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -# if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000) -# include <sys/consio.h> -# include <sys/kbio.h> -# else -# include <machine/console.h> -# endif /* FreeBSD 4.1 RELEASE or lator */ -# else -# include <sys/console.h> -# endif -# endif /* SYSCONS_SUPPORT */ -# if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__) -# if !defined(SYSCONS_SUPPORT) +#ifdef SYSCONS_SUPPORT +#define COMPAT_SYSCONS +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +#if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000) +#include <sys/consio.h> +#include <sys/kbio.h> +#else +#include <machine/console.h> +#endif /* FreeBSD 4.1 RELEASE or lator */ +#else +#include <sys/console.h> +#endif +#endif /* SYSCONS_SUPPORT */ +#if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__) +#if !defined(SYSCONS_SUPPORT) /* no syscons, so include pcvt specific header file */ -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -# include <machine/pcvt_ioctl.h> -# else -# include <sys/pcvt_ioctl.h> -# endif /* __FreeBSD_kernel__ */ -# else /* pcvt and syscons: hard-code the ID magic */ -# define VGAPCVTID _IOWR('V',113, struct pcvtid) - struct pcvtid { - char name[16]; - int rmajor, rminor; - }; -# endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */ -# endif /* PCVT_SUPPORT */ -# ifdef WSCONS_SUPPORT -# include <dev/wscons/wsconsio.h> -# include <dev/wscons/wsdisplay_usl_io.h> -# endif /* WSCONS_SUPPORT */ -# if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) -# if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013) -# include <sys/mouse.h> -# else -# undef MOUSE_GETINFO -# include <machine/mouse.h> -# endif -# endif +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#include <machine/pcvt_ioctl.h> +#else +#include <sys/pcvt_ioctl.h> +#endif /* __FreeBSD_kernel__ */ +#else /* pcvt and syscons: hard-code the ID magic */ +#define VGAPCVTID _IOWR('V',113, struct pcvtid) +struct pcvtid { + char name[16]; + int rmajor, rminor; +}; +#endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */ +#endif /* PCVT_SUPPORT */ +#ifdef WSCONS_SUPPORT +#include <dev/wscons/wsconsio.h> +#include <dev/wscons/wsdisplay_usl_io.h> +#endif /* WSCONS_SUPPORT */ +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) +#if defined(__FreeBSD_kernel_version) && (__FreeBSD_kernel_version >= 500013) +#include <sys/mouse.h> +#else +#undef MOUSE_GETINFO +#include <machine/mouse.h> +#endif +#endif /* Include these definitions in case ioctl_pc.h didn't get included */ -# ifndef CONSOLE_X_MODE_ON -# define CONSOLE_X_MODE_ON _IO('t',121) -# endif -# ifndef CONSOLE_X_MODE_OFF -# define CONSOLE_X_MODE_OFF _IO('t',122) -# endif -# ifndef CONSOLE_X_BELL -# define CONSOLE_X_BELL _IOW('t',123,int[2]) -# endif -# ifndef CONSOLE_X_TV_ON -# define CONSOLE_X_TV_ON _IOW('t',155,int) -# define XMODE_RGB 0 -# define XMODE_NTSC 1 -# define XMODE_PAL 2 -# define XMODE_SECAM 3 -# endif -# ifndef CONSOLE_X_TV_OFF -# define CONSOLE_X_TV_OFF _IO('t',156) -# endif +#ifndef CONSOLE_X_MODE_ON +#define CONSOLE_X_MODE_ON _IO('t',121) +#endif +#ifndef CONSOLE_X_MODE_OFF +#define CONSOLE_X_MODE_OFF _IO('t',122) +#endif +#ifndef CONSOLE_X_BELL +#define CONSOLE_X_BELL _IOW('t',123,int[2]) +#endif +#ifndef CONSOLE_X_TV_ON +#define CONSOLE_X_TV_ON _IOW('t',155,int) +#define XMODE_RGB 0 +#define XMODE_NTSC 1 +#define XMODE_PAL 2 +#define XMODE_SECAM 3 +#endif +#ifndef CONSOLE_X_TV_OFF +#define CONSOLE_X_TV_OFF _IO('t',156) +#endif #ifndef CONSOLE_GET_LINEAR_INFO -# define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info) +#define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info) #endif -#ifndef CONSOLE_GET_IO_INFO -# define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info) +#ifndef CONSOLE_GET_IO_INFO +#define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info) #endif -#ifndef CONSOLE_GET_MEM_INFO -# define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info) +#ifndef CONSOLE_GET_MEM_INFO +#define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info) #endif -# endif /* !LINKKIT */ +#endif /* !LINKKIT */ #if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL) #include <machine/sysarch.h> #endif -# define CLEARDTR_SUPPORT +#define CLEARDTR_SUPPORT -#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */ +#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */ /**************************************************************************/ /* IRIX */ @@ -333,7 +331,7 @@ /* Generic */ /**************************************************************************/ -#include <sys/wait.h> /* May need to adjust this for other OSs */ +#include <sys/wait.h> /* May need to adjust this for other OSs */ /* For PATH_MAX */ #include "misc.h" @@ -343,21 +341,20 @@ * and it's safe, so just do it. */ #if !defined(O_NDELAY) && defined(O_NONBLOCK) -# define O_NDELAY O_NONBLOCK -#endif /* !O_NDELAY && O_NONBLOCK */ +#define O_NDELAY O_NONBLOCK +#endif /* !O_NDELAY && O_NONBLOCK */ #if !defined(MAXHOSTNAMELEN) -# define MAXHOSTNAMELEN 32 -#endif /* !MAXHOSTNAMELEN */ +#define MAXHOSTNAMELEN 32 +#endif /* !MAXHOSTNAMELEN */ #if defined(_POSIX_SOURCE) -# include <limits.h> +#include <limits.h> #else -# define _POSIX_SOURCE -# include <limits.h> -# undef _POSIX_SOURCE -#endif /* _POSIX_SOURCE */ - +#define _POSIX_SOURCE +#include <limits.h> +#undef _POSIX_SOURCE +#endif /* _POSIX_SOURCE */ #ifndef DEV_MEM #define DEV_MEM "/dev/mem" @@ -376,4 +373,4 @@ #include "compiler.h" #endif -#endif /* _XF86_OSLIB_H */ +#endif /* _XF86_OSLIB_H */ diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h index a9856064e..f751b7b0e 100644 --- a/xorg-server/hw/xfree86/parser/xf86tokens.h +++ b/xorg-server/hw/xfree86/parser/xf86tokens.h @@ -52,7 +52,6 @@ * authorization from the copyright holder(s) and author(s). */ - #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif @@ -70,13 +69,13 @@ typedef enum { /* errno-style tokens */ - OBSOLETE_TOKEN = -5, - EOF_TOKEN = -4, - LOCK_TOKEN = -3, - ERROR_TOKEN = -2, + OBSOLETE_TOKEN = -5, + EOF_TOKEN = -4, + LOCK_TOKEN = -3, + ERROR_TOKEN = -2, /* value type tokens */ - NUMBER = 1, + NUMBER = 1, STRING, /* Tokens that can appear in many sections */ @@ -148,7 +147,7 @@ typedef enum { DEFAULTDEPTH, DEFAULTBPP, DEFAULTFBBPP, - + /* VideoAdaptor tokens */ VIDEOADAPTOR, @@ -170,7 +169,7 @@ typedef enum { LOAD, LOAD_DRIVER, DISABLE, - + /* Device tokens */ DRIVER, CHIPSET, @@ -251,7 +250,7 @@ typedef enum { DEPTH, BPP, WEIGHT, - + /* Layout Tokens */ SCREEN, INACTIVE, @@ -289,4 +288,4 @@ typedef enum { MATCH_IS_TOUCHSCREEN } ParserTokens; -#endif /* _xf86_tokens_h */ +#endif /* _xf86_tokens_h */ diff --git a/xorg-server/hw/xfree86/ramdac/BTPriv.h b/xorg-server/hw/xfree86/ramdac/BTPriv.h index 52737768f..95f288009 100644 --- a/xorg-server/hw/xfree86/ramdac/BTPriv.h +++ b/xorg-server/hw/xfree86/ramdac/BTPriv.h @@ -6,15 +6,15 @@ #include "BT.h" typedef struct { - const char *DeviceName; + const char *DeviceName; } xf86BTramdacInfo; extern xf86BTramdacInfo BTramdacDeviceInfo[]; #ifdef INIT_BT_RAMDAC_INFO xf86BTramdacInfo BTramdacDeviceInfo[] = { - {"AT&T 20C504"}, - {"AT&T 20C505"}, - {"BT485/484"} + {"AT&T 20C504"}, + {"AT&T 20C505"}, + {"BT485/484"} }; #endif diff --git a/xorg-server/hw/xfree86/ramdac/IBMPriv.h b/xorg-server/hw/xfree86/ramdac/IBMPriv.h index 309a193ad..48588c851 100644 --- a/xorg-server/hw/xfree86/ramdac/IBMPriv.h +++ b/xorg-server/hw/xfree86/ramdac/IBMPriv.h @@ -6,22 +6,22 @@ #include "IBM.h" typedef struct { - const char *DeviceName; + const char *DeviceName; } xf86IBMramdacInfo; extern xf86IBMramdacInfo IBMramdacDeviceInfo[]; #ifdef INIT_IBM_RAMDAC_INFO xf86IBMramdacInfo IBMramdacDeviceInfo[] = { - {"IBM 524"}, - {"IBM 524A"}, - {"IBM 525"}, - {"IBM 526"}, - {"IBM 526DB(DoubleBuffer)"}, - {"IBM 528"}, - {"IBM 528A"}, - {"IBM 624"}, - {"IBM 624DB(DoubleBuffer)"}, - {"IBM 640"} + {"IBM 524"}, + {"IBM 524A"}, + {"IBM 525"}, + {"IBM 526"}, + {"IBM 526DB(DoubleBuffer)"}, + {"IBM 528"}, + {"IBM 528A"}, + {"IBM 624"}, + {"IBM 624DB(DoubleBuffer)"}, + {"IBM 640"} }; #endif diff --git a/xorg-server/hw/xfree86/ramdac/TIPriv.h b/xorg-server/hw/xfree86/ramdac/TIPriv.h index 20e07f5cc..ece03483b 100644 --- a/xorg-server/hw/xfree86/ramdac/TIPriv.h +++ b/xorg-server/hw/xfree86/ramdac/TIPriv.h @@ -6,15 +6,15 @@ #include "TI.h" typedef struct { - const char *DeviceName; + const char *DeviceName; } xf86TIramdacInfo; extern xf86TIramdacInfo TIramdacDeviceInfo[]; #ifdef INIT_TI_RAMDAC_INFO xf86TIramdacInfo TIramdacDeviceInfo[] = { - {"TI TVP3030"}, - {"TI TVP3026"} + {"TI TVP3030"}, + {"TI TVP3026"} }; #endif diff --git a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h index 76e714b32..062b2eb7c 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h +++ b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h @@ -1,51 +1,52 @@ -
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#ifndef _XF86CURSORPRIV_H
-#define _XF86CURSORPRIV_H
-
-#include "xf86Cursor.h"
-#include "mipointrst.h"
-
-typedef struct {
- Bool SWCursor;
- Bool isUp;
- Bool showTransparent;
- short HotX;
- short HotY;
- short x;
- short y;
- CursorPtr CurrentCursor, CursorToRestore;
- xf86CursorInfoPtr CursorInfoPtr;
- CloseScreenProcPtr CloseScreen;
- RecolorCursorProcPtr RecolorCursor;
- InstallColormapProcPtr InstallColormap;
- QueryBestSizeProcPtr QueryBestSize;
- miPointerSpriteFuncPtr spriteFuncs;
- Bool PalettedCursor;
- ColormapPtr pInstalledMap;
- Bool (*SwitchMode)(int, DisplayModePtr,int);
- xf86EnableDisableFBAccessProc *EnableDisableFBAccess;
- CursorPtr SavedCursor;
-
- /* Number of requests to force HW cursor */
- int ForceHWCursorCount;
- Bool HWCursorForced;
-
- pointer transparentData;
-} xf86CursorScreenRec, *xf86CursorScreenPtr;
-
-void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y);
-void xf86SetTransparentCursor(ScreenPtr pScreen);
-void xf86MoveCursor(ScreenPtr pScreen, int x, int y);
-void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed);
-Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr);
-
-CARD32 xf86ReverseBitOrder(CARD32 data);
-
-extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec;
-#define xf86CursorScreenKey (&xf86CursorScreenKeyRec)
-
-#endif /* _XF86CURSORPRIV_H */
+ +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#ifndef _XF86CURSORPRIV_H +#define _XF86CURSORPRIV_H + +#include "xf86Cursor.h" +#include "mipointrst.h" + +typedef struct { + Bool SWCursor; + Bool isUp; + Bool showTransparent; + short HotX; + short HotY; + short x; + short y; + CursorPtr CurrentCursor, CursorToRestore; + xf86CursorInfoPtr CursorInfoPtr; + CloseScreenProcPtr CloseScreen; + RecolorCursorProcPtr RecolorCursor; + InstallColormapProcPtr InstallColormap; + QueryBestSizeProcPtr QueryBestSize; + miPointerSpriteFuncPtr spriteFuncs; + Bool PalettedCursor; + ColormapPtr pInstalledMap; + Bool (*SwitchMode) (int, DisplayModePtr, int); + xf86EnableDisableFBAccessProc *EnableDisableFBAccess; + CursorPtr SavedCursor; + + /* Number of requests to force HW cursor */ + int ForceHWCursorCount; + Bool HWCursorForced; + + pointer transparentData; +} xf86CursorScreenRec, *xf86CursorScreenPtr; + +void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y); +void xf86SetTransparentCursor(ScreenPtr pScreen); +void xf86MoveCursor(ScreenPtr pScreen, int x, int y); +void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed); +Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); + +CARD32 xf86ReverseBitOrder(CARD32 data); + +extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec; + +#define xf86CursorScreenKey (&xf86CursorScreenKeyRec) + +#endif /* _XF86CURSORPRIV_H */ diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c index a170444a9..a67164917 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c @@ -1,152 +1,152 @@ -/*
- * Copyright 1998 by Alan Hourihane, Wigan, England.
- *
- * 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 Alan Hourihane not be used in
- * advertising or publicity pertaining to distribution of the software without
- * specific, written prior permission. Alan Hourihane makes no representations
- * about the suitability of this software for any purpose. It is provided
- * "as is" without express or implied warranty.
- *
- * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- * EVENT SHALL ALAN HOURIHANE 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.
- *
- * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk>
- *
- * Generic RAMDAC access routines.
- */
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86.h"
-#include "xf86_OSproc.h"
-
-#include "xf86RamDacPriv.h"
-
-int RamDacHWPrivateIndex = -1;
-int RamDacScreenPrivateIndex = -1;
-
-RamDacRecPtr
-RamDacCreateInfoRec(void)
-{
- RamDacRecPtr infoRec;
-
- infoRec = calloc(1, sizeof(RamDacRec));
-
- return infoRec;
-}
-
-RamDacHelperRecPtr
-RamDacHelperCreateInfoRec(void)
-{
- RamDacHelperRecPtr infoRec;
-
- infoRec = calloc(1, sizeof(RamDacHelperRec));
-
- return infoRec;
-}
-
-void
-RamDacDestroyInfoRec(RamDacRecPtr infoRec)
-{
- free(infoRec);
-}
-
-void
-RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec)
-{
- free(infoRec);
-}
-
-Bool
-RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv)
-{
- RamDacScreenRecPtr ramdacScrPtr;
-
- /*
- * make sure the RamDacRec is allocated
- */
- if (!RamDacGetRec(pScrn))
- return FALSE;
- ramdacScrPtr =
- ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr);
- ramdacScrPtr->RamDacRec = ramdacPriv;
-
- return TRUE;
-}
-
-void
-RamDacGetRecPrivate(void)
-{
- if (RamDacHWPrivateIndex < 0)
- RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
- if (RamDacScreenPrivateIndex < 0)
- RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex();
- return;
-}
-
-Bool
-RamDacGetRec(ScrnInfoPtr scrp)
-{
- RamDacGetRecPrivate();
- /*
- * New privates are always set to NULL, so we can check if the allocation
- * has already been done.
- */
- if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL)
- return TRUE;
- if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL)
- return TRUE;
-
- scrp->privates[RamDacHWPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacHWRec), 1);
- scrp->privates[RamDacScreenPrivateIndex].ptr =
- xnfcalloc(sizeof(RamDacScreenRec), 1);
-
- return TRUE;
-}
-
-void
-RamDacFreeRec(ScrnInfoPtr pScrn)
-{
- RamDacHWRecPtr ramdacHWPtr;
- RamDacScreenRecPtr ramdacScrPtr;
-
- if (RamDacHWPrivateIndex < 0)
- return;
-
- if (RamDacScreenPrivateIndex < 0)
- return;
-
- ramdacHWPtr = RAMDACHWPTR(pScrn);
- ramdacScrPtr = ((RamDacScreenRecPtr)
- (pScrn)->privates[RamDacGetScreenIndex()].ptr);
-
- free(ramdacHWPtr);
- ramdacHWPtr = NULL;
-
- free(ramdacScrPtr);
- ramdacScrPtr = NULL;
-}
-
-int
-RamDacGetHWIndex(void)
-{
- return RamDacHWPrivateIndex;
-}
-
-int
-RamDacGetScreenIndex(void)
-{
- return RamDacScreenPrivateIndex;
-}
+/* + * Copyright 1998 by Alan Hourihane, Wigan, England. + * + * 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 Alan Hourihane not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Alan Hourihane makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL ALAN HOURIHANE 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. + * + * Authors: Alan Hourihane, <alanh@fairlite.demon.co.uk> + * + * Generic RAMDAC access routines. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include "xf86.h" +#include "xf86_OSproc.h" + +#include "xf86RamDacPriv.h" + +int RamDacHWPrivateIndex = -1; +int RamDacScreenPrivateIndex = -1; + +RamDacRecPtr +RamDacCreateInfoRec(void) +{ + RamDacRecPtr infoRec; + + infoRec = calloc(1, sizeof(RamDacRec)); + + return infoRec; +} + +RamDacHelperRecPtr +RamDacHelperCreateInfoRec(void) +{ + RamDacHelperRecPtr infoRec; + + infoRec = calloc(1, sizeof(RamDacHelperRec)); + + return infoRec; +} + +void +RamDacDestroyInfoRec(RamDacRecPtr infoRec) +{ + free(infoRec); +} + +void +RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec) +{ + free(infoRec); +} + +Bool +RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv) +{ + RamDacScreenRecPtr ramdacScrPtr; + + /* + * make sure the RamDacRec is allocated + */ + if (!RamDacGetRec(pScrn)) + return FALSE; + ramdacScrPtr = + ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr); + ramdacScrPtr->RamDacRec = ramdacPriv; + + return TRUE; +} + +void +RamDacGetRecPrivate(void) +{ + if (RamDacHWPrivateIndex < 0) + RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); + if (RamDacScreenPrivateIndex < 0) + RamDacScreenPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); + return; +} + +Bool +RamDacGetRec(ScrnInfoPtr scrp) +{ + RamDacGetRecPrivate(); + /* + * New privates are always set to NULL, so we can check if the allocation + * has already been done. + */ + if (scrp->privates[RamDacHWPrivateIndex].ptr != NULL) + return TRUE; + if (scrp->privates[RamDacScreenPrivateIndex].ptr != NULL) + return TRUE; + + scrp->privates[RamDacHWPrivateIndex].ptr = + xnfcalloc(sizeof(RamDacHWRec), 1); + scrp->privates[RamDacScreenPrivateIndex].ptr = + xnfcalloc(sizeof(RamDacScreenRec), 1); + + return TRUE; +} + +void +RamDacFreeRec(ScrnInfoPtr pScrn) +{ + RamDacHWRecPtr ramdacHWPtr; + RamDacScreenRecPtr ramdacScrPtr; + + if (RamDacHWPrivateIndex < 0) + return; + + if (RamDacScreenPrivateIndex < 0) + return; + + ramdacHWPtr = RAMDACHWPTR(pScrn); + ramdacScrPtr = ((RamDacScreenRecPtr) + (pScrn)->privates[RamDacGetScreenIndex()].ptr); + + free(ramdacHWPtr); + ramdacHWPtr = NULL; + + free(ramdacScrPtr); + ramdacScrPtr = NULL; +} + +int +RamDacGetHWIndex(void) +{ + return RamDacHWPrivateIndex; +} + +int +RamDacGetScreenIndex(void) +{ + return RamDacScreenPrivateIndex; +} diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c index c6dc83157..7a903d8e4 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c @@ -40,32 +40,32 @@ #include "xf86RamDacPriv.h" void -RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, - VisualPtr pVisual) +RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, + VisualPtr pVisual) { RamDacRecPtr hwp = RAMDACSCRPTR(pScrn); int i, index; for (i = 0; i < numColors; i++) { - index = indices[i]; - (*hwp->WriteAddress)(pScrn, index); - (*hwp->WriteData)(pScrn, colors[index].red); - (*hwp->WriteData)(pScrn, colors[index].green); - (*hwp->WriteData)(pScrn, colors[index].blue); + index = indices[i]; + (*hwp->WriteAddress) (pScrn, index); + (*hwp->WriteData) (pScrn, colors[index].red); + (*hwp->WriteData) (pScrn, colors[index].green); + (*hwp->WriteData) (pScrn, colors[index].blue); } } Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits, - unsigned int flags) + unsigned int flags) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; RamDacRecPtr hwp = RAMDACSCRPTR(pScrn); if (hwp->LoadPalette == NULL) - return xf86HandleColormaps(pScreen, maxColors, sigRGBbits, - RamDacLoadPalette, NULL, flags); + return xf86HandleColormaps(pScreen, maxColors, sigRGBbits, + RamDacLoadPalette, NULL, flags); else - return xf86HandleColormaps(pScreen, maxColors, sigRGBbits, - hwp->LoadPalette, NULL, flags); + return xf86HandleColormaps(pScreen, maxColors, sigRGBbits, + hwp->LoadPalette, NULL, flags); } diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h b/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h index f68e588f5..ae1c665de 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacPriv.h @@ -8,6 +8,6 @@ void RamDacGetRecPrivate(void); Bool RamDacGetRec(ScrnInfoPtr pScrn); -int RamDacGetScreenIndex(void); +int RamDacGetScreenIndex(void); void RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, - LOCO *colors, VisualPtr pVisual); + LOCO * colors, VisualPtr pVisual); diff --git a/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c b/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c index d5c50d9ca..0c5a43aa6 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c +++ b/xorg-server/hw/xfree86/vgahw/vgaHWmodule.c @@ -9,16 +9,16 @@ #include "xf86Module.h" static XF86ModuleVersionInfo VersRec = { - "vgahw", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XORG_VERSION_CURRENT, - 0, 1, 0, - ABI_CLASS_VIDEODRV, - ABI_VIDEODRV_VERSION, - MOD_CLASS_NONE, - {0, 0, 0, 0} + "vgahw", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XORG_VERSION_CURRENT, + 0, 1, 0, + ABI_CLASS_VIDEODRV, + ABI_VIDEODRV_VERSION, + MOD_CLASS_NONE, + {0, 0, 0, 0} }; _X_EXPORT XF86ModuleData vgahwModuleData = { &VersRec, NULL, NULL }; diff --git a/xorg-server/hw/xfree86/x86emu/x86emu.h b/xorg-server/hw/xfree86/x86emu/x86emu.h index 795e2d688..501dd913c 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu.h @@ -56,7 +56,7 @@ typedef int X86EMU_pioAddr; /*---------------------- Macros and type definitions ----------------------*/ #ifdef PACK -# pragma PACK /* Don't pack structs with function pointers! */ +#pragma PACK /* Don't pack structs with function pointers! */ #endif /**************************************************************************** @@ -81,13 +81,13 @@ outw - Function to write a word to an I/O port outl - Function to write a dword to an I/O port ****************************************************************************/ typedef struct { - u8 (X86APIP inb)(X86EMU_pioAddr addr); - u16 (X86APIP inw)(X86EMU_pioAddr addr); - u32 (X86APIP inl)(X86EMU_pioAddr addr); - void (X86APIP outb)(X86EMU_pioAddr addr, u8 val); - void (X86APIP outw)(X86EMU_pioAddr addr, u16 val); - void (X86APIP outl)(X86EMU_pioAddr addr, u32 val); - } X86EMU_pioFuncs; + u8(X86APIP inb) (X86EMU_pioAddr addr); + u16(X86APIP inw) (X86EMU_pioAddr addr); + u32(X86APIP inl) (X86EMU_pioAddr addr); + void (X86APIP outb) (X86EMU_pioAddr addr, u8 val); + void (X86APIP outw) (X86EMU_pioAddr addr, u16 val); + void (X86APIP outl) (X86EMU_pioAddr addr, u32 val); +} X86EMU_pioFuncs; /**************************************************************************** REMARKS: @@ -112,13 +112,13 @@ wrw - Function to write a word to an address wrl - Function to write a dword to an address ****************************************************************************/ typedef struct { - u8 (X86APIP rdb)(u32 addr); - u16 (X86APIP rdw)(u32 addr); - u32 (X86APIP rdl)(u32 addr); - void (X86APIP wrb)(u32 addr, u8 val); - void (X86APIP wrw)(u32 addr, u16 val); - void (X86APIP wrl)(u32 addr, u32 val); - } X86EMU_memFuncs; + u8(X86APIP rdb) (u32 addr); + u16(X86APIP rdw) (u32 addr); + u32(X86APIP rdl) (u32 addr); + void (X86APIP wrb) (u32 addr, u8 val); + void (X86APIP wrw) (u32 addr, u16 val); + void (X86APIP wrl) (u32 addr, u32 val); +} X86EMU_memFuncs; /**************************************************************************** Here are the default memory read and write @@ -132,29 +132,29 @@ extern void X86API wrw(u32 addr, u16 val); extern void X86API wrl(u32 addr, u32 val); #ifdef END_PACK -# pragma END_PACK +#pragma END_PACK #endif /*--------------------- type definitions -----------------------------------*/ -typedef void (X86APIP X86EMU_intrFuncs)(int num); +typedef void (X86APIP X86EMU_intrFuncs) (int num); extern X86EMU_intrFuncs _X86EMU_intrTab[256]; /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -void X86EMU_setupMemFuncs(X86EMU_memFuncs *funcs); -void X86EMU_setupPioFuncs(X86EMU_pioFuncs *funcs); -void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]); -void X86EMU_prepareForInt(int num); + void X86EMU_setupMemFuncs(X86EMU_memFuncs * funcs); + void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs); + void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]); + void X86EMU_prepareForInt(int num); /* decode.c */ -void X86EMU_exec(void); -void X86EMU_halt_sys(void); + void X86EMU_exec(void); + void X86EMU_halt_sys(void); #ifdef DEBUG #define HALT_SYS() \ @@ -166,8 +166,8 @@ void X86EMU_halt_sys(void); /* Debug options */ -#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */ -#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */ +#define DEBUG_DECODE_F 0x000001 /* print decoded instruction */ +#define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */ #define DEBUG_STEP_F 0x000004 #define DEBUG_DISASSEMBLE_F 0x000008 #define DEBUG_BREAK_F 0x000010 @@ -175,24 +175,23 @@ void X86EMU_halt_sys(void); #define DEBUG_SAVE_IP_CS_F 0x000040 #define DEBUG_FS_F 0x000080 #define DEBUG_PROC_F 0x000100 -#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */ +#define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */ #define DEBUG_TRACECALL_F 0x000400 #define DEBUG_INSTRUMENT_F 0x000800 -#define DEBUG_MEM_TRACE_F 0x001000 -#define DEBUG_IO_TRACE_F 0x002000 +#define DEBUG_MEM_TRACE_F 0x001000 +#define DEBUG_IO_TRACE_F 0x002000 #define DEBUG_TRACECALL_REGS_F 0x004000 -#define DEBUG_DECODE_NOPRINT_F 0x008000 +#define DEBUG_DECODE_NOPRINT_F 0x008000 #define DEBUG_EXIT 0x010000 #define DEBUG_SYS_F (DEBUG_SVC_F|DEBUG_FS_F|DEBUG_PROC_F) -void X86EMU_trace_regs(void); -void X86EMU_trace_xregs(void); -void X86EMU_dump_memory(u16 seg, u16 off, u32 amt); -int X86EMU_trace_on(void); -int X86EMU_trace_off(void); + void X86EMU_trace_regs(void); + void X86EMU_trace_xregs(void); + void X86EMU_dump_memory(u16 seg, u16 off, u32 amt); + int X86EMU_trace_on(void); + int X86EMU_trace_off(void); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_X86EMU_H */ +#endif /* __X86EMU_X86EMU_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h index 5f78d0575..385b804dd 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/debug.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/debug.h @@ -45,65 +45,65 @@ #define CHECK_IP_FETCH_F 0x1 #define CHECK_SP_ACCESS_F 0x2 -#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */ -#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset*/ +#define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */ +#define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset */ #ifdef DEBUG -# define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F) -# define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F) -# define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F) -# define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F) +#define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F) +#define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F) +#define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F) +#define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F) #else -# define CHECK_IP_FETCH() -# define CHECK_SP_ACCESS() -# define CHECK_MEM_ACCESS() -# define CHECK_DATA_ACCESS() +#define CHECK_IP_FETCH() +#define CHECK_SP_ACCESS() +#define CHECK_MEM_ACCESS() +#define CHECK_DATA_ACCESS() #endif #ifdef DEBUG -# define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F) -# define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F) -# define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F) -# define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F) -# define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F) -# define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F) -# define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F) -# define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F) - -# define DEBUG_FS() (M.x86.debug & DEBUG_FS_F) -# define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F) -# define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F) -# define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F) -# define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F) -# define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F) -# define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F) -# define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F) -# define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F) +#define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F) +#define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F) +#define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F) +#define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F) +#define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F) +#define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F) +#define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F) +#define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F) + +#define DEBUG_FS() (M.x86.debug & DEBUG_FS_F) +#define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F) +#define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F) +#define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F) +#define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F) +#define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F) +#define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F) +#define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F) +#define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F) #else -# define DEBUG_INSTRUMENT() 0 -# define DEBUG_DECODE() 0 -# define DEBUG_TRACE() 0 -# define DEBUG_STEP() 0 -# define DEBUG_DISASSEMBLE() 0 -# define DEBUG_BREAK() 0 -# define DEBUG_SVC() 0 -# define DEBUG_SAVE_IP_CS() 0 -# define DEBUG_FS() 0 -# define DEBUG_PROC() 0 -# define DEBUG_SYSINT() 0 -# define DEBUG_TRACECALL() 0 -# define DEBUG_TRACECALLREGS() 0 -# define DEBUG_SYS() 0 -# define DEBUG_MEM_TRACE() 0 -# define DEBUG_IO_TRACE() 0 -# define DEBUG_DECODE_NOPRINT() 0 +#define DEBUG_INSTRUMENT() 0 +#define DEBUG_DECODE() 0 +#define DEBUG_TRACE() 0 +#define DEBUG_STEP() 0 +#define DEBUG_DISASSEMBLE() 0 +#define DEBUG_BREAK() 0 +#define DEBUG_SVC() 0 +#define DEBUG_SAVE_IP_CS() 0 +#define DEBUG_FS() 0 +#define DEBUG_PROC() 0 +#define DEBUG_SYSINT() 0 +#define DEBUG_TRACECALL() 0 +#define DEBUG_TRACECALLREGS() 0 +#define DEBUG_SYS() 0 +#define DEBUG_MEM_TRACE() 0 +#define DEBUG_IO_TRACE() 0 +#define DEBUG_DECODE_NOPRINT() 0 #endif #ifdef DEBUG -# define DECODE_PRINTF(x) if (DEBUG_DECODE()) \ +#define DECODE_PRINTF(x) if (DEBUG_DECODE()) \ x86emu_decode_printf(x) -# define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \ +#define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \ x86emu_decode_printf2(x,y) /* @@ -123,10 +123,10 @@ M.x86.saved_ip = y; \ } #else -# define INC_DECODED_INST_LEN(x) -# define DECODE_PRINTF(x) -# define DECODE_PRINTF2(x,y) -# define SAVE_IP_CS(x,y) +#define INC_DECODED_INST_LEN(x) +#define DECODE_PRINTF(x) +#define DECODE_PRINTF2(x,y) +#define SAVE_IP_CS(x,y) #endif #ifdef DEBUG @@ -137,13 +137,13 @@ } \ if (DEBUG_TRACE() || DEBUG_DECODE()) X86EMU_trace_regs() #else -# define TRACE_REGS() +#define TRACE_REGS() #endif #ifdef DEBUG -# define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step() +#define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step() #else -# define SINGLE_STEP() +#define SINGLE_STEP() #endif #define TRACE_AND_STEP() \ @@ -151,29 +151,29 @@ SINGLE_STEP() #ifdef DEBUG -# define START_OF_INSTR() -# define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr(); -# define END_OF_INSTR_NO_TRACE() x86emu_end_instr(); +#define START_OF_INSTR() +#define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr(); +#define END_OF_INSTR_NO_TRACE() x86emu_end_instr(); #else -# define START_OF_INSTR() -# define END_OF_INSTR() -# define END_OF_INSTR_NO_TRACE() +#define START_OF_INSTR() +#define END_OF_INSTR() +#define END_OF_INSTR_NO_TRACE() #endif #ifdef DEBUG -# define CALL_TRACE(u,v,w,x,s) \ +#define CALL_TRACE(u,v,w,x,s) \ if (DEBUG_TRACECALLREGS()) \ x86emu_dump_regs(); \ if (DEBUG_TRACECALL()) \ printk("%04x:%04x: CALL %s%04x:%04x\n", u , v, s, w, x); -# define RETURN_TRACE(n,u,v) \ +#define RETURN_TRACE(n,u,v) \ if (DEBUG_TRACECALLREGS()) \ x86emu_dump_regs(); \ if (DEBUG_TRACECALL()) \ printk("%04x:%04x: %s\n",u,v,n); #else -# define CALL_TRACE(u,v,w,x,s) -# define RETURN_TRACE(n,u,v) +#define CALL_TRACE(u,v,w,x,s) +#define RETURN_TRACE(n,u,v) #endif #ifdef DEBUG @@ -185,26 +185,25 @@ /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -extern void x86emu_inc_decoded_inst_len (int x); -extern void x86emu_decode_printf (const char *x); -extern void x86emu_decode_printf2 (const char *x, int y); -extern void x86emu_just_disassemble (void); -extern void x86emu_single_step (void); -extern void x86emu_end_instr (void); -extern void x86emu_dump_regs (void); -extern void x86emu_dump_xregs (void); -extern void x86emu_print_int_vect (u16 iv); -extern void x86emu_instrument_instruction (void); -extern void x86emu_check_ip_access (void); -extern void x86emu_check_sp_access (void); -extern void x86emu_check_mem_access (u32 p); -extern void x86emu_check_data_access (uint s, uint o); + extern void x86emu_inc_decoded_inst_len(int x); + extern void x86emu_decode_printf(const char *x); + extern void x86emu_decode_printf2(const char *x, int y); + extern void x86emu_just_disassemble(void); + extern void x86emu_single_step(void); + extern void x86emu_end_instr(void); + extern void x86emu_dump_regs(void); + extern void x86emu_dump_xregs(void); + extern void x86emu_print_int_vect(u16 iv); + extern void x86emu_instrument_instruction(void); + extern void x86emu_check_ip_access(void); + extern void x86emu_check_sp_access(void); + extern void x86emu_check_mem_access(u32 p); + extern void x86emu_check_data_access(uint s, uint o); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_DEBUG_H */ +#endif /* __X86EMU_DEBUG_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h index 61cd4dc10..49a1f7b54 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/decode.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/decode.h @@ -52,37 +52,36 @@ /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -void x86emu_intr_raise (u8 type); -void fetch_decode_modrm (int *mod,int *regh,int *regl); -u8 fetch_byte_imm (void); -u16 fetch_word_imm (void); -u32 fetch_long_imm (void); -u8 fetch_data_byte (uint offset); -u8 fetch_data_byte_abs (uint segment, uint offset); -u16 fetch_data_word (uint offset); -u16 fetch_data_word_abs (uint segment, uint offset); -u32 fetch_data_long (uint offset); -u32 fetch_data_long_abs (uint segment, uint offset); -void store_data_byte (uint offset, u8 val); -void store_data_byte_abs (uint segment, uint offset, u8 val); -void store_data_word (uint offset, u16 val); -void store_data_word_abs (uint segment, uint offset, u16 val); -void store_data_long (uint offset, u32 val); -void store_data_long_abs (uint segment, uint offset, u32 val); -u8* decode_rm_byte_register(int reg); -u16* decode_rm_word_register(int reg); -u32* decode_rm_long_register(int reg); -u16* decode_rm_seg_register(int reg); -u32 decode_rm00_address(int rm); -u32 decode_rm01_address(int rm); -u32 decode_rm10_address(int rm); -u32 decode_sib_address(int sib, int mod); + void x86emu_intr_raise(u8 type); + void fetch_decode_modrm(int *mod, int *regh, int *regl); + u8 fetch_byte_imm(void); + u16 fetch_word_imm(void); + u32 fetch_long_imm(void); + u8 fetch_data_byte(uint offset); + u8 fetch_data_byte_abs(uint segment, uint offset); + u16 fetch_data_word(uint offset); + u16 fetch_data_word_abs(uint segment, uint offset); + u32 fetch_data_long(uint offset); + u32 fetch_data_long_abs(uint segment, uint offset); + void store_data_byte(uint offset, u8 val); + void store_data_byte_abs(uint segment, uint offset, u8 val); + void store_data_word(uint offset, u16 val); + void store_data_word_abs(uint segment, uint offset, u16 val); + void store_data_long(uint offset, u32 val); + void store_data_long_abs(uint segment, uint offset, u32 val); + u8 *decode_rm_byte_register(int reg); + u16 *decode_rm_word_register(int reg); + u32 *decode_rm_long_register(int reg); + u16 *decode_rm_seg_register(int reg); + u32 decode_rm00_address(int rm); + u32 decode_rm01_address(int rm); + u32 decode_rm10_address(int rm); + u32 decode_sib_address(int sib, int mod); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_DECODE_H */ +#endif /* __X86EMU_DECODE_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h index 5fb271463..1c114987f 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu.h @@ -40,22 +40,21 @@ #define __X86EMU_FPU_H #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif /* these have to be defined, whether 8087 support compiled in or not. */ -extern void x86emuOp_esc_coprocess_d8 (u8 op1); -extern void x86emuOp_esc_coprocess_d9 (u8 op1); -extern void x86emuOp_esc_coprocess_da (u8 op1); -extern void x86emuOp_esc_coprocess_db (u8 op1); -extern void x86emuOp_esc_coprocess_dc (u8 op1); -extern void x86emuOp_esc_coprocess_dd (u8 op1); -extern void x86emuOp_esc_coprocess_de (u8 op1); -extern void x86emuOp_esc_coprocess_df (u8 op1); + extern void x86emuOp_esc_coprocess_d8(u8 op1); + extern void x86emuOp_esc_coprocess_d9(u8 op1); + extern void x86emuOp_esc_coprocess_da(u8 op1); + extern void x86emuOp_esc_coprocess_db(u8 op1); + extern void x86emuOp_esc_coprocess_dc(u8 op1); + extern void x86emuOp_esc_coprocess_dd(u8 op1); + extern void x86emuOp_esc_coprocess_de(u8 op1); + extern void x86emuOp_esc_coprocess_df(u8 op1); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_FPU_H */ +#endif /* __X86EMU_FPU_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h index e59b80783..5a780e69c 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/fpu_regs.h @@ -42,23 +42,23 @@ #ifdef X86_FPU_SUPPORT #ifdef PACK -# pragma PACK +#pragma PACK #endif /* Basic 8087 register can hold any of the following values: */ union x86_fpu_reg_u { - s8 tenbytes[10]; - double dval; - float fval; - s16 sval; - s32 lval; - }; + s8 tenbytes[10]; + double dval; + float fval; + s16 sval; + s32 lval; +}; struct x86_fpu_reg { - union x86_fpu_reg_u reg; - char tag; - }; + union x86_fpu_reg_u reg; + char tag; +}; /* * Since we are not going to worry about the problems of aliasing @@ -83,14 +83,14 @@ struct x86_fpu_reg { #define X86_FPU_STKTOP 0 struct x86_fpu_registers { - struct x86_fpu_reg x86_fpu_stack[8]; - int x86_fpu_flags; - int x86_fpu_config; /* rounding modes, etc. */ - short x86_fpu_tos, x86_fpu_bos; - }; + struct x86_fpu_reg x86_fpu_stack[8]; + int x86_fpu_flags; + int x86_fpu_config; /* rounding modes, etc. */ + short x86_fpu_tos, x86_fpu_bos; +}; #ifdef END_PACK -# pragma END_PACK +#pragma END_PACK #endif /* @@ -104,16 +104,16 @@ struct x86_fpu_registers { * instructions. */ -#endif /* X86_FPU_SUPPORT */ +#endif /* X86_FPU_SUPPORT */ #ifdef DEBUG -# define DECODE_PRINTINSTR32(t,mod,rh,rl) \ +#define DECODE_PRINTINSTR32(t,mod,rh,rl) \ DECODE_PRINTF(t[(mod<<3)+(rh)]); -# define DECODE_PRINTINSTR256(t,mod,rh,rl) \ +#define DECODE_PRINTINSTR256(t,mod,rh,rl) \ DECODE_PRINTF(t[(mod<<6)+(rh<<3)+(rl)]); #else -# define DECODE_PRINTINSTR32(t,mod,rh,rl) -# define DECODE_PRINTINSTR256(t,mod,rh,rl) +#define DECODE_PRINTINSTR32(t,mod,rh,rl) +#define DECODE_PRINTINSTR256(t,mod,rh,rl) #endif -#endif /* __X86EMU_FPU_REGS_H */ +#endif /* __X86EMU_FPU_REGS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h index 65ea67654..1bc07a4e1 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/ops.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/ops.h @@ -39,7 +39,7 @@ #ifndef __X86EMU_OPS_H #define __X86EMU_OPS_H -extern void (*x86emu_optab[0x100])(u8 op1); -extern void (*x86emu_optab2[0x100])(u8 op2); +extern void (*x86emu_optab[0x100]) (u8 op1); +extern void (*x86emu_optab2[0x100]) (u8 op2); -#endif /* __X86EMU_OPS_H */ +#endif /* __X86EMU_OPS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h index e023cf88d..aca132bf1 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_asm.h @@ -49,14 +49,16 @@ #define __HAVE_INLINE_ASSEMBLER__ #endif -u32 get_flags_asm(void); +u32 get_flags_asm(void); + #pragma aux get_flags_asm = \ "pushf" \ "pop eax" \ value [eax] \ modify exact [eax]; -u16 aaa_word_asm(u32 *flags,u16 d); +u16 aaa_word_asm(u32 * flags, u16 d); + #pragma aux aaa_word_asm = \ "push [edi]" \ "popf" \ @@ -67,7 +69,8 @@ u16 aaa_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u16 aas_word_asm(u32 *flags,u16 d); +u16 aas_word_asm(u32 * flags, u16 d); + #pragma aux aas_word_asm = \ "push [edi]" \ "popf" \ @@ -78,7 +81,8 @@ u16 aas_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u16 aad_word_asm(u32 *flags,u16 d); +u16 aad_word_asm(u32 * flags, u16 d); + #pragma aux aad_word_asm = \ "push [edi]" \ "popf" \ @@ -89,7 +93,8 @@ u16 aad_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u16 aam_word_asm(u32 *flags,u8 d); +u16 aam_word_asm(u32 * flags, u8 d); + #pragma aux aam_word_asm = \ "push [edi]" \ "popf" \ @@ -100,7 +105,8 @@ u16 aam_word_asm(u32 *flags,u8 d); value [ax] \ modify exact [ax]; -u8 adc_byte_asm(u32 *flags,u8 d, u8 s); +u8 adc_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux adc_byte_asm = \ "push [edi]" \ "popf" \ @@ -111,7 +117,8 @@ u8 adc_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 adc_word_asm(u32 *flags,u16 d, u16 s); +u16 adc_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux adc_word_asm = \ "push [edi]" \ "popf" \ @@ -122,7 +129,8 @@ u16 adc_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 adc_long_asm(u32 *flags,u32 d, u32 s); +u32 adc_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux adc_long_asm = \ "push [edi]" \ "popf" \ @@ -133,7 +141,8 @@ u32 adc_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 add_byte_asm(u32 *flags,u8 d, u8 s); +u8 add_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux add_byte_asm = \ "push [edi]" \ "popf" \ @@ -144,7 +153,8 @@ u8 add_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 add_word_asm(u32 *flags,u16 d, u16 s); +u16 add_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux add_word_asm = \ "push [edi]" \ "popf" \ @@ -155,7 +165,8 @@ u16 add_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 add_long_asm(u32 *flags,u32 d, u32 s); +u32 add_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux add_long_asm = \ "push [edi]" \ "popf" \ @@ -166,7 +177,8 @@ u32 add_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 and_byte_asm(u32 *flags,u8 d, u8 s); +u8 and_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux and_byte_asm = \ "push [edi]" \ "popf" \ @@ -177,7 +189,8 @@ u8 and_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 and_word_asm(u32 *flags,u16 d, u16 s); +u16 and_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux and_word_asm = \ "push [edi]" \ "popf" \ @@ -188,7 +201,8 @@ u16 and_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 and_long_asm(u32 *flags,u32 d, u32 s); +u32 and_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux and_long_asm = \ "push [edi]" \ "popf" \ @@ -199,7 +213,8 @@ u32 and_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 cmp_byte_asm(u32 *flags,u8 d, u8 s); +u8 cmp_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux cmp_byte_asm = \ "push [edi]" \ "popf" \ @@ -210,7 +225,8 @@ u8 cmp_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 cmp_word_asm(u32 *flags,u16 d, u16 s); +u16 cmp_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux cmp_word_asm = \ "push [edi]" \ "popf" \ @@ -221,7 +237,8 @@ u16 cmp_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 cmp_long_asm(u32 *flags,u32 d, u32 s); +u32 cmp_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux cmp_long_asm = \ "push [edi]" \ "popf" \ @@ -232,7 +249,8 @@ u32 cmp_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 daa_byte_asm(u32 *flags,u8 d); +u8 daa_byte_asm(u32 * flags, u8 d); + #pragma aux daa_byte_asm = \ "push [edi]" \ "popf" \ @@ -243,7 +261,8 @@ u8 daa_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u8 das_byte_asm(u32 *flags,u8 d); +u8 das_byte_asm(u32 * flags, u8 d); + #pragma aux das_byte_asm = \ "push [edi]" \ "popf" \ @@ -254,7 +273,8 @@ u8 das_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u8 dec_byte_asm(u32 *flags,u8 d); +u8 dec_byte_asm(u32 * flags, u8 d); + #pragma aux dec_byte_asm = \ "push [edi]" \ "popf" \ @@ -265,7 +285,8 @@ u8 dec_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 dec_word_asm(u32 *flags,u16 d); +u16 dec_word_asm(u32 * flags, u16 d); + #pragma aux dec_word_asm = \ "push [edi]" \ "popf" \ @@ -276,7 +297,8 @@ u16 dec_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 dec_long_asm(u32 *flags,u32 d); +u32 dec_long_asm(u32 * flags, u32 d); + #pragma aux dec_long_asm = \ "push [edi]" \ "popf" \ @@ -287,7 +309,8 @@ u32 dec_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 inc_byte_asm(u32 *flags,u8 d); +u8 inc_byte_asm(u32 * flags, u8 d); + #pragma aux inc_byte_asm = \ "push [edi]" \ "popf" \ @@ -298,7 +321,8 @@ u8 inc_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 inc_word_asm(u32 *flags,u16 d); +u16 inc_word_asm(u32 * flags, u16 d); + #pragma aux inc_word_asm = \ "push [edi]" \ "popf" \ @@ -309,7 +333,8 @@ u16 inc_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 inc_long_asm(u32 *flags,u32 d); +u32 inc_long_asm(u32 * flags, u32 d); + #pragma aux inc_long_asm = \ "push [edi]" \ "popf" \ @@ -320,7 +345,8 @@ u32 inc_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 or_byte_asm(u32 *flags,u8 d, u8 s); +u8 or_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux or_byte_asm = \ "push [edi]" \ "popf" \ @@ -331,7 +357,8 @@ u8 or_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 or_word_asm(u32 *flags,u16 d, u16 s); +u16 or_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux or_word_asm = \ "push [edi]" \ "popf" \ @@ -342,7 +369,8 @@ u16 or_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 or_long_asm(u32 *flags,u32 d, u32 s); +u32 or_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux or_long_asm = \ "push [edi]" \ "popf" \ @@ -353,7 +381,8 @@ u32 or_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 neg_byte_asm(u32 *flags,u8 d); +u8 neg_byte_asm(u32 * flags, u8 d); + #pragma aux neg_byte_asm = \ "push [edi]" \ "popf" \ @@ -364,7 +393,8 @@ u8 neg_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 neg_word_asm(u32 *flags,u16 d); +u16 neg_word_asm(u32 * flags, u16 d); + #pragma aux neg_word_asm = \ "push [edi]" \ "popf" \ @@ -375,7 +405,8 @@ u16 neg_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 neg_long_asm(u32 *flags,u32 d); +u32 neg_long_asm(u32 * flags, u32 d); + #pragma aux neg_long_asm = \ "push [edi]" \ "popf" \ @@ -386,7 +417,8 @@ u32 neg_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 not_byte_asm(u32 *flags,u8 d); +u8 not_byte_asm(u32 * flags, u8 d); + #pragma aux not_byte_asm = \ "push [edi]" \ "popf" \ @@ -397,7 +429,8 @@ u8 not_byte_asm(u32 *flags,u8 d); value [al] \ modify exact [al]; -u16 not_word_asm(u32 *flags,u16 d); +u16 not_word_asm(u32 * flags, u16 d); + #pragma aux not_word_asm = \ "push [edi]" \ "popf" \ @@ -408,7 +441,8 @@ u16 not_word_asm(u32 *flags,u16 d); value [ax] \ modify exact [ax]; -u32 not_long_asm(u32 *flags,u32 d); +u32 not_long_asm(u32 * flags, u32 d); + #pragma aux not_long_asm = \ "push [edi]" \ "popf" \ @@ -419,7 +453,8 @@ u32 not_long_asm(u32 *flags,u32 d); value [eax] \ modify exact [eax]; -u8 rcl_byte_asm(u32 *flags,u8 d, u8 s); +u8 rcl_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux rcl_byte_asm = \ "push [edi]" \ "popf" \ @@ -430,7 +465,8 @@ u8 rcl_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 rcl_word_asm(u32 *flags,u16 d, u8 s); +u16 rcl_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux rcl_word_asm = \ "push [edi]" \ "popf" \ @@ -441,7 +477,8 @@ u16 rcl_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 rcl_long_asm(u32 *flags,u32 d, u8 s); +u32 rcl_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux rcl_long_asm = \ "push [edi]" \ "popf" \ @@ -452,7 +489,8 @@ u32 rcl_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 rcr_byte_asm(u32 *flags,u8 d, u8 s); +u8 rcr_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux rcr_byte_asm = \ "push [edi]" \ "popf" \ @@ -463,7 +501,8 @@ u8 rcr_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 rcr_word_asm(u32 *flags,u16 d, u8 s); +u16 rcr_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux rcr_word_asm = \ "push [edi]" \ "popf" \ @@ -474,7 +513,8 @@ u16 rcr_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 rcr_long_asm(u32 *flags,u32 d, u8 s); +u32 rcr_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux rcr_long_asm = \ "push [edi]" \ "popf" \ @@ -485,7 +525,8 @@ u32 rcr_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 rol_byte_asm(u32 *flags,u8 d, u8 s); +u8 rol_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux rol_byte_asm = \ "push [edi]" \ "popf" \ @@ -496,7 +537,8 @@ u8 rol_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 rol_word_asm(u32 *flags,u16 d, u8 s); +u16 rol_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux rol_word_asm = \ "push [edi]" \ "popf" \ @@ -507,7 +549,8 @@ u16 rol_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 rol_long_asm(u32 *flags,u32 d, u8 s); +u32 rol_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux rol_long_asm = \ "push [edi]" \ "popf" \ @@ -518,7 +561,8 @@ u32 rol_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 ror_byte_asm(u32 *flags,u8 d, u8 s); +u8 ror_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux ror_byte_asm = \ "push [edi]" \ "popf" \ @@ -529,7 +573,8 @@ u8 ror_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 ror_word_asm(u32 *flags,u16 d, u8 s); +u16 ror_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux ror_word_asm = \ "push [edi]" \ "popf" \ @@ -540,7 +585,8 @@ u16 ror_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 ror_long_asm(u32 *flags,u32 d, u8 s); +u32 ror_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux ror_long_asm = \ "push [edi]" \ "popf" \ @@ -551,7 +597,8 @@ u32 ror_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 shl_byte_asm(u32 *flags,u8 d, u8 s); +u8 shl_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux shl_byte_asm = \ "push [edi]" \ "popf" \ @@ -562,7 +609,8 @@ u8 shl_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 shl_word_asm(u32 *flags,u16 d, u8 s); +u16 shl_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux shl_word_asm = \ "push [edi]" \ "popf" \ @@ -573,7 +621,8 @@ u16 shl_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 shl_long_asm(u32 *flags,u32 d, u8 s); +u32 shl_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux shl_long_asm = \ "push [edi]" \ "popf" \ @@ -584,7 +633,8 @@ u32 shl_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 shr_byte_asm(u32 *flags,u8 d, u8 s); +u8 shr_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux shr_byte_asm = \ "push [edi]" \ "popf" \ @@ -595,7 +645,8 @@ u8 shr_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 shr_word_asm(u32 *flags,u16 d, u8 s); +u16 shr_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux shr_word_asm = \ "push [edi]" \ "popf" \ @@ -606,7 +657,8 @@ u16 shr_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 shr_long_asm(u32 *flags,u32 d, u8 s); +u32 shr_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux shr_long_asm = \ "push [edi]" \ "popf" \ @@ -617,7 +669,8 @@ u32 shr_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u8 sar_byte_asm(u32 *flags,u8 d, u8 s); +u8 sar_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux sar_byte_asm = \ "push [edi]" \ "popf" \ @@ -628,7 +681,8 @@ u8 sar_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al cl]; -u16 sar_word_asm(u32 *flags,u16 d, u8 s); +u16 sar_word_asm(u32 * flags, u16 d, u8 s); + #pragma aux sar_word_asm = \ "push [edi]" \ "popf" \ @@ -639,7 +693,8 @@ u16 sar_word_asm(u32 *flags,u16 d, u8 s); value [ax] \ modify exact [ax cl]; -u32 sar_long_asm(u32 *flags,u32 d, u8 s); +u32 sar_long_asm(u32 * flags, u32 d, u8 s); + #pragma aux sar_long_asm = \ "push [edi]" \ "popf" \ @@ -650,7 +705,8 @@ u32 sar_long_asm(u32 *flags,u32 d, u8 s); value [eax] \ modify exact [eax cl]; -u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s); +u16 shld_word_asm(u32 * flags, u16 d, u16 fill, u8 s); + #pragma aux shld_word_asm = \ "push [edi]" \ "popf" \ @@ -661,7 +717,8 @@ u16 shld_word_asm(u32 *flags,u16 d, u16 fill, u8 s); value [ax] \ modify exact [ax dx cl]; -u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s); +u32 shld_long_asm(u32 * flags, u32 d, u32 fill, u8 s); + #pragma aux shld_long_asm = \ "push [edi]" \ "popf" \ @@ -672,7 +729,8 @@ u32 shld_long_asm(u32 *flags,u32 d, u32 fill, u8 s); value [eax] \ modify exact [eax edx cl]; -u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s); +u16 shrd_word_asm(u32 * flags, u16 d, u16 fill, u8 s); + #pragma aux shrd_word_asm = \ "push [edi]" \ "popf" \ @@ -683,7 +741,8 @@ u16 shrd_word_asm(u32 *flags,u16 d, u16 fill, u8 s); value [ax] \ modify exact [ax dx cl]; -u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s); +u32 shrd_long_asm(u32 * flags, u32 d, u32 fill, u8 s); + #pragma aux shrd_long_asm = \ "push [edi]" \ "popf" \ @@ -694,7 +753,8 @@ u32 shrd_long_asm(u32 *flags,u32 d, u32 fill, u8 s); value [eax] \ modify exact [eax edx cl]; -u8 sbb_byte_asm(u32 *flags,u8 d, u8 s); +u8 sbb_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux sbb_byte_asm = \ "push [edi]" \ "popf" \ @@ -705,7 +765,8 @@ u8 sbb_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 sbb_word_asm(u32 *flags,u16 d, u16 s); +u16 sbb_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux sbb_word_asm = \ "push [edi]" \ "popf" \ @@ -716,7 +777,8 @@ u16 sbb_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 sbb_long_asm(u32 *flags,u32 d, u32 s); +u32 sbb_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux sbb_long_asm = \ "push [edi]" \ "popf" \ @@ -727,7 +789,8 @@ u32 sbb_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -u8 sub_byte_asm(u32 *flags,u8 d, u8 s); +u8 sub_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux sub_byte_asm = \ "push [edi]" \ "popf" \ @@ -738,7 +801,8 @@ u8 sub_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 sub_word_asm(u32 *flags,u16 d, u16 s); +u16 sub_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux sub_word_asm = \ "push [edi]" \ "popf" \ @@ -749,7 +813,8 @@ u16 sub_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 sub_long_asm(u32 *flags,u32 d, u32 s); +u32 sub_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux sub_long_asm = \ "push [edi]" \ "popf" \ @@ -760,7 +825,8 @@ u32 sub_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -void test_byte_asm(u32 *flags,u8 d, u8 s); +void test_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux test_byte_asm = \ "push [edi]" \ "popf" \ @@ -770,7 +836,8 @@ void test_byte_asm(u32 *flags,u8 d, u8 s); parm [edi] [al] [bl] \ modify exact [al bl]; -void test_word_asm(u32 *flags,u16 d, u16 s); +void test_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux test_word_asm = \ "push [edi]" \ "popf" \ @@ -780,7 +847,8 @@ void test_word_asm(u32 *flags,u16 d, u16 s); parm [edi] [ax] [bx] \ modify exact [ax bx]; -void test_long_asm(u32 *flags,u32 d, u32 s); +void test_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux test_long_asm = \ "push [edi]" \ "popf" \ @@ -790,7 +858,8 @@ void test_long_asm(u32 *flags,u32 d, u32 s); parm [edi] [eax] [ebx] \ modify exact [eax ebx]; -u8 xor_byte_asm(u32 *flags,u8 d, u8 s); +u8 xor_byte_asm(u32 * flags, u8 d, u8 s); + #pragma aux xor_byte_asm = \ "push [edi]" \ "popf" \ @@ -801,7 +870,8 @@ u8 xor_byte_asm(u32 *flags,u8 d, u8 s); value [al] \ modify exact [al bl]; -u16 xor_word_asm(u32 *flags,u16 d, u16 s); +u16 xor_word_asm(u32 * flags, u16 d, u16 s); + #pragma aux xor_word_asm = \ "push [edi]" \ "popf" \ @@ -812,7 +882,8 @@ u16 xor_word_asm(u32 *flags,u16 d, u16 s); value [ax] \ modify exact [ax bx]; -u32 xor_long_asm(u32 *flags,u32 d, u32 s); +u32 xor_long_asm(u32 * flags, u32 d, u32 s); + #pragma aux xor_long_asm = \ "push [edi]" \ "popf" \ @@ -823,7 +894,8 @@ u32 xor_long_asm(u32 *flags,u32 d, u32 s); value [eax] \ modify exact [eax ebx]; -void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); +void imul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s); + #pragma aux imul_byte_asm = \ "push [edi]" \ "popf" \ @@ -834,7 +906,8 @@ void imul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); parm [edi] [esi] [al] [bl] \ modify exact [esi ax bl]; -void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); +void imul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s); + #pragma aux imul_word_asm = \ "push [edi]" \ "popf" \ @@ -846,7 +919,8 @@ void imul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); parm [edi] [esi] [ecx] [ax] [bx]\ modify exact [esi edi ax bx dx]; -void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); +void imul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s); + #pragma aux imul_long_asm = \ "push [edi]" \ "popf" \ @@ -858,7 +932,8 @@ void imul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); parm [edi] [esi] [ecx] [eax] [ebx] \ modify exact [esi edi eax ebx edx]; -void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); +void mul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s); + #pragma aux mul_byte_asm = \ "push [edi]" \ "popf" \ @@ -869,7 +944,8 @@ void mul_byte_asm(u32 *flags,u16 *ax,u8 d,u8 s); parm [edi] [esi] [al] [bl] \ modify exact [esi ax bl]; -void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); +void mul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s); + #pragma aux mul_word_asm = \ "push [edi]" \ "popf" \ @@ -881,7 +957,8 @@ void mul_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 d,u16 s); parm [edi] [esi] [ecx] [ax] [bx]\ modify exact [esi edi ax bx dx]; -void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); +void mul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s); + #pragma aux mul_long_asm = \ "push [edi]" \ "popf" \ @@ -893,7 +970,8 @@ void mul_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 d,u32 s); parm [edi] [esi] [ecx] [eax] [ebx] \ modify exact [esi edi eax ebx edx]; -void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); +void idiv_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s); + #pragma aux idiv_byte_asm = \ "push [edi]" \ "popf" \ @@ -905,7 +983,8 @@ void idiv_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); parm [edi] [esi] [ecx] [ax] [bl]\ modify exact [esi edi ax bl]; -void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); +void idiv_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s); + #pragma aux idiv_word_asm = \ "push [edi]" \ "popf" \ @@ -917,7 +996,8 @@ void idiv_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); parm [edi] [esi] [ecx] [ax] [dx] [bx]\ modify exact [esi edi ax dx bx]; -void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); +void idiv_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s); + #pragma aux idiv_long_asm = \ "push [edi]" \ "popf" \ @@ -929,7 +1009,8 @@ void idiv_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); parm [edi] [esi] [ecx] [eax] [edx] [ebx]\ modify exact [esi edi eax edx ebx]; -void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); +void div_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s); + #pragma aux div_byte_asm = \ "push [edi]" \ "popf" \ @@ -941,7 +1022,8 @@ void div_byte_asm(u32 *flags,u8 *al,u8 *ah,u16 d,u8 s); parm [edi] [esi] [ecx] [ax] [bl]\ modify exact [esi edi ax bl]; -void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); +void div_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s); + #pragma aux div_word_asm = \ "push [edi]" \ "popf" \ @@ -953,7 +1035,8 @@ void div_word_asm(u32 *flags,u16 *ax,u16 *dx,u16 dlo,u16 dhi,u16 s); parm [edi] [esi] [ecx] [ax] [dx] [bx]\ modify exact [esi edi ax dx bx]; -void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); +void div_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s); + #pragma aux div_long_asm = \ "push [edi]" \ "popf" \ @@ -967,4 +1050,4 @@ void div_long_asm(u32 *flags,u32 *eax,u32 *edx,u32 dlo,u32 dhi,u32 s); #endif -#endif /* __X86EMU_PRIM_ASM_H */ +#endif /* __X86EMU_PRIM_ASM_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h index 6ac2a29f6..0f0e78d71 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/prim_ops.h @@ -40,103 +40,102 @@ #define __X86EMU_PRIM_OPS_H #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -u16 aaa_word (u16 d); -u16 aas_word (u16 d); -u16 aad_word (u16 d); -u16 aam_word (u8 d); -u8 adc_byte (u8 d, u8 s); -u16 adc_word (u16 d, u16 s); -u32 adc_long (u32 d, u32 s); -u8 add_byte (u8 d, u8 s); -u16 add_word (u16 d, u16 s); -u32 add_long (u32 d, u32 s); -u8 and_byte (u8 d, u8 s); -u16 and_word (u16 d, u16 s); -u32 and_long (u32 d, u32 s); -u8 cmp_byte (u8 d, u8 s); -u16 cmp_word (u16 d, u16 s); -u32 cmp_long (u32 d, u32 s); -u8 daa_byte (u8 d); -u8 das_byte (u8 d); -u8 dec_byte (u8 d); -u16 dec_word (u16 d); -u32 dec_long (u32 d); -u8 inc_byte (u8 d); -u16 inc_word (u16 d); -u32 inc_long (u32 d); -u8 or_byte (u8 d, u8 s); -u16 or_word (u16 d, u16 s); -u32 or_long (u32 d, u32 s); -u8 neg_byte (u8 s); -u16 neg_word (u16 s); -u32 neg_long (u32 s); -u8 not_byte (u8 s); -u16 not_word (u16 s); -u32 not_long (u32 s); -u8 rcl_byte (u8 d, u8 s); -u16 rcl_word (u16 d, u8 s); -u32 rcl_long (u32 d, u8 s); -u8 rcr_byte (u8 d, u8 s); -u16 rcr_word (u16 d, u8 s); -u32 rcr_long (u32 d, u8 s); -u8 rol_byte (u8 d, u8 s); -u16 rol_word (u16 d, u8 s); -u32 rol_long (u32 d, u8 s); -u8 ror_byte (u8 d, u8 s); -u16 ror_word (u16 d, u8 s); -u32 ror_long (u32 d, u8 s); -u8 shl_byte (u8 d, u8 s); -u16 shl_word (u16 d, u8 s); -u32 shl_long (u32 d, u8 s); -u8 shr_byte (u8 d, u8 s); -u16 shr_word (u16 d, u8 s); -u32 shr_long (u32 d, u8 s); -u8 sar_byte (u8 d, u8 s); -u16 sar_word (u16 d, u8 s); -u32 sar_long (u32 d, u8 s); -u16 shld_word (u16 d, u16 fill, u8 s); -u32 shld_long (u32 d, u32 fill, u8 s); -u16 shrd_word (u16 d, u16 fill, u8 s); -u32 shrd_long (u32 d, u32 fill, u8 s); -u8 sbb_byte (u8 d, u8 s); -u16 sbb_word (u16 d, u16 s); -u32 sbb_long (u32 d, u32 s); -u8 sub_byte (u8 d, u8 s); -u16 sub_word (u16 d, u16 s); -u32 sub_long (u32 d, u32 s); -void test_byte (u8 d, u8 s); -void test_word (u16 d, u16 s); -void test_long (u32 d, u32 s); -u8 xor_byte (u8 d, u8 s); -u16 xor_word (u16 d, u16 s); -u32 xor_long (u32 d, u32 s); -void imul_byte (u8 s); -void imul_word (u16 s); -void imul_long (u32 s); -void imul_long_direct(u32 *res_lo, u32* res_hi,u32 d, u32 s); -void mul_byte (u8 s); -void mul_word (u16 s); -void mul_long (u32 s); -void idiv_byte (u8 s); -void idiv_word (u16 s); -void idiv_long (u32 s); -void div_byte (u8 s); -void div_word (u16 s); -void div_long (u32 s); -void ins (int size); -void outs (int size); -u16 mem_access_word (int addr); -void push_word (u16 w); -void push_long (u32 w); -u16 pop_word (void); -u32 pop_long (void); -void cpuid (void); + u16 aaa_word(u16 d); + u16 aas_word(u16 d); + u16 aad_word(u16 d); + u16 aam_word(u8 d); + u8 adc_byte(u8 d, u8 s); + u16 adc_word(u16 d, u16 s); + u32 adc_long(u32 d, u32 s); + u8 add_byte(u8 d, u8 s); + u16 add_word(u16 d, u16 s); + u32 add_long(u32 d, u32 s); + u8 and_byte(u8 d, u8 s); + u16 and_word(u16 d, u16 s); + u32 and_long(u32 d, u32 s); + u8 cmp_byte(u8 d, u8 s); + u16 cmp_word(u16 d, u16 s); + u32 cmp_long(u32 d, u32 s); + u8 daa_byte(u8 d); + u8 das_byte(u8 d); + u8 dec_byte(u8 d); + u16 dec_word(u16 d); + u32 dec_long(u32 d); + u8 inc_byte(u8 d); + u16 inc_word(u16 d); + u32 inc_long(u32 d); + u8 or_byte(u8 d, u8 s); + u16 or_word(u16 d, u16 s); + u32 or_long(u32 d, u32 s); + u8 neg_byte(u8 s); + u16 neg_word(u16 s); + u32 neg_long(u32 s); + u8 not_byte(u8 s); + u16 not_word(u16 s); + u32 not_long(u32 s); + u8 rcl_byte(u8 d, u8 s); + u16 rcl_word(u16 d, u8 s); + u32 rcl_long(u32 d, u8 s); + u8 rcr_byte(u8 d, u8 s); + u16 rcr_word(u16 d, u8 s); + u32 rcr_long(u32 d, u8 s); + u8 rol_byte(u8 d, u8 s); + u16 rol_word(u16 d, u8 s); + u32 rol_long(u32 d, u8 s); + u8 ror_byte(u8 d, u8 s); + u16 ror_word(u16 d, u8 s); + u32 ror_long(u32 d, u8 s); + u8 shl_byte(u8 d, u8 s); + u16 shl_word(u16 d, u8 s); + u32 shl_long(u32 d, u8 s); + u8 shr_byte(u8 d, u8 s); + u16 shr_word(u16 d, u8 s); + u32 shr_long(u32 d, u8 s); + u8 sar_byte(u8 d, u8 s); + u16 sar_word(u16 d, u8 s); + u32 sar_long(u32 d, u8 s); + u16 shld_word(u16 d, u16 fill, u8 s); + u32 shld_long(u32 d, u32 fill, u8 s); + u16 shrd_word(u16 d, u16 fill, u8 s); + u32 shrd_long(u32 d, u32 fill, u8 s); + u8 sbb_byte(u8 d, u8 s); + u16 sbb_word(u16 d, u16 s); + u32 sbb_long(u32 d, u32 s); + u8 sub_byte(u8 d, u8 s); + u16 sub_word(u16 d, u16 s); + u32 sub_long(u32 d, u32 s); + void test_byte(u8 d, u8 s); + void test_word(u16 d, u16 s); + void test_long(u32 d, u32 s); + u8 xor_byte(u8 d, u8 s); + u16 xor_word(u16 d, u16 s); + u32 xor_long(u32 d, u32 s); + void imul_byte(u8 s); + void imul_word(u16 s); + void imul_long(u32 s); + void imul_long_direct(u32 * res_lo, u32 * res_hi, u32 d, u32 s); + void mul_byte(u8 s); + void mul_word(u16 s); + void mul_long(u32 s); + void idiv_byte(u8 s); + void idiv_word(u16 s); + void idiv_long(u32 s); + void div_byte(u8 s); + void div_word(u16 s); + void div_long(u32 s); + void ins(int size); + void outs(int size); + u16 mem_access_word(int addr); + void push_word(u16 w); + void push_long(u32 w); + u16 pop_word(void); + u32 pop_long(void); + void cpuid(void); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_PRIM_OPS_H */ +#endif /* __X86EMU_PRIM_OPS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h index 52cf8e41b..6bd061166 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/regs.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/regs.h @@ -42,7 +42,7 @@ /*---------------------- Macros and type definitions ----------------------*/ #ifdef PACK -# pragma PACK +#pragma PACK #endif /* @@ -64,48 +64,48 @@ typedef struct { u32 e_reg; - } I32_reg_t; +} I32_reg_t; typedef struct { - u16 filler0, x_reg; - } I16_reg_t; + u16 filler0, x_reg; +} I16_reg_t; typedef struct { - u8 filler0, filler1, h_reg, l_reg; - } I8_reg_t; + u8 filler0, filler1, h_reg, l_reg; +} I8_reg_t; -#else /* !__BIG_ENDIAN__ */ +#else /* !__BIG_ENDIAN__ */ typedef struct { u32 e_reg; - } I32_reg_t; +} I32_reg_t; typedef struct { - u16 x_reg; - } I16_reg_t; + u16 x_reg; +} I16_reg_t; typedef struct { - u8 l_reg, h_reg; - } I8_reg_t; + u8 l_reg, h_reg; +} I8_reg_t; -#endif /* BIG_ENDIAN */ +#endif /* BIG_ENDIAN */ typedef union { - I32_reg_t I32_reg; - I16_reg_t I16_reg; - I8_reg_t I8_reg; - } i386_general_register; + I32_reg_t I32_reg; + I16_reg_t I16_reg; + I8_reg_t I8_reg; +} i386_general_register; struct i386_general_regs { - i386_general_register A, B, C, D; - }; + i386_general_register A, B, C, D; +}; typedef struct i386_general_regs Gen_reg_t; struct i386_special_regs { - i386_general_register SP, BP, SI, DI, IP; - u32 FLAGS; - }; + i386_general_register SP, BP, SI, DI, IP; + u32 FLAGS; +}; /* * Segment registers here represent the 16 bit quantities @@ -114,7 +114,7 @@ struct i386_special_regs { struct i386_segment_regs { u16 CS, DS, SS, ES, FS, GS; - }; +}; /* 8 bit registers */ #define R_AH gen.A.I8_reg.h_reg @@ -258,9 +258,9 @@ struct i386_segment_regs { #define INTR_HALTED 0x4 typedef struct { - struct i386_general_regs gen; - struct i386_special_regs spc; - struct i386_segment_regs seg; + struct i386_general_regs gen; + struct i386_special_regs spc; + struct i386_segment_regs seg; /* * MODE contains information on: * REPE prefix 2 bits repe,repne @@ -273,21 +273,21 @@ typedef struct { * Extern interrupt 1 bits * Halted 1 bits */ - u32 mode; - volatile int intr; /* mask of pending interrupts */ - int debug; + u32 mode; + volatile int intr; /* mask of pending interrupts */ + int debug; #ifdef DEBUG - int check; - u16 saved_ip; - u16 saved_cs; - int enc_pos; - int enc_str_pos; - char decode_buf[32]; /* encoded byte stream */ - char decoded_buf[256]; /* disassembled strings */ + int check; + u16 saved_ip; + u16 saved_cs; + int enc_pos; + int enc_str_pos; + char decode_buf[32]; /* encoded byte stream */ + char decoded_buf[256]; /* disassembled strings */ #endif - u8 intno; - u8 __pad[3]; - } X86EMU_regs; + u8 intno; + u8 __pad[3]; +} X86EMU_regs; /**************************************************************************** REMARKS: @@ -300,20 +300,20 @@ private - private data pointer x86 - X86 registers ****************************************************************************/ typedef struct { - unsigned long mem_base; - unsigned long mem_size; - void* private; - X86EMU_regs x86; - } X86EMU_sysEnv; + unsigned long mem_base; + unsigned long mem_size; + void *private; + X86EMU_regs x86; +} X86EMU_sysEnv; #ifdef END_PACK -# pragma END_PACK +#pragma END_PACK #endif /*----------------------------- Global Variables --------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif /* Global emulator machine state. @@ -321,17 +321,16 @@ extern "C" { /* Use "C" linkage when in C++ mode */ * We keep it global to avoid pointer dereferences in the code for speed. */ -extern X86EMU_sysEnv _X86EMU_env; + extern X86EMU_sysEnv _X86EMU_env; #define M _X86EMU_env /*-------------------------- Function Prototypes --------------------------*/ /* Function to log information at runtime */ -void printk(const char *fmt, ...); + void printk(const char *fmt, ...); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_REGS_H */ +#endif /* __X86EMU_REGS_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/types.h b/xorg-server/hw/xfree86/x86emu/x86emu/types.h index fa23800d0..5a6ef01f8 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/types.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/types.h @@ -36,7 +36,6 @@ * ****************************************************************************/ - #ifndef __X86EMU_TYPES_H #define __X86EMU_TYPES_H @@ -63,19 +62,19 @@ #include <stdint.h> -typedef uint8_t u8; -typedef uint16_t u16; -typedef uint32_t u32; -typedef uint64_t u64; +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; -typedef int8_t s8; -typedef int16_t s16; -typedef int32_t s32; -typedef int64_t s64; +typedef int8_t s8; +typedef int16_t s16; +typedef int32_t s32; +typedef int64_t s64; -typedef unsigned int uint; -typedef int sint; +typedef unsigned int uint; +typedef int sint; typedef u16 X86EMU_pioAddr; -#endif /* __X86EMU_TYPES_H */ +#endif /* __X86EMU_TYPES_H */ diff --git a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h index 112ee366f..f11dc102f 100644 --- a/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h +++ b/xorg-server/hw/xfree86/x86emu/x86emu/x86emui.h @@ -38,7 +38,6 @@ * ****************************************************************************/ - #ifndef __X86EMU_X86EMUI_H #define __X86EMU_X86EMUI_H @@ -74,29 +73,28 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#endif +#endif /*--------------------------- Inline Functions ----------------------------*/ #ifdef __cplusplus -extern "C" { /* Use "C" linkage when in C++ mode */ +extern "C" { /* Use "C" linkage when in C++ mode */ #endif -extern u8 (X86APIP sys_rdb)(u32 addr); -extern u16 (X86APIP sys_rdw)(u32 addr); -extern u32 (X86APIP sys_rdl)(u32 addr); -extern void (X86APIP sys_wrb)(u32 addr,u8 val); -extern void (X86APIP sys_wrw)(u32 addr,u16 val); -extern void (X86APIP sys_wrl)(u32 addr,u32 val); + extern u8(X86APIP sys_rdb) (u32 addr); + extern u16(X86APIP sys_rdw) (u32 addr); + extern u32(X86APIP sys_rdl) (u32 addr); + extern void (X86APIP sys_wrb) (u32 addr, u8 val); + extern void (X86APIP sys_wrw) (u32 addr, u16 val); + extern void (X86APIP sys_wrl) (u32 addr, u32 val); -extern u8 (X86APIP sys_inb)(X86EMU_pioAddr addr); -extern u16 (X86APIP sys_inw)(X86EMU_pioAddr addr); -extern u32 (X86APIP sys_inl)(X86EMU_pioAddr addr); -extern void (X86APIP sys_outb)(X86EMU_pioAddr addr,u8 val); -extern void (X86APIP sys_outw)(X86EMU_pioAddr addr,u16 val); -extern void (X86APIP sys_outl)(X86EMU_pioAddr addr,u32 val); + extern u8(X86APIP sys_inb) (X86EMU_pioAddr addr); + extern u16(X86APIP sys_inw) (X86EMU_pioAddr addr); + extern u32(X86APIP sys_inl) (X86EMU_pioAddr addr); + extern void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val); + extern void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val); + extern void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val); #ifdef __cplusplus -} /* End of "C" linkage for C++ */ +} /* End of "C" linkage for C++ */ #endif - -#endif /* __X86EMU_X86EMUI_H */ +#endif /* __X86EMU_X86EMUI_H */ diff --git a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c index 9b124670d..3d9b980e1 100644 --- a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c +++ b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c @@ -9,8 +9,8 @@ CARD32 XAAReverseBitOrder(CARD32 v) { - return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) | - ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) | - ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) | - ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7)); + return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) | + ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) | + ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) | + ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7)); } diff --git a/xorg-server/hw/xfree86/xaa/xaacexp.h b/xorg-server/hw/xfree86/xaa/xaacexp.h index 56bcda69a..6fde54c65 100644 --- a/xorg-server/hw/xfree86/xaa/xaacexp.h +++ b/xorg-server/hw/xfree86/xaa/xaacexp.h @@ -1,5 +1,4 @@ - #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif @@ -13,76 +12,76 @@ #endif #if X_BYTE_ORDER == X_BIG_ENDIAN -# define SHIFT_L(value, shift) ((value) >> (shift)) -# define SHIFT_R(value, shift) ((value) << (shift)) +#define SHIFT_L(value, shift) ((value) >> (shift)) +#define SHIFT_R(value, shift) ((value) << (shift)) #else -# define SHIFT_L(value, shift) ((value) << (shift)) -# define SHIFT_R(value, shift) ((value) >> (shift)) +#define SHIFT_L(value, shift) ((value) << (shift)) +#define SHIFT_R(value, shift) ((value) >> (shift)) #endif #ifndef MSBFIRST -# ifdef FIXEDBASE -# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data; -# else -# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data; -# endif -#else -# ifdef FIXEDBASE -# define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data); -# else -# define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data) -# endif +#ifdef FIXEDBASE +#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = data; +#else +#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = data; +#endif +#else +#ifdef FIXEDBASE +#define WRITE_IN_BITORDER(dest, offset, data) *(dest) = SWAP_BITS_IN_BYTES(data); +#else +#define WRITE_IN_BITORDER(dest, offset, data) *(dest + offset) = SWAP_BITS_IN_BYTES(data) +#endif #endif #ifdef FIXEDBASE -# ifdef MSBFIRST -# define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b) -# define WRITE_BITS1(b) { \ +#ifdef MSBFIRST +#define WRITE_BITS(b) *base = SWAP_BITS_IN_BYTES(b) +#define WRITE_BITS1(b) { \ *base = byte_reversed_expand3[(b) & 0xFF] | \ byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; } -# define WRITE_BITS2(b) { \ +#define WRITE_BITS2(b) { \ *base = byte_reversed_expand3[(b) & 0xFF] | \ byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \ *base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \ byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; } -# define WRITE_BITS3(b) { \ +#define WRITE_BITS3(b) { \ *base = byte_reversed_expand3[(b) & 0xFF] | \ byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \ *base = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \ byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \ *base = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \ byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; } -# else -# define WRITE_BITS(b) *base = (b) -# define WRITE_BITS1(b) { \ +#else +#define WRITE_BITS(b) *base = (b) +#define WRITE_BITS1(b) { \ *base = byte_expand3[(b) & 0xFF] | \ byte_expand3[((b) & 0xFF00) >> 8] << 24; } -# define WRITE_BITS2(b) { \ +#define WRITE_BITS2(b) { \ *base = byte_expand3[(b) & 0xFF] | \ byte_expand3[((b) & 0xFF00) >> 8] << 24; \ *base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \ byte_expand3[((b) & 0xFF0000) >> 16] << 16; } -# define WRITE_BITS3(b) { \ +#define WRITE_BITS3(b) { \ *base = byte_expand3[(b) & 0xFF] | \ byte_expand3[((b) & 0xFF00) >> 8] << 24; \ *base = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \ byte_expand3[((b) & 0xFF0000) >> 16] << 16; \ *base = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \ byte_expand3[((b) & 0xFF000000) >> 24] << 8; } -# endif +#endif #else -# ifdef MSBFIRST -# define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b) -# define WRITE_BITS1(b) { \ +#ifdef MSBFIRST +#define WRITE_BITS(b) *(base++) = SWAP_BITS_IN_BYTES(b) +#define WRITE_BITS1(b) { \ *(base++) = byte_reversed_expand3[(b) & 0xFF] | \ byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; } -# define WRITE_BITS2(b) { \ +#define WRITE_BITS2(b) { \ *(base) = byte_reversed_expand3[(b) & 0xFF] | \ byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \ *(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \ byte_reversed_expand3[((b) & 0xFF0000) >> 16] << 16; \ base += 2; } -# define WRITE_BITS3(b) { \ +#define WRITE_BITS3(b) { \ *(base) = byte_reversed_expand3[(b) & 0xFF] | \ byte_reversed_expand3[((b) & 0xFF00) >> 8] << 24; \ *(base + 1) = byte_reversed_expand3[((b) & 0xFF00) >> 8] >> 8 | \ @@ -90,18 +89,18 @@ *(base + 2) = byte_reversed_expand3[((b) & 0xFF0000) >> 16] >> 16 | \ byte_reversed_expand3[((b) & 0xFF000000) >> 24] << 8; \ base += 3; } -# else -# define WRITE_BITS(b) *(base++) = (b) -# define WRITE_BITS1(b) { \ +#else +#define WRITE_BITS(b) *(base++) = (b) +#define WRITE_BITS1(b) { \ *(base++) = byte_expand3[(b) & 0xFF] | \ byte_expand3[((b) & 0xFF00) >> 8] << 24; } -# define WRITE_BITS2(b) { \ +#define WRITE_BITS2(b) { \ *(base) = byte_expand3[(b) & 0xFF] | \ byte_expand3[((b) & 0xFF00) >> 8] << 24; \ *(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \ byte_expand3[((b) & 0xFF0000) >> 16] << 16; \ base += 2; } -# define WRITE_BITS3(b) { \ +#define WRITE_BITS3(b) { \ *(base) = byte_expand3[(b) & 0xFF] | \ byte_expand3[((b) & 0xFF00) >> 8] << 24; \ *(base + 1) = byte_expand3[((b) & 0xFF00) >> 8] >> 8 | \ @@ -109,19 +108,19 @@ *(base + 2) = byte_expand3[((b) & 0xFF0000) >> 16] >> 16 | \ byte_expand3[((b) & 0xFF000000) >> 24] << 8; \ base += 3; } -# endif +#endif #endif #ifdef FIXEDBASE -# ifdef MSBFIRST -# define EXPNAME(x) x##MSBFirstFixedBase -# else -# define EXPNAME(x) x##LSBFirstFixedBase -# endif +#ifdef MSBFIRST +#define EXPNAME(x) x##MSBFirstFixedBase #else -# ifdef MSBFIRST -# define EXPNAME(x) x##MSBFirst -# else -# define EXPNAME(x) x##LSBFirst -# endif +#define EXPNAME(x) x##LSBFirstFixedBase +#endif +#else +#ifdef MSBFIRST +#define EXPNAME(x) x##MSBFirst +#else +#define EXPNAME(x) x##LSBFirst +#endif #endif diff --git a/xorg-server/hw/xfree86/xaa/xaawrap.h b/xorg-server/hw/xfree86/xaa/xaawrap.h index 1b7595e95..2d2d7881a 100644 --- a/xorg-server/hw/xfree86/xaa/xaawrap.h +++ b/xorg-server/hw/xfree86/xaa/xaawrap.h @@ -1,79 +1,75 @@ -
-#define XAA_SCREEN_PROLOGUE(pScreen, field)\
- ((pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\
- ((pScreen)->field = wrapper)
-
-
-#define XAA_GC_FUNC_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- (pGC)->funcs = pGCPriv->wrapFuncs;\
- if(pGCPriv->flags)\
- (pGC)->ops = pGCPriv->wrapOps
-
-#define XAA_GC_FUNC_EPILOGUE(pGC)\
- pGCPriv->wrapFuncs = (pGC)->funcs;\
- (pGC)->funcs = &XAAGCFuncs;\
- if(pGCPriv->flags) {\
- pGCPriv->wrapOps = (pGC)->ops;\
- (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\
- &XAAPixmapOps;\
- }
-
-
-#define XAA_GC_OP_PROLOGUE(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- GCFuncs *oldFuncs = pGC->funcs;\
- if(!RegionNumRects(pGC->pCompositeClip)) return; \
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps
-
-
-#define XAA_GC_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = pGCPriv->XAAOps
-
-
-#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\
- XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \
- XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\
- GCFuncs *oldFuncs = pGC->funcs;\
- pGC->funcs = pGCPriv->wrapFuncs;\
- pGC->ops = pGCPriv->wrapOps; \
- SYNC_CHECK(pGC)
-
-#define XAA_PIXMAP_OP_EPILOGUE(pGC)\
- pGCPriv->wrapOps = pGC->ops;\
- pGC->funcs = oldFuncs;\
- pGC->ops = &XAAPixmapOps;\
- pixPriv->flags |= DIRTY
-
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#define XAA_RENDER_PROLOGUE(pScreen,field)\
- (GetPictureScreen(pScreen)->field = \
- ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field)
-
-#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\
- (GetPictureScreen(pScreen)->field = wrapper)
-
-/* This also works fine for drawables */
-
-#define SYNC_CHECK(pGC) {\
- XAAInfoRecPtr infoRec =\
-((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \
- if(infoRec->NeedToSync) {\
- (*infoRec->Sync)(infoRec->pScrn);\
- infoRec->NeedToSync = FALSE;\
- }}
+ +#define XAA_SCREEN_PROLOGUE(pScreen, field)\ + ((pScreen)->field = \ + ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field) + +#define XAA_SCREEN_EPILOGUE(pScreen, field, wrapper)\ + ((pScreen)->field = wrapper) + +#define XAA_GC_FUNC_PROLOGUE(pGC)\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ + (pGC)->funcs = pGCPriv->wrapFuncs;\ + if(pGCPriv->flags)\ + (pGC)->ops = pGCPriv->wrapOps + +#define XAA_GC_FUNC_EPILOGUE(pGC)\ + pGCPriv->wrapFuncs = (pGC)->funcs;\ + (pGC)->funcs = &XAAGCFuncs;\ + if(pGCPriv->flags) {\ + pGCPriv->wrapOps = (pGC)->ops;\ + (pGC)->ops = (pGCPriv->flags & OPS_ARE_ACCEL) ? pGCPriv->XAAOps :\ + &XAAPixmapOps;\ + } + +#define XAA_GC_OP_PROLOGUE(pGC)\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ + GCFuncs *oldFuncs = pGC->funcs;\ + pGC->funcs = pGCPriv->wrapFuncs;\ + pGC->ops = pGCPriv->wrapOps + +#define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ + GCFuncs *oldFuncs = pGC->funcs;\ + if(!RegionNumRects(pGC->pCompositeClip)) return; \ + pGC->funcs = pGCPriv->wrapFuncs;\ + pGC->ops = pGCPriv->wrapOps + +#define XAA_GC_OP_EPILOGUE(pGC)\ + pGCPriv->wrapOps = pGC->ops;\ + pGC->funcs = oldFuncs;\ + pGC->ops = pGCPriv->XAAOps + +#define XAA_PIXMAP_OP_PROLOGUE(pGC, pDraw)\ + XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ + XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE((PixmapPtr)(pDraw));\ + GCFuncs *oldFuncs = pGC->funcs;\ + pGC->funcs = pGCPriv->wrapFuncs;\ + pGC->ops = pGCPriv->wrapOps; \ + SYNC_CHECK(pGC) + +#define XAA_PIXMAP_OP_EPILOGUE(pGC)\ + pGCPriv->wrapOps = pGC->ops;\ + pGC->funcs = oldFuncs;\ + pGC->ops = &XAAPixmapOps;\ + pixPriv->flags |= DIRTY + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#define XAA_RENDER_PROLOGUE(pScreen,field)\ + (GetPictureScreen(pScreen)->field = \ + ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field) + +#define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\ + (GetPictureScreen(pScreen)->field = wrapper) + +/* This also works fine for drawables */ + +#define SYNC_CHECK(pGC) {\ + XAAInfoRecPtr infoRec =\ +((XAAScreenPtr)dixLookupPrivate(&(pGC)->pScreen->devPrivates, XAAGetScreenKey()))->AccelInfoRec; \ + if(infoRec->NeedToSync) {\ + (*infoRec->Sync)(infoRec->pScrn);\ + infoRec->NeedToSync = FALSE;\ + }} diff --git a/xorg-server/hw/xnest/Args.h b/xorg-server/hw/xnest/Args.h index c3002bfca..514a39513 100644 --- a/xorg-server/hw/xnest/Args.h +++ b/xorg-server/hw/xnest/Args.h @@ -15,24 +15,24 @@ is" without express or implied warranty. #ifndef XNESTARGC_H #define XNESTARGS_H -extern char *xnestDisplayName; +extern char *xnestDisplayName; extern Bool xnestSynchronize; extern Bool xnestFullGeneration; -extern int xnestDefaultClass; +extern int xnestDefaultClass; extern Bool xnestUserDefaultClass; -extern int xnestDefaultDepth; +extern int xnestDefaultDepth; extern Bool xnestUserDefaultDepth; extern Bool xnestSoftwareScreenSaver; -extern int xnestX; -extern int xnestY; -extern unsigned int xnestWidth; -extern unsigned int xnestHeight; +extern int xnestX; +extern int xnestY; +extern unsigned int xnestWidth; +extern unsigned int xnestHeight; extern int xnestUserGeometry; -extern int xnestBorderWidth; +extern int xnestBorderWidth; extern Bool xnestUserBorderWidth; -extern char *xnestWindowName; +extern char *xnestWindowName; extern int xnestNumScreens; extern Bool xnestDoDirectColormaps; extern Window xnestParentWindow; -#endif /* XNESTARGS_H */ +#endif /* XNESTARGS_H */ diff --git a/xorg-server/hw/xnest/Color.h b/xorg-server/hw/xnest/Color.h index 3c75fef2f..2c4e0be2a 100644 --- a/xorg-server/hw/xnest/Color.h +++ b/xorg-server/hw/xnest/Color.h @@ -1,57 +1,58 @@ -/*
-
-Copyright 1993 by Davor Matic
-
-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. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTCOLOR_H
-#define XNESTCOLOR_H
-
-#define DUMB_WINDOW_MANAGERS
-
-#define MAXCMAPS 1
-#define MINCMAPS 1
-
-typedef struct {
- Colormap colormap;
-} xnestPrivColormap;
-
-typedef struct {
- int numCmapIDs;
- Colormap *cmapIDs;
- int numWindows;
- Window *windows;
- int index;
-} xnestInstalledColormapWindows;
-
-extern DevPrivateKeyRec xnestColormapPrivateKeyRec;
-#define xnestColormapPriv(pCmap) \
- ((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec))
-
-#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap)
-
-#define xnestPixel(pixel) (pixel)
-
-Bool xnestCreateColormap(ColormapPtr pCmap);
-void xnestDestroyColormap(ColormapPtr pCmap);
-void xnestSetInstalledColormapWindows(ScreenPtr pScreen);
-void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen);
-void xnestDirectInstallColormaps(ScreenPtr pScreen);
-void xnestDirectUninstallColormaps(ScreenPtr pScreen);
-void xnestInstallColormap(ColormapPtr pCmap);
-void xnestUninstallColormap(ColormapPtr pCmap);
-int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIDs);
-void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors);
-void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen,
- unsigned short *pBlue, VisualPtr pVisual);
-Bool xnestCreateDefaultColormap(ScreenPtr pScreen);
-
-#endif /* XNESTCOLOR_H */
+/* + +Copyright 1993 by Davor Matic + +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. Davor Matic makes no representations about +the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +*/ + +#ifndef XNESTCOLOR_H +#define XNESTCOLOR_H + +#define DUMB_WINDOW_MANAGERS + +#define MAXCMAPS 1 +#define MINCMAPS 1 + +typedef struct { + Colormap colormap; +} xnestPrivColormap; + +typedef struct { + int numCmapIDs; + Colormap *cmapIDs; + int numWindows; + Window *windows; + int index; +} xnestInstalledColormapWindows; + +extern DevPrivateKeyRec xnestColormapPrivateKeyRec; + +#define xnestColormapPriv(pCmap) \ + ((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec)) + +#define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap) + +#define xnestPixel(pixel) (pixel) + +Bool xnestCreateColormap(ColormapPtr pCmap); +void xnestDestroyColormap(ColormapPtr pCmap); +void xnestSetInstalledColormapWindows(ScreenPtr pScreen); +void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen); +void xnestDirectInstallColormaps(ScreenPtr pScreen); +void xnestDirectUninstallColormaps(ScreenPtr pScreen); +void xnestInstallColormap(ColormapPtr pCmap); +void xnestUninstallColormap(ColormapPtr pCmap); +int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmapIDs); +void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors); +void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen, + unsigned short *pBlue, VisualPtr pVisual); +Bool xnestCreateDefaultColormap(ScreenPtr pScreen); + +#endif /* XNESTCOLOR_H */ diff --git a/xorg-server/hw/xnest/Display.h b/xorg-server/hw/xnest/Display.h index d0eefd57c..4e9dbf463 100644 --- a/xorg-server/hw/xnest/Display.h +++ b/xorg-server/hw/xnest/Display.h @@ -21,7 +21,7 @@ is" without express or implied warranty. #define MAXVISUALSPERDEPTH 256 extern Display *xnestDisplay; -extern XVisualInfo *xnestVisuals; +extern XVisualInfo *xnestVisuals; extern int xnestNumVisuals; extern int xnestDefaultVisualIndex; extern Colormap *xnestDefaultColormaps; @@ -30,8 +30,8 @@ extern int *xnestDepths; extern int xnestNumDepths; extern XPixmapFormatValues *xnestPixmapFormats; extern int xnestNumPixmapFormats; -extern Pixel xnestBlackPixel; -extern Pixel xnestWhitePixel; +extern Pixel xnestBlackPixel; +extern Pixel xnestWhitePixel; extern Drawable xnestDefaultDrawables[MAXDEPTH + 1]; extern Pixmap xnestIconBitmap; extern Pixmap xnestScreenSaverPixmap; @@ -41,4 +41,4 @@ extern unsigned long xnestEventMask; void xnestOpenDisplay(int argc, char *argv[]); void xnestCloseDisplay(void); -#endif /* XNESTCOMMON_H */ +#endif /* XNESTCOMMON_H */ diff --git a/xorg-server/hw/xnest/Drawable.h b/xorg-server/hw/xnest/Drawable.h index 7f742cb1f..ea7b5bb21 100644 --- a/xorg-server/hw/xnest/Drawable.h +++ b/xorg-server/hw/xnest/Drawable.h @@ -1,26 +1,26 @@ -/*
-
-Copyright 1993 by Davor Matic
-
-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. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTDRAWABLE_H
-#define XNESTDRAWABLE_H
-
-#include "XNWindow.h"
-#include "XNPixmap.h"
-
-#define xnestDrawable(pDrawable) \
- (WindowDrawable((pDrawable)->type) ? \
- xnestWindow((WindowPtr)pDrawable) : \
- xnestPixmap((PixmapPtr)pDrawable))
-
-#endif /* XNESTDRAWABLE_H */
+/* + +Copyright 1993 by Davor Matic + +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. Davor Matic makes no representations about +the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +*/ + +#ifndef XNESTDRAWABLE_H +#define XNESTDRAWABLE_H + +#include "XNWindow.h" +#include "XNPixmap.h" + +#define xnestDrawable(pDrawable) \ + (WindowDrawable((pDrawable)->type) ? \ + xnestWindow((WindowPtr)pDrawable) : \ + xnestPixmap((PixmapPtr)pDrawable)) + +#endif /* XNESTDRAWABLE_H */ diff --git a/xorg-server/hw/xnest/Events.h b/xorg-server/hw/xnest/Events.h index 2441accd5..1c1b8cd46 100644 --- a/xorg-server/hw/xnest/Events.h +++ b/xorg-server/hw/xnest/Events.h @@ -26,4 +26,4 @@ void xnestCollectExposures(void); void xnestCollectEvents(void); void xnestQueueKeyEvent(int type, unsigned int keycode); -#endif /* XNESTEVENTS_H */ +#endif /* XNESTEVENTS_H */ diff --git a/xorg-server/hw/xnest/Handlers.c b/xorg-server/hw/xnest/Handlers.c index a113f488a..4605b90bd 100644 --- a/xorg-server/hw/xnest/Handlers.c +++ b/xorg-server/hw/xnest/Handlers.c @@ -34,12 +34,12 @@ is" without express or implied warranty. void xnestBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask) { - xnestCollectExposures(); - XFlush(xnestDisplay); + xnestCollectExposures(); + XFlush(xnestDisplay); } void xnestWakeupHandler(pointer blockData, int result, pointer pReadMask) { - xnestCollectEvents(); + xnestCollectEvents(); } diff --git a/xorg-server/hw/xnest/Handlers.h b/xorg-server/hw/xnest/Handlers.h index 16228a0c1..7160bdd13 100644 --- a/xorg-server/hw/xnest/Handlers.h +++ b/xorg-server/hw/xnest/Handlers.h @@ -16,7 +16,7 @@ is" without express or implied warranty. #define XNESTHANDLERS_H void xnestBlockHandler(pointer blockData, OSTimePtr pTimeout, - pointer pReadMask); + pointer pReadMask); void xnestWakeupHandler(pointer blockData, int result, pointer pReadMask); -#endif /* XNESTHANDLERS_H */ +#endif /* XNESTHANDLERS_H */ diff --git a/xorg-server/hw/xnest/Init.h b/xorg-server/hw/xnest/Init.h index 4bed0ee67..7c0291ebf 100644 --- a/xorg-server/hw/xnest/Init.h +++ b/xorg-server/hw/xnest/Init.h @@ -17,4 +17,4 @@ is" without express or implied warranty. extern Bool xnestDoFullGeneration; -#endif /* XNESTINIT_H */ +#endif /* XNESTINIT_H */ diff --git a/xorg-server/hw/xnest/Keyboard.h b/xorg-server/hw/xnest/Keyboard.h index 546a1cbe4..45d56bc08 100644 --- a/xorg-server/hw/xnest/Keyboard.h +++ b/xorg-server/hw/xnest/Keyboard.h @@ -21,8 +21,8 @@ is" without express or implied warranty. extern DeviceIntPtr xnestKeyboardDevice; void xnestBell(int volume, DeviceIntPtr pDev, pointer ctrl, int cls); -void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl); +void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl * ctrl); int xnestKeyboardProc(DeviceIntPtr pDev, int onoff); void xnestUpdateModifierState(unsigned int state); -#endif /* XNESTKEYBOARD_H */ +#endif /* XNESTKEYBOARD_H */ diff --git a/xorg-server/hw/xnest/Pixmap.c b/xorg-server/hw/xnest/Pixmap.c index eccf56986..13e1610fd 100644 --- a/xorg-server/hw/xnest/Pixmap.c +++ b/xorg-server/hw/xnest/Pixmap.c @@ -36,101 +36,101 @@ DevPrivateKeyRec xnestPixmapPrivateKeyRec; PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, - unsigned usage_hint) + unsigned usage_hint) { - PixmapPtr pPixmap; - - pPixmap = AllocatePixmap(pScreen, 0); - if (!pPixmap) - return NullPixmap; - pPixmap->drawable.type = DRAWABLE_PIXMAP; - pPixmap->drawable.class = 0; - pPixmap->drawable.depth = depth; - pPixmap->drawable.bitsPerPixel = depth; - pPixmap->drawable.id = 0; - pPixmap->drawable.x = 0; - pPixmap->drawable.y = 0; - pPixmap->drawable.width = width; - pPixmap->drawable.height = height; - pPixmap->drawable.pScreen = pScreen; - pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; - pPixmap->refcnt = 1; - pPixmap->devKind = PixmapBytePad(width, depth); - pPixmap->usage_hint = usage_hint; - if (width && height) - xnestPixmapPriv(pPixmap)->pixmap = - XCreatePixmap(xnestDisplay, - xnestDefaultWindows[pScreen->myNum], - width, height, depth); - else - xnestPixmapPriv(pPixmap)->pixmap = 0; - - return pPixmap; + PixmapPtr pPixmap; + + pPixmap = AllocatePixmap(pScreen, 0); + if (!pPixmap) + return NullPixmap; + pPixmap->drawable.type = DRAWABLE_PIXMAP; + pPixmap->drawable.class = 0; + pPixmap->drawable.depth = depth; + pPixmap->drawable.bitsPerPixel = depth; + pPixmap->drawable.id = 0; + pPixmap->drawable.x = 0; + pPixmap->drawable.y = 0; + pPixmap->drawable.width = width; + pPixmap->drawable.height = height; + pPixmap->drawable.pScreen = pScreen; + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; + pPixmap->refcnt = 1; + pPixmap->devKind = PixmapBytePad(width, depth); + pPixmap->usage_hint = usage_hint; + if (width && height) + xnestPixmapPriv(pPixmap)->pixmap = + XCreatePixmap(xnestDisplay, + xnestDefaultWindows[pScreen->myNum], + width, height, depth); + else + xnestPixmapPriv(pPixmap)->pixmap = 0; + + return pPixmap; } Bool xnestDestroyPixmap(PixmapPtr pPixmap) { - if(--pPixmap->refcnt) + if (--pPixmap->refcnt) + return TRUE; + XFreePixmap(xnestDisplay, xnestPixmap(pPixmap)); + FreePixmap(pPixmap); return TRUE; - XFreePixmap(xnestDisplay, xnestPixmap(pPixmap)); - FreePixmap(pPixmap); - return TRUE; } RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap) { - XImage *ximage; - register RegionPtr pReg, pTmpReg; - register int x, y; - unsigned long previousPixel, currentPixel; - BoxRec Box = { 0, 0, 0, 0 }; - Bool overlap; - - ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0, - pPixmap->drawable.width, pPixmap->drawable.height, - 1, XYPixmap); - - pReg = RegionCreate(NULL, 1); - pTmpReg = RegionCreate(NULL, 1); - if(!pReg || !pTmpReg) { - XDestroyImage(ximage); - return NullRegion; - } - - for (y = 0; y < pPixmap->drawable.height; y++) { - Box.y1 = y; - Box.y2 = y + 1; - previousPixel = 0L; - for (x = 0; x < pPixmap->drawable.width; x++) { - currentPixel = XGetPixel(ximage, x, y); - if (previousPixel != currentPixel) { - if (previousPixel == 0L) { - /* left edge */ - Box.x1 = x; - } - else if (currentPixel == 0L) { - /* right edge */ - Box.x2 = x; - RegionReset(pTmpReg, &Box); - RegionAppend(pReg, pTmpReg); - } - previousPixel = currentPixel; - } + XImage *ximage; + register RegionPtr pReg, pTmpReg; + register int x, y; + unsigned long previousPixel, currentPixel; + BoxRec Box = { 0, 0, 0, 0 }; + Bool overlap; + + ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0, + pPixmap->drawable.width, pPixmap->drawable.height, + 1, XYPixmap); + + pReg = RegionCreate(NULL, 1); + pTmpReg = RegionCreate(NULL, 1); + if (!pReg || !pTmpReg) { + XDestroyImage(ximage); + return NullRegion; } - if (previousPixel != 0L) { - /* right edge because of the end of pixmap */ - Box.x2 = pPixmap->drawable.width; - RegionReset(pTmpReg, &Box); - RegionAppend(pReg, pTmpReg); + + for (y = 0; y < pPixmap->drawable.height; y++) { + Box.y1 = y; + Box.y2 = y + 1; + previousPixel = 0L; + for (x = 0; x < pPixmap->drawable.width; x++) { + currentPixel = XGetPixel(ximage, x, y); + if (previousPixel != currentPixel) { + if (previousPixel == 0L) { + /* left edge */ + Box.x1 = x; + } + else if (currentPixel == 0L) { + /* right edge */ + Box.x2 = x; + RegionReset(pTmpReg, &Box); + RegionAppend(pReg, pTmpReg); + } + previousPixel = currentPixel; + } + } + if (previousPixel != 0L) { + /* right edge because of the end of pixmap */ + Box.x2 = pPixmap->drawable.width; + RegionReset(pTmpReg, &Box); + RegionAppend(pReg, pTmpReg); + } } - } - - RegionDestroy(pTmpReg); - XDestroyImage(ximage); - RegionValidate(pReg, &overlap); + RegionDestroy(pTmpReg); + XDestroyImage(ximage); + + RegionValidate(pReg, &overlap); - return pReg; + return pReg; } diff --git a/xorg-server/hw/xnest/Pointer.h b/xorg-server/hw/xnest/Pointer.h index 890726f55..d0047c517 100644 --- a/xorg-server/hw/xnest/Pointer.h +++ b/xorg-server/hw/xnest/Pointer.h @@ -23,7 +23,7 @@ is" without express or implied warranty. extern DeviceIntPtr xnestPointerDevice; -void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl); +void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl * ctrl); int xnestPointerProc(DeviceIntPtr pDev, int onoff); -#endif /* XNESTPOINTER_H */ +#endif /* XNESTPOINTER_H */ diff --git a/xorg-server/hw/xnest/Screen.h b/xorg-server/hw/xnest/Screen.h index b113c6460..1d255d79b 100644 --- a/xorg-server/hw/xnest/Screen.h +++ b/xorg-server/hw/xnest/Screen.h @@ -22,4 +22,4 @@ ScreenPtr xnestScreen(Window window); Bool xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]); Bool xnestCloseScreen(int index, ScreenPtr pScreen); -#endif /* XNESTSCREEN_H */ +#endif /* XNESTSCREEN_H */ diff --git a/xorg-server/hw/xnest/Visual.c b/xorg-server/hw/xnest/Visual.c index da1d63c10..63198ba4f 100644 --- a/xorg-server/hw/xnest/Visual.c +++ b/xorg-server/hw/xnest/Visual.c @@ -30,41 +30,41 @@ is" without express or implied warranty. Visual * xnestVisual(VisualPtr pVisual) { - int i; + int i; - for (i = 0; i < xnestNumVisuals; i++) - if (pVisual->class == xnestVisuals[i].class && - pVisual->bitsPerRGBValue == xnestVisuals[i].bits_per_rgb && - pVisual->ColormapEntries == xnestVisuals[i].colormap_size && - pVisual->nplanes == xnestVisuals[i].depth && - pVisual->redMask == xnestVisuals[i].red_mask && - pVisual->greenMask == xnestVisuals[i].green_mask && - pVisual->blueMask == xnestVisuals[i].blue_mask) - return xnestVisuals[i].visual; + for (i = 0; i < xnestNumVisuals; i++) + if (pVisual->class == xnestVisuals[i].class && + pVisual->bitsPerRGBValue == xnestVisuals[i].bits_per_rgb && + pVisual->ColormapEntries == xnestVisuals[i].colormap_size && + pVisual->nplanes == xnestVisuals[i].depth && + pVisual->redMask == xnestVisuals[i].red_mask && + pVisual->greenMask == xnestVisuals[i].green_mask && + pVisual->blueMask == xnestVisuals[i].blue_mask) + return xnestVisuals[i].visual; - return NULL; + return NULL; } Visual * xnestVisualFromID(ScreenPtr pScreen, VisualID visual) { - int i; - - for (i = 0; i < pScreen->numVisuals; i++) - if (pScreen->visuals[i].vid == visual) - return xnestVisual(&pScreen->visuals[i]); + int i; - return NULL; + for (i = 0; i < pScreen->numVisuals; i++) + if (pScreen->visuals[i].vid == visual) + return xnestVisual(&pScreen->visuals[i]); + + return NULL; } Colormap -xnestDefaultVisualColormap(Visual *visual) +xnestDefaultVisualColormap(Visual * visual) { - int i; - - for (i = 0; i < xnestNumVisuals; i++) - if (xnestVisuals[i].visual == visual) - return xnestDefaultColormaps[i]; - - return None; + int i; + + for (i = 0; i < xnestNumVisuals; i++) + if (xnestVisuals[i].visual == visual) + return xnestDefaultColormaps[i]; + + return None; } diff --git a/xorg-server/hw/xnest/Visual.h b/xorg-server/hw/xnest/Visual.h index 1bd203709..c3ae8a19f 100644 --- a/xorg-server/hw/xnest/Visual.h +++ b/xorg-server/hw/xnest/Visual.h @@ -17,9 +17,9 @@ is" without express or implied warranty. Visual *xnestVisual(VisualPtr pVisual); Visual *xnestVisualFromID(ScreenPtr pScreen, VisualID visual); -Colormap xnestDefaultVisualColormap(Visual *visual); +Colormap xnestDefaultVisualColormap(Visual * visual); #define xnestDefaultVisual(pScreen) \ xnestVisualFromID((pScreen), (pScreen)->rootVisual) -#endif /* XNESTVISUAL_H */ +#endif /* XNESTVISUAL_H */ diff --git a/xorg-server/hw/xnest/XNFont.h b/xorg-server/hw/xnest/XNFont.h index 92c112f36..a210b1790 100644 --- a/xorg-server/hw/xnest/XNFont.h +++ b/xorg-server/hw/xnest/XNFont.h @@ -16,7 +16,7 @@ is" without express or implied warranty. #define XNESTFONT_H typedef struct { - XFontStruct *font_struct; + XFontStruct *font_struct; } xnestPrivFont; extern int xnestFontPrivateIndex; @@ -31,4 +31,4 @@ extern int xnestFontPrivateIndex; Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont); Bool xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont); -#endif /* XNESTFONT_H */ +#endif /* XNESTFONT_H */ diff --git a/xorg-server/hw/xnest/XNGC.h b/xorg-server/hw/xnest/XNGC.h index c4a6cef77..c7c25e426 100644 --- a/xorg-server/hw/xnest/XNGC.h +++ b/xorg-server/hw/xnest/XNGC.h @@ -18,10 +18,11 @@ is" without express or implied warranty. /* This file uses the GC definition form Xlib.h as XlibGC. */ typedef struct { - XlibGC gc; + XlibGC gc; } xnestPrivGC; extern DevPrivateKeyRec xnestGCPrivateKeyRec; + #define xnestGCPrivateKey (&xnestGCPrivateKeyRec) #define xnestGCPriv(pGC) ((xnestPrivGC *) \ @@ -39,4 +40,4 @@ void xnestDestroyClip(GCPtr pGC); void xnestDestroyClipHelper(GCPtr pGC); void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc); -#endif /* XNESTGC_H */ +#endif /* XNESTGC_H */ diff --git a/xorg-server/hw/xnest/XNPixmap.h b/xorg-server/hw/xnest/XNPixmap.h index 0d7c6b61e..268ba1e8b 100644 --- a/xorg-server/hw/xnest/XNPixmap.h +++ b/xorg-server/hw/xnest/XNPixmap.h @@ -1,37 +1,38 @@ -/*
-
-Copyright 1993 by Davor Matic
-
-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. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTPIXMAP_H
-#define XNESTPIXMAP_H
-
-extern DevPrivateKeyRec xnestPixmapPrivateKeyRec;
-#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec)
-
-typedef struct {
- Pixmap pixmap;
-} xnestPrivPixmap;
-
-#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \
- dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey))
-
-#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap)
-
-#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++)
-
-PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height,
- int depth, unsigned usage_hint);
-Bool xnestDestroyPixmap(PixmapPtr pPixmap);
-RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap);
-
-#endif /* XNESTPIXMAP_H */
+/* + +Copyright 1993 by Davor Matic + +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. Davor Matic makes no representations about +the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +*/ + +#ifndef XNESTPIXMAP_H +#define XNESTPIXMAP_H + +extern DevPrivateKeyRec xnestPixmapPrivateKeyRec; + +#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec) + +typedef struct { + Pixmap pixmap; +} xnestPrivPixmap; + +#define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \ + dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey)) + +#define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap) + +#define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++) + +PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, + int depth, unsigned usage_hint); +Bool xnestDestroyPixmap(PixmapPtr pPixmap); +RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap); + +#endif /* XNESTPIXMAP_H */ diff --git a/xorg-server/hw/xnest/XNWindow.h b/xorg-server/hw/xnest/XNWindow.h index c620767aa..02b0f3f36 100644 --- a/xorg-server/hw/xnest/XNWindow.h +++ b/xorg-server/hw/xnest/XNWindow.h @@ -1,73 +1,74 @@ -/*
-
-Copyright 1993 by Davor Matic
-
-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. Davor Matic makes no representations about
-the suitability of this software for any purpose. It is provided "as
-is" without express or implied warranty.
-
-*/
-
-#ifndef XNESTWINDOW_H
-#define XNESTWINDOW_H
-
-typedef struct {
- Window window;
- Window parent;
- int x;
- int y;
- unsigned int width;
- unsigned int height;
- unsigned int border_width;
- Window sibling_above;
- RegionPtr bounding_shape;
- RegionPtr clip_shape;
-} xnestPrivWin;
-
-typedef struct {
- WindowPtr pWin;
- Window window;
-} xnestWindowMatch;
-
-extern DevPrivateKeyRec xnestWindowPrivateKeyRec;
-#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec)
-
-#define xnestWindowPriv(pWin) ((xnestPrivWin *) \
- dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey))
-
-#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window)
-
-#define xnestWindowParent(pWin) \
- ((pWin)->parent ? \
- xnestWindow((pWin)->parent) : \
- xnestDefaultWindows[pWin->drawable.pScreen->myNum])
-
-#define xnestWindowSiblingAbove(pWin) \
- ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None)
-
-#define xnestWindowSiblingBelow(pWin) \
- ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None)
-
-#define CWParent CWSibling
-#define CWStackingOrder CWStackMode
-
-WindowPtr xnestWindowPtr(Window window);
-Bool xnestCreateWindow(WindowPtr pWin);
-Bool xnestDestroyWindow(WindowPtr pWin);
-Bool xnestPositionWindow(WindowPtr pWin, int x, int y);
-void xnestConfigureWindow(WindowPtr pWin, unsigned int mask);
-Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
-Bool xnestRealizeWindow(WindowPtr pWin);
-Bool xnestUnrealizeWindow(WindowPtr pWin);
-void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
-void xnestClipNotify(WindowPtr pWin, int dx, int dy);
-void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
- RegionPtr other_exposed);
-void xnestSetShape(WindowPtr pWin, int kind);
-void xnestShapeWindow(WindowPtr pWin);
-
-#endif /* XNESTWINDOW_H */
+/* + +Copyright 1993 by Davor Matic + +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. Davor Matic makes no representations about +the suitability of this software for any purpose. It is provided "as +is" without express or implied warranty. + +*/ + +#ifndef XNESTWINDOW_H +#define XNESTWINDOW_H + +typedef struct { + Window window; + Window parent; + int x; + int y; + unsigned int width; + unsigned int height; + unsigned int border_width; + Window sibling_above; + RegionPtr bounding_shape; + RegionPtr clip_shape; +} xnestPrivWin; + +typedef struct { + WindowPtr pWin; + Window window; +} xnestWindowMatch; + +extern DevPrivateKeyRec xnestWindowPrivateKeyRec; + +#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec) + +#define xnestWindowPriv(pWin) ((xnestPrivWin *) \ + dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey)) + +#define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) + +#define xnestWindowParent(pWin) \ + ((pWin)->parent ? \ + xnestWindow((pWin)->parent) : \ + xnestDefaultWindows[pWin->drawable.pScreen->myNum]) + +#define xnestWindowSiblingAbove(pWin) \ + ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) + +#define xnestWindowSiblingBelow(pWin) \ + ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) + +#define CWParent CWSibling +#define CWStackingOrder CWStackMode + +WindowPtr xnestWindowPtr(Window window); +Bool xnestCreateWindow(WindowPtr pWin); +Bool xnestDestroyWindow(WindowPtr pWin); +Bool xnestPositionWindow(WindowPtr pWin, int x, int y); +void xnestConfigureWindow(WindowPtr pWin, unsigned int mask); +Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); +Bool xnestRealizeWindow(WindowPtr pWin); +Bool xnestUnrealizeWindow(WindowPtr pWin); +void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); +void xnestClipNotify(WindowPtr pWin, int dx, int dy); +void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, + RegionPtr other_exposed); +void xnestSetShape(WindowPtr pWin, int kind); +void xnestShapeWindow(WindowPtr pWin); + +#endif /* XNESTWINDOW_H */ diff --git a/xorg-server/hw/xnest/Xnest.h b/xorg-server/hw/xnest/Xnest.h index 827030c8f..adb9daf8b 100644 --- a/xorg-server/hw/xnest/Xnest.h +++ b/xorg-server/hw/xnest/Xnest.h @@ -40,6 +40,7 @@ typedef unsigned long Mask64; typedef unsigned long Atom64; typedef unsigned long VisualID64; typedef unsigned long Time64; + #define XID XID64 #define Mask Mask64 #define Atom Atom64 @@ -53,6 +54,7 @@ typedef XID Cursor64; typedef XID Colormap64; typedef XID GContext64; typedef XID KeySym64; + #define Window Window64 #define Drawable Drawable64 #define Font Font64 @@ -86,9 +88,3 @@ typedef XID KeySym64; #undef GContext #undef KeySym #endif /*_XSERVER64_tmp*/ - - - - - - diff --git a/xorg-server/hw/xnest/xnest-config.h b/xorg-server/hw/xnest/xnest-config.h index 4889f1fdd..ef48c580f 100644 --- a/xorg-server/hw/xnest/xnest-config.h +++ b/xorg-server/hw/xnest/xnest-config.h @@ -33,4 +33,4 @@ #undef MITSHM -#endif /* XNEST_CONFIG_H */ +#endif /* XNEST_CONFIG_H */ diff --git a/xorg-server/hw/xquartz/sanitizedCarbon.h b/xorg-server/hw/xquartz/sanitizedCarbon.h index cc6ef198d..2002a6c46 100644 --- a/xorg-server/hw/xquartz/sanitizedCarbon.h +++ b/xorg-server/hw/xquartz/sanitizedCarbon.h @@ -10,11 +10,11 @@ // the basic X server headers. Use QD_<name> to use the QuickDraw // definition of any of these symbols, or the normal name for the // X11 definition. -#define Cursor QD_Cursor -#define WindowPtr QD_WindowPtr -#define Picture QD_Picture -#define BOOL OSX_BOOL -#define EventType HIT_EventType +#define Cursor QD_Cursor +#define WindowPtr QD_WindowPtr +#define Picture QD_Picture +#define BOOL OSX_BOOL +#define EventType HIT_EventType #include <ApplicationServices/ApplicationServices.h> #include <CoreServices/CoreServices.h> diff --git a/xorg-server/hw/xquartz/sanitizedCocoa.h b/xorg-server/hw/xquartz/sanitizedCocoa.h index 5a2a282d1..f1f1cc2e2 100644 --- a/xorg-server/hw/xquartz/sanitizedCocoa.h +++ b/xorg-server/hw/xquartz/sanitizedCocoa.h @@ -10,11 +10,11 @@ // the basic X server headers. Use QD_<name> to use the QuickDraw // definition of any of these symbols, or the normal name for the // X11 definition. -#define Cursor QD_Cursor -#define WindowPtr QD_WindowPtr -#define Picture QD_Picture -#define BOOL OSX_BOOL -#define EventType HIT_EventType +#define Cursor QD_Cursor +#define WindowPtr QD_WindowPtr +#define Picture QD_Picture +#define BOOL OSX_BOOL +#define EventType HIT_EventType #import <Cocoa/Cocoa.h> #import <Foundation/Foundation.h> diff --git a/xorg-server/hw/xwin/winclip.c b/xorg-server/hw/xwin/winclip.c index aab7d632d..941e9483a 100644 --- a/xorg-server/hw/xwin/winclip.c +++ b/xorg-server/hw/xwin/winclip.c @@ -35,8 +35,8 @@ /* Look at mfb/mfbclip.c for sample implementation */ RegionPtr -winPixmapToRegionNativeGDI (PixmapPtr pPix) +winPixmapToRegionNativeGDI(PixmapPtr pPix) { - ErrorF ("winPixmapToRegion()\n"); - return NULL; + ErrorF("winPixmapToRegion()\n"); + return NULL; } diff --git a/xorg-server/hw/xwin/winfont.c b/xorg-server/hw/xwin/winfont.c index af3e90da5..7bcbce1c7 100644 --- a/xorg-server/hw/xwin/winfont.c +++ b/xorg-server/hw/xwin/winfont.c @@ -37,44 +37,46 @@ /* See Porting Layer Definition - p. 32 */ /* See mfb/mfbfont.c - mfbRealizeFont() - which is empty :) */ Bool -winRealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont) +winRealizeFontNativeGDI(ScreenPtr pScreen, FontPtr pFont) { - BOOL fResult = TRUE; - winScreenPriv(pScreen); - + BOOL fResult = TRUE; + + winScreenPriv(pScreen); + #if CYGDEBUG - winTrace ("winRealizeFont (%p, %p)\n", pScreen, pFont); + winTrace("winRealizeFont (%p, %p)\n", pScreen, pFont); #endif - WIN_UNWRAP(RealizeFont); - if (pScreen->RealizeFont) - fResult = (*pScreen->RealizeFont) (pScreen, pFont); - WIN_WRAP(RealizeFont, winRealizeFontNativeGDI); - - return fResult; + WIN_UNWRAP(RealizeFont); + if (pScreen->RealizeFont) + fResult = (*pScreen->RealizeFont) (pScreen, pFont); + WIN_WRAP(RealizeFont, winRealizeFontNativeGDI); + + return fResult; } /* See Porting Layer Definition - p. 32 */ /* See mfb/mfbfont.c - mfbUnrealizeFont() - which is empty :) */ Bool -winUnrealizeFontNativeGDI (ScreenPtr pScreen, FontPtr pFont) +winUnrealizeFontNativeGDI(ScreenPtr pScreen, FontPtr pFont) { - BOOL fResult = TRUE; - winScreenPriv(pScreen); - + BOOL fResult = TRUE; + + winScreenPriv(pScreen); + #if CYGDEBUG - winTrace ("winUnrealizeFont (%p, %p)\n", pScreen, pFont); + winTrace("winUnrealizeFont (%p, %p)\n", pScreen, pFont); #endif - WIN_UNWRAP(UnrealizeFont); - if (pScreen->UnrealizeFont) - fResult = (*pScreen->UnrealizeFont) (pScreen, pFont); - WIN_WRAP(UnrealizeFont, winUnrealizeFontNativeGDI); - - return fResult; + WIN_UNWRAP(UnrealizeFont); + if (pScreen->UnrealizeFont) + fResult = (*pScreen->UnrealizeFont) (pScreen, pFont); + WIN_WRAP(UnrealizeFont, winUnrealizeFontNativeGDI); + + return fResult; #if CYGDEBUG - winDebug ("winUnrealizeFont()\n"); + winDebug("winUnrealizeFont()\n"); #endif - return TRUE; + return TRUE; } #endif diff --git a/xorg-server/hw/xwin/winglobals.c b/xorg-server/hw/xwin/winglobals.c index 655cdb131..4953bd0cf 100644 --- a/xorg-server/hw/xwin/winglobals.c +++ b/xorg-server/hw/xwin/winglobals.c @@ -35,88 +35,86 @@ #endif #include "win.h" - /* * General global variables */ -int g_iNumScreens = 0; -winScreenInfo * g_ScreenInfo = 0; +int g_iNumScreens = 0; +winScreenInfo *g_ScreenInfo = 0; + #ifdef HAS_DEVWINDOWS -int g_fdMessageQueue = WIN_FD_INVALID; +int g_fdMessageQueue = WIN_FD_INVALID; #endif DevPrivateKeyRec g_iScreenPrivateKeyRec; DevPrivateKeyRec g_iCmapPrivateKeyRec; DevPrivateKeyRec g_iGCPrivateKeyRec; DevPrivateKeyRec g_iPixmapPrivateKeyRec; DevPrivateKeyRec g_iWindowPrivateKeyRec; -unsigned long g_ulServerGeneration = 0; -DWORD g_dwEnginesSupported = 0; -HINSTANCE g_hInstance = 0; -HWND g_hDlgDepthChange = NULL; -HWND g_hDlgExit = NULL; -HWND g_hDlgAbout = NULL; -const char * g_pszQueryHost = NULL; -Bool g_fXdmcpEnabled = FALSE; -Bool g_fAuthEnabled = FALSE; -HICON g_hIconX = NULL; -HICON g_hSmallIconX = NULL; +unsigned long g_ulServerGeneration = 0; +DWORD g_dwEnginesSupported = 0; +HINSTANCE g_hInstance = 0; +HWND g_hDlgDepthChange = NULL; +HWND g_hDlgExit = NULL; +HWND g_hDlgAbout = NULL; +const char *g_pszQueryHost = NULL; +Bool g_fXdmcpEnabled = FALSE; +Bool g_fAuthEnabled = FALSE; +HICON g_hIconX = NULL; +HICON g_hSmallIconX = NULL; + #ifndef RELOCATE_PROJECTROOT -const char * g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log"; +const char *g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log"; #else -const char * g_pszLogFile = "XWin.log"; -Bool g_fLogFileChanged = FALSE; +const char *g_pszLogFile = "XWin.log"; +Bool g_fLogFileChanged = FALSE; #endif -int g_iLogVerbose = 2; -Bool g_fLogInited = FALSE; -char * g_pszCommandLine = NULL; -Bool g_fSilentFatalError = FALSE; -DWORD g_dwCurrentThreadID = 0; -Bool g_fKeyboardHookLL = FALSE; -Bool g_fNoHelpMessageBox = FALSE; -Bool g_fSoftwareCursor = FALSE; -Bool g_fSilentDupError = FALSE; -Bool g_fNativeGl = FALSE; - +int g_iLogVerbose = 2; +Bool g_fLogInited = FALSE; +char *g_pszCommandLine = NULL; +Bool g_fSilentFatalError = FALSE; +DWORD g_dwCurrentThreadID = 0; +Bool g_fKeyboardHookLL = FALSE; +Bool g_fNoHelpMessageBox = FALSE; +Bool g_fSoftwareCursor = FALSE; +Bool g_fSilentDupError = FALSE; +Bool g_fNativeGl = FALSE; #ifdef XWIN_CLIPBOARD /* * Wrapped DIX functions */ -winDispatchProcPtr winProcEstablishConnectionOrig = NULL; -winDispatchProcPtr winProcQueryTreeOrig = NULL; -winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL; - +winDispatchProcPtr winProcEstablishConnectionOrig = NULL; +winDispatchProcPtr winProcQueryTreeOrig = NULL; +winDispatchProcPtr winProcSetSelectionOwnerOrig = NULL; /* * Clipboard variables */ -Bool g_fUnicodeClipboard = TRUE; -Bool g_fClipboard = TRUE; -Bool g_fClipboardLaunched = FALSE; -Bool g_fClipboardStarted = FALSE; -pthread_t g_ptClipboardProc; -HWND g_hwndClipboard = NULL; -void *g_pClipboardDisplay = NULL; -Window g_iClipboardWindow = None; -Atom g_atomLastOwnedSelection = None; +Bool g_fUnicodeClipboard = TRUE; +Bool g_fClipboard = TRUE; +Bool g_fClipboardLaunched = FALSE; +Bool g_fClipboardStarted = FALSE; +pthread_t g_ptClipboardProc; +HWND g_hwndClipboard = NULL; +void *g_pClipboardDisplay = NULL; +Window g_iClipboardWindow = None; +Atom g_atomLastOwnedSelection = None; #endif - /* * Re-initialize global variables that are invalidated * by a server reset. */ void -winInitializeGlobals (void) +winInitializeGlobals(void) { - g_dwCurrentThreadID = GetCurrentThreadId (); + g_dwCurrentThreadID = GetCurrentThreadId(); #ifdef XWIN_CLIPBOARD - g_iClipboardWindow = None; - g_pClipboardDisplay = NULL; - g_atomLastOwnedSelection = None; - g_hwndClipboard = NULL; + g_iClipboardWindow = None; + g_pClipboardDisplay = NULL; + g_atomLastOwnedSelection = None; + g_hwndClipboard = NULL; #endif } diff --git a/xorg-server/hw/xwin/winglobals.h b/xorg-server/hw/xwin/winglobals.h index 898b9388a..2edf9571e 100644 --- a/xorg-server/hw/xwin/winglobals.h +++ b/xorg-server/hw/xwin/winglobals.h @@ -1,88 +1,89 @@ -/*
- File: winglobals.h
- Purpose: declarations for global variables
-
- 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 (including the next
- paragraph) 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
- THE AUTHORS OR COPYRIGHT HOLDERS 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.
-
-*/
-
-#ifndef WINGLOBALS_H
-#define WINGLOBALS_H
-
-/*
- * References to external symbols
- */
-
-extern int g_iNumScreens;
-extern int g_iLastScreen;
-extern char * g_pszCommandLine;
-extern Bool g_fSilentFatalError;
-extern const char * g_pszLogFile;
-#ifdef RELOCATE_PROJECTROOT
-extern Bool g_fLogFileChanged;
-#endif
-extern int g_iLogVerbose;
-extern Bool g_fLogInited;
-
-extern Bool g_fAuthEnabled;
-extern Bool g_fXdmcpEnabled;
-
-extern Bool g_fNoHelpMessageBox;
-extern Bool g_fSilentDupError;
-extern Bool g_fNativeGl;
-
-extern HWND g_hDlgDepthChange;
-extern HWND g_hDlgExit;
-extern HWND g_hDlgAbout;
-
-extern Bool g_fSoftwareCursor;
-extern Bool g_fCursor;
-
-#ifdef XWIN_CLIPBOARD
-
-/* Typedef for DIX wrapper functions */
-typedef int (*winDispatchProcPtr) (ClientPtr);
-
-/*
- * Wrapped DIX functions
- */
-extern winDispatchProcPtr winProcEstablishConnectionOrig;
-extern winDispatchProcPtr winProcQueryTreeOrig;
-extern winDispatchProcPtr winProcSetSelectionOwnerOrig;
-#endif
-
-/* The global X default icons */
-#if defined(XWIN_MULTIWINDOW)
-extern HICON g_hIconX;
-extern HICON g_hSmallIconX;
-#endif
-
-#ifdef XWIN_MULTIWINDOW
-extern DWORD g_dwCurrentThreadID;
-#endif
-
-extern Bool g_fKeyboardHookLL;
-extern Bool g_fButton[3];
-
-#ifdef XWIN_MULTIWINDOWEXTWM
-extern Bool g_fNoConfigureWindow;
-#endif
-
-#endif /* WINGLOBALS_H */
+/* + File: winglobals.h + Purpose: declarations for global variables + + 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 (including the next + paragraph) 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 + THE AUTHORS OR COPYRIGHT HOLDERS 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. + +*/ + +#ifndef WINGLOBALS_H +#define WINGLOBALS_H + +/* + * References to external symbols + */ + +extern int g_iNumScreens; +extern int g_iLastScreen; +extern char *g_pszCommandLine; +extern Bool g_fSilentFatalError; +extern const char *g_pszLogFile; + +#ifdef RELOCATE_PROJECTROOT +extern Bool g_fLogFileChanged; +#endif +extern int g_iLogVerbose; +extern Bool g_fLogInited; + +extern Bool g_fAuthEnabled; +extern Bool g_fXdmcpEnabled; + +extern Bool g_fNoHelpMessageBox; +extern Bool g_fSilentDupError; +extern Bool g_fNativeGl; + +extern HWND g_hDlgDepthChange; +extern HWND g_hDlgExit; +extern HWND g_hDlgAbout; + +extern Bool g_fSoftwareCursor; +extern Bool g_fCursor; + +#ifdef XWIN_CLIPBOARD + +/* Typedef for DIX wrapper functions */ +typedef int (*winDispatchProcPtr) (ClientPtr); + +/* + * Wrapped DIX functions + */ +extern winDispatchProcPtr winProcEstablishConnectionOrig; +extern winDispatchProcPtr winProcQueryTreeOrig; +extern winDispatchProcPtr winProcSetSelectionOwnerOrig; +#endif + +/* The global X default icons */ +#if defined(XWIN_MULTIWINDOW) +extern HICON g_hIconX; +extern HICON g_hSmallIconX; +#endif + +#ifdef XWIN_MULTIWINDOW +extern DWORD g_dwCurrentThreadID; +#endif + +extern Bool g_fKeyboardHookLL; +extern Bool g_fButton[3]; + +#ifdef XWIN_MULTIWINDOWEXTWM +extern Bool g_fNoConfigureWindow; +#endif + +#endif /* WINGLOBALS_H */ diff --git a/xorg-server/hw/xwin/winkeynames.h b/xorg-server/hw/xwin/winkeynames.h index 75e172e1f..bfed9d427 100644 --- a/xorg-server/hw/xwin/winkeynames.h +++ b/xorg-server/hw/xwin/winkeynames.h @@ -60,20 +60,20 @@ * ---------------- ---------- ------- ------ ------ */ -#define KEY_Escape /* Escape 0x01 */ 1 -#define KEY_1 /* 1 ! 0x02 */ 2 -#define KEY_2 /* 2 @ 0x03 */ 3 -#define KEY_3 /* 3 # 0x04 */ 4 -#define KEY_4 /* 4 $ 0x05 */ 5 -#define KEY_5 /* 5 % 0x06 */ 6 -#define KEY_6 /* 6 ^ 0x07 */ 7 -#define KEY_7 /* 7 & 0x08 */ 8 -#define KEY_8 /* 8 * 0x09 */ 9 -#define KEY_9 /* 9 ( 0x0a */ 10 -#define KEY_0 /* 0 ) 0x0b */ 11 +#define KEY_Escape /* Escape 0x01 */ 1 +#define KEY_1 /* 1 ! 0x02 */ 2 +#define KEY_2 /* 2 @ 0x03 */ 3 +#define KEY_3 /* 3 # 0x04 */ 4 +#define KEY_4 /* 4 $ 0x05 */ 5 +#define KEY_5 /* 5 % 0x06 */ 6 +#define KEY_6 /* 6 ^ 0x07 */ 7 +#define KEY_7 /* 7 & 0x08 */ 8 +#define KEY_8 /* 8 * 0x09 */ 9 +#define KEY_9 /* 9 ( 0x0a */ 10 +#define KEY_0 /* 0 ) 0x0b */ 11 #define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12 -#define KEY_Equal /* = (Equal) + 0x0d */ 13 -#define KEY_BackSpace /* Back Space 0x0e */ 14 +#define KEY_Equal /* = (Equal) + 0x0d */ 13 +#define KEY_BackSpace /* Back Space 0x0e */ 14 #define KEY_Tab /* Tab 0x0f */ 15 #define KEY_Q /* Q 0x10 */ 16 #define KEY_W /* W 0x11 */ 17 @@ -86,12 +86,12 @@ #define KEY_O /* O 0x18 */ 24 #define KEY_P /* P 0x19 */ 25 #define KEY_LBrace /* [ { 0x1a */ 26 -#define KEY_RBrace /* ] } 0x1b */ 27 +#define KEY_RBrace /* ] } 0x1b */ 27 #define KEY_Enter /* Enter 0x1c */ 28 #define KEY_LCtrl /* Ctrl(left) 0x1d */ 29 #define KEY_A /* A 0x1e */ 30 #define KEY_S /* S 0x1f */ 31 -#define KEY_D /* D 0x20 */ 32 +#define KEY_D /* D 0x20 */ 32 #define KEY_F /* F 0x21 */ 33 #define KEY_G /* G 0x22 */ 34 #define KEY_H /* H 0x23 */ 35 @@ -130,9 +130,9 @@ #define KEY_F10 /* F10 0x44 */ 68 #define KEY_NumLock /* NumLock 0x45 */ 69 #define KEY_ScrollLock /* ScrollLock 0x46 */ 70 -#define KEY_KP_7 /* 7 Home 0x47 */ 71 -#define KEY_KP_8 /* 8 Up 0x48 */ 72 -#define KEY_KP_9 /* 9 PgUp 0x49 */ 73 +#define KEY_KP_7 /* 7 Home 0x47 */ 71 +#define KEY_KP_8 /* 8 Up 0x48 */ 72 +#define KEY_KP_9 /* 9 PgUp 0x49 */ 73 #define KEY_KP_Minus /* - (Minus) 0x4a */ 74 #define KEY_KP_4 /* 4 Left 0x4b */ 75 #define KEY_KP_5 /* 5 0x4c */ 76 @@ -142,7 +142,7 @@ #define KEY_KP_2 /* 2 Down 0x50 */ 80 #define KEY_KP_3 /* 3 PgDown 0x51 */ 81 #define KEY_KP_0 /* 0 Insert 0x52 */ 82 -#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83 +#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83 #define KEY_SysReqest /* SysReqest 0x54 */ 84 #define KEY_Fn /* Fn 0x55 */ 85 #define KEY_Less /* < (Less) >(Greater) 0x56 */ 86 @@ -203,4 +203,4 @@ #define KEY_NOTUSED 0 #define KEY_UNKNOWN 255 -#endif /* _WINKEYNAMES_H */ +#endif /* _WINKEYNAMES_H */ diff --git a/xorg-server/hw/xwin/winmessages.h b/xorg-server/hw/xwin/winmessages.h index ae50dc474..3d3fab274 100644 --- a/xorg-server/hw/xwin/winmessages.h +++ b/xorg-server/hw/xwin/winmessages.h @@ -1,1030 +1,1031 @@ #ifndef __WINMESSAGES_H__ #define __WINMESSAGES_H__ -static const unsigned MESSAGE_NAMES_LEN =1024; +static const unsigned MESSAGE_NAMES_LEN = 1024; + static const char *MESSAGE_NAMES[1024] = { - "WM_NULL", - "WM_CREATE", - "WM_DESTROY", - "WM_MOVE", - "4", - "WM_SIZE", - "WM_ACTIVATE", - "WM_SETFOCUS", - "WM_KILLFOCUS", - "9", - "WM_ENABLE", - "WM_SETREDRAW", - "WM_SETTEXT", - "WM_GETTEXT", - "WM_GETTEXTLENGTH", - "WM_PAINT", - "WM_CLOSE", - "WM_QUERYENDSESSION", - "WM_QUIT", - "WM_QUERYOPEN", - "WM_ERASEBKGND", - "WM_SYSCOLORCHANGE", - "WM_ENDSESSION", - "23", - "WM_SHOWWINDOW", - "25", - "WM_WININICHANGE", - "WM_DEVMODECHANGE", - "WM_ACTIVATEAPP", - "WM_FONTCHANGE", - "WM_TIMECHANGE", - "WM_CANCELMODE", - NULL /* WM_SETCURSOR */, - "WM_MOUSEACTIVATE", - "WM_CHILDACTIVATE", - "WM_QUEUESYNC", - "WM_GETMINMAXINFO", - "37", - "WM_PAINTICON", - "WM_ICONERASEBKGND", - "WM_NEXTDLGCTL", - "41", - "WM_SPOOLERSTATUS", - "WM_DRAWITEM", - "WM_MEASUREITEM", - "WM_DELETEITEM", - "WM_VKEYTOITEM", - "WM_CHARTOITEM", - "WM_SETFONT", - "WM_GETFONT", - "WM_SETHOTKEY", - "WM_GETHOTKEY", - "52", - "53", - "54", - "WM_QUERYDRAGICON", - "56", - "WM_COMPAREITEM", - "58", - "59", - "60", - "61", - "62", - "63", - "64", - "WM_COMPACTING", - "66", - "67", - "WM_COMMNOTIFY", - "69", - "WM_WINDOWPOSCHANGING", - "WM_WINDOWPOSCHANGED", - "WM_POWER", - "73", - "WM_COPYDATA", - "WM_CANCELJOURNAL", - "76", - "77", - "WM_NOTIFY", - "79", - "WM_INPUTLANGCHANGEREQUEST", - "WM_INPUTLANGCHANGE", - "WM_TCARD", - "WM_HELP", - "WM_USERCHANGED", - "WM_NOTIFYFORMAT", - "86", - "87", - "88", - "89", - "90", - "91", - "92", - "93", - "94", - "95", - "96", - "97", - "98", - "99", - "100", - "101", - "102", - "103", - "104", - "105", - "106", - "107", - "108", - "109", - "110", - "111", - "112", - "113", - "114", - "115", - "116", - "117", - "118", - "119", - "120", - "121", - "122", - "WM_CONTEXTMENU", - "WM_STYLECHANGING", - "WM_STYLECHANGED", - "WM_DISPLAYCHANGE", - "WM_GETICON", - "WM_SETICON", - "WM_NCCREATE", - "WM_NCDESTROY", - "WM_NCCALCSIZE", - NULL /* WM_NCHITTEST */, - "WM_NCPAINT", - "WM_NCACTIVATE", - "WM_GETDLGCODE", - "WM_SYNCPAINT", - "137", - "138", - "139", - "140", - "141", - "142", - "143", - "144", - "145", - "146", - "147", - "148", - "149", - "150", - "151", - "152", - "153", - "154", - "155", - "156", - "157", - "158", - "159", - NULL /* WM_NCMOUSEMOVE */, - "WM_NCLBUTTONDOWN", - "WM_NCLBUTTONUP", - "WM_NCLBUTTONDBLCLK", - "WM_NCRBUTTONDOWN", - "WM_NCRBUTTONUP", - "WM_NCRBUTTONDBLCLK", - "WM_NCMBUTTONDOWN", - "WM_NCMBUTTONUP", - "WM_NCMBUTTONDBLCLK", - "170", - "171", - "172", - "173", - "174", - "175", - "176", - "177", - "178", - "179", - "180", - "181", - "182", - "183", - "184", - "185", - "186", - "187", - "188", - "189", - "190", - "191", - "192", - "193", - "194", - "195", - "196", - "197", - "198", - "199", - "200", - "201", - "202", - "203", - "204", - "205", - "206", - "207", - "208", - "209", - "210", - "211", - "212", - "213", - "214", - "215", - "216", - "217", - "218", - "219", - "220", - "221", - "222", - "223", - "224", - "225", - "226", - "227", - "228", - "229", - "230", - "231", - "232", - "233", - "234", - "235", - "236", - "237", - "238", - "239", - "240", - "241", - "242", - "243", - "244", - "245", - "246", - "247", - "248", - "249", - "250", - "251", - "252", - "253", - "254", - "255", - "WM_KEYDOWN", - "WM_KEYUP", - "WM_CHAR", - "WM_DEADCHAR", - "WM_SYSKEYDOWN", - "WM_SYSKEYUP", - "WM_SYSCHAR", - "WM_SYSDEADCHAR", - "WM_CONVERTREQUESTEX", - "265", - "266", - "267", - "268", - "WM_IME_STARTCOMPOSITION", - "WM_IME_ENDCOMPOSITION", - "WM_IME_KEYLAST", - "WM_INITDIALOG", - "WM_COMMAND", - "WM_SYSCOMMAND", - NULL /* WM_TIMER */, - "WM_HSCROLL", - "WM_VSCROLL", - "WM_INITMENU", - "WM_INITMENUPOPUP", - "280", - "281", - "282", - "283", - "284", - "285", - "286", - "WM_MENUSELECT", - "WM_MENUCHAR", - "WM_ENTERIDLE", - "290", - "291", - "292", - "293", - "294", - "295", - "296", - "297", - "298", - "299", - "300", - "301", - "302", - "303", - "304", - "305", - "WM_CTLCOLORMSGBOX", - "WM_CTLCOLOREDIT", - "WM_CTLCOLORLISTBOX", - "WM_CTLCOLORBTN", - "WM_CTLCOLORDLG", - "WM_CTLCOLORSCROLLBAR", - "WM_CTLCOLORSTATIC", - "313", - "314", - "315", - "316", - "317", - "318", - "319", - "320", - "321", - "322", - "323", - "324", - "325", - "326", - "327", - "328", - "329", - "330", - "331", - "332", - "333", - "334", - "335", - "336", - "337", - "338", - "339", - "340", - "341", - "342", - "343", - "344", - "345", - "346", - "347", - "348", - "349", - "350", - "351", - "352", - "353", - "354", - "355", - "356", - "357", - "358", - "359", - "360", - "361", - "362", - "363", - "364", - "365", - "366", - "367", - "368", - "369", - "370", - "371", - "372", - "373", - "374", - "375", - "376", - "377", - "378", - "379", - "380", - "381", - "382", - "383", - "384", - "385", - "386", - "387", - "388", - "389", - "390", - "391", - "392", - "393", - "394", - "395", - "396", - "397", - "398", - "399", - "400", - "401", - "402", - "403", - "404", - "405", - "406", - "407", - "408", - "409", - "410", - "411", - "412", - "413", - "414", - "415", - "416", - "417", - "418", - "419", - "420", - "421", - "422", - "423", - "424", - "425", - "426", - "427", - "428", - "429", - "430", - "431", - "432", - "433", - "434", - "435", - "436", - "437", - "438", - "439", - "440", - "441", - "442", - "443", - "444", - "445", - "446", - "447", - "448", - "449", - "450", - "451", - "452", - "453", - "454", - "455", - "456", - "457", - "458", - "459", - "460", - "461", - "462", - "463", - "464", - "465", - "466", - "467", - "468", - "469", - "470", - "471", - "472", - "473", - "474", - "475", - "476", - "477", - "478", - "479", - "480", - "481", - "482", - "483", - "484", - "485", - "486", - "487", - "488", - "489", - "490", - "491", - "492", - "493", - "494", - "495", - "496", - "497", - "498", - "499", - "500", - "501", - "502", - "503", - "504", - "505", - "506", - "507", - "508", - "509", - "510", - "511", - NULL /* WM_MOUSEMOVE */, - "WM_LBUTTONDOWN", - "WM_LBUTTONUP", - "WM_LBUTTONDBLCLK", - "WM_RBUTTONDOWN", - "WM_RBUTTONUP", - "WM_RBUTTONDBLCLK", - "WM_MBUTTONDOWN", - "WM_MBUTTONUP", - "WM_MBUTTONDBLCLK", - "WM_MOUSEWHEEL", - "WM_XBUTTONDOWN", - "WM_XBUTTONUP", - "WM_XBUTTONDBLCLK", - "526", - "527", - "WM_PARENTNOTIFY", - "WM_ENTERMENULOOP", - "WM_EXITMENULOOP", - "WM_NEXTMENU", - "WM_SIZING", - "WM_CAPTURECHANGED", - "WM_MOVING", - "535", - "WM_POWERBROADCAST", - "WM_DEVICECHANGE", - "538", - "539", - "540", - "541", - "542", - "543", - "WM_MDICREATE", - "WM_MDIDESTROY", - "WM_MDIACTIVATE", - "WM_MDIRESTORE", - "WM_MDINEXT", - "WM_MDIMAXIMIZE", - "WM_MDITILE", - "WM_MDICASCADE", - "WM_MDIICONARRANGE", - "WM_MDIGETACTIVE", - "554", - "555", - "556", - "557", - "558", - "559", - "WM_MDISETMENU", - "WM_ENTERSIZEMOVE", - "WM_EXITSIZEMOVE", - "WM_DROPFILES", - "WM_MDIREFRESHMENU", - "565", - "566", - "567", - "568", - "569", - "570", - "571", - "572", - "573", - "574", - "575", - "576", - "577", - "578", - "579", - "580", - "581", - "582", - "583", - "584", - "585", - "586", - "587", - "588", - "589", - "590", - "591", - "592", - "593", - "594", - "595", - "596", - "597", - "598", - "599", - "600", - "601", - "602", - "603", - "604", - "605", - "606", - "607", - "608", - "609", - "610", - "611", - "612", - "613", - "614", - "615", - "616", - "617", - "618", - "619", - "620", - "621", - "622", - "623", - "624", - "625", - "626", - "627", - "628", - "629", - "630", - "631", - "632", - "633", - "634", - "635", - "636", - "637", - "638", - "639", - "640", - "WM_IME_SETCONTEXT", - "WM_IME_NOTIFY", - "WM_IME_CONTROL", - "WM_IME_COMPOSITIONFULL", - "WM_IME_SELECT", - "WM_IME_CHAR", - "647", - "648", - "649", - "650", - "651", - "652", - "653", - "654", - "655", - "WM_IME_KEYDOWN", - "WM_IME_KEYUP", - "658", - "659", - "660", - "661", - "662", - "663", - "664", - "665", - "666", - "667", - "668", - "669", - "670", - "671", - "672", - "WM_MOUSEHOVER", - "674", - "WM_MOUSELEAVE", - "676", - "677", - "678", - "679", - "680", - "681", - "682", - "683", - "684", - "685", - "686", - "687", - "688", - "689", - "690", - "691", - "692", - "693", - "694", - "695", - "696", - "697", - "698", - "699", - "700", - "701", - "702", - "703", - "704", - "705", - "706", - "707", - "708", - "709", - "710", - "711", - "712", - "713", - "714", - "715", - "716", - "717", - "718", - "719", - "720", - "721", - "722", - "723", - "724", - "725", - "726", - "727", - "728", - "729", - "730", - "731", - "732", - "733", - "734", - "735", - "736", - "737", - "738", - "739", - "740", - "741", - "742", - "743", - "744", - "745", - "746", - "747", - "748", - "749", - "750", - "751", - "752", - "753", - "754", - "755", - "756", - "757", - "758", - "759", - "760", - "761", - "762", - "763", - "764", - "765", - "766", - "767", - "WM_CUT", - "WM_COPY", - "WM_PASTE", - "WM_CLEAR", - "WM_UNDO", - "WM_RENDERFORMAT", - "WM_RENDERALLFORMATS", - "WM_DESTROYCLIPBOARD", - "WM_DRAWCLIPBOARD", - "WM_PAINTCLIPBOARD", - "WM_VSCROLLCLIPBOARD", - "WM_SIZECLIPBOARD", - "WM_ASKCBFORMATNAME", - "WM_CHANGECBCHAIN", - "WM_HSCROLLCLIPBOARD", - "WM_QUERYNEWPALETTE", - "WM_PALETTEISCHANGING", - "WM_PALETTECHANGED", - "WM_HOTKEY", - "787", - "788", - "789", - "790", - "WM_PRINT", - "WM_PRINTCLIENT", - "793", - "794", - "795", - "796", - "797", - "798", - "799", - "800", - "801", - "802", - "803", - "804", - "805", - "806", - "807", - "808", - "809", - "810", - "811", - "812", - "813", - "814", - "815", - "816", - "817", - "818", - "819", - "820", - "821", - "822", - "823", - "824", - "825", - "826", - "827", - "828", - "829", - "830", - "831", - "832", - "833", - "834", - "835", - "836", - "837", - "838", - "839", - "840", - "841", - "842", - "843", - "844", - "845", - "846", - "847", - "848", - "849", - "850", - "851", - "852", - "853", - "854", - "855", - "856", - "857", - "858", - "859", - "860", - "861", - "862", - "863", - "864", - "865", - "866", - "867", - "868", - "869", - "870", - "871", - "872", - "873", - "874", - "875", - "876", - "877", - "878", - "879", - "880", - "881", - "882", - "883", - "884", - "885", - "886", - "887", - "888", - "889", - "890", - "891", - "892", - "893", - "894", - "895", - "896", - "897", - "898", - "899", - "900", - "901", - "902", - "903", - "904", - "905", - "906", - "907", - "908", - "909", - "910", - "911", - "912", - "913", - "914", - "915", - "916", - "917", - "918", - "919", - "920", - "921", - "922", - "923", - "924", - "925", - "926", - "927", - "928", - "929", - "930", - "931", - "932", - "933", - "934", - "935", - "936", - "937", - "938", - "939", - "940", - "941", - "942", - "943", - "944", - "945", - "946", - "947", - "948", - "949", - "950", - "951", - "952", - "953", - "954", - "955", - "956", - "957", - "958", - "959", - "960", - "961", - "962", - "963", - "964", - "965", - "966", - "967", - "968", - "969", - "970", - "971", - "972", - "973", - "974", - "975", - "976", - "977", - "978", - "979", - "980", - "981", - "982", - "983", - "984", - "985", - "986", - "987", - "988", - "989", - "990", - "991", - "992", - "993", - "994", - "995", - "996", - "997", - "998", - "999", - "1000", - "1001", - "1002", - "1003", - "1004", - "1005", - "1006", - "1007", - "1008", - "1009", - "1010", - "1011", - "1012", - "1013", - "1014", - "1015", - "1016", - "1017", - "1018", - "1019", - "1020", - "1021", - "1022", - "1023" + "WM_NULL", + "WM_CREATE", + "WM_DESTROY", + "WM_MOVE", + "4", + "WM_SIZE", + "WM_ACTIVATE", + "WM_SETFOCUS", + "WM_KILLFOCUS", + "9", + "WM_ENABLE", + "WM_SETREDRAW", + "WM_SETTEXT", + "WM_GETTEXT", + "WM_GETTEXTLENGTH", + "WM_PAINT", + "WM_CLOSE", + "WM_QUERYENDSESSION", + "WM_QUIT", + "WM_QUERYOPEN", + "WM_ERASEBKGND", + "WM_SYSCOLORCHANGE", + "WM_ENDSESSION", + "23", + "WM_SHOWWINDOW", + "25", + "WM_WININICHANGE", + "WM_DEVMODECHANGE", + "WM_ACTIVATEAPP", + "WM_FONTCHANGE", + "WM_TIMECHANGE", + "WM_CANCELMODE", + NULL /* WM_SETCURSOR */ , + "WM_MOUSEACTIVATE", + "WM_CHILDACTIVATE", + "WM_QUEUESYNC", + "WM_GETMINMAXINFO", + "37", + "WM_PAINTICON", + "WM_ICONERASEBKGND", + "WM_NEXTDLGCTL", + "41", + "WM_SPOOLERSTATUS", + "WM_DRAWITEM", + "WM_MEASUREITEM", + "WM_DELETEITEM", + "WM_VKEYTOITEM", + "WM_CHARTOITEM", + "WM_SETFONT", + "WM_GETFONT", + "WM_SETHOTKEY", + "WM_GETHOTKEY", + "52", + "53", + "54", + "WM_QUERYDRAGICON", + "56", + "WM_COMPAREITEM", + "58", + "59", + "60", + "61", + "62", + "63", + "64", + "WM_COMPACTING", + "66", + "67", + "WM_COMMNOTIFY", + "69", + "WM_WINDOWPOSCHANGING", + "WM_WINDOWPOSCHANGED", + "WM_POWER", + "73", + "WM_COPYDATA", + "WM_CANCELJOURNAL", + "76", + "77", + "WM_NOTIFY", + "79", + "WM_INPUTLANGCHANGEREQUEST", + "WM_INPUTLANGCHANGE", + "WM_TCARD", + "WM_HELP", + "WM_USERCHANGED", + "WM_NOTIFYFORMAT", + "86", + "87", + "88", + "89", + "90", + "91", + "92", + "93", + "94", + "95", + "96", + "97", + "98", + "99", + "100", + "101", + "102", + "103", + "104", + "105", + "106", + "107", + "108", + "109", + "110", + "111", + "112", + "113", + "114", + "115", + "116", + "117", + "118", + "119", + "120", + "121", + "122", + "WM_CONTEXTMENU", + "WM_STYLECHANGING", + "WM_STYLECHANGED", + "WM_DISPLAYCHANGE", + "WM_GETICON", + "WM_SETICON", + "WM_NCCREATE", + "WM_NCDESTROY", + "WM_NCCALCSIZE", + NULL /* WM_NCHITTEST */ , + "WM_NCPAINT", + "WM_NCACTIVATE", + "WM_GETDLGCODE", + "WM_SYNCPAINT", + "137", + "138", + "139", + "140", + "141", + "142", + "143", + "144", + "145", + "146", + "147", + "148", + "149", + "150", + "151", + "152", + "153", + "154", + "155", + "156", + "157", + "158", + "159", + NULL /* WM_NCMOUSEMOVE */ , + "WM_NCLBUTTONDOWN", + "WM_NCLBUTTONUP", + "WM_NCLBUTTONDBLCLK", + "WM_NCRBUTTONDOWN", + "WM_NCRBUTTONUP", + "WM_NCRBUTTONDBLCLK", + "WM_NCMBUTTONDOWN", + "WM_NCMBUTTONUP", + "WM_NCMBUTTONDBLCLK", + "170", + "171", + "172", + "173", + "174", + "175", + "176", + "177", + "178", + "179", + "180", + "181", + "182", + "183", + "184", + "185", + "186", + "187", + "188", + "189", + "190", + "191", + "192", + "193", + "194", + "195", + "196", + "197", + "198", + "199", + "200", + "201", + "202", + "203", + "204", + "205", + "206", + "207", + "208", + "209", + "210", + "211", + "212", + "213", + "214", + "215", + "216", + "217", + "218", + "219", + "220", + "221", + "222", + "223", + "224", + "225", + "226", + "227", + "228", + "229", + "230", + "231", + "232", + "233", + "234", + "235", + "236", + "237", + "238", + "239", + "240", + "241", + "242", + "243", + "244", + "245", + "246", + "247", + "248", + "249", + "250", + "251", + "252", + "253", + "254", + "255", + "WM_KEYDOWN", + "WM_KEYUP", + "WM_CHAR", + "WM_DEADCHAR", + "WM_SYSKEYDOWN", + "WM_SYSKEYUP", + "WM_SYSCHAR", + "WM_SYSDEADCHAR", + "WM_CONVERTREQUESTEX", + "265", + "266", + "267", + "268", + "WM_IME_STARTCOMPOSITION", + "WM_IME_ENDCOMPOSITION", + "WM_IME_KEYLAST", + "WM_INITDIALOG", + "WM_COMMAND", + "WM_SYSCOMMAND", + NULL /* WM_TIMER */ , + "WM_HSCROLL", + "WM_VSCROLL", + "WM_INITMENU", + "WM_INITMENUPOPUP", + "280", + "281", + "282", + "283", + "284", + "285", + "286", + "WM_MENUSELECT", + "WM_MENUCHAR", + "WM_ENTERIDLE", + "290", + "291", + "292", + "293", + "294", + "295", + "296", + "297", + "298", + "299", + "300", + "301", + "302", + "303", + "304", + "305", + "WM_CTLCOLORMSGBOX", + "WM_CTLCOLOREDIT", + "WM_CTLCOLORLISTBOX", + "WM_CTLCOLORBTN", + "WM_CTLCOLORDLG", + "WM_CTLCOLORSCROLLBAR", + "WM_CTLCOLORSTATIC", + "313", + "314", + "315", + "316", + "317", + "318", + "319", + "320", + "321", + "322", + "323", + "324", + "325", + "326", + "327", + "328", + "329", + "330", + "331", + "332", + "333", + "334", + "335", + "336", + "337", + "338", + "339", + "340", + "341", + "342", + "343", + "344", + "345", + "346", + "347", + "348", + "349", + "350", + "351", + "352", + "353", + "354", + "355", + "356", + "357", + "358", + "359", + "360", + "361", + "362", + "363", + "364", + "365", + "366", + "367", + "368", + "369", + "370", + "371", + "372", + "373", + "374", + "375", + "376", + "377", + "378", + "379", + "380", + "381", + "382", + "383", + "384", + "385", + "386", + "387", + "388", + "389", + "390", + "391", + "392", + "393", + "394", + "395", + "396", + "397", + "398", + "399", + "400", + "401", + "402", + "403", + "404", + "405", + "406", + "407", + "408", + "409", + "410", + "411", + "412", + "413", + "414", + "415", + "416", + "417", + "418", + "419", + "420", + "421", + "422", + "423", + "424", + "425", + "426", + "427", + "428", + "429", + "430", + "431", + "432", + "433", + "434", + "435", + "436", + "437", + "438", + "439", + "440", + "441", + "442", + "443", + "444", + "445", + "446", + "447", + "448", + "449", + "450", + "451", + "452", + "453", + "454", + "455", + "456", + "457", + "458", + "459", + "460", + "461", + "462", + "463", + "464", + "465", + "466", + "467", + "468", + "469", + "470", + "471", + "472", + "473", + "474", + "475", + "476", + "477", + "478", + "479", + "480", + "481", + "482", + "483", + "484", + "485", + "486", + "487", + "488", + "489", + "490", + "491", + "492", + "493", + "494", + "495", + "496", + "497", + "498", + "499", + "500", + "501", + "502", + "503", + "504", + "505", + "506", + "507", + "508", + "509", + "510", + "511", + NULL /* WM_MOUSEMOVE */ , + "WM_LBUTTONDOWN", + "WM_LBUTTONUP", + "WM_LBUTTONDBLCLK", + "WM_RBUTTONDOWN", + "WM_RBUTTONUP", + "WM_RBUTTONDBLCLK", + "WM_MBUTTONDOWN", + "WM_MBUTTONUP", + "WM_MBUTTONDBLCLK", + "WM_MOUSEWHEEL", + "WM_XBUTTONDOWN", + "WM_XBUTTONUP", + "WM_XBUTTONDBLCLK", + "526", + "527", + "WM_PARENTNOTIFY", + "WM_ENTERMENULOOP", + "WM_EXITMENULOOP", + "WM_NEXTMENU", + "WM_SIZING", + "WM_CAPTURECHANGED", + "WM_MOVING", + "535", + "WM_POWERBROADCAST", + "WM_DEVICECHANGE", + "538", + "539", + "540", + "541", + "542", + "543", + "WM_MDICREATE", + "WM_MDIDESTROY", + "WM_MDIACTIVATE", + "WM_MDIRESTORE", + "WM_MDINEXT", + "WM_MDIMAXIMIZE", + "WM_MDITILE", + "WM_MDICASCADE", + "WM_MDIICONARRANGE", + "WM_MDIGETACTIVE", + "554", + "555", + "556", + "557", + "558", + "559", + "WM_MDISETMENU", + "WM_ENTERSIZEMOVE", + "WM_EXITSIZEMOVE", + "WM_DROPFILES", + "WM_MDIREFRESHMENU", + "565", + "566", + "567", + "568", + "569", + "570", + "571", + "572", + "573", + "574", + "575", + "576", + "577", + "578", + "579", + "580", + "581", + "582", + "583", + "584", + "585", + "586", + "587", + "588", + "589", + "590", + "591", + "592", + "593", + "594", + "595", + "596", + "597", + "598", + "599", + "600", + "601", + "602", + "603", + "604", + "605", + "606", + "607", + "608", + "609", + "610", + "611", + "612", + "613", + "614", + "615", + "616", + "617", + "618", + "619", + "620", + "621", + "622", + "623", + "624", + "625", + "626", + "627", + "628", + "629", + "630", + "631", + "632", + "633", + "634", + "635", + "636", + "637", + "638", + "639", + "640", + "WM_IME_SETCONTEXT", + "WM_IME_NOTIFY", + "WM_IME_CONTROL", + "WM_IME_COMPOSITIONFULL", + "WM_IME_SELECT", + "WM_IME_CHAR", + "647", + "648", + "649", + "650", + "651", + "652", + "653", + "654", + "655", + "WM_IME_KEYDOWN", + "WM_IME_KEYUP", + "658", + "659", + "660", + "661", + "662", + "663", + "664", + "665", + "666", + "667", + "668", + "669", + "670", + "671", + "672", + "WM_MOUSEHOVER", + "674", + "WM_MOUSELEAVE", + "676", + "677", + "678", + "679", + "680", + "681", + "682", + "683", + "684", + "685", + "686", + "687", + "688", + "689", + "690", + "691", + "692", + "693", + "694", + "695", + "696", + "697", + "698", + "699", + "700", + "701", + "702", + "703", + "704", + "705", + "706", + "707", + "708", + "709", + "710", + "711", + "712", + "713", + "714", + "715", + "716", + "717", + "718", + "719", + "720", + "721", + "722", + "723", + "724", + "725", + "726", + "727", + "728", + "729", + "730", + "731", + "732", + "733", + "734", + "735", + "736", + "737", + "738", + "739", + "740", + "741", + "742", + "743", + "744", + "745", + "746", + "747", + "748", + "749", + "750", + "751", + "752", + "753", + "754", + "755", + "756", + "757", + "758", + "759", + "760", + "761", + "762", + "763", + "764", + "765", + "766", + "767", + "WM_CUT", + "WM_COPY", + "WM_PASTE", + "WM_CLEAR", + "WM_UNDO", + "WM_RENDERFORMAT", + "WM_RENDERALLFORMATS", + "WM_DESTROYCLIPBOARD", + "WM_DRAWCLIPBOARD", + "WM_PAINTCLIPBOARD", + "WM_VSCROLLCLIPBOARD", + "WM_SIZECLIPBOARD", + "WM_ASKCBFORMATNAME", + "WM_CHANGECBCHAIN", + "WM_HSCROLLCLIPBOARD", + "WM_QUERYNEWPALETTE", + "WM_PALETTEISCHANGING", + "WM_PALETTECHANGED", + "WM_HOTKEY", + "787", + "788", + "789", + "790", + "WM_PRINT", + "WM_PRINTCLIENT", + "793", + "794", + "795", + "796", + "797", + "798", + "799", + "800", + "801", + "802", + "803", + "804", + "805", + "806", + "807", + "808", + "809", + "810", + "811", + "812", + "813", + "814", + "815", + "816", + "817", + "818", + "819", + "820", + "821", + "822", + "823", + "824", + "825", + "826", + "827", + "828", + "829", + "830", + "831", + "832", + "833", + "834", + "835", + "836", + "837", + "838", + "839", + "840", + "841", + "842", + "843", + "844", + "845", + "846", + "847", + "848", + "849", + "850", + "851", + "852", + "853", + "854", + "855", + "856", + "857", + "858", + "859", + "860", + "861", + "862", + "863", + "864", + "865", + "866", + "867", + "868", + "869", + "870", + "871", + "872", + "873", + "874", + "875", + "876", + "877", + "878", + "879", + "880", + "881", + "882", + "883", + "884", + "885", + "886", + "887", + "888", + "889", + "890", + "891", + "892", + "893", + "894", + "895", + "896", + "897", + "898", + "899", + "900", + "901", + "902", + "903", + "904", + "905", + "906", + "907", + "908", + "909", + "910", + "911", + "912", + "913", + "914", + "915", + "916", + "917", + "918", + "919", + "920", + "921", + "922", + "923", + "924", + "925", + "926", + "927", + "928", + "929", + "930", + "931", + "932", + "933", + "934", + "935", + "936", + "937", + "938", + "939", + "940", + "941", + "942", + "943", + "944", + "945", + "946", + "947", + "948", + "949", + "950", + "951", + "952", + "953", + "954", + "955", + "956", + "957", + "958", + "959", + "960", + "961", + "962", + "963", + "964", + "965", + "966", + "967", + "968", + "969", + "970", + "971", + "972", + "973", + "974", + "975", + "976", + "977", + "978", + "979", + "980", + "981", + "982", + "983", + "984", + "985", + "986", + "987", + "988", + "989", + "990", + "991", + "992", + "993", + "994", + "995", + "996", + "997", + "998", + "999", + "1000", + "1001", + "1002", + "1003", + "1004", + "1005", + "1006", + "1007", + "1008", + "1009", + "1010", + "1011", + "1012", + "1013", + "1014", + "1015", + "1016", + "1017", + "1018", + "1019", + "1020", + "1021", + "1022", + "1023" }; #endif diff --git a/xorg-server/hw/xwin/winmonitors.h b/xorg-server/hw/xwin/winmonitors.h index 180566b00..acef48274 100644 --- a/xorg-server/hw/xwin/winmonitors.h +++ b/xorg-server/hw/xwin/winmonitors.h @@ -1,14 +1,14 @@ /* data returned for monitor information */ struct GetMonitorInfoData { - int requestedMonitor; - int monitorNum; + int requestedMonitor; + int monitorNum; Bool bUserSpecifiedMonitor; Bool bMonitorSpecifiedExists; - int monitorOffsetX; - int monitorOffsetY; - int monitorHeight; - int monitorWidth; + int monitorOffsetX; + int monitorOffsetY; + int monitorHeight; + int monitorWidth; }; Bool QueryMonitor(int index, struct GetMonitorInfoData *data); diff --git a/xorg-server/hw/xwin/winms.h b/xorg-server/hw/xwin/winms.h index 60f7eb906..4355baeb8 100644 --- a/xorg-server/hw/xwin/winms.h +++ b/xorg-server/hw/xwin/winms.h @@ -46,4 +46,4 @@ #undef CreateWindow -#endif /* _WINMS_H_ */ +#endif /* _WINMS_H_ */ diff --git a/xorg-server/hw/xwin/winmultiwindowclass.h b/xorg-server/hw/xwin/winmultiwindowclass.h index 1c9a5e52d..0e3465c78 100644 --- a/xorg-server/hw/xwin/winmultiwindowclass.h +++ b/xorg-server/hw/xwin/winmultiwindowclass.h @@ -35,16 +35,16 @@ */ typedef struct { - long flags; /* marks which fields in this structure are defined */ - Bool input; /* does this application rely on the window manager to - get keyboard input? */ - int initial_state; /* see below */ - Pixmap icon_pixmap; /* pixmap to be used as icon */ - Window icon_window; /* window to be used as icon */ - int icon_x, icon_y; /* initial position of icon */ - Pixmap icon_mask; /* icon mask bitmap */ - XID window_group; /* id of related window group */ - /* this structure may be extended in the future */ + long flags; /* marks which fields in this structure are defined */ + Bool input; /* does this application rely on the window manager to + get keyboard input? */ + int initial_state; /* see below */ + Pixmap icon_pixmap; /* pixmap to be used as icon */ + Window icon_window; /* window to be used as icon */ + int icon_x, icon_y; /* initial position of icon */ + Pixmap icon_mask; /* icon mask bitmap */ + XID window_group; /* id of related window group */ + /* this structure may be extended in the future */ } WinXWMHints; /* Window manager hints mask bits */ @@ -63,18 +63,18 @@ typedef struct { * used with WM_NORMAL_HINTS. */ typedef struct { - long flags; /* marks which fields in this structure are defined */ - int x, y; /* obsolete for new window mgrs, but clients */ - int width, height; /* should set so old wm's don't mess up */ - int min_width, min_height; - int max_width, max_height; - int width_inc, height_inc; - struct { - int x; /* numerator */ - int y; /* denominator */ - } min_aspect, max_aspect; - int base_width, base_height; /* added by ICCCM version 1 */ - int win_gravity; /* added by ICCCM version 1 */ + long flags; /* marks which fields in this structure are defined */ + int x, y; /* obsolete for new window mgrs, but clients */ + int width, height; /* should set so old wm's don't mess up */ + int min_width, min_height; + int max_width, max_height; + int width_inc, height_inc; + struct { + int x; /* numerator */ + int y; /* denominator */ + } min_aspect, max_aspect; + int base_width, base_height; /* added by ICCCM version 1 */ + int win_gravity; /* added by ICCCM version 1 */ } WinXSizeHints; /* @@ -83,42 +83,41 @@ typedef struct { */ /* flags argument in size hints */ -#define USPosition (1L << 0) /* user specified x, y */ -#define USSize (1L << 1) /* user specified width, height */ - -#define PPosition (1L << 2) /* program specified position */ -#define PSize (1L << 3) /* program specified size */ -#define PMinSize (1L << 4) /* program specified minimum size */ -#define PMaxSize (1L << 5) /* program specified maximum size */ -#define PResizeInc (1L << 6) /* program specified resize increments */ -#define PAspect (1L << 7) /* program specified min and max aspect ratios */ -#define PBaseSize (1L << 8) /* program specified base for incrementing */ -#define PWinGravity (1L << 9) /* program specified window gravity */ +#define USPosition (1L << 0) /* user specified x, y */ +#define USSize (1L << 1) /* user specified width, height */ + +#define PPosition (1L << 2) /* program specified position */ +#define PSize (1L << 3) /* program specified size */ +#define PMinSize (1L << 4) /* program specified minimum size */ +#define PMaxSize (1L << 5) /* program specified maximum size */ +#define PResizeInc (1L << 6) /* program specified resize increments */ +#define PAspect (1L << 7) /* program specified min and max aspect ratios */ +#define PBaseSize (1L << 8) /* program specified base for incrementing */ +#define PWinGravity (1L << 9) /* program specified window gravity */ /* obsolete */ #define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) - /* * Function prototypes */ int -winMultiWindowGetWMHints (WindowPtr pWin, WinXWMHints *hints); + winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints); int -winMultiWindowGetClassHint (WindowPtr pWin, char **res_name, char **res_class); + winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class); int -winMultiWindowGetWindowRole (WindowPtr pWin, char **res_role); + winMultiWindowGetWindowRole(WindowPtr pWin, char **res_role); int -winMultiWindowGetWMNormalHints (WindowPtr pWin, WinXSizeHints *hints); + winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints); int -winMultiWindowGetWMName (WindowPtr pWin, char **wmName); + winMultiWindowGetWMName(WindowPtr pWin, char **wmName); int -winMultiWindowGetTransientFor (WindowPtr pWin, WindowPtr *ppDaddy); + winMultiWindowGetTransientFor(WindowPtr pWin, WindowPtr *ppDaddy); #endif diff --git a/xorg-server/hw/xwin/winresource.h b/xorg-server/hw/xwin/winresource.h index 7085117e6..a14d402e1 100644 --- a/xorg-server/hw/xwin/winresource.h +++ b/xorg-server/hw/xwin/winresource.h @@ -30,7 +30,6 @@ * Authors: Harold L Hunt II */ - /* * Local defines */ @@ -40,7 +39,6 @@ #define IDM_TRAYICON_MENU 103 #define IDC_CLIENTS_CONNECTED 104 - #define ID_APP_EXIT 200 #define ID_APP_HIDE_ROOT 201 #define ID_APP_ALWAYS_ON_TOP 202 |