diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-04-27 14:23:39 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-04-27 14:23:39 +0200 |
commit | 9b94209f53782ecaf7084722ce90836573ceb86b (patch) | |
tree | 42354553aeeb29d9490a3120f0c5cd687cbad370 /nx-X11/programs | |
parent | 91d9218c0cc659f40918af6ac6c035c6c48d2c6d (diff) | |
parent | 16f6803f1597788b3bebcfa15e8900d8420b54a4 (diff) | |
download | nx-libs-9b94209f53782ecaf7084722ce90836573ceb86b.tar.gz nx-libs-9b94209f53782ecaf7084722ce90836573ceb86b.tar.bz2 nx-libs-9b94209f53782ecaf7084722ce90836573ceb86b.zip |
Merge branch 'uli42-pr/various9' into 3.6.x
Attributes GH PR #1029: https://github.com/ArcticaProject/nx-libs/pull/1029
Diffstat (limited to 'nx-X11/programs')
33 files changed, 252 insertions, 256 deletions
diff --git a/nx-X11/programs/Imakefile b/nx-X11/programs/Imakefile index 743851143..f290e5373 100644 --- a/nx-X11/programs/Imakefile +++ b/nx-X11/programs/Imakefile @@ -25,7 +25,7 @@ XSSRCDIR = Xserver #endif -SUBDIRS = $(XSSRCDIR) +SUBDIRS = $(XSSRCDIR) MakeSubdirs($(SUBDIRS)) DependSubdirs($(SUBDIRS)) diff --git a/nx-X11/programs/Xserver/GL/Imakefile b/nx-X11/programs/Xserver/GL/Imakefile index 19b5902a5..47dbf795c 100644 --- a/nx-X11/programs/Xserver/GL/Imakefile +++ b/nx-X11/programs/Xserver/GL/Imakefile @@ -27,7 +27,7 @@ DEFINES = $(GLX_DEFINES) MakeMutex($(SUBDIRS) $(OBJS) $(DONES)) #endif -#if HasGnuMake || HasBsdMake +#if HasGnuMake || HasBsdMake $(DONES): $(SUBDIRS) #endif diff --git a/nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile.inc b/nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile.inc index 567ad65b8..5d55a5855 100644 --- a/nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile.inc +++ b/nx-X11/programs/Xserver/GL/mesa/swrast_setup/Imakefile.inc @@ -1,7 +1,7 @@ MESASWRSETUPDIR = MesaSwrastSetupBuildDir MESA_SWR_SETUP_SRCS = $(MESASWRSETUPDIR)ss_context.c \ - $(MESASWRSETUPDIR)ss_triangle.c + $(MESASWRSETUPDIR)ss_triangle.c #ifdef NeedToLinkMesaSrc LinkSourceFile(ss_context.c, $(MESASRCDIR)/src/mesa/swrast_setup) @@ -13,18 +13,18 @@ LinkSourceFile(swrast_setup.h, $(MESASRCDIR)/src/mesa/swrast_setup) #endif MESA_SWR_SETUP_OBJS = $(MESASWRSETUPDIR)ss_context.o \ - $(MESASWRSETUPDIR)ss_triangle.o + $(MESASWRSETUPDIR)ss_triangle.o #if defined(DoSharedLib) && DoSharedLib MESA_SWR_SETUP_UOBJS = $(MESASWRSETUPDIR)unshared/ss_context.o \ - $(MESASWRSETUPDIR)unshared/ss_triangle.o + $(MESASWRSETUPDIR)unshared/ss_triangle.o #else MESA_SWR_SETUP_UOBJS = $(MESA_SWR_SETUP_OBJS) #endif MESA_SWR_SETUP_DOBJS = $(MESASWRSETUPDIR)debugger/ss_context.o \ - $(MESASWRSETUPDIR)debugger/ss_triangle.o + $(MESASWRSETUPDIR)debugger/ss_triangle.o MESA_SWR_SETUP_POBJS = $(MESASWRSETUPDIR)profiled/ss_context.o \ - $(MESASWRSETUPDIR)profiled/ss_triangle.o + $(MESASWRSETUPDIR)profiled/ss_triangle.o diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index c3bb8391f..ad9a2d058 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -87,7 +87,7 @@ XF86BIGFOBJS = xf86bigfont.o $(XF86BIGFOBJS) #if defined(NXAgentServer) && NXAgentServer -NX_DEFINES = -DNXAGENT_SERVER +NX_DEFINES = -DNXAGENT_SERVER #endif diff --git a/nx-X11/programs/Xserver/Xi/Imakefile b/nx-X11/programs/Xserver/Xi/Imakefile index 746e57eaa..c0eede6a1 100644 --- a/nx-X11/programs/Xserver/Xi/Imakefile +++ b/nx-X11/programs/Xserver/Xi/Imakefile @@ -37,7 +37,7 @@ stubs.c \ ungrdev.c \ ungrdevb.c \ - ungrdevk.c + ungrdevk.c OBJS = allowev.o \ chgkbd.o \ @@ -75,7 +75,7 @@ setmmap.o \ ungrdev.o \ ungrdevb.o \ - ungrdevk.o + ungrdevk.o INCLUDES = -I../include -I$(EXTINCSRC) -I$(XINCLUDESRC) `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/dbe/Imakefile b/nx-X11/programs/Xserver/dbe/Imakefile index 3c4f40174..6bef0aff1 100644 --- a/nx-X11/programs/Xserver/dbe/Imakefile +++ b/nx-X11/programs/Xserver/dbe/Imakefile @@ -1,8 +1,8 @@ #include <Server.tmpl> - SRCS = dbe.c midbe.c - OBJS = dbe.o midbe.o + SRCS = dbe.c midbe.c + OBJS = dbe.o midbe.o INCLUDES = -I$(SERVERSRC)/include -I$(XINCLUDESRC) -I$(EXTINCSRC) $(EXTRAINCLUDES) `pkg-config --cflags-only-I pixman-1` LINTLIBS = ../dix/llib-ldix.ln ../os/llib-los.ln diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 174873e51..a3867f6a7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -480,7 +480,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 2; } return 0; - } + } if (!strcmp(argv[i], "-streaming")) { @@ -542,7 +542,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) if (++i < argc && sscanf(argv[i], "%ix%i", &width, &height) == 2 && width >= 32 && height >= 32) - { + { nxagentChangeOption(TileWidth, width); nxagentChangeOption(TileHeight, height); return 2; @@ -582,13 +582,13 @@ int ddxProcessArgument(int argc, char *argv[], int i) nxagentChangeOption(AllScreens, False); } else - { - if (nxagentUserGeometry.flag == 0) + { + if (nxagentUserGeometry.flag == 0) { - nxagentUserGeometry.flag = XParseGeometry(argv[i], - &nxagentUserGeometry.X, - &nxagentUserGeometry.Y, - &nxagentUserGeometry.Width, + nxagentUserGeometry.flag = XParseGeometry(argv[i], + &nxagentUserGeometry.X, + &nxagentUserGeometry.Y, + &nxagentUserGeometry.Width, &nxagentUserGeometry.Height); } } @@ -2025,12 +2025,12 @@ FIXME: In rootless mode the backing-store support is not functional yet. * need to check if this was set on the command line as this has * the priority over the option file. */ - + if (nxagentRenderEnable == UNDEFINED) { nxagentRenderEnable = True; } - + if (nxagentRenderEnable == True) { nxagentAlphaEnabled = True; @@ -2216,7 +2216,7 @@ void nxagentSetPackMethod(void) nxagentChangeOption(Adaptive, False); } - + if (method == PACK_LOSSY || method == PACK_ADAPTIVE) { nxagentPackMethod = PACK_JPEG_16M_COLORS; @@ -2433,7 +2433,7 @@ void nxagentSetDeferLevel(void) /* * Set the tile height. */ - + if (nxagentOption(TileHeight) != UNDEFINED) { #ifdef TEST diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c index 6ce8b21e8..632f09440 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c @@ -225,7 +225,7 @@ static void finishWMDetection(Bool verbose) } } -void nxagentWMDetect() +void nxagentWMDetect() { /* FIXME: verbose is always false, there's no code to set it to true */ Bool verbose = False; @@ -508,7 +508,7 @@ static void nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet) name_list[i] = atomNameList[i]; atom_list[i] = None; } - + for (unsigned int i = 0; i < privLastAtom; i++) { name_list[count + i] = (char *)privAtomMap[i].string; @@ -623,7 +623,7 @@ static AtomMap* nxagentFindAtomByName(char *string, unsigned int length) { for (unsigned int i = 0; i < privLastAtom; i++) { - if ((length == privAtomMap[i].length) && + if ((length == privAtomMap[i].length) && (strcmp(string, privAtomMap[i].string) == 0)) { return (privAtomMap + i); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Binder.c b/nx-X11/programs/Xserver/hw/nxagent/Binder.c index 518c016c4..7119e2886 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Binder.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Binder.c @@ -115,7 +115,7 @@ int nxagentCheckBinder(int argc, char *argv[], int i) * getenv(). It is to be decided how to handle the values of type * string in the Options repository. */ - + nxagentChangeOption(BinderOptions, display); return 2; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c index 08b2d8feb..ff772f6ef 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Client.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c @@ -434,7 +434,7 @@ void nxagentWakeupByReset(ClientPtr client) */ #define WAIT_ALL_EVENTS - + #ifndef WAIT_ALL_EVENTS static Bool nxagentWaitWakeupBySplitPredicate(Display *disp, XEvent *event, XPointer ptr) @@ -514,7 +514,7 @@ void nxagentWaitWakeupBySplit(ClientPtr client) } #endif - + return; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Composite.c b/nx-X11/programs/Xserver/hw/nxagent/Composite.c index 9e14a82bb..aed0c367f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Composite.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Composite.c @@ -145,7 +145,7 @@ void nxagentRedirectDefaultWindows(void) * agent window disappears. To make things even more weird, this * happens only at reconnection. */ - + XCompositeRedirectSubwindows(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], CompositeRedirectAutomatic); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 2facf1df3..f0ebbc5ca 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -286,7 +286,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask totalReconnectedPixmaps++; fprintf(stderr, "%s: Reconnecting pixmap at [%p] [%dx%d] " - "Depth [%d] Size [%d]. Total size [%d]. Total reconnected pixmaps [%d].\n", + "Depth [%d] Size [%d]. Total size [%d]. Total reconnected pixmaps [%d].\n", __func__, (void *) pDrawable, width, height, depth, length, totalLength, totalReconnectedPixmaps); } @@ -460,7 +460,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned nxagentDrawableType(pDrawable), (void *) pDrawable); #endif - goto nxagentSynchronizeRegionFree; + goto nxagentSynchronizeRegionFree; } /* @@ -724,7 +724,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned */ RegionSubtract(nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)), - nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)), &tileRegion); + nxagentPixmapCorruptedRegion(nxagentDrawableBitmap(pDrawable)), &tileRegion); /* * The drawable's corrupted region can be cleared if the @@ -920,7 +920,7 @@ nxagentSynchronizeRegionStop: int y = RegionRects(&collectedUpdates)[i].y1; int w = RegionRects(&collectedUpdates)[i].x2 - RegionRects(&collectedUpdates)[i].x1; int h = RegionRects(&collectedUpdates)[i].y2 - RegionRects(&collectedUpdates)[i].y1; - + if (nxagentOption(Shadow) && (nxagentOption(XRatio) != DONT_SCALE || nxagentOption(YRatio) != DONT_SCALE)) @@ -2788,7 +2788,7 @@ void nxagentUnmarkExposedRegion(WindowPtr pWin, RegionPtr pRegion, RegionPtr pOt RegionInit(&clipRegion, NullBox, 1); RegionCopy(&clipRegion, pRegion); - + if (pOther != NullRegion && !RegionNil(pOther)) { RegionUnion(&clipRegion, &clipRegion, pOther); @@ -2858,7 +2858,7 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt #ifdef TEST fprintf(stderr, "nxagentSendBackgroundExpose: Pixmap background [%dx%d] is " "smaller than window [%dx%d]. Going to expose the winSize.\n", - pBackground -> drawable.width, pBackground -> drawable.height, + pBackground -> drawable.width, pBackground -> drawable.height, pWin -> drawable.width, pWin -> drawable.height); #endif @@ -2913,11 +2913,11 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt /* * Reduce the overall region to expose. */ - + RegionTranslate(&expose, -pWin -> drawable.x, -pWin -> drawable.y); - + RegionSubtract(pExpose, pExpose, &expose); - + RegionTranslate(&expose, pWin -> drawable.x, pWin -> drawable.y); miWindowExposures(pWin, &expose, &expose); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c index 9ca7711b2..91f36e496 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c @@ -312,7 +312,7 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen) for (int i = 2; i < nSizes - 1; i++) { - if ((w[i] <= maxWidth * 3 / 4) && + if ((w[i] <= maxWidth * 3 / 4) && (h[i] <= maxHeight * 3 / 4) && (w[i] >= w[0]) && (h[i] >= h[0])) diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c index b956bb8df..46e9cfe6f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GC.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c @@ -219,13 +219,13 @@ void nxagentValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) if (!pGC -> tileIsPixel && !nxagentPixmapIsVirtual(pGC -> tile.pixmap)) { - pGC -> tile.pixmap = nxagentVirtualPixmap(pGC -> tile.pixmap); + pGC -> tile.pixmap = nxagentVirtualPixmap(pGC -> tile.pixmap); } PixmapPtr lastTile = pGC -> tile.pixmap; PixmapPtr lastStipple = pGC->stipple; - + if (lastStipple) { pGC->stipple = nxagentVirtualPixmap(pGC->stipple); @@ -403,7 +403,7 @@ void nxagentChangeGC(GCPtr pGC, unsigned long mask) values.font = nxagentFont(pGC->font); changeFlag += nxagentTestGC(values.font, font); } - } + } CHECKGCVAL(GCSubwindowMode, subwindow_mode, pGC->subWindowMode); CHECKGCVAL(GCGraphicsExposures, graphics_exposures, pGC->graphicsExposures); @@ -595,7 +595,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects) case CT_UNSORTED: { if (!clipsMatch && !nxagentGCTrap) - { + { XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC->clipOrg.x, pGC->clipOrg.y, (XRectangle *)pValue, nRects, Unsorted); @@ -896,7 +896,7 @@ static void nxagentReconnectGC(void *param0, XID param1, void * param2) #endif } - #ifdef DEBUG + #ifdef DEBUG fprintf(stderr, "nxagentReconnectGC: GC at [%p].\n", (void *) pGC); #endif @@ -1036,7 +1036,7 @@ void nxagentDisconnectGC(void * p0, XID x1, void * p2) if (!*pBool || !pGC) { - if (!pGC) + if (!pGC) { #ifdef WARNING fprintf(stderr, "nxagentDisconnectGC: WARNING! pGC is NULL.\n"); @@ -1050,7 +1050,7 @@ void nxagentDisconnectGC(void * p0, XID x1, void * p2) PixmapPtr pMap = pGC -> stipple; nxagentDisconnectPixmap(nxagentRealPixmap(pMap), 0, pBool); } -} +} Bool nxagentDisconnectAllGCs(void) { @@ -1385,7 +1385,7 @@ GCPtr nxagentCreateGraphicContext(int depth) */ nxagentGraphicContextsPtr nxagentGCs = realloc(nxagentGraphicContexts, (nxagentGraphicContextsSize + 1) * sizeof(nxagentGraphicContextsRec)); - + if (nxagentGCs == NULL) { #ifdef WARNING @@ -1471,4 +1471,3 @@ void nxagentDisconnectGraphicContexts(void) return; } - diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c index bac9947f0..176e087a0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c @@ -87,7 +87,7 @@ static int nxagentSaveGCTrap; { \ nxagentGCTrap = nxagentSaveGCTrap; \ } - + /* * This is currently unused. */ @@ -131,7 +131,7 @@ void nxagentSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc, else { fbSetSpans(pDrawable, pGC, pSrc, pPoints, pWidths, nSpans, fSorted); - } + } } void nxagentGetSpans(DrawablePtr pDrawable, int maxWidth, xPoint *pPoints, @@ -577,7 +577,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, #ifdef TEST fprintf(stderr, "nxagentCopyArea: Image src [%s:%p], dst [%s:%p] (%d,%d) -> (%d,%d) size (%d,%d)\n", (pSrcDrawable -> type == DRAWABLE_PIXMAP) ? "PIXMAP" : "WINDOW", (void *) pSrcDrawable, - (pDstDrawable -> type == DRAWABLE_PIXMAP) ? "PIXMAP" : "WINDOW", + (pDstDrawable -> type == DRAWABLE_PIXMAP) ? "PIXMAP" : "WINDOW", (void *) pDstDrawable, srcx, srcy, dstx, dsty, width, height); #endif @@ -669,7 +669,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, if (pSrcDrawable -> type == DRAWABLE_PIXMAP && pDstDrawable -> type == DRAWABLE_PIXMAP) { - return fbCopyArea(nxagentVirtualDrawable(pSrcDrawable), + return fbCopyArea(nxagentVirtualDrawable(pSrcDrawable), nxagentVirtualDrawable(pDstDrawable), pGC, srcx, srcy, width, height, dstx, dsty); } @@ -823,7 +823,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, (void *) nxagentVirtualDrawable(pDstDrawable)); #endif - return fbCopyArea(nxagentVirtualDrawable(pSrcDrawable), + return fbCopyArea(nxagentVirtualDrawable(pSrcDrawable), nxagentVirtualDrawable(pDstDrawable), pGC, srcx, srcy, width, height, dstx, dsty); } @@ -873,7 +873,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, } } - return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, 0); } @@ -895,7 +895,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, if (pSrcDrawable -> type == DRAWABLE_PIXMAP && pDstDrawable -> type == DRAWABLE_PIXMAP) { - return fbCopyPlane(nxagentVirtualDrawable(pSrcDrawable), + return fbCopyPlane(nxagentVirtualDrawable(pSrcDrawable), nxagentVirtualDrawable(pDstDrawable), pGC, srcx, srcy, width, height, dstx, dsty, plane); } @@ -1041,7 +1041,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, (void *) nxagentVirtualDrawable(pDstDrawable)); #endif - return fbCopyPlane(nxagentVirtualDrawable(pSrcDrawable), + return fbCopyPlane(nxagentVirtualDrawable(pSrcDrawable), nxagentVirtualDrawable(pDstDrawable), pGC, srcx, srcy, width, height, dstx, dsty, plane); } @@ -1061,7 +1061,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, srcx, srcy, width, height, dstx, dsty, plane); } - return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, + return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, plane); } @@ -1507,7 +1507,7 @@ void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, if (nRectangles == 1) { fprintf(stderr, "nxagentPolyFillRect: Drawable at [%p] GC at [%p] FillStyle [%d] Rectangle [%d,%d][%d,%d].\n", - (void *) pDrawable, (void *) pGC, pGC -> fillStyle, + (void *) pDrawable, (void *) pGC, pGC -> fillStyle, pRectangles -> x, pRectangles -> y, pRectangles -> width, pRectangles -> height); } else diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index 639e3429e..77d498606 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -425,7 +425,7 @@ void nxagentBlockHandler(void * data, struct timeval **timeout, void * mask) } #endif /* #ifdef DYNAMIC_DISPLAY_BUFFER */ - + /* * Dispatch to the clients the events that may have become * available. diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c index c033bf70d..a8ccef8ac 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Image.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c @@ -629,7 +629,7 @@ FIXME: Should use these. pRegion -> extents.y1, pRegion -> extents.x2, pRegion -> extents.y2, (void *) pDrawable); #endif - + nxagentMarkCorruptedRegion(pDrawable, pRegion); goto nxagentPutImageEnd; @@ -647,7 +647,7 @@ FIXME: Should use these. pRegion -> extents.y1, pRegion -> extents.x2, pRegion -> extents.y2, (void *) pDrawable); #endif - + nxagentMarkCorruptedRegion(pDrawable, pRegion); goto nxagentPutImageEnd; @@ -915,9 +915,9 @@ void nxagentRealizeImage(DrawablePtr pDrawable, GCPtr pGC, int depth, #ifdef WARNING fprintf(stderr, "nxagentRealizeImage: WARNING! Visual not found. Using default visual.\n"); #endif - + pVisual = nxagentVisuals[nxagentDefaultVisualIndex].visual; - } + } /* * Get bytes per line according to format. @@ -1089,7 +1089,7 @@ FIXME: Should use an unpack resource here. if (client == NULL) { client = serverClient; - + #ifdef TEST fprintf(stderr, "nxagentPutSubImage: WARNING! Using the server client with index [%d].\n", client -> index); @@ -1405,7 +1405,7 @@ FIXME: There should be a callback registered by the agent that * Add the image only if we have a valid checksum. This is the * case only if we originally tried to find the image in cache. */ - + if (NXImageCacheSize > 0 && packedChecksum != NULL) { #ifdef DEBUG @@ -1608,7 +1608,7 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio, if (newImage -> data == NULL) { SAFE_free(newImage); - + #ifdef PANIC fprintf(stderr, "nxagentScaleImage: PANIC! Failed to create the target image data.\n"); #endif @@ -1703,4 +1703,3 @@ char *nxagentAllocateImageData(int width, int height, int depth, int *length, in return data; } - diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index fe51b595a..ec6521cce 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -269,7 +269,7 @@ void InitOutput(ScreenInfo *scrInfo, int argc, char *argv[]) */ if (nxagentOption(ImageRateLimit) != 0) - { + { fprintf(stderr, "Info: Image rate limit set to %u kB/s.\n", nxagentOption(ImageRateLimit)); } @@ -380,10 +380,10 @@ FIXME: These variables, if not removed at all because have probably #else nxagentFontPrivateIndex = AllocateFontPrivateIndex(); #endif /* HAS_XFONT2 */ - RT_NX_FONT = CreateNewResourceType(nxagentDestroyNewFontResourceType); + RT_NX_FONT = CreateNewResourceType(nxagentDestroyNewFontResourceType); nxagentClientPrivateIndex = AllocateClientPrivateIndex(); nxagentPixmapPrivateIndex = AllocatePixmapPrivateIndex(); - RT_NX_PIXMAP = CreateNewResourceType(nxagentDestroyNewPixmapResourceType); + RT_NX_PIXMAP = CreateNewResourceType(nxagentDestroyNewPixmapResourceType); RT_NX_CORR_BACKGROUND = CreateNewResourceType(nxagentDestroyCorruptedBackgroundResource); RT_NX_CORR_WINDOW = CreateNewResourceType(nxagentDestroyCorruptedWindowResource); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 2142adc8e..636414c40 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1292,7 +1292,7 @@ void nxagentInitXkbWrapper(void) } void nxagentDisableXkbExtension(void) -{ +{ #ifdef TEST fprintf(stderr, "%s: Called.\n", __func__); #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Literals.h b/nx-X11/programs/Xserver/hw/nxagent/Literals.h index cef2904d1..9547b5aab 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Literals.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Literals.h @@ -29,7 +29,7 @@ * opcode to the name of the X request. */ -static char *nxagentRequestLiteral[] = +static char *nxagentRequestLiteral[] = { "None", "CreateWindow", diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index cd57182a1..77da4c765 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -550,7 +550,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio nxagentFreeTimeoutTimer(); /* FIXME: maybe move the code up to the KillAllClients() call to ddxBeforeReset? */ - if ((dispatchException & DE_RESET) && + if ((dispatchException & DE_RESET) && (serverGeneration > nxagentMaxAllowedResets)) { dispatchException &= ~DE_RESET; @@ -568,7 +568,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio * error on the display and wait until the * NX transport is gone. */ - + fprintf(stderr, "Session: Terminating session at '%s'.\n", GetTimeAsString()); saveAgentState("TERMINATING"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h index d3c8c7150..ddcd6443c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h @@ -234,7 +234,7 @@ typedef struct _AgentOptions */ Bool Reset; - /* + /* * Geometry of the agent root window, relative to the agent default * window. */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixels.c b/nx-X11/programs/Xserver/hw/nxagent/Pixels.c index 8aaa9ecd8..1b415718b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixels.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixels.c @@ -75,7 +75,7 @@ int nxagentUniquePixels(XImage *image) */ int total = image -> width * image -> height; - + int step = total / elements; if (step < PIXEL_STEP) @@ -91,7 +91,7 @@ int nxagentUniquePixels(XImage *image) /* * Shift at the left after each scanline. */ - + if (image -> bytes_per_line % step == 0) { step++; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index 30e5d1e3f..6d9be3a90 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -287,7 +287,7 @@ PixmapPtr nxagentCreatePixmap(ScreenPtr pScreen, int width, int height, * pointers to pVirtualPixmap. We should also remove the copy of id * and use the one of the real pixmap. */ - + pVirtualPriv -> id = pPixmapPriv -> id; pVirtualPriv -> mid = 0; @@ -783,7 +783,7 @@ void nxagentReconnectPixmap(void *p0, XID x1, void *p2) #endif } - + if (nxagentDrawableStatus((DrawablePtr) pPixmap) == NotSynchronized) { if (nxagentIsCorruptedBackground(pPixmap) == 1) @@ -1238,9 +1238,9 @@ FIXME: If the pixmap has a different depth from the window, the #ifdef WARNING fprintf(stderr, "nxagentPixmapOnShadowDisplay: WARNING! Visual not found. Using default visual.\n"); #endif - + pVisual = nxagentVisuals[nxagentDefaultVisualIndex].visual; - } + } XImage *image = XCreateImage(nxagentDisplay, pVisual, depth, format, 0, (char *) data, @@ -1394,9 +1394,9 @@ Bool nxagentFbOnShadowDisplay(void) #ifdef WARNING fprintf(stderr, "nxagentFbOnShadowDisplay: WARNING! Visual not found. Using default visual.\n"); #endif - + pVisual = nxagentVisuals[nxagentDefaultVisualIndex].visual; - } + } XImage *image = XCreateImage(nxagentDisplay, pVisual, depth, format, 0, (char *) data, @@ -1480,5 +1480,3 @@ void nxagentPrintResources(void) } #endif - - diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c index 1191049ad..87b12fe52 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c @@ -90,7 +90,7 @@ void nxagentChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl) fprintf(stderr, "%s: WARNING! Propagating changes to pointer settings.\n", __func__); #endif - XChangePointerControl(nxagentDisplay, True, True, + XChangePointerControl(nxagentDisplay, True, True, ctrl->num, ctrl->den, ctrl->threshold); return; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 205940ed7..386a4d273 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -759,7 +759,7 @@ void nxagentDestroyPicture(PicturePtr pPicture) XRenderFreePicture(nxagentDisplay, nxagentPicturePriv(pPicture) -> picture); - + #ifdef DEBUG XSync(nxagentDisplay, 0); #endif @@ -789,8 +789,8 @@ int nxagentChangePictureClip(PicturePtr pPicture, int clipType, int nRects, { #ifdef DEBUG fprintf(stderr, "nxagentChangePictureClip: Clip type is [CT_PIXMAP].\n"); - #endif - + #endif + /* * if(!nRects) * { @@ -820,7 +820,7 @@ FIXME: Is this useful or just a waste of bandwidth? #endif break; - } + } case CT_NONE: { #ifdef DEBUG @@ -859,7 +859,7 @@ FIXME: Is this useful or just a waste of bandwidth? #ifdef DEBUG fprintf(stderr, "nxagentChangePictureClip: Clip type is [CT_REGION].\n"); #endif - + reg = XCreateRegion(); for (index = 0; index <= nRects; index++, rects++) @@ -889,7 +889,7 @@ FIXME: Is this useful or just a waste of bandwidth? #ifdef DEBUG XSync(nxagentDisplay, 0); #endif - + XDestroyRegion(reg); break; @@ -1025,7 +1025,7 @@ void nxagentChangePicture(PicturePtr pPicture, Mask mask) { valuemask |= CPPolyEdge; nxagentSetPictureRemoteValue(pPicture, poly_edge, attributes.poly_edge); - } + } } if (mask & CPPolyMode) @@ -1260,8 +1260,8 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, #ifdef TEST if ((pSrc && pSrc->pDrawable) && (pDst && pDst->pDrawable)) { fprintf(stderr, "nxagentGlyphs: Called with source [%s][%p] destination [%s][%p] and size id [%d].\n", - (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pSrc, - (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pDst, + (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pSrc, + (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pDst, sizeID); } #endif @@ -1313,7 +1313,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, { RegionPtr pRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, glyphBox.x1, glyphBox.y1, glyphBox.x2 - glyphBox.x1, glyphBox.y2 - glyphBox.y1); - + if (RegionNil(pRegion)) { #ifdef TEST @@ -1356,7 +1356,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, #ifdef DEBUG if (pSrc && pSrc->pDrawable) { fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p] " - "with geometry [%d,%d,%d,%d].\n", + "with geometry [%d,%d,%d,%d].\n", (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pSrc -> pDrawable, pSrc -> pDrawable -> x, pSrc -> pDrawable -> y, pSrc -> pDrawable -> x + pSrc -> pDrawable -> width, @@ -1404,7 +1404,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, #ifdef DEBUG if (pDst && pDst->pDrawable) { fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p] " - "with geometry [%d,%d,%d,%d].\n", + "with geometry [%d,%d,%d,%d].\n", (pDst -> pDrawable -> type == DRAWABLE_PIXMAP ? "pixmap" : "window"), (void *) pDst -> pDrawable, pDst -> pDrawable -> x, pDst -> pDrawable -> y, pDst -> pDrawable -> x + pDst -> pDrawable -> width, @@ -1480,7 +1480,7 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, x += glyph -> info.xOff; y += glyph -> info.yOff; - + #ifdef TEST fprintf(stderr, "nxagentGlyphs: Glyph at index [%d] has offset [%d,%d] and " "position [%d,%d].\n", i, elements -> nchars, glyph -> info.xOff, @@ -2697,8 +2697,8 @@ void nxagentRenderCreateRadialGradient(PicturePtr pPicture, xPointFixed *inner, void nxagentRenderCreateConicalGradient(PicturePtr pPicture, xPointFixed *center, - xFixed angle, int nStops, - xFixed *stops, + xFixed angle, int nStops, + xFixed *stops, xRenderColor *colors) { if (nxagentRenderEnable == False) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 026a8ff98..05bee177b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -258,10 +258,10 @@ void nxagentSetScreenInfo(ScreenInfo *scrInfo) scrInfo -> bitmapBitOrder = BITMAP_BIT_ORDER; #ifdef TEST - fprintf(stderr, "nxagentSetScreenInfo: Server image order is [%d] bitmap order is [%d].\n", + fprintf(stderr, "%s: Server image order is [%d] bitmap order is [%d].\n", __func__, scrInfo -> imageByteOrder, scrInfo -> bitmapBitOrder); - fprintf(stderr, "nxagentSetScreenInfo: Server scanline unit is [%d] scanline pad is [%d].\n", + fprintf(stderr, "%s: Server scanline unit is [%d] scanline pad is [%d].\n", __func__, scrInfo -> bitmapScanlineUnit, scrInfo -> bitmapScanlinePad); #endif } @@ -284,8 +284,8 @@ void nxagentSetPixmapFormats(ScreenInfo *scrInfo) scrInfo -> formats[i].scanlinePad = nxagentPixmapFormats[i].scanline_pad; #ifdef TEST - fprintf(stderr, "nxagentSetPixmapFormats: Set format at index [%d] to depth [%d] " - "bits per pixel [%d] scanline pad [%d].\n", i, + fprintf(stderr, "%s: Set format at index [%d] to depth [%d] " + "bits per pixel [%d] scanline pad [%d].\n", __func__, i, scrInfo -> formats[i].depth, scrInfo -> formats[i].bitsPerPixel, scrInfo -> formats[i].scanlinePad); #endif @@ -433,7 +433,7 @@ Window nxagentCreateIconWindow(void) unsigned long valuemask = CWOverrideRedirect | CWBackPixmap | CWColormap; #ifdef TEST - fprintf(stderr, "nxagentCreateIconWindow: Going to create new icon window.\n"); + fprintf(stderr, "%s: Going to create new icon window.\n", __func__); #endif Window w = XCreateWindow(nxagentDisplay, DefaultRootWindow(nxagentDisplay), @@ -448,7 +448,7 @@ Window nxagentCreateIconWindow(void) fprintf(stderr, "NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]\n", w); } #ifdef TEST - fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [0x%x].\n", + fprintf(stderr, "%s: Created new icon window with id [0x%x].\n", __func__, w); #endif @@ -530,14 +530,14 @@ Bool nxagentMagicPixelZone(int x, int y) void nxagentSetScreenSaverTime(void) { #ifdef TEST - fprintf(stderr, "nxagentSetScreenSaverTime: ScreenSaverTime was [%lu], ScreenSaverInterval was [%lu].\n", + fprintf(stderr, "%s: ScreenSaverTime was [%lu], ScreenSaverInterval was [%lu].\n", __func__, (long unsigned int)ScreenSaverTime, (long unsigned int)ScreenSaverInterval); #endif ScreenSaverInterval = ScreenSaverTime; #ifdef TEST - fprintf(stderr, "nxagentSetScreenSaverTime: ScreenSaverTime now is [%lu], ScreenSaverInterval now is [%lu].\n", + fprintf(stderr, "%s: ScreenSaverTime now is [%lu], ScreenSaverInterval now is [%lu].\n", __func__, (long unsigned int)ScreenSaverTime, (long unsigned int)ScreenSaverInterval); #endif } @@ -671,7 +671,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) xid = FakeClientID(serverClient -> index); #ifdef TEST - fprintf(stderr, "nxagentInitViewportFrame: XID = [%lx]\n", xid); + fprintf(stderr, "%s: XID = [%lx]\n", __func__, xid); #endif nxagentViewportFrameLeft = CreateWindow(xid, pRootWin, -NXAGENT_FRAME_WIDTH, 0, NXAGENT_FRAME_WIDTH, @@ -685,7 +685,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) if (error != Success) { #ifdef WARNING - fprintf(stderr, "nxagentInitViewportFrame: Error creating nxagentViewportFrameLeft.\n"); + fprintf(stderr, "%s: Error creating nxagentViewportFrameLeft.\n", __func__); #endif error = Success; @@ -694,7 +694,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) xid = FakeClientID(serverClient -> index); #ifdef TEST - fprintf(stderr, "nxagentInitViewportFrame: XID = [%lx]\n", xid); + fprintf(stderr, "%s: XID = [%lx]\n", __func__, xid); #endif nxagentViewportFrameRight = CreateWindow(xid, pRootWin, pRootWin -> drawable.width, 0, @@ -710,7 +710,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) if (error != Success) { #ifdef WARNING - fprintf(stderr, "nxagentInitViewportFrame: Error creating nxagentViewportFrameRight.\n"); + fprintf(stderr, "%s: Error creating nxagentViewportFrameRight.\n", __func__); #endif error = Success; @@ -719,7 +719,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) xid = FakeClientID(serverClient -> index); #ifdef TEST - fprintf(stderr, "nxagentInitViewportFrame: XID = [%lx]\n", xid); + fprintf(stderr, "%s: XID = [%lx]\n", __func__, xid); #endif nxagentViewportFrameAbove = CreateWindow(xid, pRootWin, 0, -NXAGENT_FRAME_WIDTH, @@ -735,7 +735,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) if (error != Success) { #ifdef WARNING - fprintf(stderr, "nxagentInitViewportFrame: Error creating nxagentViewportFrameAbove.\n"); + fprintf(stderr, "%s: Error creating nxagentViewportFrameAbove.\n", __func__); #endif error = Success; @@ -744,7 +744,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) xid = FakeClientID(serverClient -> index); #ifdef TEST - fprintf(stderr, "nxagentInitViewportFrame: XID = [%lx]\n", xid); + fprintf(stderr, "%s: XID = [%lx]\n", __func__, xid); #endif nxagentViewportFrameBelow = CreateWindow(xid, pRootWin, 0, @@ -760,7 +760,7 @@ void nxagentInitViewportFrame(ScreenPtr pScreen, WindowPtr pRootWin) if (error != Success) { #ifdef WARNING - fprintf(stderr, "nxagentInitViewportFrame: Error creating nxagentViewportFrameBelow.\n"); + fprintf(stderr, "%s: Error creating nxagentViewportFrameBelow.\n", __func__); #endif } @@ -857,7 +857,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) Bool resetAgentPosition = False; #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Called for screen index [%d].\n", + fprintf(stderr, "%s: Called for screen index [%d].\n", __func__, pScreen->myNum); #endif @@ -963,7 +963,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) if (!nxagentOption(Rootless) && !nxagentWMIsRunning) { #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Forcing fullscreen mode with no window manager running.\n"); + fprintf(stderr, "%s: Forcing fullscreen mode with no window manager running.\n", __func__); #endif nxagentChangeOption(Fullscreen, True); @@ -983,7 +983,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) nxagentXServerGeometryChanged()) { #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Forcing window mode with server geometry changed.\n"); + fprintf(stderr, "%s: Forcing window mode with server geometry changed.\n", __func__); #endif nxagentChangeOption(Fullscreen, False); @@ -1288,7 +1288,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) if (depthIndex == UNDEFINED) { #ifdef WARNING - fprintf(stderr, "nxagentOpenScreen: WARNING! Can't find a matching depth for visual depth [%d].\n", + fprintf(stderr, "%s: WARNING! Can't find a matching depth for visual depth [%d].\n", __func__, nxagentVisuals[i].depth); #endif @@ -1345,8 +1345,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) } #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Frame buffer allocated. rootDepth " - "[%d] bitsPerPixel [%d] sizeInBytes [%d]\n", rootDepth, bitsPerPixel, sizeInBytes); + fprintf(stderr, "%s: Frame buffer allocated. rootDepth " + "[%d] bitsPerPixel [%d] sizeInBytes [%d]\n", __func__, rootDepth, bitsPerPixel, sizeInBytes); #endif void * pFrameBufferBits = (char *) malloc(sizeInBytes); @@ -1359,8 +1359,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) } #if defined(DEBUG) || defined(DEBUG_COLORMAP) - fprintf(stderr, "nxagentOpenScreen: Before fbScreenInit numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + fprintf(stderr, "%s: Before fbScreenInit numVisuals [%d] numDepths [%d] " + "rootDepth [%d] defaultVisual [%lu].\n", __func__, numVisuals, numDepths, rootDepth, (long unsigned int)defaultVisual); #endif @@ -1385,8 +1385,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) } #if defined(DEBUG) || defined(DEBUG_COLORMAP) - fprintf(stderr, "nxagentOpenScreen: After fbScreenInit numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + fprintf(stderr, "%s: After fbScreenInit numVisuals [%d] numDepths [%d] " + "rootDepth [%d] defaultVisual [%lu].\n", __func__, numVisuals, numDepths, rootDepth, (long unsigned int)defaultVisual); #endif @@ -1396,8 +1396,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) */ #if defined(DEBUG) || defined(DEBUG_COLORMAP) - fprintf(stderr, "nxagentOpenScreen: Before GLX numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + fprintf(stderr, "%s: Before GLX numVisuals [%d] numDepths [%d] " + "rootDepth [%d] defaultVisual [%lu].\n", __func__, numVisuals, numDepths, rootDepth, (long unsigned int)defaultVisual); #endif @@ -1405,8 +1405,8 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) &rootDepth, &defaultVisual); #if defined(DEBUG) || defined(DEBUG_COLORMAP) - fprintf(stderr, "nxagentOpenScreen: After GLX numVisuals [%d] numDepths [%d] " - "rootDepth [%d] defaultVisual [%lu].\n", numVisuals, numDepths, + fprintf(stderr, "%s: After GLX numVisuals [%d] numDepths [%d] " + "rootDepth [%d] defaultVisual [%lu].\n", __func__, numVisuals, numDepths, rootDepth, (long unsigned int)defaultVisual); #endif @@ -1435,7 +1435,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) #ifdef WATCH - fprintf(stderr, "nxagentOpenScreen: Watchpoint 7.\n"); + fprintf(stderr, "%s: Watchpoint 7.\n", __func__); /* Reply Total Cached Bits In Bits Out Bits/Reply Ratio @@ -1620,7 +1620,7 @@ N/A if (enableBackingStore) { #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Going to initialize backing store.\n"); + fprintf(stderr, "%s: Going to initialize backing store.\n", __func__); #endif pScreen -> BackingStoreFuncs.SaveAreas = nxagentSaveAreas; @@ -1752,7 +1752,7 @@ N/A */ #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Going to create new default window.\n"); + fprintf(stderr, "%s: Going to create new default window.\n", __func__); #endif nxagentDefaultWindows[pScreen->myNum] = @@ -1824,7 +1824,7 @@ N/A #endif { #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Setting WM_CLASS and WM_NAME for window with id [%ld].\n", + fprintf(stderr, "%s: Setting WM_CLASS and WM_NAME for window with id [%ld].\n", __func__, (long int)nxagentDefaultWindows[pScreen->myNum]); #endif @@ -1971,7 +1971,7 @@ N/A if (!nxagentWMIsRunning && !nxagentOption(Fullscreen)) { #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: No window manager, we call XGrabKeyboard.\n"); + fprintf(stderr, "%s: No window manager, we call XGrabKeyboard.\n", __func__); #endif XGrabKeyboard(nxagentDisplay, RootWindow (nxagentDisplay, 0), True, GrabModeAsync, @@ -1982,7 +1982,7 @@ N/A if (!nxagentCreateDefaultColormap(pScreen)) { #ifdef PANIC - fprintf(stderr, "nxagentOpenScreen: Failed to create default colormap for screen.\n"); + fprintf(stderr, "%s: Failed to create default colormap for screen.\n", __func__); #endif return False; @@ -1999,7 +1999,7 @@ N/A XlibAtom deleteWMatom = nxagentAtoms[2]; /* WM_DELETE_WINDOW */ #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Found WM, delete window atom [%ld].\n", + fprintf(stderr, "%s: Found WM, delete window atom [%ld].\n", __func__, deleteWMatom); #endif @@ -2041,7 +2041,7 @@ N/A if (nxagentOption(Fullscreen)) { #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: WARNING! Forcing propagation of device control changes.\n"); + fprintf(stderr, "%s: WARNING! Forcing propagation of device control changes.\n", __func__); #endif nxagentChangeOption(DeviceControl, True); @@ -2102,7 +2102,7 @@ N/A #ifdef WATCH - fprintf(stderr, "nxagentOpenScreen: Watchpoint 8.\n"); + fprintf(stderr, "%s: Watchpoint 8.\n", __func__); /* Reply Total Cached Bits In Bits Out Bits/Reply Ratio @@ -2123,7 +2123,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio Bool nxagentCloseScreen(ScreenPtr pScreen) { #ifdef DEBUG - fprintf(stderr, "running nxagentCloseScreen()\n"); + fprintf(stderr, "running %s()\n", __func__); #endif /* @@ -2575,7 +2575,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) } #ifdef DEBUG - fprintf(stderr, "nxagentShadowInit: Setting the master uid [%d].\n", + fprintf(stderr, "%s: Setting the master uid [%d].\n", __func__, nxagentShadowUid); #endif @@ -2593,8 +2593,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) (void *) &nxagentShadowDisplay) != 1) { #ifdef PANIC - fprintf(stderr, "nxagentShadowInit: PANIC! Failed to initialize shadow " - "display [%s].\n", nxagentShadowDisplayName); + fprintf(stderr, "%s: PANIC! Failed to initialize shadow " + "display [%s].\n", __func__, nxagentShadowDisplayName); #endif return -1; @@ -2614,7 +2614,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) &nxagentShadowHeight, &nxagentMasterDepth) == 0) { #ifdef PANIC - fprintf(stderr, "nxagentShadowInit: PANIC! Failed to add display [%s].\n", + fprintf(stderr, "%s: PANIC! Failed to add display [%s].\n", __func__, nxagentDisplayName); #endif @@ -2636,8 +2636,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) class != TrueColor) { #ifdef PANIC - fprintf(stderr, "nxagentShadowInit: PANIC! The visual class of the remote " - "X server is not TrueColor.\n"); + fprintf(stderr, "%s: PANIC! The visual class of the remote " + "X server is not TrueColor.\n", __func__); #endif return -1; @@ -2660,9 +2660,9 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) default: { className = ""; break; } } - fprintf(stderr, "nxagentShadowInit: PANIC! Cannot shadow the display. " + fprintf(stderr, "%s: PANIC! Cannot shadow the display. " "%s visual class is not supported. Only TrueColor visuals " - "are supported.\n", className); + "are supported.\n", __func__, className); #endif /* #endif PANIC */ @@ -2683,8 +2683,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) else if (nxagentShadowDepth == 8) { #ifdef PANIC - fprintf(stderr, "nxagentShadowInit: PANIC! Unable to shadow a %d bit " - "display with a 8 bit screen depth.\n", nxagentMasterDepth); + fprintf(stderr, "%s: PANIC! Unable to shadow a %d bit " + "display with a 8 bit screen depth.\n", __func__, nxagentMasterDepth); #endif return -1; @@ -2703,8 +2703,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) else if (nxagentShadowDepth == 8) { #ifdef PANIC - fprintf(stderr, "nxagentShadowInit: PANIC! Unable to shadow a 16 bit " - "display with a 8 bit screen depth.\n"); + fprintf(stderr, "%s: PANIC! Unable to shadow a 16 bit " + "display with a 8 bit screen depth.\n", __func__); #endif return -1; @@ -2719,8 +2719,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) if (nxagentShadowDepth != 8) { #ifdef PANIC - fprintf(stderr, "nxagentShadowInit: PANIC! Unable to shadow a 8 bit " - "display with a %d bit screen depth.\n", nxagentShadowDepth); + fprintf(stderr, "%s: PANIC! Unable to shadow a 8 bit " + "display with a %d bit screen depth.\n", __func__, nxagentShadowDepth); #endif return -1; @@ -2733,7 +2733,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) default: { #ifdef PANIC - fprintf(stderr, "nxagentShadowInit: PANIC! The depth is not 32, 24, 16 or 8 bit.\n"); + fprintf(stderr, "%s: PANIC! The depth is not 32, 24, 16 or 8 bit.\n", __func__); #endif return -1; @@ -2758,8 +2758,8 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) nxagentShadowXConnectionNumber = XConnectionNumber(nxagentShadowDisplay); #ifdef TEST - fprintf(stderr, "nxagentShadowInit: Adding the X connection [%d] " - "to the device set.\n", nxagentShadowXConnectionNumber); + fprintf(stderr, "%s: Adding the X connection [%d] " + "to the device set.\n", __func__, nxagentShadowXConnectionNumber); #endif SetNotifyFd(nxagentShadowXConnectionNumber, nxagentNotifyConnection, X_NOTIFY_READ, NULL); @@ -2817,7 +2817,7 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, NXShadowUpdateBuffer((void *)&nxagentShadowBuffer); #ifdef TEST - fprintf(stderr, "nxagentShadowCreateMainWindow: Update frame buffer [%p].\n", nxagentShadowBuffer); + fprintf(stderr, "%s: Update frame buffer [%p].\n", __func__, nxagentShadowBuffer); #endif nxagentShadowSetWindowOptions(); @@ -2840,16 +2840,16 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, nxagentShadowPixmapPtr -> drawable.id = accessPixmapID; #ifdef TEST - fprintf(stderr, "nxagentShadowCreateMainWindow: nxagentShadowPixmapPtr [%p] PixmapM -> drawable.id [%u].\n", + fprintf(stderr, "%s: nxagentShadowPixmapPtr [%p] PixmapM -> drawable.id [%u].\n", __func__, (void *)nxagentShadowPixmapPtr, nxagentShadowPixmapPtr -> drawable.id); - fprintf(stderr, "nxagentShadowCreateMainWindow: Create pixmap with width [%d] height [%d] depth [%d].\n", + fprintf(stderr, "%s: Create pixmap with width [%d] height [%d] depth [%d].\n", __func__, nxagentShadowWidth, nxagentShadowHeight, (int)nxagentShadowDepth); #endif } else { #ifdef PANIC - fprintf(stderr, "nxagentShadowCreateMainWindow: PANIC! Failed to create pixmap with width [%d] height [%d] depth [%d].\n", + fprintf(stderr, "%s: PANIC! Failed to create pixmap with width [%d] height [%d] depth [%d].\n", __func__, nxagentShadowWidth, nxagentShadowHeight, (int)nxagentShadowDepth); #endif } @@ -2876,14 +2876,14 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, if (nxagentShadowGCPtr) { #ifdef TEST - fprintf(stderr, "nxagentShadowCreateMainWindow: Created GC with pGC[%p]\n", (void *) nxagentShadowGCPtr); + fprintf(stderr, "%s: Created GC with pGC[%p]\n", __func__, (void *) nxagentShadowGCPtr); #endif ValidateGC((DrawablePtr)nxagentShadowPixmapPtr, nxagentShadowGCPtr); } else { #ifdef PANIC - fprintf(stderr, "nxagentShadowCreateMainWindow: PANIC! Failed to create GC."); + fprintf(stderr, "%s: PANIC! Failed to create GC.", __func__); #endif } @@ -2916,11 +2916,11 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, if (nxagentShadowWindowPtr && !error) { #ifdef TEST - fprintf(stderr, "nxagentShadowCreateMainWindow: Create window with nxagentShadowWindowPtr [%p]" - "nxagentShadowWindowPtr -> drawable.id [%u].\n", (void *) nxagentShadowWindowPtr, + fprintf(stderr, "%s: Create window with nxagentShadowWindowPtr [%p]" + "nxagentShadowWindowPtr -> drawable.id [%u].\n", __func__, (void *) nxagentShadowWindowPtr, nxagentShadowWindowPtr -> drawable.id); - fprintf(stderr, "nxagentShadowCreateMainWindow: parent nxagentShadowWindowPtr [%p] parent -> drawable.id [%u].\n", + fprintf(stderr, "%s: parent nxagentShadowWindowPtr [%p] parent -> drawable.id [%u].\n", __func__, (void *)nxagentShadowWindowPtr->parent, nxagentShadowWindowPtr -> parent -> drawable.id); #endif @@ -2930,7 +2930,7 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, else { #ifdef PANIC - fprintf(stderr, "nxagentShadowCreateMainWindow: PANIC! Failed to create window.\n"); + fprintf(stderr, "%s: PANIC! Failed to create window.\n", __func__); #endif } @@ -2945,7 +2945,7 @@ int nxagentShadowCreateMainWindow(ScreenPtr pScreen, WindowPtr pWin, int width, XConfigureWindow(nxagentDisplay, nxagentWindow(pWin), mask, &changes); #ifdef TEST - fprintf(stderr, "nxagentShadowCreateMainWindow: Completed mapping of Access window.\n"); + fprintf(stderr, "%s: Completed mapping of Access window.\n", __func__); #endif return 0; @@ -2994,7 +2994,7 @@ int nxagentShadowPoll(PixmapPtr shadowPixmapPtr, GCPtr shadowGCPtr, BoxRec *pBox = (BoxRec *)ptBox; #ifdef TEST - fprintf(stderr, "nxagentShadowPoll: nRects[%ld], pBox[%p] depth[%d].\n", numRects, (void *) pBox, shadowDepth); + fprintf(stderr, "%s: nRects[%ld], pBox[%p] depth[%d].\n", __func__, numRects, (void *) pBox, shadowDepth); #endif for (int n = 0; n < numRects; n++) @@ -3023,7 +3023,7 @@ int nxagentShadowPoll(PixmapPtr shadowPixmapPtr, GCPtr shadowGCPtr, int line = PixmapBytePad(width, nxagentMasterDepth); #ifdef DEBUG - fprintf(stderr, "nxagentShadowPoll: Rectangle Number[%d] - x[%d]y[%d]W[%u]H[%u].\n", n+1, x, y, width, height); + fprintf(stderr, "%s: Rectangle Number[%d] - x[%d]y[%d]W[%u]H[%u].\n", __func__, n+1, x, y, width, height); #endif unsigned int length = nxagentImageLength(width, height, ZPixmap, 0, nxagentMasterDepth); @@ -3035,7 +3035,7 @@ int nxagentShadowPoll(PixmapPtr shadowPixmapPtr, GCPtr shadowGCPtr, if (tBuffer == NULL) { #ifdef PANIC - fprintf(stderr, "nxagentShadowPoll: malloc failed.\n"); + fprintf(stderr, "%s: malloc failed.\n", __func__); #endif return -1; @@ -3083,7 +3083,7 @@ int nxagentShadowPoll(PixmapPtr shadowPixmapPtr, GCPtr shadowGCPtr, else if (result == -1) { #ifdef TEST - fprintf(stderr, "nxagentShadowPoll: polling failed!\n"); + fprintf(stderr, "%s: polling failed!\n", __func__); #endif usleep(50 * 1000); @@ -3117,14 +3117,14 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, if (pVisual == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentCorrectDepthShadow: WARNING! Visual not found. Using default visual.\n"); + fprintf(stderr, "%s: WARNING! Visual not found. Using default visual.\n", __func__); #endif pVisual = nxagentVisuals[nxagentDefaultVisualIndex].visual; } #ifdef TEST - fprintf(stderr, "nxagentCorrectDepthShadow: Shadow redMask [%lu] greenMask[%lu] blueMask[%lu].\n", + fprintf(stderr, "%s: Shadow redMask [%lu] greenMask[%lu] blueMask[%lu].\n", __func__, pVisual -> red_mask, pVisual -> green_mask, pVisual -> blue_mask); #endif @@ -3133,7 +3133,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, unsigned long blueMask = nxagentShadowDisplay -> screens[0].root_visual[0].blue_mask; #ifdef TEST - fprintf(stderr, "nxagentCorrectDepthShadow: Master redMask [%lu] greenMask[%lu] blueMask[%lu].\n", + fprintf(stderr, "%s: Master redMask [%lu] greenMask[%lu] blueMask[%lu].\n", __func__, redMask, greenMask, blueMask); #endif @@ -3147,7 +3147,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, unsigned int pad = lineMaster - nxagentBppMaster * width; #ifdef TEST - fprintf(stderr, "nxagentCorrectDepthShadow: line [%d] width[%d] pad[%d].\n", lineMaster, width, pad); + fprintf(stderr, "%s: line [%d] width[%d] pad[%d].\n", __func__, lineMaster, width, pad); #endif while (height > 0) @@ -3230,7 +3230,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, unsigned int pad = lineShadow - nxagentBppShadow * width; #ifdef TEST - fprintf(stderr, "nxagentCorrectDepthShadow: line [%d] width[%d] pad[%d].\n", lineShadow, width, pad); + fprintf(stderr, "%s: line [%d] width[%d] pad[%d].\n", __func__, lineShadow, width, pad); #endif while (height > 0) @@ -3351,7 +3351,7 @@ FIXME: The port information is not used at the moment and produces a ulReturnItems > 0 && pszReturnData != NULL) { #ifdef TEST - fprintf(stderr, "nxagentPropagateArtsdProperties: Got [%ld] elements of format [%d] with [%ld] bytes left.\n", + fprintf(stderr, "%s: Got [%ld] elements of format [%d] with [%ld] bytes left.\n", __func__, ulReturnItems, iReturnFormat, ulReturnBytesLeft); #endif @@ -3359,7 +3359,7 @@ FIXME: The port information is not used at the moment and produces a if (ulReturnBytesLeft > 0) { - fprintf(stderr, "nxagentPropagateArtsdProperties: WARNING! Could not get the whole ARTSD property data.\n"); + fprintf(stderr, "%s: WARNING! Could not get the whole ARTSD property data.\n", __func__); } #endif @@ -3482,7 +3482,7 @@ Bool nxagentReconnectScreen(void *p0) PixmapPtr pPixmap = (PixmapPtr)nxagentDefaultScreen->devPrivate; #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_SCREEN_DEBUG) - fprintf(stderr, "nxagentReconnectScreen\n"); + fprintf(stderr, "%s\n", __func__); #endif if (!nxagentOpenScreen(nxagentDefaultScreen, nxagentArgc, nxagentArgv)) @@ -3496,7 +3496,7 @@ Bool nxagentReconnectScreen(void *p0) pPixmap -> drawable.height, pPixmap -> drawable.depth); #ifdef NXAGENT_RECONNECT_SCREEN_DEBUG - fprintf(stderr, "nxagentReconnectScreen: recreated %p - ID %lx\n", + fprintf(stderr, "%s: recreated %p - ID %lx\n", __func__, pPixmap, nxagentPixmap( pPixmap )); #endif @@ -3548,7 +3548,7 @@ Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah, if (ax2 < bx1 || bx2 < ax1 || ay2 < by1 || by2 < ay1) { #ifdef DEBUG - fprintf(stderr, "intersect: the given rectangles do not intersect at all\n"); + fprintf(stderr, "%s: the given rectangles do not intersect at all\n", __func__); #endif return FALSE; @@ -3568,7 +3568,7 @@ Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah, if (iw <= 0 || ih <= 0) { #ifdef DEBUG - fprintf(stderr, "intersect: intersection rectangle not feasible\n"); + fprintf(stderr, "%s: intersection rectangle not feasible\n", __func__); #endif return FALSE; @@ -3579,7 +3579,7 @@ Bool intersect(int ax1, int ay1, unsigned int aw, unsigned int ah, *h = ih; #ifdef DEBUG - fprintf(stderr, "intersect: intersection is: ([%d],[%d]) [ %d x %d ]\n", *x, *y, *w, *h); + fprintf(stderr, "%s: intersection is: ([%d],[%d]) [ %d x %d ]\n", __func__, *x, *y, *w, *h); #endif return TRUE; @@ -3595,9 +3595,9 @@ Bool intersect_bb(int ax1, int ay1, unsigned int aw, unsigned int ah, { #ifdef DEBUG - fprintf(stderr, "intersect_bb: session window: ([%d],[%d]) [ %d x %d ]\n", ax1, ay1, aw, ah); - fprintf(stderr, "intersect_bb: crtc: ([%d],[%d]) [ %d x %d ]\n", bx1, by1, bw, bh); - fprintf(stderr, "intersect_bb: bounding box: ([%d],[%d]) [ %d x %d ]\n", bbx1, bby1, bbx2-bbx1, bby2-bby1); + fprintf(stderr, "%s: session window: ([%d],[%d]) [ %d x %d ]\n", __func__, ax1, ay1, aw, ah); + fprintf(stderr, "%s: crtc: ([%d],[%d]) [ %d x %d ]\n", __func__, bx1, by1, bw, bh); + fprintf(stderr, "%s: bounding box: ([%d],[%d]) [ %d x %d ]\n", __func__, bbx1, bby1, bbx2-bbx1, bby2-bby1); #endif Bool result = intersect(ax1, ay1, aw, ah, bx1, by1, bw, bh, x, y, w, h); @@ -3615,7 +3615,7 @@ Bool intersect_bb(int ax1, int ay1, unsigned int aw, unsigned int ah, *x = 0; #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-left of the bounding box - width gets adapted to [%d]\n", *w); + fprintf(stderr, "%s: session box is outside-left of the bounding box - width gets adapted to [%d]\n", __func__, *w); #endif } @@ -3625,7 +3625,7 @@ Bool intersect_bb(int ax1, int ay1, unsigned int aw, unsigned int ah, *w += ax1 + aw - bbx2; #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-right of the bounding box - width gets adapted to [%d]\n", *w); + fprintf(stderr, "%s: session box is outside-right of the bounding box - width gets adapted to [%d]\n", __func__, *w); #endif } @@ -3640,7 +3640,7 @@ Bool intersect_bb(int ax1, int ay1, unsigned int aw, unsigned int ah, *y = 0; #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-above of the bounding box - height gets adapted to [%d]\n", *h); + fprintf(stderr, "%s: session box is outside-above of the bounding box - height gets adapted to [%d]\n", __func__, *h); #endif } @@ -3650,7 +3650,7 @@ Bool intersect_bb(int ax1, int ay1, unsigned int aw, unsigned int ah, *h += ay1 + ah - bby2; #ifdef DEBUG - fprintf(stderr, "intersect_bb: session box is outside-below of the bounding box - height gets adapted to [%d]\n", *h); + fprintf(stderr, "%s: session box is outside-below of the bounding box - height gets adapted to [%d]\n", __func__, *h); #endif } } @@ -3738,11 +3738,11 @@ void nxagentAdjustCustomMode(ScreenPtr pScreen) int nxagentChangeScreenConfig(int screen, int width, int height, Bool doresize) { #ifdef DEBUG - fprintf(stderr, "nxagentChangeScreenConfig: called for screen [%d], width [%d] height [%d] doresize [%d]\n", screen, width, height, doresize); + fprintf(stderr, "%s: called for screen [%d], width [%d] height [%d] doresize [%d]\n", __func__, screen, width, height, doresize); #endif #ifdef TEST - fprintf(stderr, "nxagentChangeScreenConfig: screenInfo.screens[%d]->root [%p]\n", screen, (void *) screenInfo.screens[screen]); + fprintf(stderr, "%s: screenInfo.screens[%d]->root [%p]\n", __func__, screen, (void *) screenInfo.screens[screen]); #endif if (screenInfo.screens[screen]->root == NULL) { @@ -3753,15 +3753,15 @@ int nxagentChangeScreenConfig(int screen, int width, int height, Bool doresize) #ifdef DEBUG if (nxagentGrabServerInfo.grabstate == SERVER_GRABBED) - fprintf(stderr, "nxagentChangeScreenConfig: grabstate [SERVER_GRABBED], client [%p]\n", (void *) nxagentGrabServerInfo.client); + fprintf(stderr, "%s: grabstate [SERVER_GRABBED], client [%p]\n", __func__, (void *) nxagentGrabServerInfo.client); else if (nxagentGrabServerInfo.grabstate == SERVER_UNGRABBED) - fprintf(stderr, "nxagentChangeScreenConfig: grabstate [SERVER_UNGRABBED], client [%p]\n", (void *) nxagentGrabServerInfo.client); + fprintf(stderr, "%s: grabstate [SERVER_UNGRABBED], client [%p]\n", __func__, (void *) nxagentGrabServerInfo.client); else if (nxagentGrabServerInfo.grabstate == CLIENT_PERVIOUS) - fprintf(stderr, "nxagentChangeScreenConfig: grabstate [CLIENT_PERVIOUS], client [%p]\n", (void *) nxagentGrabServerInfo.client); + fprintf(stderr, "%s: grabstate [CLIENT_PERVIOUS], client [%p]\n", __func__, (void *) nxagentGrabServerInfo.client); else if (nxagentGrabServerInfo.grabstate == CLIENT_IMPERVIOUS) - fprintf(stderr, "nxagentChangeScreenConfig: grabstate [CLIENT_IMPERVIOUS], client [%p]\n", (void *) nxagentGrabServerInfo.client); + fprintf(stderr, "%s: grabstate [CLIENT_IMPERVIOUS], client [%p]\n", __func__, (void *) nxagentGrabServerInfo.client); else - fprintf(stderr, "nxagentChangeScreenConfig: grabstate [UNKNOWN], client [%p]\n", (void *) nxagentGrabServerInfo.client); + fprintf(stderr, "%s: grabstate [UNKNOWN], client [%p]\n", __func__, (void *) nxagentGrabServerInfo.client); #endif if (nxagentGrabServerInfo.grabstate == SERVER_GRABBED) @@ -3774,7 +3774,7 @@ int nxagentChangeScreenConfig(int screen, int width, int height, Bool doresize) */ #ifdef TEST - fprintf(stderr, "nxagentChangeScreenConfig: Cancel with grabbed server (grab held by [%p]).\n", (void *) nxagentGrabServerInfo.client); + fprintf(stderr, "%s: Cancel with grabbed server (grab held by [%p]).\n", __func__, (void *) nxagentGrabServerInfo.client); #endif return 0; @@ -3783,7 +3783,7 @@ int nxagentChangeScreenConfig(int screen, int width, int height, Bool doresize) ScreenPtr pScreen = screenInfo.screens[screen] -> root -> drawable.pScreen; #ifdef TEST - fprintf(stderr, "nxagentChangeScreenConfig: Changing config to %d x %d\n", width, height); + fprintf(stderr, "%s: Changing config to %d x %d\n", __func__, width, height); #endif int r = nxagentResizeScreen(pScreen, width, height, 0, 0, doresize); @@ -3805,8 +3805,8 @@ int nxagentChangeScreenConfig(int screen, int width, int height, Bool doresize) } #ifdef DEBUG - fprintf(stderr, "nxagentChangeScreenConfig: current geometry: %d,%d %dx%d\n", nxagentOption(X), nxagentOption(Y), nxagentOption(Width), nxagentOption(Height)); - fprintf(stderr, "nxagentChangeScreenConfig: returning [%d]\n", r); + fprintf(stderr, "%s: current geometry: %d,%d %dx%d\n", __func__, nxagentOption(X), nxagentOption(Y), nxagentOption(Width), nxagentOption(Height)); + fprintf(stderr, "%s: returning [%d]\n", __func__, r); #endif return r; @@ -3825,14 +3825,14 @@ void nxagentDropOutput(RROutputPtr o) if (c->outputs[i] == o) { #ifdef DEBUG - fprintf(stderr, "nxagentDropOutput: output [%s] is in use by crtc [%p], removing it from there\n", o->name, c); + fprintf(stderr, "%s: output [%s] is in use by crtc [%p], removing it from there\n", __func__, o->name, c); #endif RRCrtcSet(c, NULL, 0, 0, RR_Rotate_0, 0, NULL); } } } #ifdef DEBUG - fprintf(stderr, "nxagentDropOutput: destroying output [%s]\n", o->name); + fprintf(stderr, "%s: destroying output [%s]\n", __func__, o->name); #endif RROutputDestroy(o); } @@ -3853,16 +3853,16 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) if (number) { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: XineramaQueryScreens() returned [%d] screens:\n", number); + fprintf(stderr, "%s: XineramaQueryScreens() returned [%d] screens:\n", __func__, number); for (int i = 0; i < number; i++) { - fprintf(stderr, "nxagentAdjustRandRXinerama: screen_number [%d] x_org [%d] y_org [%d] width [%d] height [%d]\n", screeninfo[i].screen_number, screeninfo[i].x_org, screeninfo[i].y_org, screeninfo[i].width, screeninfo[i].height); + fprintf(stderr, "%s: screen_number [%d] x_org [%d] y_org [%d] width [%d] height [%d]\n", __func__, screeninfo[i].screen_number, screeninfo[i].x_org, screeninfo[i].y_org, screeninfo[i].width, screeninfo[i].height); } #endif } else { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: XineramaQueryScreens() failed - continuing without Xinerama\n"); + fprintf(stderr, "%s: XineramaQueryScreens() failed - continuing without Xinerama\n", __func__); #endif } @@ -3877,7 +3877,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) if (number == 0) { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: faking xinerama\n"); + fprintf(stderr, "%s: faking xinerama\n", __func__); #endif number = 1; @@ -3897,7 +3897,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) } #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: numCrtcs [%d], numOutputs [%d]\n", pScrPriv->numCrtcs, pScrPriv->numOutputs); + fprintf(stderr, "%s: numCrtcs [%d], numOutputs [%d]\n", __func__, pScrPriv->numCrtcs, pScrPriv->numOutputs); { /* * Convert old RANDR 1.0 data (if any) to current structure. This @@ -3907,7 +3907,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) */ Bool rrgetinfo = RRGetInfo(pScreen, FALSE); - fprintf(stderr, "nxagentAdjustRandRXinerama: RRGetInfo returned [%d]\n", rrgetinfo); + fprintf(stderr, "%s: RRGetInfo returned [%d]\n", __func__, rrgetinfo); } #else /* we are not interested in the return code */ @@ -3928,12 +3928,12 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) bby1 = min(bby1, screeninfo[i].y_org); } #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: bounding box: left [%d] right [%d] top [%d] bottom [%d]\n", bbx1, bbx2, bby1, bby2); + fprintf(stderr, "%s: bounding box: left [%d] right [%d] top [%d] bottom [%d]\n", __func__, bbx1, bbx2, bby1, bby2); #endif #endif #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: numCrtcs [%d], numOutputs [%d]\n", pScrPriv->numCrtcs, pScrPriv->numOutputs); + fprintf(stderr, "%s: numCrtcs [%d], numOutputs [%d]\n", __func__, pScrPriv->numCrtcs, pScrPriv->numOutputs); #endif /* adjust the number of CRTCs to match the number of reported @@ -3943,7 +3943,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) if (number < pScrPriv->numCrtcs) { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: destroying crtc\n"); + fprintf(stderr, "%s: destroying crtc\n", __func__); #endif /* first reset the crtc to free possible outputs, then destroy the crtc */ RRCrtcSet(pScrPriv->crtcs[pScrPriv->numCrtcs - 1], NULL, 0, 0, RR_Rotate_0, 0, NULL); @@ -3952,14 +3952,14 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) else { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: adding crtc\n"); + fprintf(stderr, "%s: adding crtc\n", __func__); #endif RRCrtcCreate(pScreen, NULL); } } #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: numCrtcs [%d], numOutputs [%d]\n", pScrPriv->numCrtcs, pScrPriv->numOutputs); + fprintf(stderr, "%s: numCrtcs [%d], numOutputs [%d]\n", __func__, pScrPriv->numCrtcs, pScrPriv->numOutputs); #endif /* set gamma. Currently the only reason for doing this is @@ -3999,7 +3999,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) RROutputSetConnection(output, RR_Disconnected); */ #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: created new output [%s]\n", name); + fprintf(stderr, "%s: created new output [%s]\n", __func__, name); #endif } else @@ -4007,7 +4007,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) output = pScrPriv->outputs[i]; } #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: adjusting output [%s]\n", output->name); + fprintf(stderr, "%s: adjusting output [%s]\n", __func__, output->name); #endif RROutputSetCrtcs(output, &(pScrPriv->crtcs[i]), 1); /* FIXME: Isn't there a function for setting this? */ @@ -4046,11 +4046,11 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) #ifdef DEBUG if (prevmode) { - fprintf(stderr, "nxagentAdjustRandRXinerama: output [%d] name [%s]: prevmode [%s] ([%p]) refcnt [%d]\n", i, pScrPriv->outputs[i]->name, prevmode->name, (void *)prevmode, prevmode->refcnt); + fprintf(stderr, "%s: output [%d] name [%s]: prevmode [%s] ([%p]) refcnt [%d]\n", __func__, i, pScrPriv->outputs[i]->name, prevmode->name, (void *)prevmode, prevmode->refcnt); } else { - fprintf(stderr, "nxagentAdjustRandRXinerama: output [%d] name [%s]: no prevmode\n", i, pScrPriv->outputs[i]->name); + fprintf(stderr, "%s: output [%d] name [%s]: no prevmode\n", __func__, i, pScrPriv->outputs[i]->name); } #endif @@ -4059,7 +4059,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) if (disable_output) { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: output [%d] name [%s]: no (valid) intersection - disconnecting\n", i, pScrPriv->outputs[i]->name); + fprintf(stderr, "%s: output [%d] name [%s]: no (valid) intersection - disconnecting\n", __func__, i, pScrPriv->outputs[i]->name); #endif RROutputSetConnection(pScrPriv->outputs[i], RR_Disconnected); @@ -4075,12 +4075,12 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) if (prevmode) { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: removing mode from output [%d] name [%s]\n", i, pScrPriv->outputs[i]->name); + fprintf(stderr, "%s: removing mode from output [%d] name [%s]\n", __func__, i, pScrPriv->outputs[i]->name); #endif RROutputSetModes(pScrPriv->outputs[i], NULL, 0, 0); #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: removing mode from ctrc [%d]\n", i); + fprintf(stderr, "%s: removing mode from ctrc [%d]\n", __func__, i); #endif RRCrtcSet(pScrPriv->crtcs[i], NULL, 0, 0, RR_Rotate_0, 1, &(pScrPriv->outputs[i])); } @@ -4088,7 +4088,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) else { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: output [%d] name [%s]: intersection is x [%d] y [%d] width [%d] height [%d]\n", i, pScrPriv->outputs[i]->name, new_x, new_y, new_w, new_h); + fprintf(stderr, "%s: output [%d] name [%s]: intersection is x [%d] y [%d] width [%d] height [%d]\n", __func__, i, pScrPriv->outputs[i]->name, new_x, new_y, new_w, new_h); #endif RROutputSetConnection(pScrPriv->outputs[i], RR_Connected); @@ -4116,18 +4116,18 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) #ifdef DEBUG if (mymode) { - fprintf(stderr, "nxagentAdjustRandRXinerama: output [%d] name [%s]: mode [%s] ([%p]) created/received, refcnt [%d]\n", i, pScrPriv->outputs[i]->name, name, (void *) mymode, mymode->refcnt); + fprintf(stderr, "%s: output [%d] name [%s]: mode [%s] ([%p]) created/received, refcnt [%d]\n", __func__, i, pScrPriv->outputs[i]->name, name, (void *) mymode, mymode->refcnt); } else { /* FIXME: what is the correct behaviour in this case? */ - fprintf(stderr, "nxagentAdjustRandRXinerama: output [%d] name [%s]: mode [%s] creation failed!\n", i, pScrPriv->outputs[i]->name, name); + fprintf(stderr, "%s: output [%d] name [%s]: mode [%s] creation failed!\n", __func__, i, pScrPriv->outputs[i]->name, name); } #endif if (prevmode && mymode == prevmode) { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: mymode [%s] ([%p]) == prevmode [%s] ([%p])\n", mymode->name, (void *) mymode, prevmode->name, (void *)prevmode); + fprintf(stderr, "%s: mymode [%s] ([%p]) == prevmode [%s] ([%p])\n", __func__, mymode->name, (void *) mymode, prevmode->name, (void *)prevmode); #endif /* if they are the same RRModeGet() has increased the @@ -4138,13 +4138,13 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) else { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: setting mode [%s] ([%p]) refcnt [%d] for output %d [%s]\n", mymode->name, (void *) mymode, mymode->refcnt, i, pScrPriv->outputs[i]->name); + fprintf(stderr, "%s: setting mode [%s] ([%p]) refcnt [%d] for output %d [%s]\n", __func__, mymode->name, (void *) mymode, mymode->refcnt, i, pScrPriv->outputs[i]->name); #endif RROutputSetModes(pScrPriv->outputs[i], &mymode, 1, 0); } #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: setting mode [%s] ([%p]) refcnt [%d] for crtc %d\n", mymode->name, (void *) mymode, mymode->refcnt, i); + fprintf(stderr, "%s: setting mode [%s] ([%p]) refcnt [%d] for crtc %d\n", __func__, mymode->name, (void *) mymode, mymode->refcnt, i); #endif RRCrtcSet(pScrPriv->crtcs[i], mymode, new_x, new_y, RR_Rotate_0, 1, &(pScrPriv->outputs[i])); } /* if disable_output */ @@ -4155,7 +4155,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) if (prevmode && prevmode->refcnt == 1) { #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: destroying prevmode [%s]\n", prevmode->name); + fprintf(stderr, "%s: destroying prevmode [%s]\n", __func__, prevmode->name); #endif FreeResource(prevmode->mode.id, 0); } @@ -4172,16 +4172,16 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) { RRModePtr mode = pScrPriv->crtcs[i]->mode; if (mode) { - fprintf(stderr, "nxagentAdjustRandRXinerama: crtc [%d] ([%p]) has mode [%s] ([%p]), refcnt [%d] and [%d] outputs:\n", i, (void *) pScrPriv->crtcs[i], pScrPriv->crtcs[i]->mode->name, (void *)pScrPriv->crtcs[i]->mode, pScrPriv->crtcs[i]->mode->refcnt, pScrPriv->crtcs[i]->numOutputs); + fprintf(stderr, "%s: crtc [%d] ([%p]) has mode [%s] ([%p]), refcnt [%d] and [%d] outputs:\n", __func__, i, (void *) pScrPriv->crtcs[i], pScrPriv->crtcs[i]->mode->name, (void *)pScrPriv->crtcs[i]->mode, pScrPriv->crtcs[i]->mode->refcnt, pScrPriv->crtcs[i]->numOutputs); } else { - fprintf(stderr, "nxagentAdjustRandRXinerama: crtc [%d] ([%p]) has no mode and [%d] outputs:\n", i, (void *) pScrPriv->crtcs[i], pScrPriv->crtcs[i]->numOutputs); + fprintf(stderr, "%s: crtc [%d] ([%p]) has no mode and [%d] outputs:\n", __func__, i, (void *) pScrPriv->crtcs[i], pScrPriv->crtcs[i]->numOutputs); } if (pScrPriv->crtcs[i]->numOutputs > 0) for (int j = 0; j < pScrPriv->crtcs[i]->numOutputs; j++) - fprintf(stderr, "nxagentAdjustRandRXinerama: output [%d] name [%s]->crtc=[%p]\n", j, pScrPriv->crtcs[i]->outputs[j]->name, (void *)pScrPriv->crtcs[i]->outputs[j]->crtc); + fprintf(stderr, "%s: output [%d] name [%s]->crtc=[%p]\n", __func__, j, pScrPriv->crtcs[i]->outputs[j]->name, (void *)pScrPriv->crtcs[i]->outputs[j]->crtc); } #endif @@ -4201,7 +4201,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) /* FIXME: adjust maximum screen size according to remote randr/xinerama setup */ #ifdef DEBUG - fprintf(stderr, "nxagentAdjustRandRXinerama: Min %dx%d, Max %dx%d \n", pScrPriv->minWidth, pScrPriv->minHeight, pScrPriv->maxWidth, pScrPriv->maxHeight); + fprintf(stderr, "%s: Min %dx%d, Max %dx%d \n", __func__, pScrPriv->minWidth, pScrPriv->minHeight, pScrPriv->maxWidth, pScrPriv->maxHeight); #endif return TRUE; @@ -4309,7 +4309,7 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg, pBackingStore -> x, pBackingStore -> y); #ifdef TEST - fprintf(stderr,"nxagentSaveAreas: Added pixmap [%p] with id [%d] on window [%p] to BSPixmapList.\n", + fprintf(stderr,"%s: Added pixmap [%p] with id [%d] on window [%p] to BSPixmapList.\n", __func__, (void *) pPixmap, nxagentPixmap(pPixmap), (void *) pWin); #endif @@ -4587,7 +4587,7 @@ void nxagentShowPixmap(PixmapPtr pPixmap, int x, int y, int width, int height) if (shadow == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentShowPixmap: WARNING! Shadow display not opened.\n"); + fprintf(stderr, "%s: WARNING! Shadow display not opened.\n", __func__); #endif return; @@ -4628,7 +4628,7 @@ void nxagentShowPixmap(PixmapPtr pPixmap, int x, int y, int width, int height) if (data == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentShowPixmap: malloc failed.\n"); + fprintf(stderr, "%s: malloc failed.\n", __func__); #endif return; @@ -4646,7 +4646,7 @@ FIXME if (image == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentShowPixmap: XGetImage failed.\n"); + fprintf(stderr, "%s: XGetImage failed.\n", __func__); #endif SAFE_free(data); @@ -4713,7 +4713,7 @@ void nxagentFbRestoreArea(PixmapPtr pPixmap, WindowPtr pWin, int xSrc, int ySrc, if (data == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentFbRestoreArea: malloc failed.\n"); + fprintf(stderr, "%s: malloc failed.\n", __func__); #endif return; @@ -4728,7 +4728,7 @@ void nxagentFbRestoreArea(PixmapPtr pPixmap, WindowPtr pWin, int xSrc, int ySrc, if (image == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentFbRestoreArea: XGetImage failed.\n"); + fprintf(stderr, "%s: XGetImage failed.\n", __func__); #endif SAFE_free(data); @@ -4747,7 +4747,7 @@ FIXME if (pVisual == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentFbRestoreArea: WARNING! Visual not found. Using default visual.\n"); + fprintf(stderr, "%s: WARNING! Visual not found. Using default visual.\n", __func__); #endif pVisual = nxagentVisuals[nxagentDefaultVisualIndex].visual; @@ -4762,7 +4762,7 @@ FIXME memcpy(image -> data, data, length); */ - fprintf(stderr, "nxagentFbRestoreArea: Cleaning %d bytes of image.\n", length); + fprintf(stderr, "%s: Cleaning %d bytes of image.\n", __func__, length); XGCValues value = { .foreground = 0xffffff, diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c index 99cc3a280..198ead5eb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Split.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c @@ -406,7 +406,7 @@ void nxagentRegionSplit(DrawablePtr pDrawable, RegionPtr pRegion) nxagentCheckSplit(pDrawable, pResource); #endif - + if (pResource == NULL) { #ifdef PANIC @@ -579,7 +579,7 @@ void nxagentValidateSplit(DrawablePtr pDrawable, RegionPtr pRegion) nxagentCheckSplit(pDrawable, pResource); #endif - + #ifdef TEST fprintf(stderr, "nxagentValidateSplit: Checking the region for resource [%d] " "and drawable at [%p].\n", pResource -> split, (void *) pDrawable); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Visual.c b/nx-X11/programs/Xserver/hw/nxagent/Visual.c index 6be82148f..9e338ad96 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Visual.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Visual.c @@ -94,7 +94,7 @@ Visual *nxagentVisualFromID(ScreenPtr pScreen, VisualID visual) return nxagentVisual(&pScreen->visuals[i]); } } - + return NULL; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c index 0cc60410d..477fd3f95 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c @@ -157,7 +157,7 @@ int CleanZImage(XImage *image) } } - /* + /* * Clean the padding bytes at the real * end of the buffer. */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c index dcb91348b..cc13dffbb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Compext.c @@ -1321,7 +1321,7 @@ unsigned int NXAllocSplit(Display *dpy, unsigned int resource) } #ifdef TEST_SPLIT - fprintf(stderr, "******NXAllocSplit: WARNING! Resource limit exausted.\n"); + fprintf(stderr, "******NXAllocSplit: WARNING! Resource limit exhausted.\n"); #endif return NXNoResource; @@ -1606,7 +1606,7 @@ unsigned int NXAllocUnpack(Display *dpy, unsigned int resource) } #ifdef TEST_UNPACK - fprintf(stderr, "******NXAllocUnpack: WARNING! Resource limit exausted.\n"); + fprintf(stderr, "******NXAllocUnpack: WARNING! Resource limit exhausted.\n"); #endif return NXNoResource; @@ -4776,7 +4776,7 @@ void _NXDumpData(const unsigned char *buffer, unsigned int size) { fprintf(stderr, "[%d]\t", i); - for (unsinged int ii = 0; i < size && ii < 8; i++, ii++) + for (unsigned int ii = 0; i < size && ii < 8; i++, ii++) { fprintf(stderr, "%d\t", (unsigned int) (buffer[i])); } diff --git a/nx-X11/programs/Xserver/mi/Imakefile b/nx-X11/programs/Xserver/mi/Imakefile index 71245a407..40e746c8d 100644 --- a/nx-X11/programs/Xserver/mi/Imakefile +++ b/nx-X11/programs/Xserver/mi/Imakefile @@ -116,9 +116,9 @@ OBJS = $(CBRT_OBJ) \ $(NULL) #if defined(XorgVersion) -/* - * Make sure XINPUT, XF86VidTune, etc aren't defined for the miinitext.o - * used by Xnest, Xvfb +/* + * Make sure XINPUT, XF86VidTune, etc aren't defined for the miinitext.o + * used by Xnest, Xvfb */ #if NXLibraries diff --git a/nx-X11/programs/Xserver/os/Imakefile b/nx-X11/programs/Xserver/os/Imakefile index 1b1c2d4fe..031a1eaa2 100644 --- a/nx-X11/programs/Xserver/os/Imakefile +++ b/nx-X11/programs/Xserver/os/Imakefile @@ -70,7 +70,7 @@ XDMAUTHDEFS = -DHASXDMAUTH XDMAUTHOBJS = xdmauth.o XDMAUTHSRCS = xdmauth.c #else -XDMAUTHDEFS = +XDMAUTHDEFS = XDMAUTHOBJS = XDMAUTHSCRS = #endif @@ -133,7 +133,7 @@ TMEMCMP_SRCS = timingsafe_memcmp.c TMEMCMP_OBJS = timingsafe_memcmp.o #endif -BOOTSTRAPCFLAGS = +BOOTSTRAPCFLAGS = SRCS = WaitFor.c \ access.c \ client.c \ |