diff --git a/dbe/dbe.c b/dbe/dbe.c index 178c1c47fc..59beab761c 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -30,8 +30,6 @@ * *****************************************************************************/ -/* INCLUDES */ - #include #include @@ -90,9 +88,8 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens) pDbeScreenPriv->WinPrivDelete = NULL; (*nStubbedScreens)++; +} -} /* DbeStubScreen() */ - /****************************************************************************** * * DBE DIX Procedure: ProcDbeGetVersion @@ -239,17 +236,14 @@ ProcDbeAllocateBackBufferName(ClientPtr client) /* Actually connect the window priv to the window. */ dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, pDbeWindowPriv); - - } /* if -- There is no buffer associated with the window. */ - - else { - int i=0; + } else { /* A buffer is already associated with the window. * Add the new buffer ID to the array, reallocating the array memory * if necessary. */ /* Determine if there is a free element in the ID array. */ + int i=0; for (i = 0; i < pDbeWindowPriv->maxAvailableIDs; i++) { if (pDbeWindowPriv->IDs[i] == DBE_FREE_ID_ELEMENT) { /* There is still room in the ID array. */ @@ -296,8 +290,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) } add_index = i; - - } /* else -- A buffer is already associated with the window. */ + } /* Call the DDX routine to allocate the back buffer. */ status = (*pDbeScreenPriv->AllocBackBufferName) (pWin, stuff->buffer, @@ -337,8 +330,8 @@ ProcDbeAllocateBackBufferName(ClientPtr client) free(pDbeWindowPriv); return status; -} /* ProcDbeAllocateBackBufferName() */ - +} + /****************************************************************************** * * DBE DIX Procedure: ProcDbeDeallocateBackBufferName @@ -402,9 +395,8 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) FreeResource(stuff->buffer, X11_RESTYPE_NONE); return Success; +} -} /* ProcDbeDeallocateBackBufferName() */ - /****************************************************************************** * * DBE DIX Procedure: ProcDbeSwapBuffers @@ -542,9 +534,8 @@ ProcDbeSwapBuffers(ClientPtr client) free(swapInfo); return Success; +} -} /* ProcDbeSwapBuffers() */ - /****************************************************************************** * * DBE DIX Procedure: ProcDbeGetVisualInfo @@ -662,9 +653,8 @@ clearRpcBuf: free(pDrawables); return rc; +} -} /* ProcDbeGetVisualInfo() */ - /****************************************************************************** * * DBE DIX Procedure: ProcDbeGetbackBufferAttributes @@ -755,8 +745,7 @@ ProcDbeDispatch(ClientPtr client) default: return BadRequest; } - -} /* ProcDbeDispatch() */ +} /****************************************************************************** * @@ -818,8 +807,8 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) } return ChangeGC(NULL, pGC, gcmask, gcvalues) == 0; -} /* DbeSetupBackgroundPainter() */ - +} + /****************************************************************************** * * DBE DIX Procedure: DbeDrawableDelete @@ -841,8 +830,8 @@ DbeDrawableDelete(void *pDrawable, XID id) { return Success; -} /* DbeDrawableDelete() */ - +} + /****************************************************************************** * * DBE DIX Procedure: DbeWindowPrivDelete @@ -937,8 +926,7 @@ DbeWindowPrivDelete(void *pDbeWinPriv, XID id) } return Success; - -} /* DbeWindowPrivDelete() */ +} static void miDbeWindowDestroy(CallbackListPtr *pcbl, ScreenPtr pScreen, WindowPtr pWin); @@ -1111,5 +1099,4 @@ DbeExtensionInit(void) SetResourceTypeErrorValue(dbeWindowPrivResType, dbeErrorBase + DbeBadBuffer); SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer); - -} /* DbeExtensionInit() */ +} diff --git a/dbe/midbe.c b/dbe/midbe.c index 3dd9152d2d..05d7c22279 100644 --- a/dbe/midbe.c +++ b/dbe/midbe.c @@ -30,8 +30,6 @@ * *****************************************************************************/ -/* INCLUDES */ - #include #include @@ -54,7 +52,6 @@ #include - /****************************************************************************** * * DBE MI Procedure: miDbeGetVisualInfo @@ -114,9 +111,8 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo * pScrVisInfo) pScrVisInfo->visinfo = visInfo; return TRUE; /* success */ +} -} /* miDbeGetVisualInfo() */ - /****************************************************************************** * * DBE MI Procedure: miAllocBackBufferName @@ -207,9 +203,8 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) } return Success; +} -} /* miDbeAllocBackBufferName() */ - /****************************************************************************** * * DBE MI Procedure: miDbeAliasBuffers @@ -230,9 +225,8 @@ miDbeAliasBuffers(DbeWindowPrivPtr pDbeWindowPriv) ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType, (void *) pDbeWindowPriv->pBackBuffer); } +} -} /* miDbeAliasBuffers() */ - /****************************************************************************** * * DBE MI Procedure: miDbeSwapBuffers @@ -361,9 +355,8 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo) FreeScratchGC(pGC); return Success; +} -} /* miSwapBuffers() */ - /****************************************************************************** * * DBE MI Procedure: miDbeWinPrivDelete @@ -430,7 +423,7 @@ miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId) if (pDbeWindowPriv->pBackBuffer) dixDestroyPixmap(pDbeWindowPriv->pBackBuffer, 0); -} /* miDbeWinPrivDelete() */ +} /****************************************************************************** * @@ -557,9 +550,7 @@ void miDbeWindowPosition(CallbackListPtr *pcbl, ScreenPtr pScreen, XorgScreenWin FreeScratchGC(pGC); return; - } - - else { + } else { /* Clear out the new DBE buffer pixmaps. */ /* I suppose this could avoid quite a bit of work if @@ -630,5 +621,4 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv) pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete; return TRUE; - -} /* miDbeInit() */ +} diff --git a/dbe/midbe.h b/dbe/midbe.h index 18930947a8..f25177e21d 100644 --- a/dbe/midbe.h +++ b/dbe/midbe.h @@ -36,8 +36,6 @@ #include "dix/screen_hooks_priv.h" #include "include/privates.h" -/* EXTERNS */ - extern Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv); extern DevPrivateKeyRec dbeScreenPrivKeyRec;