From c87efef42f76c2ff0dcfad2842ab369beffd21de Mon Sep 17 00:00:00 2001 From: marha Date: Sat, 25 Jul 2009 12:38:10 +0000 Subject: Added libX11-1.2.2.tar.gz. --- libX11/src/AllPlanes.c | 10 +- libX11/src/ChClMode.c | 2 +- libX11/src/ChKeyCon.c | 2 +- libX11/src/ChProp.c | 2 +- libX11/src/ChkIfEv.c | 2 +- libX11/src/ChkMaskEv.c | 4 +- libX11/src/ChkTypEv.c | 2 +- libX11/src/ChkTypWEv.c | 2 +- libX11/src/ChkWinEv.c | 4 +- libX11/src/ClDisplay.c | 2 +- libX11/src/ClearArea.c | 2 +- libX11/src/ConnDis.c | 230 +++++------ libX11/src/Context.c | 23 +- libX11/src/ConvSel.c | 2 +- libX11/src/CopyArea.c | 2 +- libX11/src/CopyCmap.c | 2 +- libX11/src/CopyGC.c | 20 +- libX11/src/CopyPlane.c | 4 +- libX11/src/CrBFData.c | 6 +- libX11/src/CrCursor.c | 8 +- libX11/src/CrGC.c | 12 +- libX11/src/CrGlCur.c | 10 +- libX11/src/CrPFBData.c | 8 +- libX11/src/CrWindow.c | 4 +- libX11/src/Cursor.c | 4 +- libX11/src/Depths.c | 2 +- libX11/src/DisName.c | 6 +- libX11/src/DrArc.c | 4 +- libX11/src/DrLine.c | 4 +- libX11/src/DrRect.c | 2 +- libX11/src/ErrDes.c | 14 +- libX11/src/ErrHndlr.c | 10 +- libX11/src/EvToWire.c | 6 +- libX11/src/FSWrap.c | 14 +- libX11/src/FetchName.c | 4 +- libX11/src/FillPoly.c | 2 +- libX11/src/FillRct.c | 4 +- libX11/src/FillRcts.c | 2 +- libX11/src/FilterEv.c | 4 +- libX11/src/Font.c | 10 +- libX11/src/FontInfo.c | 8 +- libX11/src/FontNames.c | 4 +- libX11/src/FreeEData.c | 2 +- libX11/src/FreeGC.c | 2 +- libX11/src/FreePix.c | 4 +- libX11/src/Geom.c | 12 +- libX11/src/GetAtomNm.c | 4 +- libX11/src/GetDflt.c | 8 +- libX11/src/GetFProp.c | 6 +- libX11/src/GetGeom.c | 4 +- libX11/src/GetHints.c | 24 +- libX11/src/GetIFocus.c | 2 +- libX11/src/GetImage.c | 10 +- libX11/src/GetKCnt.c | 2 +- libX11/src/GetMoEv.c | 8 +- libX11/src/GetNrmHint.c | 26 +- libX11/src/GetPCnt.c | 2 +- libX11/src/GetPntMap.c | 4 +- libX11/src/GetProp.c | 14 +- libX11/src/GetRGBCMap.c | 6 +- libX11/src/GetSSaver.c | 4 +- libX11/src/GetStCmap.c | 12 +- libX11/src/GetTxtProp.c | 8 +- libX11/src/GetWAttrs.c | 4 +- libX11/src/GetWMCMapW.c | 8 +- libX11/src/GetWMProto.c | 8 +- libX11/src/GrButton.c | 2 +- libX11/src/GrKey.c | 2 +- libX11/src/GrKeybd.c | 2 +- libX11/src/GrPointer.c | 2 +- libX11/src/Host.c | 28 +- libX11/src/Iconify.c | 8 +- libX11/src/IfEvent.c | 4 +- libX11/src/ImText.c | 4 +- libX11/src/ImText16.c | 4 +- libX11/src/ImUtil.c | 86 ++--- libX11/src/InitExt.c | 6 +- libX11/src/IntAtom.c | 2 +- libX11/src/KeyBind.c | 148 +++---- libX11/src/KeysymStr.c | 2 +- libX11/src/LiHosts.c | 14 +- libX11/src/LiICmaps.c | 2 +- libX11/src/LoadFont.c | 2 +- libX11/src/LockDis.c | 2 +- libX11/src/Macros.c | 32 +- libX11/src/Makefile.am | 2 +- libX11/src/Makefile.in | 274 ++++++++----- libX11/src/MaskEvent.c | 4 +- libX11/src/ModMap.c | 4 +- libX11/src/MoveWin.c | 2 +- libX11/src/NextEvent.c | 6 +- libX11/src/OMWrap.c | 2 +- libX11/src/OpenDis.c | 69 ++-- libX11/src/ParseCmd.c | 20 +- libX11/src/ParseGeom.c | 28 +- libX11/src/PeekEvent.c | 2 +- libX11/src/PolyReg.c | 78 ++-- libX11/src/PolyTxt.c | 34 +- libX11/src/PolyTxt16.c | 30 +- libX11/src/PropAlloc.c | 2 +- libX11/src/PutBEvent.c | 4 +- libX11/src/PutImage.c | 18 +- libX11/src/QuBest.c | 2 +- libX11/src/QuCurShp.c | 6 +- libX11/src/QuExt.c | 2 +- libX11/src/QuKeybd.c | 4 +- libX11/src/QuPntr.c | 6 +- libX11/src/QuStipShp.c | 2 +- libX11/src/QuTileShp.c | 4 +- libX11/src/QuTree.c | 2 +- libX11/src/Quarks.c | 10 +- libX11/src/RdBitF.c | 16 +- libX11/src/RecolorC.c | 2 +- libX11/src/ReconfWin.c | 2 +- libX11/src/Region.c | 234 +++--------- libX11/src/RegstFlt.c | 4 +- libX11/src/RepWindow.c | 4 +- libX11/src/RestackWs.c | 4 +- libX11/src/RotProp.c | 2 +- libX11/src/SetCRects.c | 4 +- libX11/src/SetClOrig.c | 2 +- libX11/src/SetDashes.c | 2 +- libX11/src/SetHints.c | 42 +- libX11/src/SetIFocus.c | 2 +- libX11/src/SetLocale.c | 16 +- libX11/src/SetNrmHint.c | 4 +- libX11/src/SetPMask.c | 2 +- libX11/src/SetPntMap.c | 4 +- libX11/src/SetRGBCMap.c | 2 +- libX11/src/SetSSaver.c | 2 +- libX11/src/SetStCmap.c | 10 +- libX11/src/SetTxtProp.c | 8 +- libX11/src/SetWMCMapW.c | 12 +- libX11/src/SetWMProto.c | 12 +- libX11/src/StBytes.c | 10 +- libX11/src/StColors.c | 4 +- libX11/src/StName.c | 4 +- libX11/src/StrToText.c | 4 +- libX11/src/Text.c | 22 +- libX11/src/Text16.c | 22 +- libX11/src/TextExt.c | 8 +- libX11/src/TextExt16.c | 8 +- libX11/src/TextToStr.c | 2 +- libX11/src/TrCoords.c | 6 +- libX11/src/UIThrStubs.c | 14 +- libX11/src/UnldFont.c | 2 +- libX11/src/VisUtil.c | 18 +- libX11/src/WMGeom.c | 14 +- libX11/src/WMProps.c | 16 +- libX11/src/WarpPtr.c | 2 +- libX11/src/WinEvent.c | 4 +- libX11/src/Window.c | 12 +- libX11/src/Withdraw.c | 8 +- libX11/src/WrBitF.c | 2 +- libX11/src/XErrorDB | 58 +++ libX11/src/XKeysymDB | 22 ++ libX11/src/Xatomtype.h | 8 +- libX11/src/XlibAsync.c | 4 +- libX11/src/XlibInt.c | 220 ++++++----- libX11/src/XomGeneric.h | 2 +- libX11/src/Xrm.c | 70 ++-- libX11/src/XrmI.h | 4 +- libX11/src/Xxcbint.h | 34 +- libX11/src/config.h.in | 40 +- libX11/src/globals.c | 14 +- libX11/src/imConv.c | 20 +- libX11/src/locking.c | 117 +++--- libX11/src/locking.h | 2 +- libX11/src/os2Stubs.c | 42 +- libX11/src/poly.h | 12 +- libX11/src/udcInf.c | 22 +- libX11/src/util/Makefile.am | 3 +- libX11/src/util/Makefile.in | 134 ++++--- libX11/src/util/makekeys.c | 28 +- libX11/src/x11_trans.c | 6 +- libX11/src/xcb_disp.c | 20 +- libX11/src/xcb_io.c | 300 ++++++++++----- libX11/src/xcb_lock.c | 235 ------------ libX11/src/xcms/AddDIC.c | 6 +- libX11/src/xcms/AddSF.c | 6 +- libX11/src/xcms/CCC.c | 12 +- libX11/src/xcms/CvColW.c | 6 +- libX11/src/xcms/CvCols.c | 16 +- libX11/src/xcms/HVC.c | 20 +- libX11/src/xcms/HVCGcC.c | 18 +- libX11/src/xcms/HVCGcV.c | 20 +- libX11/src/xcms/HVCGcVC.c | 22 +- libX11/src/xcms/HVCMnV.c | 12 +- libX11/src/xcms/HVCMxC.c | 16 +- libX11/src/xcms/HVCMxV.c | 16 +- libX11/src/xcms/HVCMxVC.c | 34 +- libX11/src/xcms/HVCMxVs.c | 12 +- libX11/src/xcms/HVCWpAj.c | 10 +- libX11/src/xcms/IdOfPr.c | 6 +- libX11/src/xcms/LRGB.c | 50 +-- libX11/src/xcms/Lab.c | 6 +- libX11/src/xcms/LabGcC.c | 12 +- libX11/src/xcms/LabGcL.c | 12 +- libX11/src/xcms/LabGcLC.c | 14 +- libX11/src/xcms/LabMnL.c | 22 +- libX11/src/xcms/LabMxC.c | 12 +- libX11/src/xcms/LabMxL.c | 20 +- libX11/src/xcms/LabMxLC.c | 34 +- libX11/src/xcms/LabWpAj.c | 6 +- libX11/src/xcms/Luv.c | 10 +- libX11/src/xcms/LuvGcC.c | 12 +- libX11/src/xcms/LuvGcL.c | 12 +- libX11/src/xcms/LuvGcLC.c | 14 +- libX11/src/xcms/LuvMnL.c | 22 +- libX11/src/xcms/LuvMxC.c | 14 +- libX11/src/xcms/LuvMxL.c | 20 +- libX11/src/xcms/LuvMxLC.c | 32 +- libX11/src/xcms/LuvWpAj.c | 6 +- libX11/src/xcms/Makefile.in | 149 +++++--- libX11/src/xcms/OfCCC.c | 6 +- libX11/src/xcms/PrOfId.c | 6 +- libX11/src/xcms/QBlack.c | 6 +- libX11/src/xcms/QBlue.c | 6 +- libX11/src/xcms/QGreen.c | 6 +- libX11/src/xcms/QRed.c | 6 +- libX11/src/xcms/QWhite.c | 6 +- libX11/src/xcms/QuCol.c | 6 +- libX11/src/xcms/QuCols.c | 6 +- libX11/src/xcms/SetCCC.c | 6 +- libX11/src/xcms/SetGetCols.c | 10 +- libX11/src/xcms/StCol.c | 6 +- libX11/src/xcms/StCols.c | 6 +- libX11/src/xcms/UNDEFINED.c | 6 +- libX11/src/xcms/XRGB.c | 10 +- libX11/src/xcms/XYZ.c | 6 +- libX11/src/xcms/Xcmsint.h | 6 +- libX11/src/xcms/cmsAllCol.c | 6 +- libX11/src/xcms/cmsAllNCol.c | 8 +- libX11/src/xcms/cmsCmap.c | 8 +- libX11/src/xcms/cmsColNm.c | 14 +- libX11/src/xcms/cmsGlobls.c | 6 +- libX11/src/xcms/cmsInt.c | 10 +- libX11/src/xcms/cmsLkCol.c | 8 +- libX11/src/xcms/cmsMath.c | 4 +- libX11/src/xcms/cmsProp.c | 16 +- libX11/src/xcms/cmsTrig.c | 16 +- libX11/src/xcms/uvY.c | 6 +- libX11/src/xcms/xyY.c | 8 +- libX11/src/xkb/Makefile.in | 110 ++++-- libX11/src/xkb/XKB.c | 24 +- libX11/src/xkb/XKBAlloc.c | 28 +- libX11/src/xkb/XKBBell.c | 18 +- libX11/src/xkb/XKBBind.c | 28 +- libX11/src/xkb/XKBCompat.c | 20 +- libX11/src/xkb/XKBCtrls.c | 36 +- libX11/src/xkb/XKBCvt.c | 22 +- libX11/src/xkb/XKBExtDev.c | 30 +- libX11/src/xkb/XKBGAlloc.c | 42 +- libX11/src/xkb/XKBGeom.c | 22 +- libX11/src/xkb/XKBGetByName.c | 16 +- libX11/src/xkb/XKBGetMap.c | 22 +- libX11/src/xkb/XKBList.c | 18 +- libX11/src/xkb/XKBMAlloc.c | 30 +- libX11/src/xkb/XKBMisc.c | 34 +- libX11/src/xkb/XKBNames.c | 28 +- libX11/src/xkb/XKBRdBuf.c | 18 +- libX11/src/xkb/XKBSetGeom.c | 24 +- libX11/src/xkb/XKBSetMap.c | 18 +- libX11/src/xkb/XKBUse.c | 20 +- libX11/src/xkb/XKBleds.c | 24 +- libX11/src/xkb/XKBlibint.h | 22 +- libX11/src/xlibi18n/ICWrap.c | 74 ++-- libX11/src/xlibi18n/IMWrap.c | 44 +-- libX11/src/xlibi18n/Makefile.am | 2 + libX11/src/xlibi18n/Makefile.in | 146 ++++--- libX11/src/xlibi18n/XDefaultIMIF.c | 4 +- libX11/src/xlibi18n/XDefaultOMIF.c | 34 +- libX11/src/xlibi18n/Xaixlcint.h | 2 +- libX11/src/xlibi18n/XimImSw.h | 4 +- libX11/src/xlibi18n/XimProto.h | 4 +- libX11/src/xlibi18n/XimThai.h | 30 +- libX11/src/xlibi18n/XimTrX.h | 2 +- libX11/src/xlibi18n/XimTrans.h | 8 +- libX11/src/xlibi18n/Ximint.h | 24 +- libX11/src/xlibi18n/XimintL.h | 18 +- libX11/src/xlibi18n/XimintP.h | 4 +- libX11/src/xlibi18n/XlcDL.c | 12 +- libX11/src/xlibi18n/XlcGeneric.h | 4 +- libX11/src/xlibi18n/XlcPubI.h | 2 +- libX11/src/xlibi18n/Xlcint.h | 43 ++- libX11/src/xlibi18n/imKStoUCS.c | 10 +- libX11/src/xlibi18n/lcCT.c | 14 +- libX11/src/xlibi18n/lcCharSet.c | 8 +- libX11/src/xlibi18n/lcConv.c | 4 +- libX11/src/xlibi18n/lcDB.c | 10 +- libX11/src/xlibi18n/lcFile.c | 60 ++- libX11/src/xlibi18n/lcGeneric.c | 33 +- libX11/src/xlibi18n/lcInit.c | 6 +- libX11/src/xlibi18n/lcPrTxt.c | 4 +- libX11/src/xlibi18n/lcPubWrap.c | 8 +- libX11/src/xlibi18n/lcPublic.c | 8 +- libX11/src/xlibi18n/lcStd.c | 4 +- libX11/src/xlibi18n/lcTxtPr.c | 4 +- libX11/src/xlibi18n/lcUTF8.c | 552 ++++++++++++++++++++++++++- libX11/src/xlibi18n/lcUniConv/cjk_tab_to_h.c | 47 +++ libX11/src/xlibi18n/lcUniConv/ksc5601.h | 12 +- libX11/src/xlibi18n/lcUtil.c | 4 +- libX11/src/xlibi18n/lcWrap.c | 50 +-- libX11/src/xlibi18n/mbWrap.c | 14 +- libX11/src/xlibi18n/utf8Wrap.c | 14 +- libX11/src/xlibi18n/wcWrap.c | 14 +- 306 files changed, 3535 insertions(+), 3004 deletions(-) delete mode 100644 libX11/src/xcb_lock.c (limited to 'libX11/src') diff --git a/libX11/src/AllPlanes.c b/libX11/src/AllPlanes.c index 7e714c0de..9ce9c22ae 100644 --- a/libX11/src/AllPlanes.c +++ b/libX11/src/AllPlanes.c @@ -38,11 +38,11 @@ Status XAllocColorPlanes( Bool contig, unsigned long *pixels, /* LISTofCARD32 */ /* RETURN */ int ncolors, - int nreds, - int ngreens, + int nreds, + int ngreens, int nblues, - unsigned long *rmask, - unsigned long *gmask, + unsigned long *rmask, + unsigned long *gmask, unsigned long *bmask) /* CARD32 */ /* RETURN */ { xAllocColorPlanesReply rep; @@ -74,4 +74,4 @@ Status XAllocColorPlanes( UnlockDisplay(dpy); SyncHandle(); return(status); -} +} diff --git a/libX11/src/ChClMode.c b/libX11/src/ChClMode.c index 80895b6bf..7267c2d23 100644 --- a/libX11/src/ChClMode.c +++ b/libX11/src/ChClMode.c @@ -33,7 +33,7 @@ in this Software without prior written authorization from The Open Group. int XSetCloseDownMode( - register Display *dpy, + register Display *dpy, int mode) { register xSetCloseDownModeReq *req; diff --git a/libX11/src/ChKeyCon.c b/libX11/src/ChKeyCon.c index 495f3dfe7..2a02f8606 100644 --- a/libX11/src/ChKeyCon.c +++ b/libX11/src/ChKeyCon.c @@ -48,7 +48,7 @@ XChangeKeyboardControl( if (mask & KBKeyClickPercent) *value++ = value_list->key_click_percent; - + if (mask & KBBellPercent) *value++ = value_list->bell_percent; diff --git a/libX11/src/ChProp.c b/libX11/src/ChProp.c index 8c524cafe..b8f596a05 100644 --- a/libX11/src/ChProp.c +++ b/libX11/src/ChProp.c @@ -67,7 +67,7 @@ XChangeProperty ( Data (dpy, (char *)data, nelements); } /* else force BadLength */ break; - + case 16: len = ((long)nelements + 1)>>1; if (dpy->bigreq_size || req->length + len <= (unsigned) 65535) { diff --git a/libX11/src/ChkIfEv.c b/libX11/src/ChkIfEv.c index 037fe2913..9bef64f89 100644 --- a/libX11/src/ChkIfEv.c +++ b/libX11/src/ChkIfEv.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Check existing events in queue to find if any match. If so, return. * If not, flush buffer and see if any more events are readable. If one * matches, return. If all else fails, tell the user no events found. diff --git a/libX11/src/ChkMaskEv.c b/libX11/src/ChkMaskEv.c index 3d1e78735..bc1a279f1 100644 --- a/libX11/src/ChkMaskEv.c +++ b/libX11/src/ChkMaskEv.c @@ -38,7 +38,7 @@ extern long const _Xevent_to_mask[]; #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ Button4MotionMask|Button5MotionMask) -/* +/* * Check existing events in queue to find if any match. If so, return. * If not, flush buffer and see if any more events are readable. If one * matches, return. If all else fails, tell the user no events found. @@ -59,7 +59,7 @@ Bool XCheckMaskEvent ( for (qelt = prev ? prev->next : dpy->head; qelt; prev = qelt, qelt = qelt->next) { - if ((qelt->event.type < LASTEvent) && + if ((qelt->event.type < GenericEvent) && (_Xevent_to_mask[qelt->event.type] & mask) && ((qelt->event.type != MotionNotify) || (mask & AllPointers) || diff --git a/libX11/src/ChkTypEv.c b/libX11/src/ChkTypEv.c index ef54f764b..fc4c7d187 100644 --- a/libX11/src/ChkTypEv.c +++ b/libX11/src/ChkTypEv.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Check existing events in queue to find if any match. If so, return. * If not, flush buffer and see if any more events are readable. If one * matches, return. If all else fails, tell the user no events found. diff --git a/libX11/src/ChkTypWEv.c b/libX11/src/ChkTypWEv.c index acd6b94e4..6214c3654 100644 --- a/libX11/src/ChkTypWEv.c +++ b/libX11/src/ChkTypWEv.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Check existing events in queue to find if any match. If so, return. * If not, flush buffer and see if any more events are readable. If one * matches, return. If all else fails, tell the user no events found. diff --git a/libX11/src/ChkWinEv.c b/libX11/src/ChkWinEv.c index ff1dc919f..1fd975cda 100644 --- a/libX11/src/ChkWinEv.c +++ b/libX11/src/ChkWinEv.c @@ -37,7 +37,7 @@ extern long const _Xevent_to_mask[]; #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ Button4MotionMask|Button5MotionMask) -/* +/* * Check existing events in queue to find if any match. If so, return. * If not, flush buffer and see if any more events are readable. If one * matches, return. If all else fails, tell the user no events found. @@ -60,7 +60,7 @@ Bool XCheckWindowEvent ( qelt; prev = qelt, qelt = qelt->next) { if ((qelt->event.xany.window == w) && - (qelt->event.type < LASTEvent) && + (qelt->event.type < GenericEvent) && (_Xevent_to_mask[qelt->event.type] & mask) && ((qelt->event.type != MotionNotify) || (mask & AllPointers) || diff --git a/libX11/src/ClDisplay.c b/libX11/src/ClDisplay.c index 3a52d8bda..a09f016e4 100644 --- a/libX11/src/ClDisplay.c +++ b/libX11/src/ClDisplay.c @@ -41,7 +41,7 @@ from The Open Group. #include "Xlibint.h" #include "Xintconn.h" -/* +/* * XCloseDisplay - XSync the connection to the X Server, close the connection, * and free all associated storage. Extension close procs should only free * memory and must be careful about the types of requests they generate. diff --git a/libX11/src/ClearArea.c b/libX11/src/ClearArea.c index 95b1f4917..166353391 100644 --- a/libX11/src/ClearArea.c +++ b/libX11/src/ClearArea.c @@ -35,7 +35,7 @@ int XClearArea ( register Display *dpy, Window w, - int x, + int x, int y, unsigned int width, unsigned int height, diff --git a/libX11/src/ConnDis.c b/libX11/src/ConnDis.c index e61e0f05b..0ecd71c37 100644 --- a/libX11/src/ConnDis.c +++ b/libX11/src/ConnDis.c @@ -1,7 +1,7 @@ /* $XdotOrg: lib/X11/src/ConnDis.c,v 1.10 2005-07-03 07:00:55 daniels Exp $ */ /* $Xorg: ConnDis.c,v 1.8 2001/02/09 02:03:31 xorgcvs Exp $ */ /* - + Copyright 1989, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its @@ -27,7 +27,7 @@ in this Software without prior written authorization from The Open Group. */ /* $XFree86: xc/lib/X11/ConnDis.c,v 3.28 2003/12/02 23:33:17 herrb Exp $ */ -/* +/* * This file contains operating system dependencies. */ @@ -58,10 +58,6 @@ in this Software without prior written authorization from The Open Group. #define X_CONNECTION_RETRIES 5 #endif -#ifdef LOCALCONN -#include -#endif - #include "Xintconn.h" /* prototypes */ @@ -77,7 +73,7 @@ static void GetAuthorization( int *auth_datalenp); /* functions */ -static char *copystring (char *src, int len) +static char *copystring (const char *src, int len) { char *dst = Xmalloc (len + 1); @@ -89,8 +85,19 @@ static char *copystring (char *src, int len) return dst; } +#define Xstrdup(s) copystring(s, strlen(s)) -/* +#ifdef TCPCONN +# define TCP_TRANS "tcp" +#endif +#ifdef UNIXCONN +# define UNIX_TRANS "unix" +#endif +#if defined(LOCALCONN) || defined(OS2PIPECONN) +# define LOCAL_TRANS "local" +#endif + +/* * Attempts to connect to server, given display name. Returns file descriptor * (network socket) or -1 if connection fails. Display names may be of the * following format: @@ -107,7 +114,7 @@ static char *copystring (char *src, int len) * by IETF RFC 2732. * * If no hostname and no protocol is specified, the string is interpreted - * as the most efficient local connection to a server on the same machine. + * as the most efficient local connection to a server on the same machine. * This is usually: * * o shared memory @@ -151,17 +158,11 @@ _X11TransConnectDisplay ( char* address = addrbuf; XtransConnInfo trans_conn = NULL; /* transport connection object */ int connect_stat; -#if defined(LOCALCONN) || defined(TCPCONN) +#if defined(LOCALCONN) || defined(UNIXCONN) || defined(TCPCONN) Bool reset_hostname = False; /* Reset hostname? */ -#endif -#ifdef LOCALCONN - struct utsname sys; -# ifdef UNIXCONN - Bool try_unix_socket = False; /* Try unix if local fails */ -# endif -#endif -#ifdef TCPCONN - char *tcphostname = NULL; /* A place to save hostname pointer */ + char *original_hostname = NULL; + int local_transport_index = -1; + const char *local_transport[] = { LOCAL_TRANSPORT_LIST, NULL }; #endif p = display_name; @@ -170,7 +171,7 @@ _X11TransConnectDisplay ( saddr = NULL; /* - * Step 0, find the protocol. This is delimited by the optional + * Step 0, find the protocol. This is delimited by the optional * slash ('/'). */ for (lastp = p; *p && *p != ':' && *p != '/'; p++) ; @@ -187,7 +188,7 @@ _X11TransConnectDisplay ( /* * Step 1, find the hostname. This is delimited by either one colon, * or two colons in the case of DECnet (DECnet Phase V allows a single - * colon in the hostname). (See note above regarding IPv6 numeric + * colon in the hostname). (See note above regarding IPv6 numeric * addresses with triple colons or [] brackets.) */ @@ -199,7 +200,7 @@ _X11TransConnectDisplay ( if (!lastc) return NULL; /* must have a colon */ - if ((lastp != lastc) && (*(lastc - 1) == ':') + if ((lastp != lastc) && (*(lastc - 1) == ':') #if defined(IPv6) && defined(AF_INET6) && ( ((lastc - 1) == lastp) || (*(lastc - 2) != ':')) #endif @@ -227,38 +228,23 @@ _X11TransConnectDisplay ( p = lastc; -#ifdef LOCALCONN +#if defined(LOCALCONN) || defined(UNIXCONN) || defined(TCPCONN) /* check if phostname == localnodename AND protocol not specified */ - if (!pprotocol && (!phostname || (phostname && uname(&sys) >= 0 && - !strncmp(phostname, sys.nodename, - (strlen(sys.nodename) < strlen(phostname) ? - strlen(phostname) : strlen(sys.nodename)))))) - { - /* - * We'll first attempt to connect using the local transport. If - * that fails, we'll try again using the Unix socket transport. If - * this fails (which is the case if sshd X protocol forwarding is - * being used), retry using tcp and this hostname. - */ -#ifdef UNIXCONN - try_unix_socket = True; -#endif -#ifdef TCPCONN - if (phostname) - tcphostname = copystring(phostname, strlen(phostname)); - else - tcphostname = copystring("localhost", 9); -#endif - if (!phostname) + if (!pprotocol && phostname) { + char localhostname[256]; + + if ((_XGetHostname (localhostname, sizeof localhostname) > 0) + && (strcmp(phostname, localhostname) == 0)) { + original_hostname = phostname; + phostname = NULL; reset_hostname = True; - Xfree (phostname); - phostname = copystring ("unix", 4); + } } #endif /* - * Step 2, find the display number. This field is required and is + * Step 2, find the display number. This field is required and is * delimited either by a nul or a period, depending on whether or not * a screen number is present. */ @@ -272,7 +258,7 @@ _X11TransConnectDisplay ( /* - * Step 3, find the screen number. This field is optional. It is + * Step 3, find the screen number. This field is optional. It is * present only if the display number was followed by a period (which * we've already verified is the only non-nul character). */ @@ -295,72 +281,51 @@ _X11TransConnectDisplay ( * idisplay display number * iscreen screen number * dnet DECnet boolean - * - * We can now decide which transport to use based on the ConnectionFlags - * build parameter the hostname string. If phostname is NULL or equals - * the string "local", then choose the best transport. If phostname - * is "unix", then choose BSD UNIX domain sockets (if configured). + * + * We can now decide which transport to use based on the defined + * connection types and the hostname string. + * If phostname & pprotocol are NULL, then choose the best transport. + * If phostname is "unix" & pprotocol is NULL, then choose UNIX domain + * sockets (if configured). */ #if defined(TCPCONN) || defined(UNIXCONN) || defined(LOCALCONN) || defined(MNX_TCPCONN) || defined(OS2PIPECONN) if (!pprotocol) { -#ifdef HAVE_LAUNCHD - if (!phostname || phostname[0]=='/') { -#else - if (!phostname) { -#endif -#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) - pprotocol = copystring ("local", 5); -#if defined(TCPCONN) - tcphostname = copystring("localhost", 9); +#if defined(UNIXCONN) + if (phostname && (strcmp (phostname, "unix") == 0)) { + Xfree(pprotocol); + pprotocol = copystring ("unix", 4); + } else #endif +#ifdef HAVE_LAUNCHD + if (phostname && phostname[0]=='/') { + pprotocol = copystring ("local", 5); } - else - { #endif + if (!phostname) + { + if (local_transport[0] != NULL) { + pprotocol = Xstrdup(local_transport[0]); + local_transport_index = 0; + } + } + + if (!pprotocol) { /* if still not found one, tcp is our last resort */ pprotocol = copystring ("tcp", 3); } } #endif -#if defined(UNIXCONN) || defined(LOCALCONN) || defined(OS2PIPECONN) - /* - * Now that the defaults have been established, see if we have any - * special names that we have to override: - * - * :N => if UNIXCONN then unix-domain-socket - * ::N => if UNIXCONN then unix-domain-socket - * unix:N => if UNIXCONN then unix-domain-socket - * - * Note that if UNIXCONN isn't defined, then we can use the default - * transport connection function set above. - */ - if (!phostname) { -#ifdef apollo - ; /* Unix domain sockets are *really* bad on apollos */ -#else - if( pprotocol ) Xfree(pprotocol); - pprotocol = copystring ("local", 5); -#endif - } - else if (strcmp (phostname, "unix") == 0) { - if( pprotocol ) Xfree(pprotocol); - pprotocol = copystring ("local", 5); - } -#endif - -#if defined(TCPCONN) connect: -#endif /* * This seems kind of backwards, but we need to put the protocol, * host, and port back together to pass to _X11TransOpenCOTSClient(). */ { - int olen = 3 + (pprotocol ? strlen(pprotocol) : 0) + - (phostname ? strlen(phostname) : 0) + + int olen = 3 + (pprotocol ? strlen(pprotocol) : 0) + + (phostname ? strlen(phostname) : 0) + (pdpynum ? strlen(pdpynum) : 0); if (olen > sizeof addrbuf) address = Xmalloc (olen); } @@ -435,14 +400,15 @@ _X11TransConnectDisplay ( * * [host] : [:] dpy . scr \0 */ -#if defined(LOCALCONN) || defined(TCPCONN) +#if defined(LOCALCONN) || defined(TCPCONN) || defined(UNIXCONN) /* * If we computed the host name, get rid of it so that * XDisplayString() and XDisplayName() agree. - */ - if (reset_hostname) { + */ + if (reset_hostname && (phostname != original_hostname)) { Xfree (phostname); - phostname = NULL; + phostname = original_hostname; + original_hostname = NULL; } #endif len = ((phostname ? strlen(phostname) : 0) + 1 + (dnet ? 1 : 0) + @@ -451,7 +417,7 @@ _X11TransConnectDisplay ( if (!*fullnamep) goto bad; #ifdef HAVE_LAUNCHD - if (phostname && strlen(phostname) > 11 && !strncmp(phostname, "/tmp/launch", 11)) + if (phostname && strlen(phostname) > 11 && !strncmp(phostname, "/tmp/launch", 11)) sprintf (*fullnamep, "%s%s%d", (phostname ? phostname : ""), (dnet ? "::" : ":"), @@ -469,8 +435,8 @@ _X11TransConnectDisplay ( if (phostname) Xfree (phostname); if (pdpynum) Xfree (pdpynum); if (pscrnum) Xfree (pscrnum); -#ifdef TCPCONN - if (tcphostname) Xfree (tcphostname); +#if defined(LOCALCONN) || defined(UNIXCONN) || defined(TCPCONN) + if (original_hostname) Xfree (original_hostname); #endif GetAuthorization(trans_conn, family, (char *) saddr, saddrlen, idisplay, @@ -488,24 +454,36 @@ _X11TransConnectDisplay ( if (phostname) Xfree (phostname); if (address && address != addrbuf) { Xfree(address); address = addrbuf; } -#if defined(LOCALCONN) && defined(UNIXCONN) - if (try_unix_socket) { - pprotocol = copystring ("unix", 4); - phostname = NULL; - try_unix_socket = False; /* Do this only once */ - goto connect; - } -#endif - -#if defined(TCPCONN) - if (tcphostname) { - pprotocol = copystring("tcp", 3); - phostname = tcphostname; - tcphostname = NULL; - reset_hostname = True; - goto connect; +#if defined(LOCALCONN) || defined(UNIXCONN) || defined(TCPCONN) + /* If connecting to the local machine, and we failed, try again with + * the next transport type available, if there is one. + */ + if (local_transport_index >= 0) { + if (local_transport[++local_transport_index] != NULL) { + pprotocol = Xstrdup(local_transport[local_transport_index]); +#ifdef TCPCONN + if (strcmp(pprotocol, "tcp") == 0) { + if (original_hostname != NULL) { + phostname = original_hostname; + original_hostname = NULL; + } else { + phostname = copystring("localhost", 9); + } + } else +#endif /* TCPCONN */ + { + if ((phostname != NULL) && (original_hostname == NULL)) { + original_hostname = phostname; + } + phostname = NULL; + } + goto connect; + } } -#endif + + /* No more to try, we've failed all available local transports */ + if (original_hostname) Xfree(original_hostname); +#endif /* LOCALCONN || UNIXCONN || TCPCONN */ if (pdpynum) Xfree (pdpynum); if (pscrnum) Xfree (pscrnum); @@ -552,7 +530,7 @@ int _XConnectDisplay ( * * *****************************************************************************/ -/* +/* * Disconnect from server. */ @@ -688,7 +666,7 @@ static _Xconst int default_xauth_lengths[] = { }; #define NUM_DEFAULT_AUTH (sizeof (default_xauth_names) / sizeof (default_xauth_names[0])) - + static char **xauth_names = default_xauth_names; static _Xconst int *xauth_lengths = default_xauth_lengths; @@ -1137,18 +1115,18 @@ GetAuthorization( { unsigned char ipv4mappedprefix[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff }; - - /* In the case of v4 mapped addresses send the v4 + + /* In the case of v4 mapped addresses send the v4 part of the address - addr is already in network byte order */ if (memcmp((char*)addr+8, ipv4mappedprefix, 12) == 0) { for (i = 20 ; i < 24; i++) xdmcp_data[j++] = ((char *)addr)[i]; - + /* Port number */ for (i=2; i<4; i++) xdmcp_data[j++] = ((char *)addr)[i]; } else { - /* Fake data to keep the data aligned. Otherwise the + /* Fake data to keep the data aligned. Otherwise the the server will bail about incorrect timing data */ for (i = 0; i < 6; i++) { xdmcp_data[j++] = 0; @@ -1172,14 +1150,14 @@ GetAuthorization( unsigned short the_port; unsigned long the_utime; struct timeval tp; - + X_GETTIMEOFDAY(&tp); _XLockMutex(_Xglobal_lock); the_addr = unix_addr--; _XUnlockMutex(_Xglobal_lock); the_utime = (unsigned long) tp.tv_usec; the_port = getpid (); - + xdmcp_data[j++] = (the_utime >> 24) & 0xFF; xdmcp_data[j++] = (the_utime >> 16) & 0xFF; xdmcp_data[j++] = ((the_utime >> 8) & 0xF0) diff --git a/libX11/src/Context.c b/libX11/src/Context.c index 747bb6be7..4c547d7fe 100644 --- a/libX11/src/Context.c +++ b/libX11/src/Context.c @@ -5,13 +5,13 @@ Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -156,7 +156,7 @@ static void _XFreeContextDB(Display *display) /* Save the given value of data to correspond with the keys XID and context. Returns nonzero error code if an error has occured, 0 otherwise. Possible errors are Out-of-memory. -*/ +*/ int XSaveContext( Display *display, @@ -230,16 +230,12 @@ int XSaveContext( -/* Given an XID and context, returns the associated data. Note that data +/* Given an XID and context, returns the associated data. Note that data here is a pointer since it is a return value. Returns nonzero error code if an error has occured, 0 otherwise. Possible errors are Entry-not-found. */ -int XFindContext(display, rid, context, data) - Display *display; - register XID rid; - register XContext context; - XPointer *data; /* RETURN */ +int XFindContext(Display *display, XID rid, XContext context, XPointer *data) { register DB db; register TableEntry entry; @@ -274,10 +270,7 @@ int XFindContext(display, rid, context, data) with the same arguments. */ -int XDeleteContext(display, rid, context) - Display *display; - register XID rid; - register XContext context; +int XDeleteContext(Display *display, XID rid, XContext context) { register DB db; register TableEntry entry, *prev; diff --git a/libX11/src/ConvSel.c b/libX11/src/ConvSel.c index e60148eef..bb7a6b713 100644 --- a/libX11/src/ConvSel.c +++ b/libX11/src/ConvSel.c @@ -34,7 +34,7 @@ in this Software without prior written authorization from The Open Group. int XConvertSelection( register Display *dpy, - Atom selection, + Atom selection, Atom target, Atom property, Window requestor, diff --git a/libX11/src/CopyArea.c b/libX11/src/CopyArea.c index a2dc6fa97..d32144e1c 100644 --- a/libX11/src/CopyArea.c +++ b/libX11/src/CopyArea.c @@ -41,7 +41,7 @@ XCopyArea( int src_y, unsigned int width, unsigned int height, - int dst_x, + int dst_x, int dst_y) { diff --git a/libX11/src/CopyCmap.c b/libX11/src/CopyCmap.c index 127c15b1b..94a9d0184 100644 --- a/libX11/src/CopyCmap.c +++ b/libX11/src/CopyCmap.c @@ -61,6 +61,6 @@ Colormap XCopyColormapAndFree( #if XCMS _XcmsCopyCmapRecAndFree(dpy, src_cmap, mid); #endif - + return(mid); } diff --git a/libX11/src/CopyGC.c b/libX11/src/CopyGC.c index f94914ae4..9e78c3519 100644 --- a/libX11/src/CopyGC.c +++ b/libX11/src/CopyGC.c @@ -46,7 +46,7 @@ XCopyGC ( LockDisplay(dpy); mask &= (1L << (GCLastBit + 1)) - 1; - /* if some of the source values to be copied are "dirty", flush them + /* if some of the source values to be copied are "dirty", flush them out before sending the CopyGC request. */ if (srcGC->dirty & mask) _XFlushGCCache(dpy, srcGC); @@ -61,7 +61,7 @@ XCopyGC ( if (mask & GCFunction) destgv->function = srcgv->function; - + if (mask & GCPlaneMask) destgv->plane_mask = srcgv->plane_mask; @@ -79,14 +79,14 @@ XCopyGC ( if (mask & GCCapStyle) destgv->cap_style = srcgv->cap_style; - + if (mask & GCJoinStyle) destgv->join_style = srcgv->join_style; if (mask & GCFillStyle) destgv->fill_style = srcgv->fill_style; - if (mask & GCFillRule) + if (mask & GCFillRule) destgv->fill_rule = srcgv->fill_rule; if (mask & GCArcMode) @@ -104,19 +104,19 @@ XCopyGC ( if (mask & GCTileStipYOrigin) destgv->ts_y_origin = srcgv->ts_y_origin; - if (mask & GCFont) + if (mask & GCFont) destgv->font = srcgv->font; - if (mask & GCSubwindowMode) + if (mask & GCSubwindowMode) destgv->subwindow_mode = srcgv->subwindow_mode; - if (mask & GCGraphicsExposures) + if (mask & GCGraphicsExposures) destgv->graphics_exposures = srcgv->graphics_exposures; - if (mask & GCClipXOrigin) + if (mask & GCClipXOrigin) destgv->clip_x_origin = srcgv->clip_x_origin; - if (mask & GCClipYOrigin) + if (mask & GCClipYOrigin) destgv->clip_y_origin = srcgv->clip_y_origin; if (mask & GCClipMask) { @@ -124,7 +124,7 @@ XCopyGC ( destgv->clip_mask = srcgv->clip_mask; } - if (mask & GCDashOffset) + if (mask & GCDashOffset) destgv->dash_offset = srcgv->dash_offset; if (mask & GCDashList) { diff --git a/libX11/src/CopyPlane.c b/libX11/src/CopyPlane.c index 5d1dbb9d2..fd512dfe9 100644 --- a/libX11/src/CopyPlane.c +++ b/libX11/src/CopyPlane.c @@ -39,13 +39,13 @@ XCopyPlane( GC gc, int src_x, int src_y, - unsigned int width, + unsigned int width, unsigned int height, int dst_x, int dst_y, unsigned long bit_plane) -{ +{ register xCopyPlaneReq *req; LockDisplay(dpy); diff --git a/libX11/src/CrBFData.c b/libX11/src/CrBFData.c index 2e665dfe7..844ba92a8 100644 --- a/libX11/src/CrBFData.c +++ b/libX11/src/CrBFData.c @@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group. #include "Xlib.h" /* - * XCreateBitmapFromData: Routine to make a pixmap of depth 1 from user + * XCreateBitmapFromData: Routine to make a pixmap of depth 1 from user * supplied data. * D is any drawable on the same screen that the pixmap will be used in. - * Data is a pointer to the bit data, and + * Data is a pointer to the bit data, and * width & height give the size in bits of the pixmap. * * The following format is assumed for data: @@ -47,7 +47,7 @@ in this Software without prior written authorization from The Open Group. * bitmap_unit=8 * xoffset=0 * no extra bytes per line - */ + */ Pixmap XCreateBitmapFromData( Display *display, Drawable d, diff --git a/libX11/src/CrCursor.c b/libX11/src/CrCursor.c index ba1b0c2b7..6417b0ebf 100644 --- a/libX11/src/CrCursor.c +++ b/libX11/src/CrCursor.c @@ -41,22 +41,22 @@ _XTryShapeBitmapCursor (Display *dpy, unsigned int x, unsigned int y); #endif - + Cursor XCreatePixmapCursor( register Display *dpy, Pixmap source, Pixmap mask, - XColor *foreground, + XColor *foreground, XColor *background, unsigned int x, unsigned int y) -{ +{ register xCreateCursorReq *req; Cursor cid; #ifdef USE_DYNAMIC_XCURSOR - cid = _XTryShapeBitmapCursor (dpy, source, mask, + cid = _XTryShapeBitmapCursor (dpy, source, mask, foreground, background, x, y); if (cid) return cid; diff --git a/libX11/src/CrGC.c b/libX11/src/CrGC.c index e6aa35807..23fd279fe 100644 --- a/libX11/src/CrGC.c +++ b/libX11/src/CrGC.c @@ -150,10 +150,10 @@ _XGenerateGCList ( req->length += (nvalues = value - values); - /* + /* * note: Data is a macro that uses its arguments multiple * times, so "nvalues" is changed in a separate assignment - * statement + * statement */ nvalues <<= 2; @@ -175,7 +175,7 @@ _XUpdateGCCache ( gv->function = attr->function; gc->dirty |= GCFunction; } - + if (mask & GCPlaneMask) if (gv->plane_mask != attr->plane_mask) { gv->plane_mask = attr->plane_mask; @@ -211,7 +211,7 @@ _XUpdateGCCache ( gv->cap_style = attr->cap_style; gc->dirty |= GCCapStyle; } - + if (mask & GCJoinStyle) if (gv->join_style != attr->join_style) { gv->join_style = attr->join_style; @@ -333,7 +333,7 @@ void _XFlushGCCache( } } -void +void XFlushGC( Display *dpy, GC gc) @@ -342,6 +342,6 @@ XFlushGC( } GContext XGContextFromGC(GC gc) -{ +{ return (gc->gid); } diff --git a/libX11/src/CrGlCur.c b/libX11/src/CrGlCur.c index 0adb4a4ad..812559392 100644 --- a/libX11/src/CrGlCur.c +++ b/libX11/src/CrGlCur.c @@ -46,6 +46,10 @@ in this Software without prior written authorization from The Open Group. #endif #include "Cr.h" +#ifdef __CYGWIN__ +#define LIBXCURSOR "cygXcursor-1.dll" +#endif + #if defined(hpux) typedef shl_dt XModuleType; #else @@ -89,7 +93,7 @@ fetch_symbol (XModuleType module, const char *under_symbol) #if defined(hpux) int getsyms_cnt, i; struct shl_symbol *symbols; - + getsyms_cnt = shl_getsymbols(module, TYPE_PROCEDURE, EXPORT_SYMBOLS, malloc, &symbols); @@ -228,12 +232,12 @@ Cursor XCreateGlyphCursor( unsigned int mask_char, XColor _Xconst *foreground, XColor _Xconst *background) -{ +{ Cursor cid; register xCreateGlyphCursorReq *req; #ifdef USE_DYNAMIC_XCURSOR - cid = _XTryShapeCursor (dpy, source_font, mask_font, + cid = _XTryShapeCursor (dpy, source_font, mask_font, source_char, mask_char, foreground, background); if (cid) return cid; diff --git a/libX11/src/CrPFBData.c b/libX11/src/CrPFBData.c index e08b65c2b..8ec88abb6 100644 --- a/libX11/src/CrPFBData.c +++ b/libX11/src/CrPFBData.c @@ -34,7 +34,7 @@ in this Software without prior written authorization from The Open Group. /* * XCreatePixmapFromBitmapData: Routine to make a pixmap from user supplied bitmap data. * D is any drawable on the same screen that the pixmap will be used in. - * Data is a pointer to the bit data, and + * Data is a pointer to the bit data, and * width & height give the size in bits of the pixmap. * Fg and Bg are the pixel values to use for the two colors. * Depth is the depth of the pixmap to create. @@ -48,14 +48,14 @@ in this Software without prior written authorization from The Open Group. * bitmap_unit=8 * xoffset=0 * no extra bytes per line - */ + */ Pixmap XCreatePixmapFromBitmapData( Display *display, Drawable d, char *data, - unsigned int width, + unsigned int width, unsigned int height, - unsigned long fg, + unsigned long fg, unsigned long bg, unsigned int depth) { diff --git a/libX11/src/CrWindow.c b/libX11/src/CrWindow.c index d0b17a2ad..ca56d60f9 100644 --- a/libX11/src/CrWindow.c +++ b/libX11/src/CrWindow.c @@ -33,9 +33,9 @@ in this Software without prior written authorization from The Open Group. Window XCreateSimpleWindow( register Display *dpy, Window parent, - int x, + int x, int y, - unsigned int width, + unsigned int width, unsigned int height, unsigned int borderWidth, unsigned long border, diff --git a/libX11/src/Cursor.c b/libX11/src/Cursor.c index 76ac3be73..4bacfc970 100644 --- a/libX11/src/Cursor.c +++ b/libX11/src/Cursor.c @@ -37,7 +37,7 @@ Cursor XCreateFontCursor( Display *dpy, unsigned int which) { - /* + /* * the cursor font contains the shape glyph followed by the mask * glyph; so character position 0 contains a shape, 1 the mask for 0, * 2 a shape, etc. contains hash define names @@ -49,7 +49,7 @@ Cursor XCreateFontCursor( if (dpy->cursor_font == None) return None; } - return XCreateGlyphCursor (dpy, dpy->cursor_font, dpy->cursor_font, + return XCreateGlyphCursor (dpy, dpy->cursor_font, dpy->cursor_font, which, which + 1, &foreground, &background); } diff --git a/libX11/src/Depths.c b/libX11/src/Depths.c index dba1471d8..7285be1c3 100644 --- a/libX11/src/Depths.c +++ b/libX11/src/Depths.c @@ -52,7 +52,7 @@ int *XListDepths ( depths = (int *) Xmalloc (count * sizeof(int)); if (!depths) return NULL; - for (i = 0, dp = scr->depths; i < count; i++, dp++) + for (i = 0, dp = scr->depths; i < count; i++, dp++) depths[i] = dp->depth; } else { /* a screen must have a depth */ diff --git a/libX11/src/DisName.c b/libX11/src/DisName.c index 59b5b3e1f..385ec39de 100644 --- a/libX11/src/DisName.c +++ b/libX11/src/DisName.c @@ -30,14 +30,14 @@ from The Open Group. /* $XFree86$ */ /* XDisplayName.c */ -/* +/* * Returns the name of the display XOpenDisplay would use. This is better * than just printing the "display" variable in a program because that * could be NULL and/or there could be an environment variable set. * This makes it easier for programmers to provide meaningful error - * messages. + * messages. + * * - * * For example, this is used in XOpenDisplay() as * strncpy( displaybuf, XDisplayName( display ), sizeof(displaybuf) ); * if ( *displaybuf == '\0' ) return( NULL ); diff --git a/libX11/src/DrArc.c b/libX11/src/DrArc.c index 1f1c86a70..5bc6c4a08 100644 --- a/libX11/src/DrArc.c +++ b/libX11/src/DrArc.c @@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group. We don't do this because X_PolyArc applies the GC's join-style if the last point in one arc coincides with the first point in another. The client wouldn't expect this and would have no easy way to defeat it. */ - + #ifdef HAVE_CONFIG_H #include #endif @@ -46,7 +46,7 @@ XDrawArc( int y, /* INT16 */ unsigned int width, unsigned int height, /* CARD16 */ - int angle1, + int angle1, int angle2) /* INT16 */ { register xPolyArcReq *req; diff --git a/libX11/src/DrLine.c b/libX11/src/DrLine.c index 9c5275b0c..29a3ecbfc 100644 --- a/libX11/src/DrLine.c +++ b/libX11/src/DrLine.c @@ -42,8 +42,8 @@ XDrawLine ( Drawable d, GC gc, int x1, - int y1, - int x2, + int y1, + int x2, int y2) { register xSegment *segment; diff --git a/libX11/src/DrRect.c b/libX11/src/DrRect.c index 682c00244..a707228a1 100644 --- a/libX11/src/DrRect.c +++ b/libX11/src/DrRect.c @@ -41,7 +41,7 @@ XDrawRectangle( register Display *dpy, Drawable d, GC gc, - int x, + int x, int y, /* INT16 */ unsigned int width, unsigned int height) /* CARD16 */ diff --git a/libX11/src/ErrDes.c b/libX11/src/ErrDes.c index ca5dfeb34..0ec0a9d47 100644 --- a/libX11/src/ErrDes.c +++ b/libX11/src/ErrDes.c @@ -32,13 +32,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -123,10 +123,10 @@ XGetErrorText( if (ext->error_string) (*ext->error_string)(dpy, code, &ext->codes, buffer, nbytes); if (ext->codes.first_error && - ext->codes.first_error < code && + ext->codes.first_error <= code && (!bext || ext->codes.first_error > bext->codes.first_error)) bext = ext; - } + } if (!buffer[0] && bext) { sprintf(buf, "%s.%d", bext->name, code - bext->codes.first_error); (void) XGetErrorDatabaseText(dpy, "XProtoError", buf, "", buffer, nbytes); @@ -194,7 +194,7 @@ XGetErrorDatabaseText( tptr = Xmalloc (tlen); if (tptr) { sprintf(tptr, "%s.%s", name, type); - XrmGetResource(db, tptr, "ErrorType.ErrorNumber", + XrmGetResource(db, tptr, "ErrorType.ErrorNumber", &type_str, &result); if (tptr != temp) Xfree (tptr); diff --git a/libX11/src/ErrHndlr.c b/libX11/src/ErrHndlr.c index b3c2ce5a0..52205fbe6 100644 --- a/libX11/src/ErrHndlr.c +++ b/libX11/src/ErrHndlr.c @@ -31,12 +31,12 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * XErrorHandler - This procedure sets the X non-fatal error handler * (_XErrorFunction) to be the specified routine. If NULL is passed in * the original error handler is restored. */ - + XErrorHandler XSetErrorHandler(XErrorHandler handler) { @@ -59,12 +59,12 @@ XSetErrorHandler(XErrorHandler handler) return (XErrorHandler) oldhandler; } -/* +/* * XIOErrorHandler - This procedure sets the X fatal I/O error handler - * (_XIOErrorFunction) to be the specified routine. If NULL is passed in + * (_XIOErrorFunction) to be the specified routine. If NULL is passed in * the original error handler is restored. */ - + XIOErrorHandler XSetIOErrorHandler(XIOErrorHandler handler) { diff --git a/libX11/src/EvToWire.c b/libX11/src/EvToWire.c index 143352791..124fb7446 100644 --- a/libX11/src/EvToWire.c +++ b/libX11/src/EvToWire.c @@ -355,12 +355,12 @@ register xEvent *event) /* wire protocol event */ case ClientMessage: { register int i; - register XClientMessageEvent *ev + register XClientMessageEvent *ev = (XClientMessageEvent *) re; event->u.clientMessage.window = ev->window; event->u.u.detail = ev->format; switch (ev->format) { - case 8: + case 8: event->u.clientMessage.u.b.type = ev->message_type; for (i = 0; i < 20; i++) event->u.clientMessage.u.b.bytes[i] = ev->data.b[i]; @@ -400,7 +400,7 @@ register xEvent *event) /* wire protocol event */ event->u.mappingNotify.count = ev->count; } break; - + default: return(_XUnknownNativeEvent(dpy, re, event)); } diff --git a/libX11/src/FSWrap.c b/libX11/src/FSWrap.c index b4e17e445..0ea34894f 100644 --- a/libX11/src/FSWrap.c +++ b/libX11/src/FSWrap.c @@ -18,15 +18,15 @@ * OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. - * - * M. Collins OSF + * + * M. Collins OSF * * Katsuhisa Yano TOSHIBA Corp. - */ + */ /* @@ -181,13 +181,13 @@ XCreateFontSet ( om = XOpenOM(dpy, NULL, NULL, NULL); if (om == NULL) return (XFontSet) NULL; - + if ((oc = XCreateOC(om, XNBaseFontName, base_font_name_list, NULL))) { list = &oc->core.missing_list; oc->core.om_automatic = True; } else list = &om->core.required_charset; - + *missing_charset_list = copy_string_list(list->charset_list, list->charset_count); *missing_charset_count = list->charset_count; @@ -200,7 +200,7 @@ XCreateFontSet ( if (!*def_string) *def_string = ""; } - + if (oc == NULL) XCloseOM(om); diff --git a/libX11/src/FetchName.c b/libX11/src/FetchName.c index 16b2f7a38..a04e343f1 100644 --- a/libX11/src/FetchName.c +++ b/libX11/src/FetchName.c @@ -44,7 +44,7 @@ Status XFetchName ( unsigned long nitems; unsigned long leftover; unsigned char *data = NULL; - if (XGetWindowProperty(dpy, w, XA_WM_NAME, 0L, (long)BUFSIZ, False, XA_STRING, + if (XGetWindowProperty(dpy, w, XA_WM_NAME, 0L, (long)BUFSIZ, False, XA_STRING, &actual_type, &actual_format, &nitems, &leftover, &data) != Success) { *name = NULL; @@ -75,7 +75,7 @@ Status XGetIconName ( unsigned long leftover; unsigned char *data = NULL; if (XGetWindowProperty(dpy, w, XA_WM_ICON_NAME, 0L, (long)BUFSIZ, False, - XA_STRING, + XA_STRING, &actual_type, &actual_format, &nitems, &leftover, &data) != Success) { *icon_name = NULL; diff --git a/libX11/src/FillPoly.c b/libX11/src/FillPoly.c index b3a7f6368..3ec3545fc 100644 --- a/libX11/src/FillPoly.c +++ b/libX11/src/FillPoly.c @@ -58,7 +58,7 @@ XFillPolygon( /* shift (mult. by 4) before passing to the (possible) macro */ nbytes = n_points << 2; - + Data16 (dpy, (short *) points, nbytes); UnlockDisplay(dpy); SyncHandle(); diff --git a/libX11/src/FillRct.c b/libX11/src/FillRct.c index 09bc5422d..2859ceb5c 100644 --- a/libX11/src/FillRct.c +++ b/libX11/src/FillRct.c @@ -42,7 +42,7 @@ XFillRectangle( GC gc, int x, int y, /* INT16 */ - unsigned int width, + unsigned int width, unsigned int height) /* CARD16 */ { xRectangle *rect; @@ -57,7 +57,7 @@ XFillRectangle( FlushGC(dpy, gc); { - register xPolyFillRectangleReq *req + register xPolyFillRectangleReq *req = (xPolyFillRectangleReq *) dpy->last_req; /* if same as previous request, with same drawable, batch requests */ diff --git a/libX11/src/FillRcts.c b/libX11/src/FillRcts.c index 54011f65c..1e66d443f 100644 --- a/libX11/src/FillRcts.c +++ b/libX11/src/FillRcts.c @@ -65,4 +65,4 @@ XFillRectangles( SyncHandle(); return 1; } - + diff --git a/libX11/src/FilterEv.c b/libX11/src/FilterEv.c index 3191759c8..683ba33d1 100644 --- a/libX11/src/FilterEv.c +++ b/libX11/src/FilterEv.c @@ -19,12 +19,12 @@ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * PERFORMANCE OF THIS SOFTWARE. * * Author: Seiji Kuwari OMRON Corporation * kuwa@omron.co.jp * kuwa%omron.co.jp@uunet.uu.net - */ + */ /* diff --git a/libX11/src/Font.c b/libX11/src/Font.c index 5165d5e62..244cd2d72 100644 --- a/libX11/src/Font.c +++ b/libX11/src/Font.c @@ -153,7 +153,7 @@ int XFreeFont( register Display *dpy, XFontStruct *fs) -{ +{ register xResourceReq *req; register _XExtension *ext; @@ -230,7 +230,7 @@ _XQueryFont ( fs->all_chars_exist = reply.allCharsExist; fs->ascent = cvtINT16toInt (reply.fontAscent); fs->descent = cvtINT16toInt (reply.fontDescent); - + #ifdef MUSTCOPY { xCharInfo *xcip; @@ -258,7 +258,7 @@ _XQueryFont ( #endif /* MUSTCOPY */ fs->n_properties = reply.nFontProps; - /* + /* * if no properties defined for the font, then it is bad * font, but shouldn't try to read nothing. */ @@ -290,7 +290,7 @@ _XQueryFont ( (reply.nCharInfos * SIZEOF(xCharInfo))); return (XFontStruct *)NULL; } - + #ifdef MUSTCOPY { register XCharStruct *cs = fs->per_char; @@ -516,7 +516,7 @@ _XF86BigfontQueryFont ( fs->max_bounds = * (XCharStruct *) &reply.maxBounds; fs->n_properties = reply.nFontProps; - /* + /* * if no properties defined for the font, then it is bad * font, but shouldn't try to read nothing. */ diff --git a/libX11/src/FontInfo.c b/libX11/src/FontInfo.c index 0a741b938..796dcccdc 100644 --- a/libX11/src/FontInfo.c +++ b/libX11/src/FontInfo.c @@ -47,7 +47,7 @@ _Xconst char *pattern, /* null-terminated */ int maxNames, int *actualCount, /* RETURN */ XFontStruct **info) /* RETURN */ -{ +{ register long nbytes; register int i; register XFontStruct *fs; @@ -68,7 +68,7 @@ XFontStruct **info) /* RETURN */ for (i = 0; ; i++) { if (!_XReply (dpy, (xReply *) &reply, - ((SIZEOF(xListFontsWithInfoReply) - + ((SIZEOF(xListFontsWithInfoReply) - SIZEOF(xGenericReply)) >> 2), xFalse)) { for (j=(i-1); (j >= 0); j--) { Xfree(flist[j]); @@ -86,7 +86,7 @@ XFontStruct **info) /* RETURN */ size = i + reply.nReplies + 1; if (finfo) { - XFontStruct * tmp_finfo = (XFontStruct *) + XFontStruct * tmp_finfo = (XFontStruct *) Xrealloc ((char *) finfo, (unsigned) (sizeof(XFontStruct) * size)); char ** tmp_flist = (char **) @@ -134,7 +134,7 @@ XFontStruct **info) /* RETURN */ fs->all_chars_exist = reply.allCharsExist; fs->ascent = cvtINT16toInt (reply.fontAscent); fs->descent = cvtINT16toInt (reply.fontDescent); - + #ifdef MUSTCOPY { xCharInfo *xcip; diff --git a/libX11/src/FontNames.c b/libX11/src/FontNames.c index dc097856c..97a0e7a3d 100644 --- a/libX11/src/FontNames.c +++ b/libX11/src/FontNames.c @@ -39,7 +39,7 @@ register Display *dpy, _Xconst char *pattern, /* null-terminated */ int maxNames, int *actualCount) /* RETURN */ -{ +{ register long nbytes; register unsigned i; register int length; @@ -102,7 +102,7 @@ int *actualCount) /* RETURN */ int XFreeFontNames(char **list) -{ +{ if (list) { if (!*(list[0]-1)) { /* from ListFontsWithInfo */ register char **names; diff --git a/libX11/src/FreeEData.c b/libX11/src/FreeEData.c index f70820be7..bb4bb2cbe 100644 --- a/libX11/src/FreeEData.c +++ b/libX11/src/FreeEData.c @@ -36,7 +36,7 @@ _XFreeExtData (XExtData *extension) { XExtData *temp; while (extension) { - if (extension->free_private) + if (extension->free_private) (*extension->free_private)(extension); else Xfree ((char *)extension->private_data); temp = extension->next; diff --git a/libX11/src/FreeGC.c b/libX11/src/FreeGC.c index e76f70b94..1e67cdc65 100644 --- a/libX11/src/FreeGC.c +++ b/libX11/src/FreeGC.c @@ -49,4 +49,4 @@ XFreeGC ( Xfree ((char *) gc); return 1; } - + diff --git a/libX11/src/FreePix.c b/libX11/src/FreePix.c index 55bcd6399..785d66fa4 100644 --- a/libX11/src/FreePix.c +++ b/libX11/src/FreePix.c @@ -35,8 +35,8 @@ int XFreePixmap( register Display *dpy, Pixmap pixmap) -{ - register xResourceReq *req; +{ + register xResourceReq *req; LockDisplay(dpy); GetResReq(FreePixmap, pixmap, req); UnlockDisplay(dpy); diff --git a/libX11/src/Geom.c b/libX11/src/Geom.c index 498c4455e..ab85b97e9 100644 --- a/libX11/src/Geom.c +++ b/libX11/src/Geom.c @@ -67,11 +67,11 @@ XGeometry ( dmask = XParseGeometry(def, &dx, &dy, &dwidth, &dheight); /* set default values */ - *x = (dmask & XNegative) ? - DisplayWidth(dpy, screen) + dx - dwidth * fwidth - + *x = (dmask & XNegative) ? + DisplayWidth(dpy, screen) + dx - dwidth * fwidth - 2 * bwidth - xadd : dx; - *y = (dmask & YNegative) ? - DisplayHeight(dpy, screen) + dy - dheight * fheight - + *y = (dmask & YNegative) ? + DisplayHeight(dpy, screen) + dy - dheight * fheight - 2 * bwidth - yadd : dy; *width = dwidth; *height = dheight; @@ -81,11 +81,11 @@ XGeometry ( if (pmask & XValue) *x = (pmask & XNegative) ? - DisplayWidth(dpy, screen) + px - *width * fwidth - + DisplayWidth(dpy, screen) + px - *width * fwidth - 2 * bwidth - xadd : px; if (pmask & YValue) *y = (pmask & YNegative) ? - DisplayHeight(dpy, screen) + py - *height * fheight - + DisplayHeight(dpy, screen) + py - *height * fheight - 2 * bwidth - yadd : py; return (pmask); } diff --git a/libX11/src/GetAtomNm.c b/libX11/src/GetAtomNm.c index 45b4f481d..3ef24a12b 100644 --- a/libX11/src/GetAtomNm.c +++ b/libX11/src/GetAtomNm.c @@ -52,7 +52,7 @@ char *_XGetAtomName( if ((name = (char *)Xmalloc(idx))) strcpy(name, EntryName(e)); return name; - } + } } } GetResReq(GetAtomName, atom, req); @@ -70,7 +70,7 @@ char *XGetAtomName( if ((name = _XGetAtomName(dpy, atom))) { UnlockDisplay(dpy); return name; - } + } if (_XReply(dpy, (xReply *)&rep, 0, xFalse) == 0) { UnlockDisplay(dpy); SyncHandle(); diff --git a/libX11/src/GetDflt.c b/libX11/src/GetDflt.c index 7b4015258..32dbb5a90 100644 --- a/libX11/src/GetDflt.c +++ b/libX11/src/GetDflt.c @@ -29,13 +29,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/GetFProp.c b/libX11/src/GetFProp.c index e64d9096d..cb0da2dc4 100644 --- a/libX11/src/GetFProp.c +++ b/libX11/src/GetFProp.c @@ -50,7 +50,7 @@ Bool XGetFontProperty ( return (0); } - - - + + + diff --git a/libX11/src/GetGeom.c b/libX11/src/GetGeom.c index 7b44be9f2..aeabc00a5 100644 --- a/libX11/src/GetGeom.c +++ b/libX11/src/GetGeom.c @@ -35,10 +35,10 @@ Status XGetGeometry ( register Display *dpy, Drawable d, Window *root, /* RETURN */ - int *x, + int *x, int *y, /* RETURN */ unsigned int *width, - unsigned int *height, + unsigned int *height, unsigned int *borderWidth, unsigned int *depth) /* RETURN */ { diff --git a/libX11/src/GetHints.c b/libX11/src/GetHints.c index e5ccbcf7b..f52a89222 100644 --- a/libX11/src/GetHints.c +++ b/libX11/src/GetHints.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -99,7 +99,7 @@ Status XGetSizeHints ( return(1); } -/* +/* * must return a pointer to the hint, in malloc'd memory, or routine is not * extensible; any use of the caller's memory would cause things to be stepped * on. @@ -115,7 +115,7 @@ XWMHints *XGetWMHints ( int actual_format; unsigned long leftover; unsigned long nitems; - if (XGetWindowProperty(dpy, w, XA_WM_HINTS, + if (XGetWindowProperty(dpy, w, XA_WM_HINTS, 0L, (long)NumPropWMHintsElements, False, XA_WM_HINTS, &actual_type, &actual_format, &nitems, &leftover, (unsigned char **)&prop) @@ -166,9 +166,9 @@ XGetNormalHints ( return (XGetSizeHints(dpy, w, hints, XA_WM_NORMAL_HINTS)); } - + /* - * XGetIconSizes reads the property + * XGetIconSizes reads the property * ICONSIZE_ATOM type: ICONSIZE_ATOM format: 32 */ @@ -205,7 +205,7 @@ Status XGetIconSizes ( /* static copies not allowed in library, due to reentrancy constraint*/ nitems /= NumPropIconSizeElements; - if (! (hp = hints = (XIconSize *) + if (! (hp = hints = (XIconSize *) Xcalloc ((unsigned) nitems, (unsigned) sizeof(XIconSize)))) { if (prop) Xfree ((char *) prop); return 0; @@ -280,7 +280,7 @@ XGetTransientForHint( unsigned long leftover; Window *data = NULL; if (XGetWindowProperty(dpy, w, XA_WM_TRANSIENT_FOR, 0L, 1L, False, - XA_WINDOW, + XA_WINDOW, &actual_type, &actual_format, &nitems, &leftover, (unsigned char **) &data) != Success) { @@ -312,11 +312,11 @@ XGetClassHint( unsigned long leftover; unsigned char *data = NULL; if (XGetWindowProperty(dpy, w, XA_WM_CLASS, 0L, (long)BUFSIZ, False, - XA_STRING, + XA_STRING, &actual_type, &actual_format, &nitems, &leftover, &data) != Success) return (0); - + if ( (actual_type == XA_STRING) && (actual_format == 8) ) { len_name = strlen((char *) data); if (! (classhint->res_name = Xmalloc((unsigned) (len_name+1)))) { diff --git a/libX11/src/GetIFocus.c b/libX11/src/GetIFocus.c index 6e6f544ba..0f7c508d2 100644 --- a/libX11/src/GetIFocus.c +++ b/libX11/src/GetIFocus.c @@ -37,7 +37,7 @@ XGetInputFocus( register Display *dpy, Window *focus, int *revert_to) -{ +{ xGetInputFocusReply rep; register xReq *req; LockDisplay(dpy); diff --git a/libX11/src/GetImage.c b/libX11/src/GetImage.c index 4a376c67c..99c8d6e91 100644 --- a/libX11/src/GetImage.c +++ b/libX11/src/GetImage.c @@ -73,14 +73,14 @@ XImage *XGetImage ( req->height = height; req->planeMask = plane_mask; req->format = format; - + if (_XReply (dpy, (xReply *) &rep, 0, xFalse) == 0 || rep.length == 0) { UnlockDisplay(dpy); SyncHandle(); return (XImage *)NULL; } - + nbytes = (long)rep.length << 2; data = (char *) Xmalloc((unsigned) nbytes); if (! data) { @@ -117,15 +117,15 @@ XImage *XGetSubImage( unsigned long plane_mask, int format, /* either XYPixmap or ZPixmap */ XImage *dest_image, - int dest_x, + int dest_x, int dest_y) { XImage *temp_image; - temp_image = XGetImage(dpy, d, x, y, width, height, + temp_image = XGetImage(dpy, d, x, y, width, height, plane_mask, format); if (!temp_image) return (XImage *)NULL; _XSetImage(temp_image, dest_image, dest_x, dest_y); XDestroyImage(temp_image); return (dest_image); -} +} diff --git a/libX11/src/GetKCnt.c b/libX11/src/GetKCnt.c index 2cd41d098..f0ed3e199 100644 --- a/libX11/src/GetKCnt.c +++ b/libX11/src/GetKCnt.c @@ -41,7 +41,7 @@ XGetKeyboardControl ( register xReq *req; LockDisplay(dpy); GetEmptyReq (GetKeyboardControl, req); - (void) _XReply (dpy, (xReply *) &rep, + (void) _XReply (dpy, (xReply *) &rep, (SIZEOF(xGetKeyboardControlReply) - SIZEOF(xReply)) >> 2, xTrue); state->key_click_percent = rep.keyClickPercent; diff --git a/libX11/src/GetMoEv.c b/libX11/src/GetMoEv.c index dac1bfc4c..a200f7871 100644 --- a/libX11/src/GetMoEv.c +++ b/libX11/src/GetMoEv.c @@ -34,10 +34,10 @@ in this Software without prior written authorization from The Open Group. XTimeCoord *XGetMotionEvents( register Display *dpy, Window w, - Time start, + Time start, Time stop, int *nEvents) /* RETURN */ -{ +{ xGetMotionEventsReply rep; register xGetMotionEventsReq *req; XTimeCoord *tc = NULL; @@ -53,10 +53,10 @@ XTimeCoord *XGetMotionEvents( SyncHandle(); return (NULL); } - + if (rep.nEvents) { if (! (tc = (XTimeCoord *) - Xmalloc( (unsigned) + Xmalloc( (unsigned) (nbytes = (long) rep.nEvents * sizeof(XTimeCoord))))) { _XEatData (dpy, (unsigned long) nbytes); UnlockDisplay(dpy); diff --git a/libX11/src/GetNrmHint.c b/libX11/src/GetNrmHint.c index 46841a60c..62daa84bf 100644 --- a/libX11/src/GetNrmHint.c +++ b/libX11/src/GetNrmHint.c @@ -5,20 +5,20 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL AND WYSE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL DIGITAL OR WYSE 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 +software without specific, written prior permission. + +DIGITAL AND WYSE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL DIGITAL OR WYSE 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. ******************************************************************/ @@ -74,10 +74,10 @@ Status XGetWMSizeHints ( unsigned long leftover; unsigned long nitems; - if (XGetWindowProperty (dpy, w, property, 0L, + if (XGetWindowProperty (dpy, w, property, 0L, (long)NumPropSizeElements, False, XA_WM_SIZE_HINTS, &actual_type, - &actual_format, &nitems, &leftover, + &actual_format, &nitems, &leftover, (unsigned char **)&prop) != Success) return False; diff --git a/libX11/src/GetPCnt.c b/libX11/src/GetPCnt.c index 55a2f2153..857f97339 100644 --- a/libX11/src/GetPCnt.c +++ b/libX11/src/GetPCnt.c @@ -39,7 +39,7 @@ XGetPointerControl( int *accel_numer, int *accel_denom, int *threshold) -{ +{ xGetPointerControlReply rep; xReq *req; LockDisplay(dpy); diff --git a/libX11/src/GetPntMap.c b/libX11/src/GetPntMap.c index 426c9ac9d..f3446354e 100644 --- a/libX11/src/GetPntMap.c +++ b/libX11/src/GetPntMap.c @@ -67,11 +67,11 @@ int XGetPointerMapping ( _XRead (dpy, (char *)mapping, nbytes); /* don't return more data than the user asked for. */ if (rep.nElts) { - memcpy ((char *) map, (char *) mapping, + memcpy ((char *) map, (char *) mapping, MIN((int)rep.nElts, nmaps) ); } - if (remainder) + if (remainder) _XEatData(dpy, (unsigned long)remainder); UnlockDisplay(dpy); diff --git a/libX11/src/GetProp.c b/libX11/src/GetProp.c index 12c641e3b..564e1f778 100644 --- a/libX11/src/GetProp.c +++ b/libX11/src/GetProp.c @@ -60,22 +60,22 @@ XGetWindowProperty( req->longOffset = offset; req->longLength = length; error.sequenceNumber = dpy->request; - + if (!_XReply (dpy, (xReply *) &reply, 0, xFalse)) { UnlockDisplay(dpy); SyncHandle(); return (1); /* not Success */ - } + } *prop = (unsigned char *) NULL; if (reply.propertyType != None) { long nbytes, netbytes; switch (reply.format) { - /* + /* * One extra byte is malloced than is needed to contain the property - * data, but this last byte is null terminated and convenient for - * returning string properties, so the client doesn't then have to - * recopy the string to make it null terminated. + * data, but this last byte is null terminated and convenient for + * returning string properties, so the client doesn't then have to + * recopy the string to make it null terminated. */ case 8: nbytes = netbytes = reply.nItems; @@ -104,7 +104,7 @@ XGetWindowProperty( /* * This part of the code should never be reached. If it is, * the server sent back a property with an invalid format. - * This is a BadImplementation error. + * This is a BadImplementation error. */ { /* sequence number stored above */ diff --git a/libX11/src/GetRGBCMap.c b/libX11/src/GetRGBCMap.c index 45a94b782..99bdcfbb7 100644 --- a/libX11/src/GetRGBCMap.c +++ b/libX11/src/GetRGBCMap.c @@ -69,7 +69,7 @@ Status XGetRGBColormaps ( } /* - * See how many properties were found; if pre-ICCCM then assume + * See how many properties were found; if pre-ICCCM then assume * default visual and a kill id of 1. */ if (nitems < NumPropStandardColormapElements) { @@ -86,7 +86,7 @@ Status XGetRGBColormaps ( } } else { /* - * make sure we have an integral number of colormaps + * make sure we have an integral number of colormaps */ ncmaps = (nitems / NumPropStandardColormapElements); if ((((unsigned long) ncmaps) * NumPropStandardColormapElements) != @@ -96,7 +96,7 @@ Status XGetRGBColormaps ( } } - + /* * allocate array */ diff --git a/libX11/src/GetSSaver.c b/libX11/src/GetSSaver.c index 080680461..c587c69c1 100644 --- a/libX11/src/GetSSaver.c +++ b/libX11/src/GetSSaver.c @@ -40,8 +40,8 @@ XGetScreenSaver( int *interval, int *prefer_blanking, int *allow_exp) /*boolean */ - -{ + +{ xGetScreenSaverReply rep; register xReq *req; LockDisplay(dpy); diff --git a/libX11/src/GetStCmap.c b/libX11/src/GetStCmap.c index 0c05cbbf2..bdd57f772 100644 --- a/libX11/src/GetStCmap.c +++ b/libX11/src/GetStCmap.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -57,7 +57,7 @@ SOFTWARE. /* * WARNING - * + * * This is a pre-ICCCM routine. It must not reference any of the new fields * in the XStandardColormap structure. */ @@ -99,7 +99,7 @@ Status XGetStandardColormap ( } else { use = stdcmaps; } - + /* * assign only those fields which were in the pre-ICCCM version */ diff --git a/libX11/src/GetTxtProp.c b/libX11/src/GetTxtProp.c index 90db0d442..44e983a64 100644 --- a/libX11/src/GetTxtProp.c +++ b/libX11/src/GetTxtProp.c @@ -4,13 +4,13 @@ Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name Wyse not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/GetWAttrs.c b/libX11/src/GetWAttrs.c index 05f1c1124..852c66ed3 100644 --- a/libX11/src/GetWAttrs.c +++ b/libX11/src/GetWAttrs.c @@ -91,14 +91,14 @@ _XGetWindowAttributes( register Display *dpy, Window w, XWindowAttributes *attr) -{ +{ xGetGeometryReply rep; register xResourceReq *req; register int i; register Screen *sp; _XAsyncHandler async; _XWAttrsState async_state; - + GetResReq(GetWindowAttributes, w, req); async_state.attr_seq = dpy->request; diff --git a/libX11/src/GetWMCMapW.c b/libX11/src/GetWMCMapW.c index a99fb62ba..b5d481fd4 100644 --- a/libX11/src/GetWMCMapW.c +++ b/libX11/src/GetWMCMapW.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/GetWMProto.c b/libX11/src/GetWMProto.c index f0be1bb8f..bb0ff651b 100644 --- a/libX11/src/GetWMProto.c +++ b/libX11/src/GetWMProto.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/GrButton.c b/libX11/src/GrButton.c index 17177fd28..499a51555 100644 --- a/libX11/src/GrButton.c +++ b/libX11/src/GrButton.c @@ -39,7 +39,7 @@ XGrabButton( Window grab_window, Bool owner_events, unsigned int event_mask, /* CARD16 */ - int pointer_mode, + int pointer_mode, int keyboard_mode, Window confine_to, Cursor curs) diff --git a/libX11/src/GrKey.c b/libX11/src/GrKey.c index 47983b5a1..8cd03d93a 100644 --- a/libX11/src/GrKey.c +++ b/libX11/src/GrKey.c @@ -38,7 +38,7 @@ XGrabKey( unsigned int modifiers, Window grab_window, Bool owner_events, - int pointer_mode, + int pointer_mode, int keyboard_mode) { diff --git a/libX11/src/GrKeybd.c b/libX11/src/GrKeybd.c index e4ea053a8..450a67cc5 100644 --- a/libX11/src/GrKeybd.c +++ b/libX11/src/GrKeybd.c @@ -50,7 +50,7 @@ int XGrabKeyboard ( req->time = time; /* if we ever return, suppress the error */ - if (_XReply (dpy, (xReply *) &rep, 0, xTrue) == 0) + if (_XReply (dpy, (xReply *) &rep, 0, xTrue) == 0) rep.status = GrabSuccess; status = rep.status; UnlockDisplay(dpy); diff --git a/libX11/src/GrPointer.c b/libX11/src/GrPointer.c index 8aab6865a..9958af491 100644 --- a/libX11/src/GrPointer.c +++ b/libX11/src/GrPointer.c @@ -55,7 +55,7 @@ int XGrabPointer( req->confineTo = confine_to; req->cursor = curs; req->time = time; - + /* if we ever return, suppress the error */ if (_XReply (dpy, (xReply *) &rep, 0, xTrue) == 0) rep.status = GrabSuccess; diff --git a/libX11/src/Host.c b/libX11/src/Host.c index a1ca8701c..a25e275f4 100644 --- a/libX11/src/Host.c +++ b/libX11/src/Host.c @@ -54,13 +54,11 @@ XAddHost ( XServerInterpretedAddress *siAddr; int addrlen; - if (host->family == FamilyServerInterpreted) { - siAddr = (XServerInterpretedAddress *) host->address; - addrlen = siAddr->typelength + siAddr->valuelength + 1; - } else { - addrlen = host->length; - } - + siAddr = host->family == FamilyServerInterpreted ? + (XServerInterpretedAddress *)host->address : NULL; + addrlen = siAddr ? + siAddr->typelength + siAddr->valuelength + 1 : host->length; + length = (addrlen + 3) & ~0x3; /* round up */ LockDisplay(dpy); @@ -68,7 +66,7 @@ XAddHost ( req->mode = HostInsert; req->hostFamily = host->family; req->hostLength = addrlen; - if (host->family == FamilyServerInterpreted) { + if (siAddr) { char *dest = (char *) NEXTPTR(req,xChangeHostsReq); memcpy(dest, siAddr->type, siAddr->typelength); dest[siAddr->typelength] = '\0'; @@ -91,13 +89,11 @@ XRemoveHost ( XServerInterpretedAddress *siAddr; int addrlen; - if (host->family == FamilyServerInterpreted) { - siAddr = (XServerInterpretedAddress *) host->address; - addrlen = siAddr->typelength + siAddr->valuelength + 1; - } else { - addrlen = host->length; - } - + siAddr = host->family == FamilyServerInterpreted ? + (XServerInterpretedAddress *)host->address : NULL; + addrlen = siAddr ? + siAddr->typelength + siAddr->valuelength + 1 : host->length; + length = (addrlen + 3) & ~0x3; /* round up */ LockDisplay(dpy); @@ -105,7 +101,7 @@ XRemoveHost ( req->mode = HostDelete; req->hostFamily = host->family; req->hostLength = addrlen; - if (host->family == FamilyServerInterpreted) { + if (siAddr) { char *dest = (char *) NEXTPTR(req,xChangeHostsReq); memcpy(dest, siAddr->type, siAddr->typelength); dest[siAddr->typelength] = '\0'; diff --git a/libX11/src/Iconify.c b/libX11/src/Iconify.c index 973f3d570..367b1c706 100644 --- a/libX11/src/Iconify.c +++ b/libX11/src/Iconify.c @@ -5,13 +5,13 @@ Copyright 1988 by Wyse Technology, Inc., San Jose, Ca. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name Wyse not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/IfEvent.c b/libX11/src/IfEvent.c index 73a36b4ee..05a2b82cb 100644 --- a/libX11/src/IfEvent.c +++ b/libX11/src/IfEvent.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Flush output and (wait for and) return the next event matching the * predicate in the queue. */ @@ -50,7 +50,7 @@ XIfEvent ( { register _XQEvent *qelt, *prev; unsigned long qe_serial = 0; - + LockDisplay(dpy); prev = NULL; while (1) { diff --git a/libX11/src/ImText.c b/libX11/src/ImText.c index 4d2f147dc..97c26a91a 100644 --- a/libX11/src/ImText.c +++ b/libX11/src/ImText.c @@ -41,7 +41,7 @@ XDrawImageString( int y, _Xconst char *string, int length) -{ +{ register xImageText8Req *req; char *CharacterOffset = (char *)string; int FirstTimeThrough = True; @@ -50,7 +50,7 @@ XDrawImageString( LockDisplay(dpy); FlushGC(dpy, gc); - while (length > 0) + while (length > 0) { int Unit; diff --git a/libX11/src/ImText16.c b/libX11/src/ImText16.c index d0b5e9bca..3dbe5c13b 100644 --- a/libX11/src/ImText16.c +++ b/libX11/src/ImText16.c @@ -41,7 +41,7 @@ XDrawImageString16( int y, _Xconst XChar2b *string, int length) -{ +{ register xImageText16Req *req; XChar2b *CharacterOffset = (XChar2b *)string; int FirstTimeThrough = True; @@ -50,7 +50,7 @@ XDrawImageString16( LockDisplay(dpy); FlushGC(dpy, gc); - while (length > 0) + while (length > 0) { int Unit, Datalength; diff --git a/libX11/src/ImUtil.c b/libX11/src/ImUtil.c index d1df7ae28..35768563d 100644 --- a/libX11/src/ImUtil.c +++ b/libX11/src/ImUtil.c @@ -51,8 +51,8 @@ static int _XAddPixel(XImage *, long); static unsigned char const _lomask[0x09] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff }; static unsigned char const _himask[0x09] = { 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00 }; -/* These two convenience routines return the scanline_pad and bits_per_pixel - associated with a specific depth of ZPixmap format image for a +/* These two convenience routines return the scanline_pad and bits_per_pixel + associated with a specific depth of ZPixmap format image for a display. */ int @@ -62,14 +62,14 @@ _XGetScanlinePad( { register ScreenFormat *fmt = dpy->pixmap_format; register int i; - + for (i = dpy->nformats + 1; --i; ++fmt) if (fmt->depth == depth) return(fmt->scanline_pad); - + return(dpy->bitmap_pad); } - + int _XGetBitsPerPixel( Display *dpy, @@ -77,7 +77,7 @@ _XGetBitsPerPixel( { register ScreenFormat *fmt = dpy->pixmap_format; register int i; - + for (i = dpy->nformats + 1; --i; ++fmt) if (fmt->depth == depth) return(fmt->bits_per_pixel); @@ -89,7 +89,7 @@ _XGetBitsPerPixel( return 16; return 32; } - + /* * This module provides rudimentary manipulation routines for image data @@ -113,7 +113,7 @@ _XGetBitsPerPixel( * * The logic contained in these routines makes several assumptions about * the image data structures, and at least for current implementations - * these assumptions are believed to be true. They are: + * these assumptions are believed to be true. They are: * * For all formats, bits_per_pixel is less than or equal to 32. * For XY formats, bitmap_unit is always less than or equal to bitmap_pad. @@ -213,31 +213,31 @@ static void _putbits( break; } numbits = numbits - dstoffset; - } + } } /* * Macros - * + * * The ROUNDUP macro rounds up a quantity to the specified boundary, * then truncates to bytes. * - * The XYNORMALIZE macro determines whether XY format data requires + * The XYNORMALIZE macro determines whether XY format data requires * normalization and calls a routine to do so if needed. The logic in - * this module is designed for LSBFirst byte and bit order, so + * this module is designed for LSBFirst byte and bit order, so * normalization is done as required to present the data in this order. * - * The ZNORMALIZE macro performs byte and nibble order normalization if + * The ZNORMALIZE macro performs byte and nibble order normalization if * required for Z format data. * * The XYINDEX macro computes the index to the starting byte (char) boundary * for a bitmap_unit containing a pixel with coordinates x and y for image * data in XY format. - * - * The ZINDEX macro computes the index to the starting byte (char) boundary + * + * The ZINDEX macro computes the index to the starting byte (char) boundary * for a pixel with coordinates x and y for image data in ZPixmap format. - * + * */ #if defined(Lynx) && defined(ROUNDUP) @@ -301,10 +301,10 @@ void _XInitImageFuncPtrs ( /* * CreateImage - * - * Allocates the memory necessary for an XImage data structure. - * Initializes the structure with "default" values and returns XImage. - * + * + * Allocates the memory necessary for an XImage data structure. + * Initializes the structure with "default" values and returns XImage. + * */ XImage *XCreateImage ( @@ -319,7 +319,7 @@ XImage *XCreateImage ( unsigned int width, unsigned int height, int xpad, - int image_bytes_per_line) + int image_bytes_per_line) /*How many bytes between a pixel on one line and the pixel with the same X coordinate on the next line? 0 means XCreateImage can calculate it.*/ @@ -351,7 +351,7 @@ XImage *XCreateImage ( else { image->red_mask = image->green_mask = image->blue_mask = 0; } - if (format == ZPixmap) + if (format == ZPixmap) { bits_per_pixel = _XGetBitsPerPixel(dpy, (int) depth); } @@ -365,7 +365,7 @@ XImage *XCreateImage ( */ { if (format == ZPixmap) - min_bytes_per_line = + min_bytes_per_line = ROUNDUP((bits_per_pixel * width), image->bitmap_pad); else min_bytes_per_line = @@ -374,7 +374,7 @@ XImage *XCreateImage ( if (image_bytes_per_line == 0) { image->bytes_per_line = min_bytes_per_line; } else if (image_bytes_per_line < min_bytes_per_line) { - return 0; + return NULL; } else { image->bytes_per_line = image_bytes_per_line; } @@ -407,7 +407,7 @@ Status XInitImage (XImage *image) * compute per line accelerator. */ if (image->format == ZPixmap) - min_bytes_per_line = + min_bytes_per_line = ROUNDUP((image->bits_per_pixel * image->width), image->bitmap_pad); else @@ -427,8 +427,8 @@ Status XInitImage (XImage *image) /* * _DestroyImage - * - * Deallocates the memory associated with the ximage data structure. + * + * Deallocates the memory associated with the ximage data structure. * this version handles the case of the image data being malloc'd * entirely by the library. */ @@ -444,8 +444,8 @@ static int _XDestroyImage (XImage *ximage) /* * GetPixel - * - * Returns the specified pixel. The X and Y coordinates are relative to + * + * Returns the specified pixel. The X and Y coordinates are relative to * the origin (upper left [0,0]) of the image. The pixel value is returned * in normalized format, i.e. the LSB of the long is the LSB of the pixel. * The algorithm used is: @@ -480,7 +480,7 @@ static unsigned long _XGetPixel ( register int i, j; int bits, nbytes; long plane; - + if ((ximage->bits_per_pixel | ximage->depth) == 1) { src = &ximage->data[XYINDEX(x, y, ximage)]; dst = (char *)&pixel; @@ -509,7 +509,7 @@ static unsigned long _XGetPixel ( dst = (char *)&px; px = 0; for (i = (ximage->bits_per_pixel + 7) >> 3; --i >= 0; ) - *dst++ = *src++; + *dst++ = *src++; ZNORMALIZE(&px, ximage); pixel = 0; for (i=sizeof(unsigned long); --i >= 0; ) @@ -634,11 +634,11 @@ static unsigned long _XGetPixel1 ( return XGetPixel(ximage, x, y); } } - + /* * PutPixel - * - * Overwrites the specified pixel. The X and Y coordinates are relative to + * + * Overwrites the specified pixel. The X and Y coordinates are relative to * the origin (upper left [0,0]) of the image. The input pixel value must be * in normalized format, i.e. the LSB of the long is the LSB of the pixel. * The algorithm used is: @@ -711,8 +711,8 @@ static int _XPutPixel ( nbytes = (ximage->bits_per_pixel + 7) >> 3; for (i = nbytes; --i >= 0; ) *dst++ = *src++; ZNORMALIZE(&px, ximage); - _putbits ((char *)&pixel, - (x * ximage->bits_per_pixel) & 7, + _putbits ((char *)&pixel, + (x * ximage->bits_per_pixel) & 7, ximage->bits_per_pixel, (char *)&px); ZNORMALIZE(&px, ximage); src = (char *)&px; @@ -829,9 +829,9 @@ static int _XPutPixel1 ( /* * SubImage - * + * * Creates a new image that is a subsection of an existing one. - * Allocates the memory necessary for the new XImage data structure. + * Allocates the memory necessary for the new XImage data structure. * Pointer to new image is returned. The algorithm used is repetitive * calls to get and put pixel. * @@ -866,8 +866,8 @@ static XImage *_XSubImage ( /* * compute per line accelerator. */ - if (subimage->format == ZPixmap) - subimage->bytes_per_line = + if (subimage->format == ZPixmap) + subimage->bytes_per_line = ROUNDUP(subimage->bits_per_pixel * width, subimage->bitmap_pad); else @@ -904,7 +904,7 @@ static XImage *_XSubImage ( /* * SetImage - * + * * Overwrites a section of one image with all of the data from another. * If the two images are not of the same format (i.e. XYPixmap and ZPixmap), * the image data is converted to the destination format. The following @@ -919,7 +919,7 @@ static XImage *_XSubImage ( * 3. If the width of the source image is too large to fit between * the specified x starting point and the end of the scanline, * then pixels are truncated on the right. - * + * * The images need not have the same bitmap_bit_order, byte_order, * bitmap_unit, bits_per_pixel, bitmap_pad, or xoffset. * @@ -963,7 +963,7 @@ int _XSetImage( /* * AddPixel - * + * * Adds a constant value to every pixel in a pixmap. * */ diff --git a/libX11/src/InitExt.c b/libX11/src/InitExt.c index 925b98660..92fc44afa 100644 --- a/libX11/src/InitExt.c +++ b/libX11/src/InitExt.c @@ -46,7 +46,7 @@ XExtCodes *XInitExtension ( { XExtCodes codes; /* temp. place for extension information. */ register _XExtension *ext;/* need a place to build it all */ - if (!XQueryExtension(dpy, name, + if (!XQueryExtension(dpy, name, &codes.major_opcode, &codes.first_event, &codes.first_error)) return (NULL); @@ -61,7 +61,7 @@ XExtCodes *XInitExtension ( ext->codes = codes; (void) strcpy(ext->name, name); - /* chain it onto the display list */ + /* chain it onto the display list */ ext->next = dpy->ext_procs; dpy->ext_procs = ext; UnlockDisplay (dpy); @@ -363,7 +363,7 @@ BeforeFlushType XESetBeforeFlush( if (!ext) { e->next_flush = dpy->flushes; dpy->flushes = e; - } + } UnlockDisplay(dpy); return (BeforeFlushType)oldproc; } diff --git a/libX11/src/IntAtom.c b/libX11/src/IntAtom.c index 6f160810f..d1e76b0ca 100644 --- a/libX11/src/IntAtom.c +++ b/libX11/src/IntAtom.c @@ -285,7 +285,7 @@ XInternAtoms ( } if (_XReply (dpy, (xReply *)&rep, 0, xTrue)) { if ((atoms_return[missed] = rep.atom)) - _XUpdateAtomCache(dpy, names[missed], (Atom) rep.atom, + _XUpdateAtomCache(dpy, names[missed], (Atom) rep.atom, sig, idx, n); } else { atoms_return[missed] = None; diff --git a/libX11/src/KeyBind.c b/libX11/src/KeyBind.c index 3d0551b6f..e8becf006 100644 --- a/libX11/src/KeyBind.c +++ b/libX11/src/KeyBind.c @@ -1,5 +1,5 @@ /* $Xorg: KeyBind.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ -/* +/* Copyright 1985, 1987, 1998 The Open Group @@ -267,7 +267,7 @@ _XKeyInitialize( int per, n; KeySym *keysyms; - /* + /* * lets go get the keysyms from the server. */ if (!dpy->keysyms) { @@ -340,35 +340,35 @@ UCSConvertCase( register unsigned code, 0x01C0, 0x01C1, 0x01C2, 0x01C3, 0x01C6, 0x01C6, 0x01C6, 0x01C9, 0x01C9, 0x01C9, 0x01CC, 0x01CC, 0x01CC }; - + static unsigned short const Greek_upper_mapping[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, - 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, + 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x0386, 0x0387, - 0x0388, 0x0389, 0x038A, 0x0000, 0x038C, 0x0000, 0x038E, 0x038F, + 0x0388, 0x0389, 0x038A, 0x0000, 0x038C, 0x0000, 0x038E, 0x038F, 0x0390, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, - 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0x0000, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x0386, 0x0388, 0x0389, 0x038A, - 0x03B0, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, - 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, - 0x03A0, 0x03A1, 0x03A3, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, + 0x03B0, 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, + 0x0398, 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, + 0x03A0, 0x03A1, 0x03A3, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03AA, 0x03AB, 0x038C, 0x038E, 0x038F, 0x0000, - 0x0392, 0x0398, 0x03D2, 0x03D3, 0x03D4, 0x03A6, 0x03A0, 0x03D7, - 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, - 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, + 0x0392, 0x0398, 0x03D2, 0x03D3, 0x03D4, 0x03A6, 0x03A0, 0x03D7, + 0x03D8, 0x03D8, 0x03DA, 0x03DA, 0x03DC, 0x03DC, 0x03DE, 0x03DE, + 0x03E0, 0x03E0, 0x03E2, 0x03E2, 0x03E4, 0x03E4, 0x03E6, 0x03E6, 0x03E8, 0x03E8, 0x03EA, 0x03EA, 0x03EC, 0x03EC, 0x03EE, 0x03EE, - 0x039A, 0x03A1, 0x03F9, 0x03F3, 0x03F4, 0x0395, 0x03F6, 0x03F7, + 0x039A, 0x03A1, 0x03F9, 0x03F3, 0x03F4, 0x0395, 0x03F6, 0x03F7, 0x03F7, 0x03F9, 0x03FA, 0x03FA, 0x0000, 0x0000, 0x0000, 0x0000 }; static unsigned short const Greek_lower_mapping[] = { - 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0374, 0x0375, 0x0000, 0x0000, 0x0000, 0x0000, 0x037A, 0x0000, 0x0000, 0x0000, 0x037E, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0384, 0x0385, 0x03AC, 0x0387, 0x03AD, 0x03AE, 0x03AF, 0x0000, 0x03CC, 0x0000, 0x03CD, 0x03CE, 0x0390, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, - 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, + 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03C1, 0x0000, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03CA, 0x03CB, 0x03AC, 0x03AD, 0x03AE, 0x03AF, 0x03B0, 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, @@ -385,71 +385,71 @@ UCSConvertCase( register unsigned code, static unsigned short const GreekExt_lower_mapping[] = { 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07, - 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07, + 0x1F00, 0x1F01, 0x1F02, 0x1F03, 0x1F04, 0x1F05, 0x1F06, 0x1F07, 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000, 0x1F10, 0x1F11, 0x1F12, 0x1F13, 0x1F14, 0x1F15, 0x0000, 0x0000, - 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, - 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, - 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, - 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, + 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, + 0x1F20, 0x1F21, 0x1F22, 0x1F23, 0x1F24, 0x1F25, 0x1F26, 0x1F27, + 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, + 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000, 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F45, 0x0000, 0x0000, - 0x1F50, 0x1F51, 0x1F52, 0x1F53, 0x1F54, 0x1F55, 0x1F56, 0x1F57, - 0x0000, 0x1F51, 0x0000, 0x1F53, 0x0000, 0x1F55, 0x0000, 0x1F57, - 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, - 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, - 0x1F70, 0x1F71, 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1F76, 0x1F77, + 0x1F50, 0x1F51, 0x1F52, 0x1F53, 0x1F54, 0x1F55, 0x1F56, 0x1F57, + 0x0000, 0x1F51, 0x0000, 0x1F53, 0x0000, 0x1F55, 0x0000, 0x1F57, + 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, + 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, + 0x1F70, 0x1F71, 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1F76, 0x1F77, 0x1F78, 0x1F79, 0x1F7A, 0x1F7B, 0x1F7C, 0x1F7D, 0x0000, 0x0000, - 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, - 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, - 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, - 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, - 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, - 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, - 0x1FB0, 0x1FB1, 0x1FB2, 0x1FB3, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, - 0x1FB0, 0x1FB1, 0x1F70, 0x1F71, 0x1FB3, 0x1FBD, 0x1FBE, 0x1FBF, - 0x1FC0, 0x1FC1, 0x1FC2, 0x1FC3, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, - 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1FC3, 0x1FCD, 0x1FCE, 0x1FCF, - 0x1FD0, 0x1FD1, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, - 0x1FD0, 0x1FD1, 0x1F76, 0x1F77, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, + 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, + 0x1F80, 0x1F81, 0x1F82, 0x1F83, 0x1F84, 0x1F85, 0x1F86, 0x1F87, + 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, + 0x1F90, 0x1F91, 0x1F92, 0x1F93, 0x1F94, 0x1F95, 0x1F96, 0x1F97, + 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, + 0x1FA0, 0x1FA1, 0x1FA2, 0x1FA3, 0x1FA4, 0x1FA5, 0x1FA6, 0x1FA7, + 0x1FB0, 0x1FB1, 0x1FB2, 0x1FB3, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, + 0x1FB0, 0x1FB1, 0x1F70, 0x1F71, 0x1FB3, 0x1FBD, 0x1FBE, 0x1FBF, + 0x1FC0, 0x1FC1, 0x1FC2, 0x1FC3, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, + 0x1F72, 0x1F73, 0x1F74, 0x1F75, 0x1FC3, 0x1FCD, 0x1FCE, 0x1FCF, + 0x1FD0, 0x1FD1, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, + 0x1FD0, 0x1FD1, 0x1F76, 0x1F77, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, 0x1FE0, 0x1FE1, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FE5, 0x1FE6, 0x1FE7, - 0x1FE0, 0x1FE1, 0x1F7A, 0x1F7B, 0x1FE5, 0x1FED, 0x1FEE, 0x1FEF, - 0x0000, 0x0000, 0x1FF2, 0x1FF3, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, + 0x1FE0, 0x1FE1, 0x1F7A, 0x1F7B, 0x1FE5, 0x1FED, 0x1FEE, 0x1FEF, + 0x0000, 0x0000, 0x1FF2, 0x1FF3, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, 0x1F78, 0x1F79, 0x1F7C, 0x1F7D, 0x1FF3, 0x1FFD, 0x1FFE, 0x0000 }; static unsigned short const GreekExt_upper_mapping[] = { - 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, - 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, + 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, + 0x1F08, 0x1F09, 0x1F0A, 0x1F0B, 0x1F0C, 0x1F0D, 0x1F0E, 0x1F0F, 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000, 0x1F18, 0x1F19, 0x1F1A, 0x1F1B, 0x1F1C, 0x1F1D, 0x0000, 0x0000, - 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, - 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, - 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, - 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, + 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, + 0x1F28, 0x1F29, 0x1F2A, 0x1F2B, 0x1F2C, 0x1F2D, 0x1F2E, 0x1F2F, + 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, + 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000, 0x1F48, 0x1F49, 0x1F4A, 0x1F4B, 0x1F4C, 0x1F4D, 0x0000, 0x0000, - 0x1F50, 0x1F59, 0x1F52, 0x1F5B, 0x1F54, 0x1F5D, 0x1F56, 0x1F5F, - 0x0000, 0x1F59, 0x0000, 0x1F5B, 0x0000, 0x1F5D, 0x0000, 0x1F5F, - 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, - 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, - 0x1FBA, 0x1FBB, 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FDA, 0x1FDB, + 0x1F50, 0x1F59, 0x1F52, 0x1F5B, 0x1F54, 0x1F5D, 0x1F56, 0x1F5F, + 0x0000, 0x1F59, 0x0000, 0x1F5B, 0x0000, 0x1F5D, 0x0000, 0x1F5F, + 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, + 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x1F6D, 0x1F6E, 0x1F6F, + 0x1FBA, 0x1FBB, 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FDA, 0x1FDB, 0x1FF8, 0x1FF9, 0x1FEA, 0x1FEB, 0x1FFA, 0x1FFB, 0x0000, 0x0000, - 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, - 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, - 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, - 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, - 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, - 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, - 0x1FB8, 0x1FB9, 0x1FB2, 0x1FBC, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, - 0x1FB8, 0x1FB9, 0x1FBA, 0x1FBB, 0x1FBC, 0x1FBD, 0x0399, 0x1FBF, - 0x1FC0, 0x1FC1, 0x1FC2, 0x1FCC, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, - 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FCC, 0x1FCD, 0x1FCE, 0x1FCF, - 0x1FD8, 0x1FD9, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, - 0x1FD8, 0x1FD9, 0x1FDA, 0x1FDB, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, - 0x1FE8, 0x1FE9, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FEC, 0x1FE6, 0x1FE7, - 0x1FE8, 0x1FE9, 0x1FEA, 0x1FEB, 0x1FEC, 0x1FED, 0x1FEE, 0x1FEF, - 0x0000, 0x0000, 0x1FF2, 0x1FFC, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, + 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, + 0x1F88, 0x1F89, 0x1F8A, 0x1F8B, 0x1F8C, 0x1F8D, 0x1F8E, 0x1F8F, + 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, + 0x1F98, 0x1F99, 0x1F9A, 0x1F9B, 0x1F9C, 0x1F9D, 0x1F9E, 0x1F9F, + 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, + 0x1FA8, 0x1FA9, 0x1FAA, 0x1FAB, 0x1FAC, 0x1FAD, 0x1FAE, 0x1FAF, + 0x1FB8, 0x1FB9, 0x1FB2, 0x1FBC, 0x1FB4, 0x0000, 0x1FB6, 0x1FB7, + 0x1FB8, 0x1FB9, 0x1FBA, 0x1FBB, 0x1FBC, 0x1FBD, 0x0399, 0x1FBF, + 0x1FC0, 0x1FC1, 0x1FC2, 0x1FCC, 0x1FC4, 0x0000, 0x1FC6, 0x1FC7, + 0x1FC8, 0x1FC9, 0x1FCA, 0x1FCB, 0x1FCC, 0x1FCD, 0x1FCE, 0x1FCF, + 0x1FD8, 0x1FD9, 0x1FD2, 0x1FD3, 0x0000, 0x0000, 0x1FD6, 0x1FD7, + 0x1FD8, 0x1FD9, 0x1FDA, 0x1FDB, 0x0000, 0x1FDD, 0x1FDE, 0x1FDF, + 0x1FE8, 0x1FE9, 0x1FE2, 0x1FE3, 0x1FE4, 0x1FEC, 0x1FE6, 0x1FE7, + 0x1FE8, 0x1FE9, 0x1FEA, 0x1FEB, 0x1FEC, 0x1FED, 0x1FEE, 0x1FEF, + 0x0000, 0x0000, 0x1FF2, 0x1FFC, 0x1FF4, 0x0000, 0x1FF6, 0x1FF7, 0x1FF8, 0x1FF9, 0x1FFA, 0x1FFB, 0x1FFC, 0x1FFD, 0x1FFE, 0x0000 }; @@ -826,7 +826,7 @@ _XTranslateKeySym( char *buffer, int nbytes) { - register struct _XKeytrans *p; + register struct _XKeytrans *p; int length; unsigned long hiBytes; register unsigned char c; @@ -876,7 +876,7 @@ _XTranslateKeySym( buffer[0] = c; return 1; } - + /*ARGSUSED*/ int XLookupString ( @@ -904,7 +904,7 @@ XLookupString ( status->compose_ptr = NULL; status->chars_matched = 0; } - if ( ((status->chars_matched>0)&&(status->compose_ptr!=NULL)) || + if ( ((status->chars_matched>0)&&(status->compose_ptr!=NULL)) || XimCompIsComposeKey(symbol,event->keycode,status) ) { XimCompRtrn rtrn; switch (XimCompProcessSym(status,symbol,&rtrn)) { @@ -978,7 +978,7 @@ _XFreeKeyBindings( Xfree(p->string); Xfree((char *)p->modifiers); Xfree((char *)p); - } + } } int @@ -1000,7 +1000,7 @@ XRebindKeysym ( nb = sizeof(KeySym) * nm; if ((! (p = (struct _XKeytrans *) Xmalloc( sizeof(struct _XKeytrans)))) || - ((! (p->string = (char *) Xmalloc( (unsigned) nbytes))) && + ((! (p->string = (char *) Xmalloc( (unsigned) nbytes))) && (nbytes > 0)) || ((! (p->modifiers = (KeySym *) Xmalloc( (unsigned) nb))) && (nb > 0))) { @@ -1038,7 +1038,7 @@ _XKeysymToModifiers( if ((! dpy->keysyms) && (! _XKeyInitialize(dpy))) return 0; - kmax = dpy->keysyms + + kmax = dpy->keysyms + (dpy->max_keycode - dpy->min_keycode + 1) * dpy->keysyms_per_keycode; k = dpy->keysyms; m = dpy->modifiermap; @@ -1058,7 +1058,7 @@ _XKeysymToModifiers( } return mods; } - + /* * given a list of modifiers, computes the mask necessary for later matching. * This routine must lookup the key in the Keymap and then search to see diff --git a/libX11/src/KeysymStr.c b/libX11/src/KeysymStr.c index ce827610a..269cbdfa9 100644 --- a/libX11/src/KeysymStr.c +++ b/libX11/src/KeysymStr.c @@ -147,7 +147,7 @@ char *XKeysymToString(KeySym ks) s[i] = 'A'+ val1 - 10; } s[i] = 'U'; - return s; + return s; } return ((char *) NULL); } diff --git a/libX11/src/LiHosts.c b/libX11/src/LiHosts.c index ebfb245ff..c1311da26 100644 --- a/libX11/src/LiHosts.c +++ b/libX11/src/LiHosts.c @@ -74,19 +74,19 @@ XHostAddress *XListHosts ( nbytes = reply.length << 2; /* compute number of bytes in reply */ op = outbuf = (XHostAddress *) - Xmalloc((unsigned) (nbytes + + Xmalloc((unsigned) (nbytes + (reply.nHosts * sizeof(XHostAddress)) + (reply.nHosts * sizeof(XServerInterpretedAddress)))); - if (! outbuf) { + if (! outbuf) { _XEatData(dpy, (unsigned long) nbytes); UnlockDisplay(dpy); SyncHandle(); return (XHostAddress *) NULL; } - sip = (XServerInterpretedAddress *) + sip = (XServerInterpretedAddress *) (((unsigned char *) outbuf) + (reply.nHosts * sizeof(XHostAddress))); - bp = buf = ((unsigned char *) sip) + bp = buf = ((unsigned char *) sip) + (reply.nHosts * sizeof(XServerInterpretedAddress)); _XRead (dpy, (char *) buf, nbytes); @@ -99,12 +99,12 @@ XHostAddress *XListHosts ( op->length = xhe.length; #else op->family = ((xHostEntry *) bp)->family; - op->length =((xHostEntry *) bp)->length; + op->length =((xHostEntry *) bp)->length; #endif if (op->family == FamilyServerInterpreted) { char *tp = (char *) (bp + SIZEOF(xHostEntry)); char *vp = memchr(tp, 0, op->length); - + if (vp != NULL) { sip->type = tp; sip->typelength = vp - tp; @@ -132,6 +132,6 @@ XHostAddress *XListHosts ( } - + diff --git a/libX11/src/LiICmaps.c b/libX11/src/LiICmaps.c index 9381f4974..dc74d4991 100644 --- a/libX11/src/LiICmaps.c +++ b/libX11/src/LiICmaps.c @@ -65,7 +65,7 @@ Colormap *XListInstalledColormaps( _XRead32 (dpy, (long *) cmaps, nbytes); } else cmaps = (Colormap *) NULL; - + *n = rep.nColormaps; UnlockDisplay(dpy); SyncHandle(); diff --git a/libX11/src/LoadFont.c b/libX11/src/LoadFont.c index de5f5cee4..30da83a80 100644 --- a/libX11/src/LoadFont.c +++ b/libX11/src/LoadFont.c @@ -51,7 +51,7 @@ XLoadFont ( Data (dpy, name, nbytes); UnlockDisplay(dpy); SyncHandle(); - return (fid); + return (fid); /* can't return (req->fid) since request may have already been sent */ } diff --git a/libX11/src/LockDis.c b/libX11/src/LockDis.c index d99d3bb68..df121bd2b 100644 --- a/libX11/src/LockDis.c +++ b/libX11/src/LockDis.c @@ -1,7 +1,7 @@ /* $Xorg: LockDis.c,v 1.4 2001/02/09 02:03:34 xorgcvs Exp $ */ /* - + Copyright 1993, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its diff --git a/libX11/src/Macros.c b/libX11/src/Macros.c index f720a2638..55d88d9ec 100644 --- a/libX11/src/Macros.c +++ b/libX11/src/Macros.c @@ -60,15 +60,15 @@ Visual *XDefaultVisual(Display *dpy, int scr) GC XDefaultGC(Display *dpy, int scr) { - return (DefaultGC(dpy,scr)); + return (DefaultGC(dpy,scr)); } -unsigned long XBlackPixel(Display *dpy, int scr) +unsigned long XBlackPixel(Display *dpy, int scr) { return (BlackPixel(dpy, scr)); } -unsigned long XWhitePixel(Display *dpy, int scr) +unsigned long XWhitePixel(Display *dpy, int scr) { return (WhitePixel(dpy,scr)); } @@ -84,7 +84,7 @@ int XDisplayWidth(Display *dpy, int scr) int XDisplayHeight(Display *dpy, int scr) { - return (DisplayHeight(dpy, scr)); + return (DisplayHeight(dpy, scr)); } int XDisplayWidthMM(Display *dpy, int scr) @@ -98,7 +98,7 @@ int XDisplayHeightMM(Display *dpy, int scr) } int XDisplayPlanes(Display *dpy, int scr) -{ +{ return (DisplayPlanes(dpy, scr)); } @@ -120,12 +120,12 @@ int XVendorRelease(Display *dpy) { return (VendorRelease(dpy)); } char *XDisplayString(Display *dpy) { return (DisplayString(dpy)); } int XDefaultDepth(Display *dpy, int scr) -{ +{ return(DefaultDepth(dpy, scr)); } Colormap XDefaultColormap(Display *dpy, int scr) -{ +{ return (DefaultColormap(dpy, scr)); } @@ -159,7 +159,7 @@ Screen *XScreenOfDisplay(Display *dpy, int scr) } Screen *XDefaultScreenOfDisplay(Display *dpy) -{ +{ return (DefaultScreenOfDisplay(dpy)); } @@ -167,32 +167,32 @@ Display *XDisplayOfScreen(Screen *s) { return (DisplayOfScreen(s)); } Window XRootWindowOfScreen(Screen *s) { return (RootWindowOfScreen(s)); } -unsigned long XBlackPixelOfScreen(Screen *s) +unsigned long XBlackPixelOfScreen(Screen *s) { return (BlackPixelOfScreen(s)); } -unsigned long XWhitePixelOfScreen(Screen *s) +unsigned long XWhitePixelOfScreen(Screen *s) { return (WhitePixelOfScreen(s)); } -Colormap XDefaultColormapOfScreen(Screen *s) +Colormap XDefaultColormapOfScreen(Screen *s) { return (DefaultColormapOfScreen(s)); } -int XDefaultDepthOfScreen(Screen *s) -{ +int XDefaultDepthOfScreen(Screen *s) +{ return (DefaultDepthOfScreen(s)); } -GC XDefaultGCOfScreen(Screen *s) -{ +GC XDefaultGCOfScreen(Screen *s) +{ return (DefaultGCOfScreen(s)); } -Visual *XDefaultVisualOfScreen(Screen *s) +Visual *XDefaultVisualOfScreen(Screen *s) { return (DefaultVisualOfScreen(s)); } diff --git a/libX11/src/Makefile.am b/libX11/src/Makefile.am index 564e03f3e..86a846e41 100644 --- a/libX11/src/Makefile.am +++ b/libX11/src/Makefile.am @@ -310,6 +310,7 @@ libX11_la_SOURCES = \ Xintconn.h \ XlibAsync.c \ XlibInt.c \ + Xprivate.h \ XomGeneric.h \ Xresinternal.h \ Xrm.c \ @@ -342,7 +343,6 @@ EXTRA_DIST = \ if XCB libX11_la_SOURCES += \ - xcb_lock.c \ xcb_disp.c \ xcb_io.c \ Xxcbint.h diff --git a/libX11/src/Makefile.in b/libX11/src/Makefile.in index 3251aed93..ef4df0a71 100644 --- a/libX11/src/Makefile.in +++ b/libX11/src/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -41,7 +43,6 @@ host_triplet = @host@ @UDC_TRUE@am__append_2 = udcInf.c @THRSTUBS_TRUE@am__append_3 = UIThrStubs.c @XCB_TRUE@am__append_4 = \ -@XCB_TRUE@ xcb_lock.c \ @XCB_TRUE@ xcb_disp.c \ @XCB_TRUE@ xcb_io.c \ @XCB_TRUE@ Xxcbint.h @@ -63,15 +64,30 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h $(top_builddir)/include/X11/XlibConf.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(lintlibdir)" \ "$(DESTDIR)$(x11datadir)" -libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) @XCB_TRUE@libX11_xcb_la_DEPENDENCIES = libX11.la am__libX11_xcb_la_SOURCES_DIST = x11_xcb.c Xxcbint.h @@ -132,13 +148,13 @@ am__libX11_la_SOURCES_DIST = AllCells.c AllowEv.c AllPlanes.c \ UngrabSvr.c UninsCmap.c UnldFont.c UnmapSubs.c UnmapWin.c \ VisUtil.c WarpPtr.c Window.c WinEvent.c Withdraw.c WMGeom.c \ WMProps.c WrBitF.c Xatomtype.h Xintatom.h Xintconn.h \ - XlibAsync.c XlibInt.c XomGeneric.h Xresinternal.h Xrm.c XrmI.h \ - os2Stubs.c udcInf.c UIThrStubs.c xcb_lock.c xcb_disp.c \ + XlibAsync.c XlibInt.c Xprivate.h XomGeneric.h Xresinternal.h \ + Xrm.c XrmI.h os2Stubs.c udcInf.c UIThrStubs.c xcb_disp.c \ xcb_io.c Xxcbint.h ConnDis.c x11_trans.c @OS2_TRUE@am__objects_1 = os2Stubs.lo @UDC_TRUE@am__objects_2 = udcInf.lo @THRSTUBS_TRUE@am__objects_3 = UIThrStubs.lo -@XCB_TRUE@am__objects_4 = xcb_lock.lo xcb_disp.lo xcb_io.lo +@XCB_TRUE@am__objects_4 = xcb_disp.lo xcb_io.lo @XCB_FALSE@am__objects_5 = ConnDis.lo x11_trans.lo am_libX11_la_OBJECTS = AllCells.lo AllowEv.lo AllPlanes.lo AutoRep.lo \ Backgnd.lo BdrWidth.lo Bell.lo Border.lo ChAccCon.lo \ @@ -201,11 +217,9 @@ libX11_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/X11 depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -220,15 +234,41 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -lintlibDATA_INSTALL = $(INSTALL_DATA) -x11dataDATA_INSTALL = $(INSTALL_DATA) DATA = $(lintlib_DATA) $(x11data_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = util xcms xlibi18n xkb DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ @@ -244,27 +284,26 @@ BIGFONT_CFLAGS = @BIGFONT_CFLAGS@ BIGFONT_LIBS = @BIGFONT_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOLT_BASH = @DOLT_BASH@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ @@ -280,6 +319,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ # KEYSYMDEF = @KEYSYMDEF@ LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -289,7 +329,10 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINTLIB = @LINTLIB@ LINT_FLAGS = @LINT_FLAGS@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -297,8 +340,12 @@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -338,17 +385,14 @@ XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@ XPROTO_CFLAGS = @XPROTO_CFLAGS@ XPROTO_LIBS = @XPROTO_LIBS@ XTHREADLIB = @XTHREADLIB@ -XTHREADS = @XTHREADS@ XTHREAD_CFLAGS = @XTHREAD_CFLAGS@ XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@ -XUSE_MTSAFE_API = @XUSE_MTSAFE_API@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -363,6 +407,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -379,6 +424,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -391,6 +437,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @XKB_TRUE@XKB_SUBDIRS = xkb @@ -485,8 +532,8 @@ libX11_la_SOURCES = AllCells.c AllowEv.c AllPlanes.c AutoRep.c \ UngrabSvr.c UninsCmap.c UnldFont.c UnmapSubs.c UnmapWin.c \ VisUtil.c WarpPtr.c Window.c WinEvent.c Withdraw.c WMGeom.c \ WMProps.c WrBitF.c Xatomtype.h Xintatom.h Xintconn.h \ - XlibAsync.c XlibInt.c XomGeneric.h Xresinternal.h Xrm.c XrmI.h \ - $(am__append_1) $(am__append_2) $(am__append_3) \ + XlibAsync.c XlibInt.c Xprivate.h XomGeneric.h Xresinternal.h \ + Xrm.c XrmI.h $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_6) x11datadir = @X11_DATADIR@ x11data_DATA = XKeysymDB XErrorDB @@ -531,14 +578,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -556,6 +603,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ @@ -567,7 +615,7 @@ stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -576,20 +624,24 @@ distclean-hdr: install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: @@ -874,25 +926,24 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11_xcb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcb_disp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcb_io.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcb_lock.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -905,37 +956,43 @@ clean-libtool: install-lintlibDATA: $(lintlib_DATA) @$(NORMAL_INSTALL) test -z "$(lintlibdir)" || $(MKDIR_P) "$(DESTDIR)$(lintlibdir)" - @list='$(lintlib_DATA)'; for p in $$list; do \ + @list='$(lintlib_DATA)'; test -n "$(lintlibdir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(lintlibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(lintlibdir)/$$f'"; \ - $(lintlibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(lintlibdir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(lintlibdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(lintlibdir)" || exit $$?; \ done uninstall-lintlibDATA: @$(NORMAL_UNINSTALL) - @list='$(lintlib_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(lintlibdir)/$$f'"; \ - rm -f "$(DESTDIR)$(lintlibdir)/$$f"; \ - done + @list='$(lintlib_DATA)'; test -n "$(lintlibdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(lintlibdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(lintlibdir)" && rm -f $$files install-x11dataDATA: $(x11data_DATA) @$(NORMAL_INSTALL) test -z "$(x11datadir)" || $(MKDIR_P) "$(DESTDIR)$(x11datadir)" - @list='$(x11data_DATA)'; for p in $$list; do \ + @list='$(x11data_DATA)'; test -n "$(x11datadir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(x11dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(x11datadir)/$$f'"; \ - $(x11dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(x11datadir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(x11datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(x11datadir)" || exit $$?; \ done uninstall-x11dataDATA: @$(NORMAL_UNINSTALL) - @list='$(x11data_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(x11datadir)/$$f'"; \ - rm -f "$(DESTDIR)$(x11datadir)/$$f"; \ - done + @list='$(x11data_DATA)'; test -n "$(x11datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(x11datadir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(x11datadir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -961,7 +1018,7 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ @@ -995,16 +1052,16 @@ $(RECURSIVE_CLEAN_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -1012,14 +1069,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -1031,7 +1088,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ @@ -1040,29 +1097,34 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1083,29 +1145,44 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -1141,6 +1218,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -1163,6 +1241,8 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: @@ -1171,18 +1251,28 @@ install-data-am: install-lintlibDATA install-x11dataDATA install-dvi: install-dvi-recursive +install-dvi-am: + install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: install-pdf: install-pdf-recursive +install-pdf-am: + install-ps: install-ps-recursive +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -1206,8 +1296,9 @@ ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-lintlibDATA \ uninstall-x11dataDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ + ctags-recursive install install-am install-strip \ + tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic \ @@ -1252,6 +1343,7 @@ $(top_builddir)/src/util/makekeys$(EXEEXT): force cd util && $(MAKE) force: + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libX11/src/MaskEvent.c b/libX11/src/MaskEvent.c index fbada5e06..acd903f9e 100644 --- a/libX11/src/MaskEvent.c +++ b/libX11/src/MaskEvent.c @@ -37,7 +37,7 @@ extern long const _Xevent_to_mask[]; #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ Button4MotionMask|Button5MotionMask) -/* +/* * return the next event in the queue matching one of the events in the mask. * If no event, flush output, and wait until match succeeds. * Events earlier in the queue are not discarded. @@ -58,7 +58,7 @@ XMaskEvent ( for (qelt = prev ? prev->next : dpy->head; qelt; prev = qelt, qelt = qelt->next) { - if ((qelt->event.type < LASTEvent) && + if ((qelt->event.type < GenericEvent) && (_Xevent_to_mask[qelt->event.type] & mask) && ((qelt->event.type != MotionNotify) || (mask & AllPointers) || diff --git a/libX11/src/ModMap.c b/libX11/src/ModMap.c index b5cb422b3..04fe509a6 100644 --- a/libX11/src/ModMap.c +++ b/libX11/src/ModMap.c @@ -34,7 +34,7 @@ in this Software without prior written authorization from The Open Group. XModifierKeymap * XGetModifierMapping(register Display *dpy) -{ +{ xGetModifierMappingReply rep; register xReq *req; unsigned long nbytes; @@ -143,7 +143,7 @@ XInsertModifiermapEntry(XModifierKeymap *map, map->modifiermap[ row+i ] = keycode; return(map); /* we added it without stretching the map */ } - } + } /* stretch the map */ if ((newmap = XNewModifiermap(map->max_keypermod+1)) == NULL) diff --git a/libX11/src/MoveWin.c b/libX11/src/MoveWin.c index bd2a5a044..8921ec4ec 100644 --- a/libX11/src/MoveWin.c +++ b/libX11/src/MoveWin.c @@ -35,7 +35,7 @@ int XMoveWindow ( register Display *dpy, Window w, - int x, + int x, int y) { register xConfigureWindowReq *req; diff --git a/libX11/src/NextEvent.c b/libX11/src/NextEvent.c index 63032345c..d4f72e773 100644 --- a/libX11/src/NextEvent.c +++ b/libX11/src/NextEvent.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Return next event in queue, or if none, flush output and wait for * events. */ @@ -43,9 +43,9 @@ XNextEvent ( register XEvent *event) { register _XQEvent *qelt; - + LockDisplay(dpy); - + if (dpy->head == NULL) _XReadEvents(dpy); qelt = dpy->head; diff --git a/libX11/src/OMWrap.c b/libX11/src/OMWrap.c index 2373ef698..fa8e33379 100644 --- a/libX11/src/OMWrap.c +++ b/libX11/src/OMWrap.c @@ -110,7 +110,7 @@ XGetOMValues(XOM om, ...) if (args == (XlcArgList) NULL) return (char *) NULL; - + ret = (*om->methods->get_values)(om, args, num_args); Xfree(args); diff --git a/libX11/src/OpenDis.c b/libX11/src/OpenDis.c index 9c327d1b8..29ac65c6a 100644 --- a/libX11/src/OpenDis.c +++ b/libX11/src/OpenDis.c @@ -84,7 +84,7 @@ static Bool _XBigReqHandler(Display *dpy, xReply *rep, char *buf, int len, XPointer data); #endif /* !USE_XCB */ -/* +/* * Connects to a server, creates a Display object and returns a pointer to * the newly created Display back to the caller. */ @@ -129,7 +129,7 @@ XOpenDisplay ( bzero((char *) &prefix, sizeof(prefix)); /* - * If the display specifier string supplied as an argument to this + * If the display specifier string supplied as an argument to this * routine is NULL or a pointer to NULL, read the DISPLAY variable. */ if (display == NULL || *display == '\0') { @@ -166,8 +166,9 @@ XOpenDisplay ( #if USE_XCB if(!_XConnectXCB(dpy, display, &fullname, &iscreen)) { - OutOfMemory(dpy, 0); - return 0; + dpy->display_name = fullname; + OutOfMemory(dpy, NULL); + return NULL; } #else /* !USE_XCB */ if ((dpy->trans_conn = _X11TransConnectDisplay ( @@ -260,17 +261,10 @@ XOpenDisplay ( return(NULL); } -#if USE_XCB - if (!_XCBInitDisplayLock(dpy)) { - OutOfMemory (dpy, setup); - return(NULL); - } -#endif - if (!_XPollfdCacheInit(dpy)) { OutOfMemory (dpy, setup); return(NULL); - } + } /* Set up the output buffers. */ #ifndef XLIBDEFAULTBUFSIZE @@ -291,7 +285,11 @@ XOpenDisplay ( return(NULL); } dpy->bufmax = dpy->buffer + conn_buf_size; - +#if USE_XCB + dpy->xcb->real_bufmax = dpy->bufmax; + dpy->bufmax = dpy->buffer; +#endif + /* Set up the input event queue and input event queue parameters. */ dpy->head = dpy->tail = NULL; dpy->qlen = 0; @@ -308,7 +306,7 @@ XOpenDisplay ( /* * The xConnClientPrefix describes the initial connection setup information * and is followed by the authorization information. Sites that are interested - * in security are strongly encouraged to use an authentication and + * in security are strongly encouraged to use an authentication and * authorization system such as Kerberos. */ endian = 1; @@ -386,7 +384,7 @@ XOpenDisplay ( */ if (prefix.success != xTrue) { /* XXX - printing messages marks a bad programming interface */ - fprintf (stderr, + fprintf (stderr, "Xlib: connection to \"%s\" refused by server\r\nXlib: ", fullname); @@ -441,7 +439,7 @@ XOpenDisplay ( OutOfMemory(dpy, setup); return (NULL); } - + while (!(mask & 1)) { dpy->resource_shift++; mask = mask >> 1; @@ -483,7 +481,7 @@ XOpenDisplay ( /* * Now iterate down setup information..... */ - dpy->pixmap_format = + dpy->pixmap_format = (ScreenFormat *)Xmalloc( (unsigned) (dpy->nformats *sizeof(ScreenFormat))); if (dpy->pixmap_format == NULL) { @@ -513,7 +511,7 @@ XOpenDisplay ( /* * next the Screen structures. */ - dpy->screens = + dpy->screens = (Screen *)Xmalloc((unsigned) dpy->nscreens*sizeof(Screen)); if (dpy->screens == NULL) { OutOfMemory (dpy, setup); @@ -534,7 +532,7 @@ XOpenDisplay ( return(NULL); } - root_visualID = u.rp->rootVisualID; + root_visualID = u.rp->rootVisualID; sp->display = dpy; sp->root = u.rp->windowId; sp->cmap = u.rp->defaultColormap; @@ -574,12 +572,12 @@ XOpenDisplay ( OutOfMemory (dpy, setup); return(NULL); } - + dp->depth = u.dp->depth; dp->nvisuals = u.dp->nVisuals; u.dp = (xDepth *) (((char *) u.dp) + sz_xDepth); if (dp->nvisuals > 0) { - dp->visuals = + dp->visuals = (Visual *)Xmalloc((unsigned)dp->nvisuals*sizeof(Visual)); if (dp->visuals == NULL) { OutOfMemory (dpy, setup); @@ -594,7 +592,7 @@ XOpenDisplay ( OutOfMemory (dpy, setup); return(NULL); } - + vp->visualid = u.vp->visualID; vp->class = u.vp->class; vp->bits_per_rgb= u.vp->bitsPerRGB; @@ -651,6 +649,12 @@ XOpenDisplay ( UnlockDisplay(dpy); #endif /* !USE_XCB */ +#if USE_XCB + dpy->bigreq_size = xcb_get_maximum_request_length(dpy->xcb->connection); + if(dpy->bigreq_size <= dpy->max_request_size) + dpy->bigreq_size = 0; +#endif /* USE_XCB */ + /* * Set up other stuff clients are always going to use. */ @@ -672,12 +676,6 @@ XOpenDisplay ( */ (void) XSynchronize(dpy, _Xdebug); -#if USE_XCB - dpy->bigreq_size = xcb_get_maximum_request_length(dpy->xcb->connection); - if(dpy->bigreq_size <= dpy->max_request_size) - dpy->bigreq_size = 0; -#endif /* USE_XCB */ - /* * get availability of large requests, and * get the resource manager database off the root window. @@ -781,7 +779,7 @@ _XBigReqHandler( #endif /* !USE_XCB */ -/* XFreeDisplayStructure frees all the storage associated with a +/* XFreeDisplayStructure frees all the storage associated with a * Display. It is used by XOpenDisplay if it runs out of memory, * and also by XCloseDisplay. It needs to check whether all pointers * are non-NULL before dereferencing them, since it may be called @@ -790,8 +788,7 @@ _XBigReqHandler( * before the first possible call on this. */ -void _XFreeDisplayStructure(dpy) - register Display *dpy; +void _XFreeDisplayStructure(Display *dpy) { while (dpy->ext_procs) { _XExtension *ext = dpy->ext_procs; @@ -852,7 +849,7 @@ void _XFreeDisplayStructure(dpy) Xfree ((char *)dpy->screens); } - + if (dpy->pixmap_format) { register int i; @@ -882,10 +879,6 @@ void _XFreeDisplayStructure(dpy) Xfree (dpy->scratch_buffer); FreeDisplayLock(dpy); -#if USE_XCB - _XCBShutdownDisplayLock(dpy); -#endif /* USE_XCB */ - if (dpy->qfree) { register _XQEvent *qelt = dpy->qfree; @@ -920,9 +913,7 @@ void _XFreeDisplayStructure(dpy) /* OutOfMemory is called if malloc fails. XOpenDisplay returns NULL after this returns. */ -static void OutOfMemory (dpy, setup) - Display *dpy; - char *setup; +static void OutOfMemory(Display *dpy, char *setup) { #if USE_XCB if(dpy->xcb->connection) diff --git a/libX11/src/ParseCmd.c b/libX11/src/ParseCmd.c index fb79668ec..7d93f7650 100644 --- a/libX11/src/ParseCmd.c +++ b/libX11/src/ParseCmd.c @@ -29,13 +29,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -100,7 +100,7 @@ XrmParseCommand( XrmQPutStringResource(pdb, bindings, quarks, value_str); \ } /* PutCommandResource */ - myargc = (*argc); + myargc = (*argc); argend = argv + myargc; argsave = ++argv; @@ -159,7 +159,7 @@ XrmParseCommand( --(*argc); PutCommandResource(options[i].value); break; - + case XrmoptionIsArg: --(*argc); PutCommandResource(*argv); @@ -177,7 +177,7 @@ XrmParseCommand( } else (*argsave++) = (*argv); break; - + case XrmoptionResArg: if (myargc > 1) { ++argv; --myargc; --(*argc); --(*argc); @@ -185,13 +185,13 @@ XrmParseCommand( } else (*argsave++) = (*argv); break; - + case XrmoptionSkipArg: if (myargc > 1) { --myargc; (*argsave++) = (*argv++); } - (*argsave++) = (*argv); + (*argsave++) = (*argv); break; case XrmoptionSkipLine: @@ -219,7 +219,7 @@ XrmParseCommand( } } else - (*argsave++) = (*argv); /*compress arglist*/ + (*argsave++) = (*argv); /*compress arglist*/ } if (argsave < argend) diff --git a/libX11/src/ParseGeom.c b/libX11/src/ParseGeom.c index 6aaaccf07..ba6e45eb9 100644 --- a/libX11/src/ParseGeom.c +++ b/libX11/src/ParseGeom.c @@ -35,24 +35,6 @@ from The Open Group. #include "Xlibint.h" #include "Xutil.h" -#ifdef notdef -/* - *Returns pointer to first char ins search which is also in what, else NULL. - */ -static char *strscan (search, what) -char *search, *what; -{ - int i, len = strlen (what); - char c; - - while ((c = *(search++)) != NULL) - for (i = 0; i < len; i++) - if (c == what [i]) - return (--search); - return (NULL); -} -#endif - /* * XParseGeometry parses strings of the form * "=x{+-}{+-}", where @@ -62,7 +44,7 @@ char *search, *what; * It returns a bitmask that indicates which of the four values * were actually found in the string. For each value found, * the corresponding argument is updated; for each value - * not found, the corresponding argument is left unchanged. + * not found, the corresponding argument is left unchanged. */ static int @@ -70,7 +52,7 @@ ReadInteger(char *string, char **NextString) { register int Result = 0; int Sign = 1; - + if (*string == '+') string++; else if (*string == '-') @@ -110,13 +92,13 @@ unsigned int *height) /* RETURN */ strind = (char *)string; if (*strind != '+' && *strind != '-' && *strind != 'x') { tempWidth = ReadInteger(strind, &nextCharacter); - if (strind == nextCharacter) + if (strind == nextCharacter) return (0); strind = nextCharacter; mask |= WidthValue; } - if (*strind == 'x' || *strind == 'X') { + if (*strind == 'x' || *strind == 'X') { strind++; tempHeight = ReadInteger(strind, &nextCharacter); if (strind == nextCharacter) @@ -164,7 +146,7 @@ unsigned int *height) /* RETURN */ mask |= YValue; } } - + /* If strind isn't at the end of the string the it's an invalid geometry specification. */ diff --git a/libX11/src/PeekEvent.c b/libX11/src/PeekEvent.c index c28f114b9..6eec4a04d 100644 --- a/libX11/src/PeekEvent.c +++ b/libX11/src/PeekEvent.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "Xlibint.h" -/* +/* * Return the next event in the queue, * BUT do not remove it from the queue. * If none found, flush and wait until there is an event to peek. diff --git a/libX11/src/PolyReg.c b/libX11/src/PolyReg.c index d6f4c74b1..666fc1a29 100644 --- a/libX11/src/PolyReg.c +++ b/libX11/src/PolyReg.c @@ -28,13 +28,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -84,7 +84,7 @@ InsertEdgeInET( */ pPrevSLL = &ET->scanlines; pSLL = pPrevSLL->next; - while (pSLL && (pSLL->scanline < scanline)) + while (pSLL && (pSLL->scanline < scanline)) { pPrevSLL = pSLL; pSLL = pSLL->next; @@ -93,11 +93,11 @@ InsertEdgeInET( /* * reassign pSLL (pointer to ScanLineList) if necessary */ - if ((!pSLL) || (pSLL->scanline > scanline)) + if ((!pSLL) || (pSLL->scanline > scanline)) { - if (*iSLLBlock > SLLSPERBLOCK-1) + if (*iSLLBlock > SLLSPERBLOCK-1) { - tmpSLLBlock = + tmpSLLBlock = (ScanLineListBlock *)Xmalloc(sizeof(ScanLineListBlock)); (*SLLBlock)->next = tmpSLLBlock; tmpSLLBlock->next = (ScanLineListBlock *)NULL; @@ -117,7 +117,7 @@ InsertEdgeInET( */ prev = (EdgeTableEntry *)NULL; start = pSLL->edgelist; - while (start && (start->bres.minor_axis < ETE->bres.minor_axis)) + while (start && (start->bres.minor_axis < ETE->bres.minor_axis)) { prev = start; start = start->next; @@ -134,7 +134,7 @@ InsertEdgeInET( * CreateEdgeTable * * This routine creates the edge table for - * scan converting polygons. + * scan converting polygons. * The Edge Table (ET) looks like: * * EdgeTable @@ -194,19 +194,19 @@ CreateETandAET( * In this loop we are dealing with two vertices at * a time -- these make up one edge of the polygon. */ - while (count--) + while (count--) { CurrPt = pts++; /* * find out which point is above and which is below. */ - if (PrevPt->y > CurrPt->y) + if (PrevPt->y > CurrPt->y) { bottom = PrevPt, top = CurrPt; pETEs->ClockWise = 0; } - else + else { bottom = CurrPt, top = PrevPt; pETEs->ClockWise = 1; @@ -215,7 +215,7 @@ CreateETandAET( /* * don't add horizontal edges to the Edge table. */ - if (bottom->y != top->y) + if (bottom->y != top->y) { pETEs->ymax = bottom->y-1; /* -1 so we don't get last scanline */ @@ -257,9 +257,9 @@ loadAET( pPrevAET = AET; AET = AET->next; - while (ETEs) + while (ETEs) { - while (AET && (AET->bres.minor_axis < ETEs->bres.minor_axis)) + while (AET && (AET->bres.minor_axis < ETEs->bres.minor_axis)) { pPrevAET = AET; AET = AET->next; @@ -281,13 +281,13 @@ loadAET( * * This routine links the AET by the * nextWETE (winding EdgeTableEntry) link for - * use by the winding number rule. The final + * use by the winding number rule. The final * Active Edge Table (AET) might look something * like: * * AET * ---------- --------- --------- - * |ymax | |ymax | |ymax | + * |ymax | |ymax | |ymax | * | ... | |... | |... | * |next |->|next |->|next |->... * |nextWETE| |nextWETE| |nextWETE| @@ -307,7 +307,7 @@ computeWAET( AET->nextWETE = (EdgeTableEntry *)NULL; pWETE = AET; AET = AET->next; - while (AET) + while (AET) { if (AET->ClockWise) isInside++; @@ -315,7 +315,7 @@ computeWAET( isInside--; if ((!inside && !isInside) || - ( inside && isInside)) + ( inside && isInside)) { pWETE->nextWETE = AET; pWETE = AET; @@ -345,7 +345,7 @@ InsertionSort( register int changed = 0; AET = AET->next; - while (AET) + while (AET) { pETEinsert = AET; pETEchase = AET; @@ -353,7 +353,7 @@ InsertionSort( pETEchase = pETEchase->back; AET = AET->next; - if (pETEchase != pETEinsert) + if (pETEchase != pETEinsert) { pETEchaseBackTMP = pETEchase->back; pETEinsert->back->next = AET; @@ -378,7 +378,7 @@ FreeStorage( { register ScanLineListBlock *tmpSLLBlock; - while (pSLLBlock) + while (pSLLBlock) { tmpSLLBlock = pSLLBlock->next; Xfree((char *)pSLLBlock); @@ -409,21 +409,21 @@ static int PtsToRegion( BOX *prevRects = reg->rects; extents = ®->extents; - + numRects = ((numFullPtBlocks * NUMPTSTOBUFFER) + iCurPtBlock) >> 1; - - if (!(reg->rects = (BOX *)Xrealloc((char *)reg->rects, + + if (!(reg->rects = (BOX *)Xrealloc((char *)reg->rects, (unsigned) (sizeof(BOX) * numRects)))) { Xfree(prevRects); return(0); } - + reg->size = numRects; CurPtBlock = FirstPtBlock; rects = reg->rects - 1; numRects = 0; extents->x1 = MAXSHORT, extents->x2 = MINSHORT; - + for ( ; numFullPtBlocks >= 0; numFullPtBlocks--) { /* the loop uses 2 points per iteration */ i = NUMPTSTOBUFFER >> 1; @@ -461,7 +461,7 @@ static int PtsToRegion( extents->y2 = 0; } reg->numRects = numRects; - + return(TRUE); } @@ -472,7 +472,7 @@ static int PtsToRegion( * encoding of the resultant bitmap -- the run-length * encoding is in the form of an array of rectangles. */ -Region +Region XPolygonRegion( XPoint *Pts, /* the pts */ int Count, /* number of pts */ @@ -494,7 +494,7 @@ XPolygonRegion( POINTBLOCK FirstPtBlock, *curPtBlock; /* PtBlock buffers */ POINTBLOCK *tmpPtBlock; int numFullPtBlocks = 0; - + if (! (region = XCreateRegion())) return (Region) NULL; /* special case a rectangle */ @@ -520,7 +520,7 @@ XPolygonRegion( } return(region); } - + if (Count < 2) return region; if (! (pETEs = (EdgeTableEntry *) @@ -533,7 +533,7 @@ XPolygonRegion( CreateETandAET(Count, Pts, &ET, &AET, pETEs, &SLLBlock); pSLL = ET.scanlines.next; curPtBlock = &FirstPtBlock; - + if (rule == EvenOddRule) { /* * for each scanline @@ -549,14 +549,14 @@ XPolygonRegion( } pPrevAET = &AET; pAET = AET.next; - + /* * for each active edge */ while (pAET) { pts->x = pAET->bres.minor_axis, pts->y = y; pts++, iPts++; - + /* * send out the buffer */ @@ -590,7 +590,7 @@ XPolygonRegion( pPrevAET = &AET; pAET = AET.next; pWETE = pAET; - + /* * for each active edge */ @@ -602,7 +602,7 @@ XPolygonRegion( if (pWETE == pAET) { pts->x = pAET->bres.minor_axis, pts->y = y; pts++, iPts++; - + /* * send out the buffer */ @@ -617,7 +617,7 @@ XPolygonRegion( } EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); } - + /* * recompute the winding active edge table if * we just resorted or have exited an edge. @@ -628,7 +628,7 @@ XPolygonRegion( } } } - FreeStorage(SLLBlock.next); + FreeStorage(SLLBlock.next); (void) PtsToRegion(numFullPtBlocks, iPts, &FirstPtBlock, region); for (curPtBlock = FirstPtBlock.next; --numFullPtBlocks >= 0;) { tmpPtBlock = curPtBlock->next; diff --git a/libX11/src/PolyTxt.c b/libX11/src/PolyTxt.c index eb93ffd65..53dd5f888 100644 --- a/libX11/src/PolyTxt.c +++ b/libX11/src/PolyTxt.c @@ -40,7 +40,7 @@ XDrawText( int y, XTextItem *items, int nitems) -{ +{ register int i; register XTextItem *item; int length = 0; @@ -81,11 +81,11 @@ XDrawText( req->length += (length + 3)>>2; /* convert to number of 32-bit words */ - /* + /* * If the entire request does not fit into the remaining space in the * buffer, flush the buffer first. If the request does fit into the * empty buffer, then we won't have to flush it at the end to keep - * the buffer 32-bit aligned. + * the buffer 32-bit aligned. */ if (dpy->bufptr + length > dpy->bufmax) @@ -123,9 +123,9 @@ XDrawText( { int nb = SIZEOF(xTextElt); - BufAlloc (char *, tbuf, nb); + BufAlloc (char *, tbuf, nb); *tbuf = 0; /* elt->len */ - if (PartialDelta > 0 ) + if (PartialDelta > 0 ) { *(tbuf+1) = 127; /* elt->delta */ PartialDelta = PartialDelta - 127; @@ -139,7 +139,7 @@ XDrawText( } if (PartialDelta) { - BufAlloc (char *, tbuf , nbytes); + BufAlloc (char *, tbuf , nbytes); *tbuf = 0; /* elt->len */ *(tbuf+1) = PartialDelta; /* elt->delta */ } @@ -150,9 +150,9 @@ XDrawText( { FirstTimeThrough = False; if (!item->delta) - { + { nbytes += SIZEOF(xTextElt); - BufAlloc (char *, tbuf, nbytes); + BufAlloc (char *, tbuf, nbytes); *(tbuf+1) = 0; /* elt->delta */ } else @@ -181,9 +181,9 @@ XDrawText( { FirstTimeThrough = False; if (!item->delta) - { + { nbytes += SIZEOF(xTextElt); - BufAlloc (char *, tbuf, nbytes); + BufAlloc (char *, tbuf, nbytes); *(tbuf+1) = 0; /* elt->delta */ } else @@ -195,7 +195,7 @@ XDrawText( else { nbytes += SIZEOF(xTextElt); - BufAlloc (char *, tbuf, nbytes); + BufAlloc (char *, tbuf, nbytes); *(tbuf+1) = 0; /* elt->delta */ } *tbuf = PartialNChars; /* elt->len */ @@ -209,23 +209,23 @@ XDrawText( if (length &= 3) { char *pad; - /* + /* * BufAlloc is a macro that uses its last argument more than - * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" + * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" */ length = 4 - length; BufAlloc (char *, pad, length); - /* + /* * if there are 3 bytes of padding, the first byte MUST be 0 - * so the pad bytes aren't mistaken for a final xTextElt + * so the pad bytes aren't mistaken for a final xTextElt */ *pad = 0; } - /* + /* * If the buffer pointer is not now pointing to a 32-bit boundary, * we must flush the buffer so that it does point to a 32-bit boundary - * at the end of this routine. + * at the end of this routine. */ if ((dpy->bufptr - dpy->buffer) & 3) diff --git a/libX11/src/PolyTxt16.c b/libX11/src/PolyTxt16.c index 512f24756..8a11af8a3 100644 --- a/libX11/src/PolyTxt16.c +++ b/libX11/src/PolyTxt16.c @@ -40,7 +40,7 @@ XDrawText16( int y, XTextItem16 *items, int nitems) -{ +{ register int i; register XTextItem16 *item; int length = 0; @@ -85,7 +85,7 @@ XDrawText16( * If the entire request does not fit into the remaining space in the * buffer, flush the buffer first. If the request does fit into the * empty buffer, then we won't have to flush it at the end to keep - * the buffer 32-bit aligned. + * the buffer 32-bit aligned. */ if (dpy->bufptr + length > dpy->bufmax) @@ -122,9 +122,9 @@ XDrawText16( { int nb = SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nb); + BufAlloc (xTextElt *, elt, nb); elt->len = 0; - if (PartialDelta > 0 ) + if (PartialDelta > 0 ) { elt->delta = 127; PartialDelta = PartialDelta - 127; @@ -137,7 +137,7 @@ XDrawText16( } if (PartialDelta) { - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->len = 0; elt->delta = PartialDelta; } @@ -148,9 +148,9 @@ XDrawText16( { FirstTimeThrough = False; if (!item->delta) - { + { nbytes += SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; } else @@ -193,9 +193,9 @@ XDrawText16( { FirstTimeThrough = False; if (!item->delta) - { + { nbytes += SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; } else @@ -210,7 +210,7 @@ XDrawText16( else { nbytes += SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; } elt->len = PartialNChars; @@ -241,21 +241,21 @@ XDrawText16( char *pad; /* * BufAlloc is a macro that uses its last argument more than - * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" + * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" */ length = 4 - length; BufAlloc (char *, pad, length); - /* + /* * if there are 3 bytes of padding, the first byte MUST be 0 - * so the pad bytes aren't mistaken for a final xTextElt + * so the pad bytes aren't mistaken for a final xTextElt */ *pad = 0; } - /* + /* * If the buffer pointer is not now pointing to a 32-bit boundary, * we must flush the buffer so that it does point to a 32-bit boundary - * at the end of this routine. + * at the end of this routine. */ if ((dpy->bufptr - dpy->buffer) & 3) diff --git a/libX11/src/PropAlloc.c b/libX11/src/PropAlloc.c index aab348b00..2bcbc8aa1 100644 --- a/libX11/src/PropAlloc.c +++ b/libX11/src/PropAlloc.c @@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group. /* - * Routines for allocating space for structures that are expected to get + * Routines for allocating space for structures that are expected to get * longer at some point. */ diff --git a/libX11/src/PutBEvent.c b/libX11/src/PutBEvent.c index 8c1db72a7..eca44f3af 100644 --- a/libX11/src/PutBEvent.c +++ b/libX11/src/PutBEvent.c @@ -37,7 +37,7 @@ from The Open Group. int _XPutBackEvent ( - register Display *dpy, + register Display *dpy, register XEvent *event) { register _XQEvent *qelt; @@ -62,7 +62,7 @@ _XPutBackEvent ( int XPutBackEvent ( - register Display * dpy, + register Display * dpy, register XEvent *event) { int ret; diff --git a/libX11/src/PutImage.c b/libX11/src/PutImage.c index b528eb920..32223571f 100644 --- a/libX11/src/PutImage.c +++ b/libX11/src/PutImage.c @@ -684,7 +684,7 @@ SendXYImage( if ((dpy->bufptr + length) > dpy->bufmax) { if ((buf = _XAllocScratch(dpy, (unsigned long) (length))) == NULL) { UnGetReq(PutImage); - return; + return; } } else @@ -872,7 +872,7 @@ PutImageRequest( SendZImage(dpy, req, image, req_xoffset, req_yoffset, dest_bits_per_pixel, dest_scanline_pad); } - + static void PutSubImage ( register Display *dpy, @@ -891,7 +891,7 @@ PutSubImage ( if ((req_width == 0) || (req_height == 0)) return; - + Available = ((65536 < dpy->max_request_size) ? (65536 << 2) : (dpy->max_request_size << 2)) - SIZEOF(xPutImageReq); @@ -907,7 +907,7 @@ PutSubImage ( } if ((BytesPerRow * req_height) <= Available) { - PutImageRequest(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, + PutImageRequest(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, req_width, req_height, dest_bits_per_pixel, dest_scanline_pad); } else if (req_height > 1) { @@ -916,11 +916,11 @@ PutSubImage ( if (SubImageHeight == 0) SubImageHeight = 1; - PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, + PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, req_width, (unsigned int) SubImageHeight, dest_bits_per_pixel, dest_scanline_pad); - PutSubImage(dpy, d, gc, image, req_xoffset, + PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset + SubImageHeight, x, y + SubImageHeight, req_width, req_height - SubImageHeight, dest_bits_per_pixel, dest_scanline_pad); @@ -928,11 +928,11 @@ PutSubImage ( int SubImageWidth = (((Available << 3) / dest_scanline_pad) * dest_scanline_pad) - left_pad; - PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, + PutSubImage(dpy, d, gc, image, req_xoffset, req_yoffset, x, y, (unsigned int) SubImageWidth, 1, dest_bits_per_pixel, dest_scanline_pad); - PutSubImage(dpy, d, gc, image, req_xoffset + SubImageWidth, + PutSubImage(dpy, d, gc, image, req_xoffset + SubImageWidth, req_yoffset, x + SubImageWidth, y, req_width - SubImageWidth, 1, dest_bits_per_pixel, dest_scanline_pad); @@ -950,7 +950,7 @@ XPutImage ( int req_yoffset, int x, int y, - unsigned int req_width, + unsigned int req_width, unsigned int req_height) { diff --git a/libX11/src/QuBest.c b/libX11/src/QuBest.c index 8678c28ea..480a30c62 100644 --- a/libX11/src/QuBest.c +++ b/libX11/src/QuBest.c @@ -39,7 +39,7 @@ Status XQueryBestSize( unsigned int height, unsigned int *ret_width, unsigned int *ret_height) -{ +{ xQueryBestSizeReply rep; register xQueryBestSizeReq *req; diff --git a/libX11/src/QuCurShp.c b/libX11/src/QuCurShp.c index 47675a8a8..a1c6d652c 100644 --- a/libX11/src/QuCurShp.c +++ b/libX11/src/QuCurShp.c @@ -34,11 +34,11 @@ in this Software without prior written authorization from The Open Group. Status XQueryBestCursor( register Display *dpy, Drawable drawable, - unsigned int width, + unsigned int width, unsigned int height, - unsigned int *ret_width, + unsigned int *ret_width, unsigned int *ret_height) -{ +{ xQueryBestSizeReply rep; register xQueryBestSizeReq *req; diff --git a/libX11/src/QuExt.c b/libX11/src/QuExt.c index 19d8be5d5..e46725391 100644 --- a/libX11/src/QuExt.c +++ b/libX11/src/QuExt.c @@ -39,7 +39,7 @@ XQueryExtension( int *major_opcode, /* RETURN */ int *first_event, /* RETURN */ int *first_error) /* RETURN */ -{ +{ xQueryExtensionReply rep; register xQueryExtensionReq *req; diff --git a/libX11/src/QuKeybd.c b/libX11/src/QuKeybd.c index 9e1c88aa0..22ba2fae4 100644 --- a/libX11/src/QuKeybd.c +++ b/libX11/src/QuKeybd.c @@ -40,13 +40,13 @@ int XQueryKeymap( register Display *dpy, char keys[32]) -{ +{ xQueryKeymapReply rep; register xReq *req; LockDisplay(dpy); GetEmptyReq(QueryKeymap, req); - (void) _XReply(dpy, (xReply *)&rep, + (void) _XReply(dpy, (xReply *)&rep, (SIZEOF(xQueryKeymapReply) - SIZEOF(xReply)) >> 2, xTrue); *(struct kmap *) keys = *(struct kmap *)rep.map; /* faster than memcpy */ UnlockDisplay(dpy); diff --git a/libX11/src/QuPntr.c b/libX11/src/QuPntr.c index e74a80dc7..b1ccc1c72 100644 --- a/libX11/src/QuPntr.c +++ b/libX11/src/QuPntr.c @@ -33,15 +33,15 @@ in this Software without prior written authorization from The Open Group. Bool XQueryPointer( register Display *dpy, - Window w, + Window w, Window *root, Window *child, - int *root_x, + int *root_x, int *root_y, int *win_x, int *win_y, unsigned int *mask) -{ +{ xQueryPointerReply rep; xResourceReq *req; diff --git a/libX11/src/QuStipShp.c b/libX11/src/QuStipShp.c index 96fdf98b5..8724f8d77 100644 --- a/libX11/src/QuStipShp.c +++ b/libX11/src/QuStipShp.c @@ -38,7 +38,7 @@ Status XQueryBestStipple( unsigned int height, unsigned int *ret_width, unsigned int *ret_height) -{ +{ xQueryBestSizeReply rep; register xQueryBestSizeReq *req; diff --git a/libX11/src/QuTileShp.c b/libX11/src/QuTileShp.c index 5effa6c8f..4db554aca 100644 --- a/libX11/src/QuTileShp.c +++ b/libX11/src/QuTileShp.c @@ -34,11 +34,11 @@ in this Software without prior written authorization from The Open Group. Status XQueryBestTile( register Display *dpy, Drawable drawable, - unsigned int width, + unsigned int width, unsigned int height, unsigned int *ret_width, unsigned int *ret_height) -{ +{ xQueryBestSizeReply rep; register xQueryBestSizeReq *req; diff --git a/libX11/src/QuTree.c b/libX11/src/QuTree.c index 3fd72f050..fff6a6230 100644 --- a/libX11/src/QuTree.c +++ b/libX11/src/QuTree.c @@ -52,7 +52,7 @@ Status XQueryTree ( return (0); } - *children = (Window *) NULL; + *children = (Window *) NULL; if (rep.nChildren != 0) { nbytes = rep.nChildren * sizeof(Window); *children = (Window *) Xmalloc((unsigned) nbytes); diff --git a/libX11/src/Quarks.c b/libX11/src/Quarks.c index 208739661..64c12f2c6 100644 --- a/libX11/src/Quarks.c +++ b/libX11/src/Quarks.c @@ -5,13 +5,13 @@ Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard, All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -359,7 +359,7 @@ XrmStringToQuark( if (!name) return (NULLQUARK); - + for (tname = (char *)name; (c = *tname++); ) sig = (sig << 1) + c; diff --git a/libX11/src/RdBitF.c b/libX11/src/RdBitF.c index 0b31230e6..196565b5b 100644 --- a/libX11/src/RdBitF.c +++ b/libX11/src/RdBitF.c @@ -29,17 +29,17 @@ from The Open Group. /* $XFree86: xc/lib/X11/RdBitF.c,v 3.6 2003/04/13 19:22:17 dawes Exp $ */ /* - * Code to read bitmaps from disk files. Interprets + * Code to read bitmaps from disk files. Interprets * data from X10 and X11 bitmap files and creates * Pixmap representations of files. Returns Pixmap * ID and specifics about image. * * Modified for speedup by Jim Becker, changed image - * data parsing logic (removed some fscanf()s). + * data parsing logic (removed some fscanf()s). * Aug 5, 1988 * * Note that this file and ../Xmu/RdBitF.c look very similar.... Keep them - * that way (but don't use common source code so that people can have one + * that way (but don't use common source code so that people can have one * without the other). */ @@ -85,7 +85,7 @@ NextInt ( int value = 0; int gotone = 0; int done = 0; - + /* loop, accumulate hex value until find delimiter */ /* skip any initial delimiters found in read stream */ @@ -164,7 +164,7 @@ XReadBitmapFileData ( } continue; } - + if (sscanf(line, "static short %s = {", name_and_type) == 1) version10p = 1; else if (sscanf(line,"static unsigned char %s = {",name_and_type) == 1) @@ -181,7 +181,7 @@ XReadBitmapFileData ( if (strcmp("bits[]", type)) continue; - + if (!ww || !hh) RETURN (BitmapFileInvalid); @@ -194,7 +194,7 @@ XReadBitmapFileData ( size = bytes_per_line * hh; bits = (unsigned char *) Xmalloc ((unsigned int) size); - if (!bits) + if (!bits) RETURN (BitmapNoMemory); if (version10p) { @@ -213,7 +213,7 @@ XReadBitmapFileData ( int bytes; for (bytes=0, ptr=bits; bytesx; - + if (mask & CWY) *value++ = changes->y; diff --git a/libX11/src/Region.c b/libX11/src/Region.c index cdd223b25..7d7e596a2 100644 --- a/libX11/src/Region.c +++ b/libX11/src/Region.c @@ -28,13 +28,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -324,9 +324,9 @@ XOffsetRegion( return 1; } -/* +/* Utility procedure Compress: - Replace r by the region r', where + Replace r by the region r', where p in r' iff (Quantifer m <= dx) (p + m in r), and Quantifier is Exists if grow is TRUE, For all if grow is FALSE, and (x,y) + m = (x+m,y) if xdir is TRUE; (x,y+m) if xdir is FALSE. @@ -397,23 +397,6 @@ XShrinkRegion( return 0; } -#ifdef notdef -/*********************************************************** - * Bop down the array of rects until we have passed - * scanline y. numRects is the size of the array. - ***********************************************************/ - -static BOX -*IndexRects( - register BOX *rects, - register int numRects, - register int y) -{ - while ((numRects--) && (rects->y2 <= y)) - rects++; - return(rects); -} -#endif /*====================================================================== * Region Intersection @@ -507,9 +490,9 @@ XIntersectRegion( (!EXTENTCHECK(®1->extents, ®2->extents))) newReg->numRects = 0; else - miRegionOp (newReg, reg1, reg2, + miRegionOp (newReg, reg1, reg2, miIntersectO, NULL, NULL); - + /* * Can't alter newReg's extents before we call miRegionOp because * it might be one of the source regions and miRegionOp depends @@ -528,13 +511,13 @@ miRegionCopy( { if (dstrgn != rgn) /* don't want to copy to itself */ - { + { if (dstrgn->size < rgn->numRects) { if (dstrgn->rects) { BOX *prevRects = dstrgn->rects; - + if (! (dstrgn->rects = (BOX *) Xrealloc((char *) dstrgn->rects, (unsigned) rgn->numRects * (sizeof(BOX))))) { @@ -555,135 +538,6 @@ miRegionCopy( } } -#ifdef notdef - -/* - * combinRegs(newReg, reg1, reg2) - * if one region is above or below the other. -*/ - -static void -combineRegs( - register Region newReg, - Region reg1, - Region reg2) -{ - register Region tempReg; - register BOX *rects; - register BOX *rects1; - register BOX *rects2; - register int total; - - rects1 = reg1->rects; - rects2 = reg2->rects; - - total = reg1->numRects + reg2->numRects; - if (! (tempReg = XCreateRegion())) - return; - tempReg->size = total; - /* region 1 is below region 2 */ - if (reg1->extents.y1 > reg2->extents.y1) - { - miRegionCopy(tempReg, reg2); - rects = &tempReg->rects[tempReg->numRects]; - total -= tempReg->numRects; - while (total--) - *rects++ = *rects1++; - } - else - { - miRegionCopy(tempReg, reg1); - rects = &tempReg->rects[tempReg->numRects]; - total -= tempReg->numRects; - while (total--) - *rects++ = *rects2++; - } - tempReg->extents = reg1->extents; - tempReg->numRects = reg1->numRects + reg2->numRects; - EXTENTS(®2->extents, tempReg); - miRegionCopy(newReg, tempReg); - Xfree((char *)tempReg); -} - -/* - * QuickCheck checks to see if it does not have to go through all the - * the ugly code for the region call. It returns 1 if it did all - * the work for Union, otherwise 0 - still work to be done. -*/ - -static int -QuickCheck(Region newReg, Region reg1, Region reg2) -{ - - /* if unioning with itself or no rects to union with */ - if ( (reg1 == reg2) || (!(reg1->numRects)) ) - { - miRegionCopy(newReg, reg2); - return TRUE; - } - - /* if nothing to union */ - if (!(reg2->numRects)) - { - miRegionCopy(newReg, reg1); - return TRUE; - } - - /* could put an extent check to see if add above or below */ - - if ((reg1->extents.y1 >= reg2->extents.y2) || - (reg2->extents.y1 >= reg1->extents.y2) ) - { - combineRegs(newReg, reg1, reg2); - return TRUE; - } - return FALSE; -} - -/* TopRects(rects, reg1, reg2) - * N.B. We now assume that reg1 and reg2 intersect. Therefore we are - * NOT checking in the two while loops for stepping off the end of the - * region. - */ - -static int -TopRects( - register Region newReg, - register BOX *rects, - register Region reg1, - register Region reg2, - BOX *FirstRect) -{ - register BOX *tempRects; - - /* need to add some rects from region 1 */ - if (reg1->extents.y1 < reg2->extents.y1) - { - tempRects = reg1->rects; - while(tempRects->y1 < reg2->extents.y1) - { - MEMCHECK(newReg, rects, FirstRect); - ADDRECTNOX(newReg,rects, tempRects->x1, tempRects->y1, - tempRects->x2, MIN(tempRects->y2, reg2->extents.y1)); - tempRects++; - } - } - /* need to add some rects from region 2 */ - if (reg2->extents.y1 < reg1->extents.y1) - { - tempRects = reg2->rects; - while (tempRects->y1 < reg1->extents.y1) - { - MEMCHECK(newReg, rects, FirstRect); - ADDRECTNOX(newReg, rects, tempRects->x1,tempRects->y1, - tempRects->x2, MIN(tempRects->y2, reg1->extents.y1)); - tempRects++; - } - } - return 1; -} -#endif - /*====================================================================== * Generic Region Operator *====================================================================*/ @@ -739,7 +593,7 @@ miCoalesce( { pCurBox++; } - + if (pCurBox != pRegEnd) { /* @@ -756,7 +610,7 @@ miCoalesce( curStart = pRegEnd - pReg->rects; pRegEnd = pReg->rects + pReg->numRects; } - + if ((curNumRects == prevNumRects) && (curNumRects != 0)) { pCurBox -= curNumRects; /* @@ -824,7 +678,7 @@ miCoalesce( *pPrevBox++ = *pCurBox++; } while (pCurBox != pRegEnd); } - + } } return (curStart); @@ -905,7 +759,7 @@ miRegionOp( * band */ short bot; /* Bottom of non-overlapping * band */ - + /* * Initialization: * set r1, r2, r1End and r2End appropriately, preserve the important @@ -917,9 +771,9 @@ miRegionOp( r2 = reg2->rects; r1End = r1 + reg1->numRects; r2End = r2 + reg2->numRects; - + oldRects = newReg->rects; - + EMPTY_REGION(newReg); /* @@ -936,7 +790,7 @@ miRegionOp( newReg->size = 0; return; } - + /* * Initialize ybot and ytop. * In the upcoming loop, ybot and ytop serve different functions depending @@ -954,7 +808,7 @@ miRegionOp( ybot = reg1->extents.y1; else ybot = reg2->extents.y1; - + /* * prevBand serves to mark the start of the previous band so rectangles * can be coalesced into larger rectangles. qv. miCoalesce, above. @@ -965,7 +819,7 @@ miRegionOp( * array of rectangles. */ prevBand = 0; - + do { curBand = newReg->numRects; @@ -982,13 +836,13 @@ miRegionOp( { r1BandEnd++; } - + r2BandEnd = r2; while ((r2BandEnd != r2End) && (r2BandEnd->y1 == r2->y1)) { r2BandEnd++; } - + /* * First handle the band that doesn't intersect, if any. * @@ -1048,7 +902,7 @@ miRegionOp( (* overlapFunc) (newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot); } - + if (newReg->numRects != curBand) { prevBand = miCoalesce (newReg, prevBand, curBand); @@ -1225,7 +1079,7 @@ miUnionO ( register short y2) { register BoxPtr pNextRect; - + pNextRect = &pReg->rects[pReg->numRects]; #define MERGERECT(r) \ @@ -1252,7 +1106,7 @@ miUnionO ( } \ assert(pReg->numRects<=pReg->size);\ r++; - + assert (y1numRects == 1) && + if ((reg1->numRects == 1) && (reg1->extents.x1 <= reg2->extents.x1) && (reg1->extents.y1 <= reg2->extents.y1) && (reg1->extents.x2 >= reg2->extents.x2) && @@ -1325,7 +1179,7 @@ XUnionRegion( /* * Region 2 completely subsumes region 1 */ - if ((reg2->numRects == 1) && + if ((reg2->numRects == 1) && (reg2->extents.x1 <= reg1->extents.x1) && (reg2->extents.y1 <= reg1->extents.y1) && (reg2->extents.x2 >= reg1->extents.x2) && @@ -1336,7 +1190,7 @@ XUnionRegion( return 1; } - miRegionOp (newReg, reg1, reg2, miUnionO, + miRegionOp (newReg, reg1, reg2, miUnionO, miUnionNonO, miUnionNonO); newReg->extents.x1 = min(reg1->extents.x1, reg2->extents.x1); @@ -1376,9 +1230,9 @@ miSubtractNonO1 ( register short y2) { register BoxPtr pNextRect; - + pNextRect = &pReg->rects[pReg->numRects]; - + assert(y1x1; - + assert(y1rects[pReg->numRects]; @@ -1547,7 +1401,7 @@ miSubtractO ( } return 0; /* lint */ } - + /*- *----------------------------------------------------------------------- * miSubtract -- @@ -1566,7 +1420,7 @@ miSubtractO ( int XSubtractRegion( Region regM, - Region regS, + Region regS, register Region regD) { /* check for trivial reject */ @@ -1576,8 +1430,8 @@ XSubtractRegion( miRegionCopy(regD, regM); return 1; } - - miRegionOp (regD, regM, regS, miSubtractO, + + miRegionOp (regD, regM, regS, miSubtractO, miSubtractNonO1, NULL); /* @@ -1607,10 +1461,10 @@ XXorRegion(Region sra, Region srb, Region dr) } /* - * Check to see if the region is empty. Assumes a region is passed + * Check to see if the region is empty. Assumes a region is passed * as a parameter */ -int +int XEmptyRegion( Region r) { @@ -1619,9 +1473,9 @@ XEmptyRegion( } /* - * Check to see if two regions are equal + * Check to see if two regions are equal */ -int +int XEqualRegion(Region r1, Region r2) { int i; @@ -1641,7 +1495,7 @@ XEqualRegion(Region r1, Region r2) return TRUE; } -int +int XPointInRegion( Region pRegion, int x, int y) @@ -1660,7 +1514,7 @@ XPointInRegion( return FALSE; } -int +int XRectInRegion( register Region region, int rx, int ry, @@ -1676,7 +1530,7 @@ XRectInRegion( prect->y1 = ry; prect->x2 = rwidth + rx; prect->y2 = rheight + ry; - + /* this is (just) a useful optimization */ if ((region->numRects == 0) || !EXTENTCHECK(®ion->extents, prect)) return(RectangleOut); @@ -1738,6 +1592,6 @@ XRectInRegion( } - return(partIn ? ((ry < prect->y2) ? RectanglePart : RectangleIn) : + return(partIn ? ((ry < prect->y2) ? RectanglePart : RectangleIn) : RectangleOut); } diff --git a/libX11/src/RegstFlt.c b/libX11/src/RegstFlt.c index 0648a54d1..f053e8232 100644 --- a/libX11/src/RegstFlt.c +++ b/libX11/src/RegstFlt.c @@ -19,12 +19,12 @@ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. + * PERFORMANCE OF THIS SOFTWARE. * * Author: Seiji Kuwari OMRON Corporation * kuwa@omron.co.jp * kuwa%omron.co.jp@uunet.uu.net - */ + */ /* Copyright 1990, 1991, 1998 The Open Group diff --git a/libX11/src/RepWindow.c b/libX11/src/RepWindow.c index 89e5a789e..274f790cf 100644 --- a/libX11/src/RepWindow.c +++ b/libX11/src/RepWindow.c @@ -34,9 +34,9 @@ in this Software without prior written authorization from The Open Group. int XReparentWindow( register Display *dpy, - Window w, + Window w, Window p, - int x, + int x, int y) { register xReparentWindowReq *req; diff --git a/libX11/src/RestackWs.c b/libX11/src/RestackWs.c index 72228eb6b..95f8886f3 100644 --- a/libX11/src/RestackWs.c +++ b/libX11/src/RestackWs.c @@ -67,6 +67,6 @@ XRestackWindows ( return 1; } - - + + diff --git a/libX11/src/RotProp.c b/libX11/src/RotProp.c index 589a9d5a0..419a3e94b 100644 --- a/libX11/src/RotProp.c +++ b/libX11/src/RotProp.c @@ -47,7 +47,7 @@ XRotateWindowProperties( req->window = w; req->nAtoms = nprops; req->nPositions = npositions; - + req->length += nprops; nbytes = nprops << 2; /* XXX Cray needs packing here.... */ diff --git a/libX11/src/SetCRects.c b/libX11/src/SetCRects.c index 1e870f9ee..0231289e8 100644 --- a/libX11/src/SetCRects.c +++ b/libX11/src/SetCRects.c @@ -67,7 +67,7 @@ int XSetClipRectangles ( register Display *dpy, GC gc, - int clip_x_origin, + int clip_x_origin, int clip_y_origin, XRectangle *rectangles, int n, @@ -80,4 +80,4 @@ XSetClipRectangles ( SyncHandle(); return 1; } - + diff --git a/libX11/src/SetClOrig.c b/libX11/src/SetClOrig.c index 96d371391..f38f69ea0 100644 --- a/libX11/src/SetClOrig.c +++ b/libX11/src/SetClOrig.c @@ -35,7 +35,7 @@ int XSetClipOrigin ( register Display *dpy, GC gc, - int xorig, + int xorig, int yorig) { XGCValues *gv = &gc->values; diff --git a/libX11/src/SetDashes.c b/libX11/src/SetDashes.c index 6ecf955d1..bba114978 100644 --- a/libX11/src/SetDashes.c +++ b/libX11/src/SetDashes.c @@ -54,4 +54,4 @@ XSetDashes ( SyncHandle(); return 1; } - + diff --git a/libX11/src/SetHints.c b/libX11/src/SetHints.c index 130e7cac1..f9ce04d2e 100644 --- a/libX11/src/SetHints.c +++ b/libX11/src/SetHints.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -96,12 +96,12 @@ XSetSizeHints( /* old routine */ prop.maxAspectY = hints->max_aspect.y; } return XChangeProperty (dpy, w, property, XA_WM_SIZE_HINTS, 32, - PropModeReplace, (unsigned char *) &prop, + PropModeReplace, (unsigned char *) &prop, OldNumPropSizeElements); } -/* - * XSetWMHints sets the property +/* + * XSetWMHints sets the property * WM_HINTS type: WM_HINTS format:32 */ @@ -131,14 +131,14 @@ XSetWMHints ( if (wmhints->flags & WindowGroupHint) prop.windowGroup = wmhints->window_group; return XChangeProperty (dpy, w, XA_WM_HINTS, XA_WM_HINTS, 32, - PropModeReplace, (unsigned char *) &prop, + PropModeReplace, (unsigned char *) &prop, NumPropWMHintsElements); } -/* - * XSetZoomHints sets the property +/* + * XSetZoomHints sets the property * WM_ZOOM_HINTS type: WM_SIZE_HINTS format: 32 */ @@ -152,8 +152,8 @@ XSetZoomHints ( } -/* - * XSetNormalHints sets the property +/* + * XSetNormalHints sets the property * WM_NORMAL_HINTS type: WM_SIZE_HINTS format: 32 */ @@ -197,8 +197,8 @@ XSetIconSizes ( pp += 1; list += 1; } - XChangeProperty (dpy, w, XA_WM_ICON_SIZE, XA_WM_ICON_SIZE, 32, - PropModeReplace, (unsigned char *) prop, + XChangeProperty (dpy, w, XA_WM_ICON_SIZE, XA_WM_ICON_SIZE, 32, + PropModeReplace, (unsigned char *) prop, count * NumPropIconSizeElements); Xfree ((char *)prop); } @@ -218,10 +218,10 @@ XSetCommand ( for (i = 0, nbytes = 0; i < argc; i++) { nbytes += safestrlen(argv[i]) + 1; } - if ((bp = buf = Xmalloc((unsigned) nbytes))) { + if ((bp = buf = Xmalloc((unsigned) nbytes))) { /* copy arguments into single buffer */ for (i = 0; i < argc; i++) { - if (argv[i]) { + if (argv[i]) { (void) strcpy(bp, argv[i]); bp += strlen(argv[i]) + 1; } @@ -230,11 +230,11 @@ XSetCommand ( } XChangeProperty (dpy, w, XA_WM_COMMAND, XA_STRING, 8, PropModeReplace, (unsigned char *)buf, nbytes); - Xfree(buf); + Xfree(buf); } return 1; } -/* +/* * XSetStandardProperties sets the following properties: * WM_NAME type: STRING format: 8 * WM_ICON_NAME type: STRING format: 8 @@ -269,7 +269,7 @@ XSetStandardProperties ( phints.flags |= IconPixmapHint; } if (argv != NULL) XSetCommand(dpy, w, argv, argc); - + if (hints != NULL) XSetNormalHints(dpy, w, hints); if (phints.flags != 0) XSetWMHints(dpy, w, &phints); @@ -299,7 +299,7 @@ XSetClassHint( len_nm = safestrlen(classhint->res_name); len_cl = safestrlen(classhint->res_class); - if ((class_string = s = Xmalloc((unsigned) (len_nm + len_cl + 2)))) { + if ((class_string = s = Xmalloc((unsigned) (len_nm + len_cl + 2)))) { if (len_nm) { strcpy(s, classhint->res_name); s += len_nm + 1; @@ -311,7 +311,7 @@ XSetClassHint( else *s = '\0'; XChangeProperty(dpy, w, XA_WM_CLASS, XA_STRING, 8, - PropModeReplace, (unsigned char *) class_string, + PropModeReplace, (unsigned char *) class_string, len_nm+len_cl+2); Xfree(class_string); } diff --git a/libX11/src/SetIFocus.c b/libX11/src/SetIFocus.c index 37f796d24..6f10419fe 100644 --- a/libX11/src/SetIFocus.c +++ b/libX11/src/SetIFocus.c @@ -37,7 +37,7 @@ XSetInputFocus( Window focus, int revert_to, Time time) -{ +{ register xSetInputFocusReq *req; LockDisplay(dpy); diff --git a/libX11/src/SetLocale.c b/libX11/src/SetLocale.c index 2302c4473..015577726 100644 --- a/libX11/src/SetLocale.c +++ b/libX11/src/SetLocale.c @@ -19,7 +19,7 @@ * OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT, BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. @@ -27,7 +27,7 @@ * Authors: Li Yuhong OMRON Corporation * Tetsuya Kato NTT Software Corporation * Hiroshi Kuribayashi OMRON Corporation - * + * */ /* @@ -138,12 +138,12 @@ _Xsetlocale( * returned by setlocale. * * Should match the code in Xt ExtractLocaleName. - * + * * This function name is a bit of a misnomer. Even the siname parameter - * name is a misnomer. On most modern operating systems this function is - * a no-op, simply returning the osname; but on older operating systems - * like Ultrix, or HPUX 9.x and earlier, when you set LANG=german.88591 - * then the string returned by setlocale(LC_ALL, "") will look something + * name is a misnomer. On most modern operating systems this function is + * a no-op, simply returning the osname; but on older operating systems + * like Ultrix, or HPUX 9.x and earlier, when you set LANG=german.88591 + * then the string returned by setlocale(LC_ALL, "") will look something * like: "german.88591 german.88591 ... german.88591". Then this function * will pick out the LC_CTYPE component and return a pointer to that. */ @@ -211,7 +211,7 @@ _XlcMapOSLocaleName( start = osname; # endif # ifdef STARTCHAR - if (start && (start = strchr (start, STARTCHAR))) + if (start && (start = strchr (start, STARTCHAR))) # elif defined (STARTSTR) if (start && (start = strstr (start,STARTSTR))) # endif diff --git a/libX11/src/SetNrmHint.c b/libX11/src/SetNrmHint.c index 2b2f24009..043f3db01 100644 --- a/libX11/src/SetNrmHint.c +++ b/libX11/src/SetNrmHint.c @@ -69,7 +69,7 @@ void XSetWMSizeHints ( xPropSizeHints data; memset(&data, 0, sizeof(data)); - data.flags = (hints->flags & + data.flags = (hints->flags & (USPosition|USSize|PPosition|PSize|PMinSize|PMaxSize| PResizeInc|PAspect|PBaseSize|PWinGravity)); @@ -111,7 +111,7 @@ void XSetWMSizeHints ( if (hints->flags & PWinGravity) { data.winGravity = hints->win_gravity; } - + XChangeProperty (dpy, w, prop, XA_WM_SIZE_HINTS, 32, PropModeReplace, (unsigned char *) &data, NumPropSizeElements); diff --git a/libX11/src/SetPMask.c b/libX11/src/SetPMask.c index b81ea9df3..5f979c42f 100644 --- a/libX11/src/SetPMask.c +++ b/libX11/src/SetPMask.c @@ -42,7 +42,7 @@ XSetPlaneMask ( gc->values.plane_mask = planemask; gc->dirty |= GCPlaneMask; } - UnlockDisplay(dpy); + UnlockDisplay(dpy); SyncHandle(); return 1; } diff --git a/libX11/src/SetPntMap.c b/libX11/src/SetPntMap.c index 94708f0e3..fe2361605 100644 --- a/libX11/src/SetPntMap.c +++ b/libX11/src/SetPntMap.c @@ -48,7 +48,7 @@ XSetPointerMapping ( req->nElts = nmaps; req->length += (nmaps + 3)>>2; Data (dpy, (char *)map, (long) nmaps); - if (_XReply (dpy, (xReply *)&rep, 0, xFalse) == 0) + if (_XReply (dpy, (xReply *)&rep, 0, xFalse) == 0) rep.success = MappingSuccess; UnlockDisplay(dpy); SyncHandle(); @@ -79,4 +79,4 @@ XChangeKeyboardMapping ( SyncHandle(); return 0; } - + diff --git a/libX11/src/SetRGBCMap.c b/libX11/src/SetRGBCMap.c index d9eda5346..f96a1955d 100644 --- a/libX11/src/SetRGBCMap.c +++ b/libX11/src/SetRGBCMap.c @@ -49,7 +49,7 @@ void XSetRGBColormaps ( xPropStandardColormap *data, tmpdata; /* scratch data */ int mode = PropModeReplace; /* for partial writes */ Bool alloced_scratch_space; /* do we need to free? */ - + if (count < 1) return; diff --git a/libX11/src/SetSSaver.c b/libX11/src/SetSSaver.c index 3497727d8..05c2a1b62 100644 --- a/libX11/src/SetSSaver.c +++ b/libX11/src/SetSSaver.c @@ -35,7 +35,7 @@ int XSetScreenSaver( register Display *dpy, int timeout, - int interval, + int interval, int prefer_blank, int allow_exp) diff --git a/libX11/src/SetStCmap.c b/libX11/src/SetStCmap.c index 7978f1dd8..c02dfcb17 100644 --- a/libX11/src/SetStCmap.c +++ b/libX11/src/SetStCmap.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -57,7 +57,7 @@ SOFTWARE. /* * WARNING - * + * * This is a pre-ICCCM routine. It must not reference any of the new fields * in the XStandardColormap structure. */ diff --git a/libX11/src/SetTxtProp.c b/libX11/src/SetTxtProp.c index 65f9855d4..5d692f6d9 100644 --- a/libX11/src/SetTxtProp.c +++ b/libX11/src/SetTxtProp.c @@ -4,13 +4,13 @@ Copyright 1988 by Wyse Technology, Inc., San Jose, Ca. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Wyse not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/SetWMCMapW.c b/libX11/src/SetWMCMapW.c index efb380527..4375531b2 100644 --- a/libX11/src/SetWMCMapW.c +++ b/libX11/src/SetWMCMapW.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -53,8 +53,8 @@ SOFTWARE. #include "Xlibint.h" #include -/* - * XSetWMProtocols sets the property +/* + * XSetWMProtocols sets the property * WM_COLORMAP_WINDOWS type: WINDOW format:32 */ diff --git a/libX11/src/SetWMProto.c b/libX11/src/SetWMProto.c index ed07316ab..f1963c60f 100644 --- a/libX11/src/SetWMProto.c +++ b/libX11/src/SetWMProto.c @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -53,8 +53,8 @@ SOFTWARE. #include "Xlibint.h" #include -/* - * XSetWMProtocols sets the property +/* + * XSetWMProtocols sets the property * WM_PROTOCOLS type: ATOM format: 32 */ diff --git a/libX11/src/StBytes.c b/libX11/src/StBytes.c index 1476e83d0..f6a7788dd 100644 --- a/libX11/src/StBytes.c +++ b/libX11/src/StBytes.c @@ -51,9 +51,9 @@ XRotateBuffers ( /* XRotateWindowProperties wants a non-const Atom*, but it doesn't * modify it, so this is safe. */ - return XRotateWindowProperties(dpy, RootWindow(dpy, 0), n_to_atom, 8, rotate); + return XRotateWindowProperties(dpy, RootWindow(dpy, 0), (Atom *)n_to_atom, 8, rotate); } - + char *XFetchBuffer ( register Display *dpy, int *nbytes, @@ -67,8 +67,8 @@ char *XFetchBuffer ( *nbytes = 0; if ((buffer < 0) || (buffer > 7)) return (NULL); /* XXX should be (sizeof (maxint) - 1)/4 */ - if (XGetWindowProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer], - 0L, 10000000L, False, XA_STRING, + if (XGetWindowProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer], + 0L, 10000000L, False, XA_STRING, &actual_type, &actual_format, &nitems, &leftover, &data) != Success) { return (NULL); } @@ -95,7 +95,7 @@ XStoreBuffer ( register int buffer) { if ((buffer < 0) || (buffer > 7)) return 0; - return XChangeProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer], + return XChangeProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer], XA_STRING, 8, PropModeReplace, (unsigned char *) bytes, nbytes); } diff --git a/libX11/src/StColors.c b/libX11/src/StColors.c index f3a6b589b..904ff2363 100644 --- a/libX11/src/StColors.c +++ b/libX11/src/StColors.c @@ -42,7 +42,7 @@ XStoreColors( xColorItem citem; register xStoreColorsReq *req; - LockDisplay(dpy); + LockDisplay(dpy); GetReq(StoreColors, req); req->cmap = cmap; @@ -58,7 +58,7 @@ XStoreColors( /* note that xColorItem doesn't contain all 16-bit quantities, so we can't use Data16 */ - Data(dpy, (char *)&citem, (long) SIZEOF(xColorItem)); + Data(dpy, (char *)&citem, (long) SIZEOF(xColorItem)); /* assume size is 4*n */ } UnlockDisplay(dpy); diff --git a/libX11/src/StName.c b/libX11/src/StName.c index ba01ffb0c..b057cdae3 100644 --- a/libX11/src/StName.c +++ b/libX11/src/StName.c @@ -38,7 +38,7 @@ XStoreName ( Window w, _Xconst char *name) { - return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, + return XChangeProperty(dpy, w, XA_WM_NAME, XA_STRING, 8, PropModeReplace, (unsigned char *)name, name ? strlen(name) : 0); } @@ -49,7 +49,7 @@ XSetIconName ( Window w, _Xconst char *icon_name) { - return XChangeProperty(dpy, w, XA_WM_ICON_NAME, XA_STRING, + return XChangeProperty(dpy, w, XA_WM_ICON_NAME, XA_STRING, 8, PropModeReplace, (unsigned char *)icon_name, icon_name ? strlen(icon_name) : 0); } diff --git a/libX11/src/StrToText.c b/libX11/src/StrToText.c index 5ff629009..3d35cf6b4 100644 --- a/libX11/src/StrToText.c +++ b/libX11/src/StrToText.c @@ -33,8 +33,8 @@ in this Software without prior written authorization from The Open Group. #include /* - * XStringListToTextProperty - fill in TextProperty structure with - * concatenated list of null-separated strings. Return True if successful + * XStringListToTextProperty - fill in TextProperty structure with + * concatenated list of null-separated strings. Return True if successful * else False. Allocate room on end for trailing NULL, but don't include in * count. */ diff --git a/libX11/src/Text.c b/libX11/src/Text.c index 95ad0d9df..8ddf4812d 100644 --- a/libX11/src/Text.c +++ b/libX11/src/Text.c @@ -40,7 +40,7 @@ XDrawString( int y, _Xconst char *string, int length) -{ +{ int Datalength = 0; register xPolyText8Req *req; @@ -62,11 +62,11 @@ XDrawString( req->length += (Datalength + 3)>>2; /* convert to number of 32-bit words */ - /* + /* * If the entire request does not fit into the remaining space in the * buffer, flush the buffer first. If the request does fit into the * empty buffer, then we won't have to flush it at the end to keep - * the buffer 32-bit aligned. + * the buffer 32-bit aligned. */ if (dpy->bufptr + Datalength > dpy->bufmax) @@ -94,11 +94,11 @@ XDrawString( PartialNChars = PartialNChars - 254; CharacterOffset += 254; } - + if (PartialNChars) { nbytes = PartialNChars + SIZEOF(xTextElt); - BufAlloc (unsigned char *, tbuf, nbytes); + BufAlloc (unsigned char *, tbuf, nbytes); /* elt->delta = 0; * elt->len = PartialNChars; */ @@ -114,23 +114,23 @@ XDrawString( if (Datalength &= 3) { char *pad; - /* + /* * BufAlloc is a macro that uses its last argument more than - * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" + * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" */ length = 4 - Datalength; BufAlloc (char *, pad, length); - /* + /* * if there are 3 bytes of padding, the first byte MUST be 0 - * so the pad bytes aren't mistaken for a final xTextElt + * so the pad bytes aren't mistaken for a final xTextElt */ *pad = 0; } - /* + /* * If the buffer pointer is not now pointing to a 32-bit boundary, * we must flush the buffer so that it does point to a 32-bit boundary - * at the end of this routine. + * at the end of this routine. */ if ((dpy->bufptr - dpy->buffer) & 3) diff --git a/libX11/src/Text16.c b/libX11/src/Text16.c index 96d5911d6..0aa41a6a4 100644 --- a/libX11/src/Text16.c +++ b/libX11/src/Text16.c @@ -40,7 +40,7 @@ XDrawString16( int y, _Xconst XChar2b *string, int length) -{ +{ int Datalength = 0; register xPolyText16Req *req; @@ -62,11 +62,11 @@ XDrawString16( req->length += (Datalength + 3)>>2; /* convert to number of 32-bit words */ - /* + /* * If the entire request does not fit into the remaining space in the * buffer, flush the buffer first. If the request does fit into the * empty buffer, then we won't have to flush it at the end to keep - * the buffer 32-bit aligned. + * the buffer 32-bit aligned. */ if (dpy->bufptr + Datalength > dpy->bufmax) @@ -99,11 +99,11 @@ XDrawString16( PartialNChars = PartialNChars - 254; CharacterOffset += 254; } - + if (PartialNChars) { nbytes = PartialNChars * 2 + SIZEOF(xTextElt); - BufAlloc (xTextElt *, elt, nbytes); + BufAlloc (xTextElt *, elt, nbytes); elt->delta = 0; elt->len = PartialNChars; #if defined(MUSTCOPY) || defined(MUSTCOPY2B) @@ -126,23 +126,23 @@ XDrawString16( if (Datalength &= 3) { char *pad; - /* + /* * BufAlloc is a macro that uses its last argument more than - * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" + * once, otherwise I'd write "BufAlloc (char *, pad, 4-length)" */ length = 4 - Datalength; BufAlloc (char *, pad, length); - /* + /* * if there are 3 bytes of padding, the first byte MUST be 0 - * so the pad bytes aren't mistaken for a final xTextElt + * so the pad bytes aren't mistaken for a final xTextElt */ *pad = 0; } - /* + /* * If the buffer pointer is not now pointing to a 32-bit boundary, * we must flush the buffer so that it does point to a 32-bit boundary - * at the end of this routine. + * at the end of this routine. */ if ((dpy->bufptr - dpy->buffer) & 3) diff --git a/libX11/src/TextExt.c b/libX11/src/TextExt.c index fc703011f..62e84d681 100644 --- a/libX11/src/TextExt.c +++ b/libX11/src/TextExt.c @@ -43,7 +43,7 @@ from The Open Group. #define max_byte2 max_char_or_byte2 -/* +/* * CI_GET_ROWZERO_CHAR_INFO_2D - do the same thing as CI_GET_CHAR_INFO_1D, * except that the font has more than one row. This is special case of more * general version used in XTextExt16.c since row == 0. This is used when @@ -121,7 +121,7 @@ XTextExtents ( } else { overall->ascent = max (overall->ascent, cs->ascent); overall->descent = max (overall->descent, cs->descent); - overall->lbearing = min (overall->lbearing, + overall->lbearing = min (overall->lbearing, overall->width + cs->lbearing); overall->rbearing = max (overall->rbearing, overall->width + cs->rbearing); @@ -134,7 +134,7 @@ XTextExtents ( * if there were no characters, then set everything to 0 */ if (nfound == 0) { - overall->width = overall->ascent = overall->descent = + overall->width = overall->ascent = overall->descent = overall->lbearing = overall->rbearing = 0; } @@ -143,7 +143,7 @@ XTextExtents ( /* - * XTextWidth - compute the width of a string of eightbit bytes. This is a + * XTextWidth - compute the width of a string of eightbit bytes. This is a * subset of XTextExtents. */ int diff --git a/libX11/src/TextExt16.c b/libX11/src/TextExt16.c index 763350a10..ee259e600 100644 --- a/libX11/src/TextExt16.c +++ b/libX11/src/TextExt16.c @@ -43,7 +43,7 @@ from The Open Group. #define max_byte2 max_char_or_byte2 /* - * XTextExtents16 - compute the extents of string given as a sequence of + * XTextExtents16 - compute the extents of string given as a sequence of * XChar2bs. */ int @@ -96,7 +96,7 @@ XTextExtents16 ( } else { overall->ascent = max (overall->ascent, cs->ascent); overall->descent = max (overall->descent, cs->descent); - overall->lbearing = min (overall->lbearing, + overall->lbearing = min (overall->lbearing, overall->width + cs->lbearing); overall->rbearing = max (overall->rbearing, overall->width + cs->rbearing); @@ -109,7 +109,7 @@ XTextExtents16 ( * if there were no characters, then set everything to 0 */ if (nfound == 0) { - overall->width = overall->ascent = overall->descent = + overall->width = overall->ascent = overall->descent = overall->lbearing = overall->rbearing = 0; } @@ -118,7 +118,7 @@ XTextExtents16 ( /* - * XTextWidth16 - compute the width of sequence of XChar2bs. This is a + * XTextWidth16 - compute the width of sequence of XChar2bs. This is a * subset of XTextExtents16. */ int diff --git a/libX11/src/TextToStr.c b/libX11/src/TextToStr.c index a32de8729..29d07c466 100644 --- a/libX11/src/TextToStr.c +++ b/libX11/src/TextToStr.c @@ -76,7 +76,7 @@ Status XTextPropertyToStringList ( */ list = (char **) Xmalloc (nelements * sizeof (char *)); if (!list) return False; - + start = (char *) Xmalloc ((datalen + 1) * sizeof (char)); /* for */ if (!start) { Xfree ((char *) list); diff --git a/libX11/src/TrCoords.c b/libX11/src/TrCoords.c index d0e0562f2..6ec0a0fa3 100644 --- a/libX11/src/TrCoords.c +++ b/libX11/src/TrCoords.c @@ -33,14 +33,14 @@ in this Software without prior written authorization from The Open Group. Bool XTranslateCoordinates( register Display *dpy, - Window src_win, + Window src_win, Window dest_win, int src_x, int src_y, int *dst_x, int *dst_y, Window *child) -{ +{ register xTranslateCoordsReq *req; xTranslateCoordsReply rep; @@ -55,7 +55,7 @@ Bool XTranslateCoordinates( SyncHandle(); return(False); } - + *child = rep.child; *dst_x = cvtINT16toInt (rep.dstX); *dst_y = cvtINT16toInt (rep.dstY); diff --git a/libX11/src/UIThrStubs.c b/libX11/src/UIThrStubs.c index 13df9e7ce..487bb06f1 100644 --- a/libX11/src/UIThrStubs.c +++ b/libX11/src/UIThrStubs.c @@ -10,10 +10,10 @@ * 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. @@ -21,16 +21,16 @@ * 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 David E. Wexelblat shall * not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization * from David E. Wexelblat. - * + * */ /* - * Stubs for thread functions needed by the X library. Supports + * Stubs for thread functions needed by the X library. Supports * UnixWare 2.x threads; may support Solaris 2 threads as well, but not * tested. Defining things this way removes the dependency of the X * library on the threads library, but still supports threads if the user @@ -145,7 +145,7 @@ _Xthr_equal_stub_() #endif /* SVR4 */ #endif /* CTHREADS */ -static xthread_t +static xthread_t _Xthr_self_stub_() { static xthread_t _X_no_thread_id; @@ -153,7 +153,7 @@ _Xthr_self_stub_() return(_X_no_thread_id); /* defined by */ } -static int +static int _Xthr_zero_stub_() { return(0); diff --git a/libX11/src/UnldFont.c b/libX11/src/UnldFont.c index 2394e2d6a..f01569731 100644 --- a/libX11/src/UnldFont.c +++ b/libX11/src/UnldFont.c @@ -35,7 +35,7 @@ int XUnloadFont( register Display *dpy, Font font) -{ +{ register xResourceReq *req; LockDisplay(dpy); diff --git a/libX11/src/VisUtil.c b/libX11/src/VisUtil.c index 53320cad0..6e957cb42 100644 --- a/libX11/src/VisUtil.c +++ b/libX11/src/VisUtil.c @@ -33,7 +33,7 @@ in this Software without prior written authorization from The Open Group. #include /* * This procedure returns a list of visual information structures - * that match the specified attributes given in the visual information + * that match the specified attributes given in the visual information * template. * * If no visuals exist that match the specified attributes, a NULL is @@ -76,7 +76,7 @@ XVisualInfo *XGetVisualInfo( count = 0; total = 10; - if (! (vip_base = vip = (XVisualInfo *) + if (! (vip_base = vip = (XVisualInfo *) Xmalloc((unsigned) (sizeof(XVisualInfo) * total)))) { UnlockDisplay(dpy); return (XVisualInfo *) NULL; @@ -128,13 +128,13 @@ XVisualInfo *XGetVisualInfo( (vp->bits_per_rgb != visual_info_template->bits_per_rgb)) continue; /* YEA!!! WE FOUND A GOOD ONE */ - + if (count+1 > total) { XVisualInfo *old_vip_base = vip_base; total += 10; if (! (vip_base = (XVisualInfo *) - Xrealloc((char *) vip_base, + Xrealloc((char *) vip_base, (unsigned) (sizeof(XVisualInfo) * total)))) { Xfree((char *) old_vip_base); UnlockDisplay(dpy); @@ -160,7 +160,7 @@ XVisualInfo *XGetVisualInfo( } /* END OF LOOP ON VISUALS */ } /* END OF IF THERE ARE ANY VISUALS AT THIS DEPTH */ - + } /* END OF LOOP ON DEPTHS */ } /* END OF LOOP ON SCREENS */ @@ -180,9 +180,9 @@ XVisualInfo *XGetVisualInfo( /* - * This procedure will return the visual information for a visual - * that matches the specified depth and class for a screen. Since - * multiple visuals may exist that match the specified depth and + * This procedure will return the visual information for a visual + * that matches the specified depth and class for a screen. Since + * multiple visuals may exist that match the specified depth and * class, which visual chosen is undefined. * * If a visual is found, True is returned as the function value, @@ -225,7 +225,7 @@ Status XMatchVisualInfo( /* if nvisuals == 0 then vp will be NULL */ for (jj=0; jjnvisuals; jj++) { - if (vp->class == class) + if (vp->class == class) { visual_info->visual = _XVIDtoVisual(dpy, vp->visualid); visual_info->visualid = vp->visualid; diff --git a/libX11/src/WMGeom.c b/libX11/src/WMGeom.c index 59041a9fa..215ae7c40 100644 --- a/libX11/src/WMGeom.c +++ b/libX11/src/WMGeom.c @@ -74,13 +74,13 @@ XWMGeometry ( * Get the base sizes and increments. Section 4.1.2.3 of the ICCCM * states that the base and minimum sizes are defaults for each other. * If neither is given, then the base sizes should be 0. These parameters - * control the sets of sizes that window managers should allow for the + * control the sets of sizes that window managers should allow for the * window according to the following formulae: * * width = base_width + (i * width_inc) * height = base_height + (j * height_inc) */ - base_width = ((hints->flags & PBaseSize) ? hints->base_width : + base_width = ((hints->flags & PBaseSize) ? hints->base_width : ((hints->flags & PMinSize) ? hints->min_width : 0)); base_height = ((hints->flags & PBaseSize) ? hints->base_height : ((hints->flags & PMinSize) ? hints->min_height : 0)); @@ -105,11 +105,11 @@ XWMGeometry ( * 4. multiply by the size increment * 5. and add to the base size */ - rwidth = ((((umask & WidthValue) ? uwidth : + rwidth = ((((umask & WidthValue) ? uwidth : ((dmask & WidthValue) ? dwidth : 1)) * width_inc) + base_width); - rheight = ((((umask & HeightValue) ? uheight : - ((dmask & HeightValue) ? dheight : 1)) * height_inc) + + rheight = ((((umask & HeightValue) ? uheight : + ((dmask & HeightValue) ? dheight : 1)) * height_inc) + base_height); /* @@ -137,7 +137,7 @@ XWMGeometry ( if (dmask & XNegative) { rx = (DisplayWidth (dpy, screen) + dx - rwidth - 2 * bwidth); rmask |= XNegative; - } else + } else rx = dx; } else { rx = 0; /* gotta choose something... */ @@ -150,7 +150,7 @@ XWMGeometry ( if (dmask & YNegative) { ry = (DisplayHeight(dpy, screen) + dy - rheight - 2 * bwidth); rmask |= YNegative; - } else + } else ry = dy; } else { ry = 0; /* gotta choose something... */ diff --git a/libX11/src/WMProps.c b/libX11/src/WMProps.c index a581f335c..26ffc3ba3 100644 --- a/libX11/src/WMProps.c +++ b/libX11/src/WMProps.c @@ -34,13 +34,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Wyse not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -62,7 +62,7 @@ SOFTWARE. #include -/* +/* * XSetWMProperties sets the following properties: * WM_NAME type: TEXT format: varies? * WM_ICON_NAME type: TEXT format: varies? @@ -73,7 +73,7 @@ SOFTWARE. * WM_CLASS type: STRING/STRING format: 8 * WM_LOCALE_NAME type: STRING format: 8 */ - + void XSetWMProperties ( Display *dpy, Window w, /* window to decorate */ @@ -109,7 +109,7 @@ void XSetWMProperties ( textprop.format = 8; textprop.nitems = len; XSetWMClientMachine (dpy, w, &textprop); - + /* set hints about how geometry and window manager interaction */ if (sizeHints) XSetWMNormalHints (dpy, w, sizeHints); if (wmHints) XSetWMHints (dpy, w, wmHints); @@ -139,7 +139,7 @@ void XSetWMProperties ( } XSetClassHint (dpy, w, classHints); } - + locale = setlocale(LC_CTYPE, (char *)NULL); if (locale) XChangeProperty (dpy, w, XInternAtom(dpy, "WM_LOCALE_NAME", False), diff --git a/libX11/src/WarpPtr.c b/libX11/src/WarpPtr.c index d8b1bc9a8..223b035ee 100644 --- a/libX11/src/WarpPtr.c +++ b/libX11/src/WarpPtr.c @@ -42,7 +42,7 @@ XWarpPointer( unsigned int src_height, int dest_x, int dest_y) -{ +{ register xWarpPointerReq *req; LockDisplay(dpy); diff --git a/libX11/src/WinEvent.c b/libX11/src/WinEvent.c index 8839f3553..c6daf2a81 100644 --- a/libX11/src/WinEvent.c +++ b/libX11/src/WinEvent.c @@ -37,7 +37,7 @@ extern long const _Xevent_to_mask[]; #define AllButtons (Button1MotionMask|Button2MotionMask|Button3MotionMask|\ Button4MotionMask|Button5MotionMask) -/* +/* * Return the next event in the queue * for the given window matching one of the events in the mask. * Events earlier in the queue are not discarded. @@ -62,7 +62,7 @@ XWindowEvent ( qelt; prev = qelt, qelt = qelt->next) { if ((qelt->event.xany.window == w) && - (qelt->event.type < LASTEvent) && + (qelt->event.type < GenericEvent) && (_Xevent_to_mask[qelt->event.type] & mask) && ((qelt->event.type != MotionNotify) || (mask & AllPointers) || diff --git a/libX11/src/Window.c b/libX11/src/Window.c index a40e74875..81996c546 100644 --- a/libX11/src/Window.c +++ b/libX11/src/Window.c @@ -43,7 +43,7 @@ void _XProcessWindowAttributes ( if (valuemask & CWBackPixmap) *value++ = attributes->background_pixmap; - + if (valuemask & CWBackPixel) *value++ = attributes->background_pixel; @@ -61,7 +61,7 @@ void _XProcessWindowAttributes ( if (valuemask & CWBackingStore) *value++ = attributes->backing_store; - + if (valuemask & CWBackingPlanes) *value++ = attributes->backing_planes; @@ -102,10 +102,10 @@ void _XProcessWindowAttributes ( Window XCreateWindow( register Display *dpy, Window parent, - int x, + int x, int y, - unsigned int width, - unsigned int height, + unsigned int width, + unsigned int height, unsigned int borderWidth, int depth, unsigned int class, @@ -133,7 +133,7 @@ Window XCreateWindow( wid = req->wid = XAllocID(dpy); valuemask &= AllMaskBits; if ((req->mask = valuemask)) - _XProcessWindowAttributes (dpy, (xChangeWindowAttributesReq *)req, + _XProcessWindowAttributes (dpy, (xChangeWindowAttributesReq *)req, valuemask, attributes); UnlockDisplay(dpy); SyncHandle(); diff --git a/libX11/src/Withdraw.c b/libX11/src/Withdraw.c index 2d135c46d..fbfc013a8 100644 --- a/libX11/src/Withdraw.c +++ b/libX11/src/Withdraw.c @@ -5,13 +5,13 @@ Copyright 1988 by Wyse Technology, Inc., San Jose, Ca., All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name Wyse not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. WYSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/WrBitF.c b/libX11/src/WrBitF.c index 5062fdcae..01be0661d 100644 --- a/libX11/src/WrBitF.c +++ b/libX11/src/WrBitF.c @@ -82,7 +82,7 @@ static char *Format_Image( return(data); } - + #define BYTES_PER_OUTPUT_LINE 12 int diff --git a/libX11/src/XErrorDB b/libX11/src/XErrorDB index 70715a543..42a7cbc7c 100644 --- a/libX11/src/XErrorDB +++ b/libX11/src/XErrorDB @@ -235,6 +235,20 @@ XRequest.XInputExtension.32:X_DeviceBell XRequest.XInputExtension.33:X_SetDeviceValuators XRequest.XInputExtension.34:X_GetDeviceControl XRequest.XInputExtension.35:X_ChangeDeviceControl +XRequest.XInputExtension.36: X_ListDeviceProperties +XRequest.XInputExtension.37: X_ChangeDeviceProperty +XRequest.XInputExtension.38: X_DeleteDeviceProperty +XRequest.XInputExtension.39: X_GetDeviceProperty +XProtoError.XInputExtension.0: XI_BadDevice (invalid Device parameter) +XlibMessage.XInputExtension.0: Device id in failed request: 0x%lx +XProtoError.XInputExtension.1: XI_BadEvent (invalid Event parameter) +XlibMessage.XInputExtension.1: Event id in failed request: 0x%lx +XProtoError.XInputExtension.2: XI_BadMode (invalid Mode parameter) +XlibMessage.XInputExtension.2: Mode id in failed request: 0x%lx +XProtoError.XInputExtension.3: XI_DeviceBusy +XlibMessage.XInputExtension.3: Device id in failed request: 0x%lx +XProtoError.XInputExtension.4: XI_BadClass (invalid Class parameter) +XlibMessage.XInputExtension.4: Class id in failed request: 0x%lx ! MIT-SHM extension, experimental, not an X Consortium standard XRequest.MIT-SHM.0: X_ShmQueryVersion XRequest.MIT-SHM.1: X_ShmAttach @@ -386,6 +400,7 @@ XlibMessage.X3D-PEX.14: Resource id in failed request: 0x%lx XRequest.XTEST.0: X_XTestGetVersion XRequest.XTEST.1: X_XTestCompareCursor XRequest.XTEST.2: X_XTestFakeInput +XRequest.XTEST.3: X_XTestGrabControl ! BIG-REQUESTS extension, an X Consortium standard XRequest.BIG-REQUESTS.0: X_BigReqEnable ! XIE extension, an X Consortium standard @@ -859,6 +874,38 @@ XRequest.RANDR.2: RRSetScreenConfig XRequest.RANDR.3: RROldScreenChangeSelectInput XRequest.RANDR.4: RRSelectInput XRequest.RANDR.5: RRGetScreenInfo +XRequest.RANDR.6: RRGetScreenSizeRange +XRequest.RANDR.7: RRSetScreenSize +XRequest.RANDR.8: RRGetScreenResources +XRequest.RANDR.9: RRGetOutputInfo +XRequest.RANDR.10: RRListOutputProperties +XRequest.RANDR.11: RRQueryOutputProperty +XRequest.RANDR.12: RRConfigureOutputProperty +XRequest.RANDR.13: RRChangeOutputProperty +XRequest.RANDR.14: RRDeleteOutputProperty +XRequest.RANDR.15: RRGetOutputProperty +XRequest.RANDR.16: RRCreateMode +XRequest.RANDR.17: RRDestroyMode +XRequest.RANDR.18: RRAddOutputMode +XRequest.RANDR.19: RRDeleteOutputMode +XRequest.RANDR.20: RRGetCrtcInfo +XRequest.RANDR.21: RRSetCrtcConfig +XRequest.RANDR.22: RRGetCrtcGammaSize +XRequest.RANDR.23: RRGetCrtcGamma +XRequest.RANDR.24: RRSetCrtcGamma +XRequest.RANDR.25: RRGetScreenResourcesCurrent +XRequest.RANDR.26: RRSetCrtcTransform +XRequest.RANDR.27: RRGetCrtcTransform +XRequest.RANDR.28: RRGetPanning +XRequest.RANDR.29: RRSetPanning +XRequest.RANDR.30: RRSetOutputPrimary +XRequest.RANDR.31: RRGetOutputPrimary +XProtoError.RANDR.0: BadRROutput (invalid Output parameter) +XlibMessage.RANDR.0: Output id in failed request: 0x%lx +XProtoError.RANDR.1: BadRRCrtc (invalid Crtc parameter) +XlibMessage.RANDR.1: Crtc id in failed request: 0x%lx +XProtoError.RANDR.2: BadRRMode (invalid Mode parameter) +XlibMessage.RANDR.2: Mode id in failed request: 0x%lx ! RENDER XRequest.RENDER.0: RenderQueryVersion XRequest.RENDER.1: RenderQueryPictFormats @@ -946,3 +993,14 @@ XRequest.DAMAGE.0: XDamageQueryVersion XRequest.DAMAGE.1: XDamageCreate XRequest.DAMAGE.2: XDamageDestroy XRequest.DAMAGE.3: XDamageSubtract +XRequest.DAMAGE.4: XDamageAdd +XProtoError.DAMAGE.0: BadDamage (invalid Damage parameter) +XlibMessage.DAMAGE.0: Damage id in failed request: 0x%lx +! DRI2 extension +XRequest.DRI2.0: DRI2QueryVersion +XRequest.DRI2.1: DRI2Connect +XRequest.DRI2.2: DRI2Authenticate +XRequest.DRI2.3: DRI2CreateDrawable +XRequest.DRI2.4: DRI2DestroyDrawable +XRequest.DRI2.5: DRI2GetBuffers +XRequest.DRI2.6: DRI2CopyRegion diff --git a/libX11/src/XKeysymDB b/libX11/src/XKeysymDB index 539044417..5e668820b 100644 --- a/libX11/src/XKeysymDB +++ b/libX11/src/XKeysymDB @@ -331,6 +331,28 @@ XF86WebCam :1008FF8F XF86MailForward :1008FF90 XF86Pictures :1008FF91 XF86Music :1008FF92 +XF86Battery :1008FF93 +XF86Bluetooth :1008FF94 +XF86WLAN :1008FF95 +XF86UWB :1008FF96 +XF86AudioForward :1008FF97 +XF86AudioRepeat :1008FF98 +XF86AudioRandomPlay :1008FF99 +XF86Subtitle :1008FF9A +XF86AudioCycleTrack :1008FF9B +XF86CycleAngle :1008FF9C +XF86FrameBack :1008FF9D +XF86FrameForward :1008FF9E +XF86Time :1008FF9F +XF86Select :1008FFA0 +XF86View :1008FFA1 +XF86TopMenu :1008FFA2 +XF86Red :1008FFA3 +XF86Green :1008FFA4 +XF86Yellow :1008FFA5 +XF86Blue :1008FFA6 +XF86Suspend :1008FFA7 +XF86Hibernate :1008FFA8 ! XFree86 special action keys XF86_Switch_VT_1 :1008FE01 diff --git a/libX11/src/Xatomtype.h b/libX11/src/Xatomtype.h index 7ab7e5a04..d9bb818fb 100644 --- a/libX11/src/Xatomtype.h +++ b/libX11/src/Xatomtype.h @@ -29,13 +29,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/libX11/src/XlibAsync.c b/libX11/src/XlibAsync.c index 6e963a61c..28f898b8f 100644 --- a/libX11/src/XlibAsync.c +++ b/libX11/src/XlibAsync.c @@ -115,9 +115,9 @@ _XGetAsyncReply( return buf; } - /* + /* *if we get here, then extra > rep->generic.length--meaning we - * read a reply that's shorter than we expected. This is an + * read a reply that's shorter than we expected. This is an * error, but we still need to figure out how to handle it... */ if ((rep->generic.length << 2) > len) diff --git a/libX11/src/XlibInt.c b/libX11/src/XlibInt.c index f90f85112..320e80800 100644 --- a/libX11/src/XlibInt.c +++ b/libX11/src/XlibInt.c @@ -42,11 +42,13 @@ from The Open Group. #include #endif #include "Xlibint.h" +#include "Xprivate.h" #include #if !USE_XCB #include #include #endif /* !USE_XCB */ +#include #include #ifdef WIN32 #include @@ -99,12 +101,12 @@ xthread_t (*_Xthread_self_fn)(void) = NULL; #else /* XTHREADS else */ #if !USE_XCB -#define UnlockNextReplyReader(d) +#define UnlockNextReplyReader(d) #define UnlockNextEventReader(d) #define InternalLockDisplay(d,wskip) #endif /* !USE_XCB */ -#endif /* XTHREADS else */ +#endif /* XTHREADS else */ /* check for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX * systems are broken and return EWOULDBLOCK when they should return EAGAIN @@ -135,11 +137,7 @@ xthread_t (*_Xthread_self_fn)(void) = NULL; #define ECHECK(err) (errno == err) #define ESET(val) #else -#ifdef ISC -#define ECHECK(err) ((errno == err) || ETEST()) -#else #define ECHECK(err) (errno == err) -#endif #define ESET(val) errno = val #endif #endif @@ -214,7 +212,7 @@ static char *_XAsyncReply( * perform any operations (directly or indirectly) on the DISPLAY. * * Routines declared with a return type of 'Status' return 0 on failure, - * and non 0 on success. Routines with no declared return type don't + * and non 0 on success. Routines with no declared return type don't * return anything. Whenever possible routines that create objects return * the object they have created. */ @@ -275,7 +273,7 @@ _XWaitForWritable( XXX - what if cv is NULL and someone else comes along after us while we are waiting? */ - + if (!dpy->lock || (!dpy->lock->event_awaiters && (!dpy->lock->reply_awaiters || @@ -297,7 +295,7 @@ _XWaitForWritable( nfound = Select (dpy->fd + 1, &r_mask, &w_mask, NULL, NULL); #endif InternalLockDisplay(dpy, cv != NULL); - if (nfound < 0 && !ECHECK(EINTR)) + if (nfound < 0 && !(ECHECK(EINTR) || ETEST())) _XIOError(dpy); } while (nfound <= 0); @@ -327,7 +325,7 @@ _XWaitForWritable( #endif ) len = SIZEOF(xReply); - + /* but we won't read more than the max buffer size */ if (len > BUFSIZE) len = BUFSIZE; @@ -460,7 +458,7 @@ _XWaitForReadable( { int result; int fd = dpy->fd; - struct _XConnectionInfo *ilist; + struct _XConnectionInfo *ilist; register int saved_event_serial = 0; int in_read_events = 0; register Bool did_proc_conni = False; @@ -509,7 +507,7 @@ _XWaitForReadable( result = Select(highest_fd + 1, &r_mask, NULL, NULL, NULL); #endif InternalLockDisplay(dpy, dpy->flags & XlibDisplayReply); - if (result == -1 && !ECHECK(EINTR)) _XIOError(dpy); + if (result == -1 && !(ECHECK(EINTR) || ETEST())) _XIOError(dpy); if (result <= 0) continue; #ifdef USE_POLL @@ -583,28 +581,42 @@ int _XSeqSyncFunction( GetEmptyReq(GetInputFocus, req); (void) _XReply (dpy, (xReply *)&rep, 0, xTrue); sent_sync = 1; - } - /* could get XID handler while waiting for reply in MT env */ - if (dpy->synchandler == _XSeqSyncFunction && !sync_hazard(dpy)) { - dpy->synchandler = dpy->savedsynchandler; - dpy->flags &= ~XlibDisplayPrivSync; - } + } else if (sync_hazard(dpy)) + _XSetPrivSyncFunction(dpy); UnlockDisplay(dpy); if (sent_sync) SyncHandle(); return 0; } -void _XSetSeqSyncFunction( - register Display *dpy) +static int +_XPrivSyncFunction (Display *dpy) +{ + assert(dpy->synchandler == _XPrivSyncFunction); + assert((dpy->flags & XlibDisplayPrivSync) != 0); + dpy->synchandler = dpy->savedsynchandler; + dpy->savedsynchandler = NULL; + dpy->flags &= ~XlibDisplayPrivSync; + _XIDHandler(dpy); + _XSeqSyncFunction(dpy); + return 0; +} + +void _XSetPrivSyncFunction(Display *dpy) { - if (!(dpy->flags & XlibDisplayPrivSync) && sync_hazard(dpy)) { + if (!(dpy->flags & XlibDisplayPrivSync)) { dpy->savedsynchandler = dpy->synchandler; - dpy->synchandler = _XSeqSyncFunction; + dpy->synchandler = _XPrivSyncFunction; dpy->flags |= XlibDisplayPrivSync; } } +void _XSetSeqSyncFunction(Display *dpy) +{ + if (sync_hazard(dpy)) + _XSetPrivSyncFunction (dpy); +} + #if !USE_XCB #ifdef XTHREADS static void _XFlushInt( @@ -643,7 +655,7 @@ static void _XFlushInt( /* This fix resets the bufptr to the front of the buffer so * additional appends to the bufptr will not corrupt memory. Since - * the server is down, these appends are no-op's anyway but + * the server is down, these appends are no-op's anyway but * callers of _XFlush() are not verifying this before they call it. */ if (dpy->flags & XlibDisplayIOError) @@ -701,7 +713,7 @@ static void _XFlushInt( #endif #ifdef ESZTEST } else if (ESZTEST()) { - if (todo > 1) + if (todo > 1) todo >>= 1; else { _XWaitForWritable(dpy @@ -826,7 +838,7 @@ _XEventsQueued( if (!pend) pend = SIZEOF(xReply); } - else if (result < 0 && !ECHECK(EINTR)) + else if (result < 0 && !(ECHECK(EINTR) || ETEST())) _XIOError(dpy); } } @@ -854,7 +866,7 @@ _XEventsQueued( #endif /* XTHREADS*/ { read_buf = buf.buf; - + if (len < SIZEOF(xReply) #ifdef XTHREADS || dpy->async_handlers @@ -870,7 +882,7 @@ _XEventsQueued( #endif (void) _XRead (dpy, read_buf, (long) len); - + #ifdef XTHREADS /* what did we actually read: reply or event? */ if (dpy->lock && dpy->lock->reply_awaiters) { @@ -1061,12 +1073,22 @@ void _XReadEvents( RESETITERPTR(rep,xReply, _XAsyncReply (dpy, rep, ITERPTR(rep), &len, True)); - pend = len; + pend = len; } else { if (rep->generic.type == X_Error) _XError (dpy, (xError *) rep); else /* must be an event packet */ - _XEnq (dpy, (xEvent *)rep); + { + if (rep->generic.type == GenericEvent) + { + int evlen; + evlen = (rep->generic.length << 2); + if (_XRead(dpy, &read_buf[len], evlen) == -2) + goto got_event; /* XXX: aargh! */ + } + + _XEnq (dpy, (xEvent *)rep); + } INCITERPTR(rep,xReply); len -= SIZEOF(xReply); } @@ -1076,7 +1098,7 @@ void _XReadEvents( UnlockNextEventReader(dpy); } -/* +/* * _XRead - Read bytes from the socket taking into account incomplete * reads. This routine may have to be reworked if int < long. */ @@ -1170,7 +1192,7 @@ void _XRead32( /* * _XRead32 - Read bytes from the socket unpacking each 32 bits * into a long (64 bits on a CRAY computer). - * + * */ static void _doXRead32( register Display *dpy, @@ -1298,7 +1320,7 @@ void _XReadPad( if ((dpy->flags & XlibDisplayIOError) || size == 0) return; iov[0].iov_len = (int)size; iov[0].iov_base = data; - /* + /* * The following hack is used to provide 32 bit long-word * aligned padding. The [1] vector is of length 0, 1, 2, or 3, * whatever is needed. @@ -1341,7 +1363,7 @@ void _XReadPad( ESET(EPIPE); _XIOError(dpy); } - + else /* bytes_read is less than 0; presumably -1 */ { /* If it's a system call interrupt, it's not an error. */ if (!ECHECK(EINTR)) @@ -1441,7 +1463,7 @@ _XSend ( InsertIOV (dpy->buffer, dbufsize) InsertIOV ((char *)data, size) InsertIOV ((char *)pad, padsize) - + ESET(0); if ((len = _X11TransWritev(dpy->trans_conn, iov, i)) >= 0) { skip += len; @@ -1463,7 +1485,7 @@ _XSend ( #endif #ifdef ESZTEST } else if (ESZTEST()) { - if (todo > 1) + if (todo > 1) todo >>= 1; else { _XWaitForWritable(dpy @@ -1516,34 +1538,35 @@ _XGetMiscCode( } } -static int +int _XIDHandler( register Display *dpy) { xXCMiscGetXIDRangeReply grep; register xXCMiscGetXIDRangeReq *greq; + int sent_req = 0; LockDisplay(dpy); - _XGetMiscCode(dpy); - if (dpy->xcmisc_opcode > 0) { - GetReq(XCMiscGetXIDRange, greq); - greq->reqType = dpy->xcmisc_opcode; - greq->miscReqType = X_XCMiscGetXIDRange; - if (_XReply (dpy, (xReply *)&grep, 0, xTrue) && grep.count) { - dpy->resource_id = ((grep.start_id - dpy->resource_base) >> - dpy->resource_shift); - dpy->resource_max = dpy->resource_id; - if (grep.count > 5) - dpy->resource_max += grep.count - 6; - dpy->resource_max <<= dpy->resource_shift; + if (dpy->resource_max == dpy->resource_mask + 1) { + _XGetMiscCode(dpy); + if (dpy->xcmisc_opcode > 0) { + GetReq(XCMiscGetXIDRange, greq); + greq->reqType = dpy->xcmisc_opcode; + greq->miscReqType = X_XCMiscGetXIDRange; + if (_XReply (dpy, (xReply *)&grep, 0, xTrue) && grep.count) { + dpy->resource_id = ((grep.start_id - dpy->resource_base) >> + dpy->resource_shift); + dpy->resource_max = dpy->resource_id; + if (grep.count > 5) + dpy->resource_max += grep.count - 6; + dpy->resource_max <<= dpy->resource_shift; + } + sent_req = 1; } } - if (dpy->flags & XlibDisplayPrivSync) { - dpy->synchandler = dpy->savedsynchandler; - dpy->flags &= ~XlibDisplayPrivSync; - } UnlockDisplay(dpy); - SyncHandle(); + if (sent_req) + SyncHandle(); return 0; } @@ -1557,11 +1580,7 @@ XID _XAllocID( id = dpy->resource_id << dpy->resource_shift; if (id >= dpy->resource_max) { - if (!(dpy->flags & XlibDisplayPrivSync)) { - dpy->savedsynchandler = dpy->synchandler; - dpy->flags |= XlibDisplayPrivSync; - } - dpy->synchandler = _XIDHandler; + _XSetPrivSyncFunction(dpy); dpy->resource_max = dpy->resource_mask + 1; } if (id <= dpy->resource_mask) { @@ -1617,11 +1636,7 @@ void _XAllocIDs( dpy->resource_id = id; } if (id >= dpy->resource_max) { - if (!(dpy->flags & XlibDisplayPrivSync)) { - dpy->savedsynchandler = dpy->synchandler; - dpy->flags |= XlibDisplayPrivSync; - } - dpy->synchandler = _XIDHandler; + _XSetPrivSyncFunction(dpy); dpy->resource_max = dpy->resource_mask + 1; } } @@ -1662,9 +1677,9 @@ _XSetLastRequestRead( if (newseq < lastseq) { newseq += 0x10000; if (newseq > dpy->request) { - (void) fprintf (stderr, + (void) fprintf (stderr, "Xlib: sequence lost (0x%lx > 0x%lx) in reply type 0x%x!\n", - newseq, dpy->request, + newseq, dpy->request, (unsigned int) rep->type); newseq -= 0x10000; } @@ -1754,9 +1769,9 @@ _XReply ( } if (extra <= rep->generic.length) { if (extra > 0) - /* + /* * Read the extra data into storage immediately - * following the GenericReply structure. + * following the GenericReply structure. */ (void) _XRead (dpy, (char *) (NEXTPTR(rep,xReply)), ((long)extra) << 2); @@ -1781,9 +1796,9 @@ _XReply ( #endif return 1; } - /* + /* *if we get here, then extra > rep->generic.length--meaning we - * read a reply that's shorter than we expected. This is an + * read a reply that's shorter than we expected. This is an * error, but we still need to figure out how to handle it... */ (void) _XRead (dpy, (char *) (NEXTPTR(rep,xReply)), @@ -1826,12 +1841,12 @@ _XReply ( UnlockNextReplyReader(dpy); return (0); } - /* + /* * we better see if there is an extension who may * want to suppress the error. */ for (ext = dpy->ext_procs; !ret && ext; ext = ext->next) { - if (ext->error) + if (ext->error) ret = (*ext->error)(dpy, err, &ext->codes, &ret_code); } if (!ret) { @@ -1854,7 +1869,7 @@ _XReply ( break; } } -} +} static char * _XAsyncReply( @@ -1877,7 +1892,7 @@ _XAsyncReply( *lenp = 0; return buf; } - + for (async = dpy->async_handlers; async; async = next) { next = async->next; if ((consumed = (*async->handler)(dpy, rep, buf, *lenp, async->data))) @@ -1886,7 +1901,7 @@ _XAsyncReply( if (!consumed) { if (!discard) return buf; - (void) fprintf(stderr, + (void) fprintf(stderr, "Xlib: unexpected async reply (sequence 0x%lx)!\n", dpy->last_request_read); #ifdef XTHREADS @@ -2183,7 +2198,7 @@ XAddConnectionWatch( * Unregister a callback registered by XAddConnectionWatch. * Both callback and client_data must match what was passed to * XAddConnectionWatch. - */ + */ void XRemoveConnectionWatch( Display* dpy, @@ -2259,7 +2274,7 @@ void _XEnq( /* If dpy->qfree is non-NULL do this, else malloc a new one. */ dpy->qfree = qelt->next; } - else if ((qelt = + else if ((qelt = (_XQEvent *) Xmalloc((unsigned)sizeof(_XQEvent))) == NULL) { /* Malloc call failed! */ ESET(ENOMEM); @@ -2271,7 +2286,7 @@ void _XEnq( qelt->qserial_num = dpy->next_event_serial_num++; if (dpy->tail) dpy->tail->next = qelt; else dpy->head = qelt; - + dpy->tail = qelt; dpy->qlen++; } else { @@ -2315,7 +2330,7 @@ _XUnknownWireEvent( register xEvent *event) /* wire protocol event */ { #ifdef notdef - (void) fprintf(stderr, + (void) fprintf(stderr, "Xlib: unhandled wire event! event number = %d, display = %x\n.", event->u.u.type, dpy); #endif @@ -2330,7 +2345,7 @@ _XUnknownNativeEvent( register xEvent *event) /* wire protocol event */ { #ifdef notdef - (void) fprintf(stderr, + (void) fprintf(stderr, "Xlib: unhandled native event! event number = %d, display = %x\n.", re->type, dpy); #endif @@ -2351,7 +2366,7 @@ _XWireToEvent( (xGenericReply *)event); ((XAnyEvent *)re)->send_event = ((event->u.u.type & 0x80) != 0); ((XAnyEvent *)re)->display = dpy; - + /* Ignore the leading bit of the event type since it is set when a client sends an event rather than the server. */ @@ -2420,7 +2435,7 @@ _XWireToEvent( ev->y_root = cvtINT16toInt(event->u.enterLeave.rootY); ev->state = event->u.enterLeave.state; ev->mode = event->u.enterLeave.mode; - ev->same_screen = (event->u.enterLeave.flags & + ev->same_screen = (event->u.enterLeave.flags & ELFlagSameScreen) && True; ev->focus = (event->u.enterLeave.flags & ELFlagFocus) && True; @@ -2658,14 +2673,14 @@ _XWireToEvent( case ClientMessage: { register int i; - register XClientMessageEvent *ev + register XClientMessageEvent *ev = (XClientMessageEvent *) re; ev->window = event->u.clientMessage.window; ev->format = event->u.u.detail; switch (ev->format) { - case 8: + case 8: ev->message_type = event->u.clientMessage.u.b.type; - for (i = 0; i < 20; i++) + for (i = 0; i < 20; i++) ev->data.b[i] = event->u.clientMessage.u.b.bytes[i]; break; case 16: @@ -2711,7 +2726,7 @@ _XWireToEvent( /* - * _XDefaultIOError - Default fatal system error reporting routine. Called + * _XDefaultIOError - Default fatal system error reporting routine. Called * when an X internal system error is encountered. */ int _XDefaultIOError( @@ -2722,7 +2737,7 @@ int _XDefaultIOError( "X connection to %s broken (explicit kill or server shutdown).\r\n", DisplayString (dpy)); } else { - (void) fprintf (stderr, + (void) fprintf (stderr, "XIO: fatal IO error %d (%s) on X server \"%s\"\r\n", #ifdef WIN32 WSAGetLastError(), strerror(WSAGetLastError()), @@ -2730,7 +2745,7 @@ int _XDefaultIOError( errno, strerror (errno), #endif DisplayString (dpy)); - (void) fprintf (stderr, + (void) fprintf (stderr, " after %lu requests (%lu known processed) with %d events remaining.\r\n", NextRequest(dpy) - 1, LastKnownRequestProcessed(dpy), QLength(dpy)); @@ -2755,7 +2770,7 @@ static int _XPrintDefaultError( XGetErrorText(dpy, event->error_code, buffer, BUFSIZ); XGetErrorDatabaseText(dpy, mtype, "XError", "X Error", mesg, BUFSIZ); (void) fprintf(fp, "%s: %s\n ", mesg, buffer); - XGetErrorDatabaseText(dpy, mtype, "MajorCode", "Request Major code %d", + XGetErrorDatabaseText(dpy, mtype, "MajorCode", "Request Major code %d", mesg, BUFSIZ); (void) fprintf(fp, mesg, event->request_code); if (event->request_code < 128) { @@ -2788,7 +2803,7 @@ static int _XPrintDefaultError( /* kludge, try to find the extension that caused it */ buffer[0] = '\0'; for (ext = dpy->ext_procs; ext; ext = ext->next) { - if (ext->error_string) + if (ext->error_string) (*ext->error_string)(dpy, event->error_code, &ext->codes, buffer, BUFSIZ); if (buffer[0]) { @@ -2799,7 +2814,7 @@ static int _XPrintDefaultError( ext->codes.first_error < (int)event->error_code && (!bext || ext->codes.first_error > bext->codes.first_error)) bext = ext; - } + } if (bext) sprintf(buffer, "%s.%d", bext->name, event->error_code - bext->codes.first_error); @@ -2839,7 +2854,7 @@ static int _XPrintDefaultError( (void) fprintf(fp, mesg, event->resourceid); fputs("\n", fp); } - XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", + XGetErrorDatabaseText(dpy, mtype, "ErrorSerial", "Error Serial #%d", mesg, BUFSIZ); fputs(" ", fp); (void) fprintf(fp, mesg, event->serial); @@ -2862,10 +2877,7 @@ int _XDefaultError( } /*ARGSUSED*/ -Bool _XDefaultWireError(display, he, we) - Display *display; - XErrorEvent *he; - xError *we; +Bool _XDefaultWireError(Display *display, XErrorEvent *he, xError *we) { return True; } @@ -2877,7 +2889,7 @@ int _XError ( Display *dpy, register xError *rep) { - /* + /* * X_Error packet encountered! We need to unpack the error before * giving it to the user. */ @@ -2920,7 +2932,7 @@ int _XError ( return _XDefaultError(dpy, (XErrorEvent *)&event); } } - + /* * _XIOError - call user connection error handler and exit */ @@ -3096,7 +3108,7 @@ _XData32( #ifdef WORD64 /* - * XXX This is a *really* stupid way of doing this. It should just use + * XXX This is a *really* stupid way of doing this. It should just use * dpy->bufptr directly, taking into account where in the word it is. */ @@ -3197,7 +3209,7 @@ static doData32( void _XData32( Display *dpy, long *data, - unsigned len, + unsigned len) { char packbuffer[PACKBUFFERSIZE]; unsigned nunits = PACKBUFFERSIZE >> 2; @@ -3219,7 +3231,7 @@ void _XData32( * and so, you may be better off using gethostname (if it exists). */ -#if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(__QNX__)) || defined(hpux) || defined(USG) || defined(SVR4) +#if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(__QNX__)) || defined(hpux) || defined(SVR4) #define NEED_UTSNAME #include #endif @@ -3261,9 +3273,7 @@ int _XGetHostname ( * _XScreenOfWindow - get the Screen of a given window */ -Screen *_XScreenOfWindow (dpy, w) - Display *dpy; - Window w; +Screen *_XScreenOfWindow(Display *dpy, Window w) { register int i; Window root; @@ -3272,7 +3282,7 @@ Screen *_XScreenOfWindow (dpy, w) if (XGetGeometry (dpy, w, &root, &x, &y, &width, &height, &bw, &depth) == False) { - return None; + return NULL; } for (i = 0; i < ScreenCount (dpy); i++) { /* find root from list */ if (root == RootWindow (dpy, i)) { @@ -3347,7 +3357,7 @@ static int AccessFile (path, pathbuf, len_pathbuf, pathret) return 1; } -#ifndef __UNIXOS2__ +#ifndef __UNIXOS2__ /* one last place to look */ drive = getenv ("HOMEDRIVE"); if (drive) { diff --git a/libX11/src/XomGeneric.h b/libX11/src/XomGeneric.h index ce61eca34..8e245f894 100644 --- a/libX11/src/XomGeneric.h +++ b/libX11/src/XomGeneric.h @@ -143,7 +143,7 @@ typedef struct _XOCGenericPart { typedef struct _XOCGenericRec { XOCMethods methods; - XOCCoreRec core; + XOCCoreRec core; XOCGenericPart gen; } XOCGenericRec, *XOCGeneric; diff --git a/libX11/src/Xrm.c b/libX11/src/Xrm.c index 65d058fa5..46bc31daa 100644 --- a/libX11/src/Xrm.c +++ b/libX11/src/Xrm.c @@ -5,13 +5,13 @@ Copyright 1987, 1988, 1990 by Digital Equipment Corporation, Maynard All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -335,7 +335,6 @@ void XrmInitialize(void) XrmQANY = XrmPermStringToQuark("?"); } -#ifndef _XP_PRINT_SERVER_ XrmDatabase XrmGetDatabase( Display *display) { @@ -359,7 +358,6 @@ void XrmSetDatabase( display->db = database; UnlockDisplay(display); } -#endif /* !_XP_PRINT_SERVER_ */ void XrmStringToQuarkList( @@ -503,11 +501,7 @@ static XrmDatabase NewDatabase(void) _XCreateMutex(&db->linfo); db->table = (NTable)NULL; db->mbstate = (XPointer)NULL; -#ifdef _XP_PRINT_SERVER_ - db->methods = NULL; -#else db->methods = _XrmInitParseInfo(&db->mbstate); -#endif if (!db->methods) db->methods = &mb_methods; } @@ -1071,20 +1065,20 @@ XrmQPutStringResource( */ /* - * This function is highly optimized to inline as much as possible. - * Be very careful with modifications, or simplifications, as they + * This function is highly optimized to inline as much as possible. + * Be very careful with modifications, or simplifications, as they * may adversely affect the performance. * * Chris Peterson, MIT X Consortium 5/17/90. */ -/* +/* * Xlib spec says max 100 quarks in a lookup, will stop and return if * return if any single production's lhs has more than 100 components. */ #define QLIST_SIZE 100 -/* +/* * This should be big enough to handle things like the XKeysymDB or biggish * ~/.Xdefaults or app-defaults files. Anything bigger will be allocated on * the heap. @@ -1125,14 +1119,14 @@ static void GetDatabase( if (!db) return; - /* - * if strlen (str) < DEF_BUFF_SIZE allocate buffers on the stack for + /* + * if strlen (str) < DEF_BUFF_SIZE allocate buffers on the stack for * speed otherwise malloc the buffer. From a buffer overflow standpoint * we can be sure that neither: a) a component on the lhs, or b) a * value on the rhs, will be longer than the overall length of str, * i.e. strlen(str). * - * This should give good performance when parsing "*foo: bar" type + * This should give good performance when parsing "*foo: bar" type * databases as might be passed with -xrm command line options; but * with larger databases, e.g. .Xdefaults, app-defaults, or KeysymDB * files, the size of the buffers will be overly large. One way @@ -1143,7 +1137,7 @@ static void GetDatabase( str_len = strlen (str); if (DEF_BUFF_SIZE > str_len) lhs = lhs_s; - else if ((lhs = (char*) Xmalloc (str_len)) == NULL) + else if ((lhs = (char*) Xmalloc (str_len)) == NULL) return; alloc_chars = DEF_BUFF_SIZE < str_len ? str_len : DEF_BUFF_SIZE; @@ -1159,7 +1153,7 @@ static void GetDatabase( dolines = doall; /* - * First: Remove extra whitespace. + * First: Remove extra whitespace. */ do { @@ -1231,13 +1225,13 @@ static void GetDatabase( * Third: loop through the LHS of the resource specification * storing characters and converting this to a Quark. */ - + num_quarks = 0; t_bindings = bindings; sig = 0; ptr = lhs; - *t_bindings = XrmBindTightly; + *t_bindings = XrmBindTightly; for(;;) { if (!is_binding(bits)) { while (!is_EOQ(bits)) { @@ -1246,7 +1240,7 @@ static void GetDatabase( bits = next_char(c, str); } - quarks[num_quarks++] = + quarks[num_quarks++] = _XrmInternalStringToQuark(lhs, ptr - lhs, sig, False); if (num_quarks > QLIST_SIZE) { @@ -1266,9 +1260,9 @@ static void GetDatabase( sig = (sig << 1) + c; /* Compute the signature. */ } while (is_space(bits = next_char(c, str))); - /* + /* * The spec doesn't permit it, but support spaces - * internal to resource name/class + * internal to resource name/class */ if (is_separator(bits)) @@ -1292,7 +1286,7 @@ static void GetDatabase( * If two separators appear with no Text between them then * ignore them. * - * If anyone of those separators is a '*' then the binding + * If anyone of those separators is a '*' then the binding * will be loose, otherwise it will be tight. */ @@ -1337,7 +1331,7 @@ static void GetDatabase( * the right hand side. */ - /* + /* * Fourth: Remove more whitespace */ @@ -1355,7 +1349,7 @@ static void GetDatabase( break; } - /* + /* * Fifth: Process the right hand side. */ @@ -1456,8 +1450,8 @@ static void GetDatabase( else { int tcount; - /* - * Otherwise just insert those characters into the + /* + * Otherwise just insert those characters into the * string, since no special processing is needed on * numerics we can skip the special processing. */ @@ -1480,7 +1474,7 @@ static void GetDatabase( } } - /* + /* * It is important to make sure that there is room for at least * four more characters in the buffer, since I can add that * many characters into the buffer after a backslash has occured. @@ -1489,7 +1483,7 @@ static void GetDatabase( if (ptr + len > ptr_max) { char * temp_str; - alloc_chars += BUFSIZ/10; + alloc_chars += BUFSIZ/10; temp_str = Xrealloc(rhs, sizeof(char) * alloc_chars); if (!temp_str) { @@ -1506,7 +1500,7 @@ static void GetDatabase( } /* - * Lastly: Terminate the value string, and store this entry + * Lastly: Terminate the value string, and store this entry * into the database. */ @@ -1515,7 +1509,7 @@ static void GetDatabase( /* Store it in database */ value.size = ptr - rhs; value.addr = (XPointer) rhs; - + PutEntry(db, bindings, quarks, XrmQString, &value); } @@ -2280,7 +2274,7 @@ Bool XrmQGetSearchList( } else { if (table && !table->leaf) table = table->next; - if (table && + if (table && AppendLEntry((LTable)table, names, classes, &closure)) { _XUnlockMutex(&db->linfo); return False; @@ -2573,12 +2567,8 @@ Bool XrmQGetResource( } Bool -XrmGetResource(db, name_str, class_str, pType_str, pValue) - XrmDatabase db; - _Xconst char *name_str; - _Xconst char *class_str; - XrmString *pType_str; /* RETURN */ - XrmValuePtr pValue; /* RETURN */ +XrmGetResource(XrmDatabase db, _Xconst char *name_str, _Xconst char *class_str, + XrmString *pType_str, XrmValuePtr pValue) { XrmName names[MAXDBDEPTH+1]; XrmClass classes[MAXDBDEPTH+1]; diff --git a/libX11/src/XrmI.h b/libX11/src/XrmI.h index 949bcd6f3..0791260df 100644 --- a/libX11/src/XrmI.h +++ b/libX11/src/XrmI.h @@ -31,11 +31,11 @@ from The Open Group. /* * Macros to abstract out reading the file, and getting its size. * - * You may need to redefine these for various other operating systems. + * You may need to redefine these for various other operating systems. */ #include -#include +#include #define GetSizeOfFile(fd,size) \ { \ diff --git a/libX11/src/Xxcbint.h b/libX11/src/Xxcbint.h index cc73749aa..f6afa1834 100644 --- a/libX11/src/Xxcbint.h +++ b/libX11/src/Xxcbint.h @@ -5,36 +5,37 @@ #define XXCBINT_H #include +#include #include #include -#include "locking.h" /* really just want X11/Xthreads.h but can't have it. */ +#include "locking.h" -#define XCB_SEQUENCE_COMPARE(a,op,b) ((int) ((a) - (b)) op 0) -#define assert_sequence_less(a,b) assert(XCB_SEQUENCE_COMPARE((a), <=, (b))) +#define XLIB_SEQUENCE_COMPARE(a,op,b) (((long) (a) - (long) (b)) op 0) typedef struct PendingRequest PendingRequest; struct PendingRequest { PendingRequest *next; - xcondition_rec condition; - int waiters; /* Number of threads waiting; -1 if no wait needed */ - unsigned int sequence; + unsigned long sequence; }; typedef struct _X11XCBPrivate { - struct _XLockPtrs lock_fns; xcb_connection_t *connection; PendingRequest *pending_requests; PendingRequest **pending_requests_tail; xcb_generic_event_t *next_event; - const char *request_extra; - int request_extra_size; - char *partial_request; - int partial_request_offset; + char *real_bufmax; char *reply_data; int reply_length; int reply_consumed; + uint64_t last_flushed; enum XEventQueueOwner event_owner; XID next_xid; + + /* handle simultaneous threads waiting for events, + * used in wait_or_poll_for_event + */ + xcondition_t event_notify; + int event_waiter; } _X11XCBPrivate; /* xcb_disp.c */ @@ -42,15 +43,4 @@ typedef struct _X11XCBPrivate { int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *screenp); void _XFreeX11XCBStructure(Display *dpy); -/* xcb_lock.c */ - -int _XCBInitDisplayLock(Display *dpy); -void _XCBShutdownDisplayLock(Display *dpy); - -/* _XGetXCBBuffer and _XPutXCBBuffer calls must be paired and must not - * be nested. */ - -void _XGetXCBBuffer(Display *dpy); -void _XPutXCBBuffer(Display *dpy); - #endif /* XXCBINT_H */ diff --git a/libX11/src/config.h.in b/libX11/src/config.h.in index e95cb99e3..0c71790e1 100644 --- a/libX11/src/config.h.in +++ b/libX11/src/config.h.in @@ -81,6 +81,13 @@ /* Support os-specific local connections */ #undef LOCALCONN +/* preference sorted list of transport types to try for local connections */ +#undef LOCAL_TRANSPORT_LIST + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Disable XLOCALEDIR environment variable */ #undef NO_XLOCALEDIR @@ -138,6 +145,28 @@ /* poll() function is available */ #undef USE_POLL +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Use XCB for low-level protocol implementation */ #undef USE_XCB @@ -183,5 +212,12 @@ /* Whether libX11 needs to use MT safe API's */ #undef XUSE_MTSAFE_API -/* Enable GNU and other extensions to the C environment for glibc */ -#undef _GNU_SOURCE +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE diff --git a/libX11/src/globals.c b/libX11/src/globals.c index 11965cb5f..30ff11df7 100644 --- a/libX11/src/globals.c +++ b/libX11/src/globals.c @@ -48,7 +48,7 @@ from The Open Group. */ #ifdef NULL_NOT_ZERO /* then need to initialize */ #define SetZero(t,var,z) t var = z -#else +#else #define SetZero(t,var,z) t var #endif @@ -117,25 +117,25 @@ extern int close(); #ifdef SVR4 extern int _XsSetupSpStream(); extern int _XsSetupNamedStream(); -#endif +#endif extern int _XsSetupLocalStream(); extern int _XsConnectLocalClient(); extern int _XsCallLocalServer(); extern int _XsReadLocalStream(); extern int _XsErrorCall(); extern int _XsWriteLocalStream(); -extern int _XsCloseLocalStream(); +extern int _XsCloseLocalStream(); extern int _XsSetupTliStream(); extern int _XsConnectTliClient(); -extern int _XsCallTliServer(); -extern int _XsReadTliStream(); +extern int _XsCallTliServer(); +extern int _XsReadTliStream(); extern int _XsWriteTliStream(); extern int _XsCloseTliStream(); Xstream _XsStream[] = { - { + { /* local connections using pseudo-ttys */ _XsSetupLocalStream, @@ -147,7 +147,7 @@ Xstream _XsStream[] = { close, NULL }, - { + { #ifdef SVR4 /* local connections using named streams */ diff --git a/libX11/src/imConv.c b/libX11/src/imConv.c index e30f8ef95..2a50c37cb 100644 --- a/libX11/src/imConv.c +++ b/libX11/src/imConv.c @@ -46,9 +46,9 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "XlcPubI.h" #ifdef XKB -/* - * rather than just call _XLookupString (i.e. the pre-XKB XLookupString) - * do this because with XKB the event may have some funky modifiers that +/* + * rather than just call _XLookupString (i.e. the pre-XKB XLookupString) + * do this because with XKB the event may have some funky modifiers that * _XLookupString doesn't grok. */ #include "XKBlib.h" @@ -107,7 +107,7 @@ _XimGetLocaleCode ( * locale */ /*ARGSUSED*/ -int +int _XimGetCharCode ( XPointer ucs_conv, KeySym keysym, @@ -146,7 +146,7 @@ static int lookup_string( { int ret; unsigned ctrls = XkbGetXlibControls (event->display); - XkbSetXlibControls (event->display, + XkbSetXlibControls (event->display, XkbLC_ForceLatin1Lookup, XkbLC_ForceLatin1Lookup); ret = XLookupString(event, (char *)buffer, nbytes, keysym, status); XkbSetXlibControls (event->display, @@ -183,11 +183,11 @@ _XimLookupMBText( memcpy(look, (char *)buffer,count); look[count] = '\0'; if ((count = im->methods->ctstombs(ic->core.im, - (char*) look, count, + (char*) look, count, buffer, nbytes, &dummy)) < 0) { count = 0; } - } else if ((count == 0) || + } else if ((count == 0) || (count == 1 && (symbol > 0x7f && symbol < 0xff00))) { XPointer from = (XPointer) &ucs4; @@ -252,7 +252,7 @@ _XimLookupWCText( if (count > 1) { if ((count = im->methods->ctstowcs(ic->core.im, - (char*) look, count, + (char*) look, count, buffer, nbytes, &dummy)) < 0) { count = 0; } @@ -326,11 +326,11 @@ _XimLookupUTF8Text( memcpy(look, (char *)buffer,count); look[count] = '\0'; if ((count = im->methods->ctstoutf8(ic->core.im, - (char*) look, count, + (char*) look, count, buffer, nbytes, &dummy)) < 0) { count = 0; } - } else if ((count == 0) || + } else if ((count == 0) || (count == 1 && (symbol > 0x7f && symbol < 0xff00))) { XPointer from = (XPointer) &ucs4; diff --git a/libX11/src/locking.c b/libX11/src/locking.c index d69b35484..8c85badfd 100644 --- a/libX11/src/locking.c +++ b/libX11/src/locking.c @@ -1,6 +1,6 @@ /* $Xorg: locking.c,v 1.5 2001/02/09 02:03:40 xorgcvs Exp $ */ /* - + Copyright 1992, 1998 The Open Group Permission to use, copy, modify, distribute, and sell this software and its @@ -52,6 +52,17 @@ in this Software without prior written authorization from The Open Group. #include /* for warn/debug stuff */ #endif +/* Additional arguments for source code location lock call was made from */ +#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) +# define XTHREADS_FILE_LINE_ARGS \ + , \ + char* file, /* source file, from macro */ \ + int line +#else +# define XTHREADS_FILE_LINE_ARGS /* None */ +#endif + + #define NUM_FREE_CVLS 4 /* in lcWrap.c */ @@ -60,14 +71,14 @@ extern LockInfoPtr _Xi18n_lock; #ifdef WIN32 static DWORD _X_TlsIndex = (DWORD)-1; -void _Xthread_init() +void _Xthread_init(void) { if (_X_TlsIndex == (DWORD)-1) _X_TlsIndex = TlsAlloc(); } struct _xthread_waiter * -_Xthread_waiter() +_Xthread_waiter(void) { struct _xthread_waiter *me; @@ -89,28 +100,18 @@ static xthread_t _Xthread_self(void) static LockInfoRec global_lock; static LockInfoRec i18n_lock; -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XLockMutex(lip,file,line) - LockInfoPtr lip; - char* file; - int line; -#else static void _XLockMutex( - LockInfoPtr lip) -#endif + LockInfoPtr lip + XTHREADS_FILE_LINE_ARGS + ) { xmutex_lock(lip->lock); } -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) static void _XUnlockMutex( - LockInfoPtr lip, - char* file, - int line) -#else -static void _XUnlockMutex( - LockInfoPtr lip) -#endif + LockInfoPtr lip + XTHREADS_FILE_LINE_ARGS + ) { xmutex_unlock(lip->lock); } @@ -202,15 +203,10 @@ static void _XLockDisplayWarn( } #endif /* XTHREADS_WARN */ -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XUnlockDisplay(dpy,file,line) - Display *dpy; - char *file; - int line; -#else static void _XUnlockDisplay( - Display *dpy) -#endif + Display *dpy + XTHREADS_FILE_LINE_ARGS + ) { #ifdef XTHREADS_WARN xthread_t self = xthread_self(); @@ -330,23 +326,17 @@ static void _XPopReader( } } -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XConditionWait(cv, mutex,file,line) - xcondition_t cv; - xmutex_t mutex; - char *file; - int line; -#else static void _XConditionWait( xcondition_t cv, - xmutex_t mutex) -#endif + xmutex_t mutex + XTHREADS_FILE_LINE_ARGS + ) { #ifdef XTHREADS_WARN xthread_t self = xthread_self(); char *old_file = locking_file; int old_line = locking_line; - + #ifdef XTHREADS_DEBUG printf("line %d thread %x in condition wait\n", line, self); #endif @@ -381,15 +371,10 @@ static void _XConditionWait( #endif /* XTHREADS_WARN */ } -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XConditionSignal(cv,file,line) - xcondition_t cv; - char *file; - int line; -#else static void _XConditionSignal( - xcondition_t cv) -#endif + xcondition_t cv + XTHREADS_FILE_LINE_ARGS + ) { #ifdef XTHREADS_WARN #ifdef XTHREADS_DEBUG @@ -398,17 +383,12 @@ static void _XConditionSignal( #endif xcondition_signal(cv); } - -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XConditionBroadcast(cv,file,line) - xcondition_t cv; - char *file; - int line; -#else + static void _XConditionBroadcast( - xcondition_t cv) -#endif + xcondition_t cv + XTHREADS_FILE_LINE_ARGS + ) { #ifdef XTHREADS_WARN #ifdef XTHREADS_DEBUG @@ -417,7 +397,7 @@ static void _XConditionBroadcast( #endif xcondition_broadcast(cv); } - + static void _XFreeDisplayLock( Display *dpy) @@ -469,15 +449,10 @@ static void _XDisplayLockWait( } } -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XLockDisplay(dpy, file, line) - Display *dpy; - char *file; /* source file, from macro */ - int line; -#else static void _XLockDisplay( - Display *dpy) -#endif + Display *dpy + XTHREADS_FILE_LINE_ARGS + ) { #ifdef XTHREADS_WARN _XLockDisplayWarn(dpy, file, line); @@ -492,17 +467,11 @@ static void _XLockDisplay( * _XReply is allowed to exit from select/poll and clean up even if a * user-level lock is in force, so it uses this instead of _XFancyLockDisplay. */ -#if defined(XTHREADS_WARN) || defined(XTHREADS_FILE_LINE) -static void _XInternalLockDisplay(dpy, wskip, file, line) - Display *dpy; - Bool wskip; - char *file; /* source file, from macro */ - int line; -#else static void _XInternalLockDisplay( Display *dpy, - Bool wskip) -#endif + Bool wskip + XTHREADS_FILE_LINE_ARGS + ) { #ifdef XTHREADS_WARN _XLockDisplayWarn(dpy, file, line); @@ -597,7 +566,7 @@ xthread_t (*_x11_thr_self)() = __x11_thr_self; #endif -Status XInitThreads() +Status XInitThreads(void) { if (_Xglobal_lock) return 1; @@ -646,7 +615,7 @@ Status XInitThreads() } #else /* XTHREADS */ -Status XInitThreads() +Status XInitThreads(void) { return 0; } diff --git a/libX11/src/locking.h b/libX11/src/locking.h index 96c99b972..ced618152 100644 --- a/libX11/src/locking.h +++ b/libX11/src/locking.h @@ -1,5 +1,5 @@ /* $Xorg: locking.h,v 1.4 2001/02/09 02:03:40 xorgcvs Exp $ */ -/* +/* Copyright 1992, 1998 The Open Group diff --git a/libX11/src/os2Stubs.c b/libX11/src/os2Stubs.c index 9d109025c..6d99cd750 100644 --- a/libX11/src/os2Stubs.c +++ b/libX11/src/os2Stubs.c @@ -3,26 +3,26 @@ * * * - * 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 + * 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 - * HOLGER VEIT 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 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * HOLGER VEIT 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 Sebastien Marineau or Holger Veit - * shall not be used in advertising or otherwise to promote the sale, use or other + * + * Except as contained in this notice, the name of Sebastien Marineau or Holger Veit + * shall not be used in advertising or otherwise to promote the sale, use or other * dealings in this Software without prior written authorization from Holger Veit or * Sebastien Marineau. * @@ -67,7 +67,7 @@ char *__XOS2RedirRoot(char *fname) return fname; root = (char*)getenv("X11ROOT"); - if (root==0 || + if (root==0 || (fname[1]==':' && isalpha(fname[0])) || (strlen(fname)+strlen(root)+2) > 300) return fname; @@ -132,7 +132,7 @@ BOOL any_ready; int np,ns, i,ready_handles,n; APIRET rc; -sd.have_read=FALSE; sd.have_write=FALSE; +sd.have_read=FALSE; sd.have_write=FALSE; sd.socket_nread=0; sd.socket_nwrite=0; sd.socket_ntotal=0; sd.max_fds=31; ready_handles=0; any_ready=FALSE; sd.pipe_ntotal=0; sd.pipe_have_write=FALSE; @@ -150,7 +150,7 @@ if(FirstTime){ } /* Call these a first time to set the semaphore */ rc = DosCreateEventSem(NULL, &hPipeSem, DC_SEM_SHARED, FALSE); - if(rc) { + if(rc) { fprintf(stderr, "Could not create event semaphore, rc=%d\n",rc); return(-1); } @@ -239,7 +239,7 @@ if(FirstTime){ ready_handles+=np; any_ready = TRUE; } - else if (np == -1) { + else if (np == -1) { return(-1); } } @@ -250,7 +250,7 @@ if(FirstTime){ } else if (ns == -1) {return(-1);} - if (i%8 == 0) { + if (i%8 == 0) { now_millis = os2_get_sys_millis(); if((now_millis-start_millis) > timeout_ms) timeout_ms = 0; } @@ -350,7 +350,7 @@ fd_set *readfds,*writefds; int j,n; memcpy(sd->tcp_select_copy,sd->tcp_select_mask, sd->socket_ntotal*sizeof(int)); - + e = os2_tcp_select(sd->tcp_select_copy,sd->socket_nread, sd->socket_nwrite, 0, 0); @@ -371,7 +371,7 @@ fd_set *readfds,*writefds; n ++; } errno = 0; - + return n; } if(e<0){ @@ -394,7 +394,7 @@ PIPESEMSTATE pipeSemState[128]; APIRET rc; e = 0; rc = DosResetEventSem(hPipeSem,&ulPostCount); - rc = DosQueryNPipeSemState((HSEM) hPipeSem, (PPIPESEMSTATE)&pipeSemState, + rc = DosQueryNPipeSemState((HSEM) hPipeSem, (PPIPESEMSTATE)&pipeSemState, sizeof(pipeSemState)); if(rc) fprintf(stderr,"SELECT: rc from QueryNPipeSem: %d\n",rc); i=0; diff --git a/libX11/src/poly.h b/libX11/src/poly.h index 0d82443c9..0215acd4b 100644 --- a/libX11/src/poly.h +++ b/libX11/src/poly.h @@ -28,13 +28,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -177,7 +177,7 @@ typedef struct { * the polygon by incrementing the y coordinate. We * keep a list of edges which the current scanline crosses, * sorted by x. This list is called the Active Edge Table (AET) - * As we change the y-coordinate, we update each entry in + * As we change the y-coordinate, we update each entry in * in the active edge table to reflect the edges new xcoord. * This list must be sorted at each scanline in case * two edges intersect. @@ -204,7 +204,7 @@ typedef struct { * for the winding number rule */ #define CLOCKWISE 1 -#define COUNTERCLOCKWISE -1 +#define COUNTERCLOCKWISE -1 typedef struct _EdgeTableEntry { int ymax; /* ycoord at which we exit this edge. */ diff --git a/libX11/src/udcInf.c b/libX11/src/udcInf.c index 43b1cb024..fafc642b9 100644 --- a/libX11/src/udcInf.c +++ b/libX11/src/udcInf.c @@ -48,7 +48,7 @@ from The Open Group. #include /* - external symbols + external symbols */ extern FontData read_EncodingInfo(); extern int _xudc_get_codeset(); @@ -151,8 +151,8 @@ int *num_codeset; } else { int *prev_ret = ret; - ret = - (int *)Xrealloc(ret,num_ret*sizeof(int)); + ret = + (int *)Xrealloc(ret,num_ret*sizeof(int)); if (ret == NULL){ Xfree(prev_ret); } @@ -309,9 +309,9 @@ int *num_gr; return 0; } -/* +/* * Code convert wo tomonau UDC area no kakutoku - * GetUDCCPArea() / glyph_to_code() + * GetUDCCPArea() / glyph_to_code() * */ @@ -375,7 +375,7 @@ XlcCharSet charset; sprintf(buf, "csd%d.charset_name", i); _XlcGetLocaleDataBase(lcd, "XLC_CHARSET_DEFINE", buf, &value, &count); if(count > 0){ - if(!_XlcNCompareISOLatin1(value[0], + if(!_XlcNCompareISOLatin1(value[0], charset->name,strlen(value[0])) ){ return(True); } @@ -406,7 +406,7 @@ int size; strcpy(&from[seq_len + name_len],src); return True; } -int +int _xudc_glyph_to_code(locale,charset_str,codeset,glyph_index,codepoint) char *locale; char *charset_str; @@ -432,7 +432,7 @@ unsigned long *codepoint; dst = (unsigned char *)to32; memset(dst,0,25); - + lcd = (XLCd)_XlcGenericLoader(locale); if (!_xudc_gi_to_vgi(lcd,locale,charset_str,codeset, @@ -560,7 +560,7 @@ int *num_cr; /* * code_to_glyph() - * + * */ typedef struct __XUDCGIInf { char *charset_str; @@ -589,7 +589,7 @@ FontScope scope; * * */ -static Bool +static Bool _xudc_vgi_to_gi(lcd,locale,vglyph,glyph,charset,charsetname,size) XLCd lcd; char *locale; @@ -605,7 +605,7 @@ int size; FontData font_data; CodeSet cs; - + for(i=0;;i++){ sprintf(buf, "fs%d.charset.name",i); _XlcGetLocaleDataBase(lcd, "XLC_FONTSET", buf, &value, &count); diff --git a/libX11/src/util/Makefile.am b/libX11/src/util/Makefile.am index 3ff421d02..c9e81c044 100644 --- a/libX11/src/util/Makefile.am +++ b/libX11/src/util/Makefile.am @@ -4,8 +4,7 @@ noinst_PROGRAMS=makekeys makekeys_CFLAGS=$(X11_CFLAGS) -#override CC = gcc -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +CC = @CC_FOR_BUILD@ EXTRA_DIST = mkks.sh diff --git a/libX11/src/util/Makefile.in b/libX11/src/util/Makefile.in index adb30539a..11474a962 100644 --- a/libX11/src/util/Makefile.in +++ b/libX11/src/util/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,8 +19,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -46,6 +48,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h \ $(top_builddir)/include/X11/XlibConf.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) makekeys_SOURCES = makekeys.c makekeys_OBJECTS = makekeys-makekeys.$(OBJEXT) @@ -56,12 +59,13 @@ makekeys_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = makekeys.c DIST_SOURCES = makekeys.c ETAGS = etags @@ -80,29 +84,28 @@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BIGFONT_CFLAGS = @BIGFONT_CFLAGS@ BIGFONT_LIBS = @BIGFONT_LIBS@ -CC = @CC@ +CC = @CC_FOR_BUILD@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOLT_BASH = @DOLT_BASH@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ @@ -114,6 +117,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KEYSYMDEF = @KEYSYMDEF@ LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -123,7 +127,10 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINTLIB = @LINTLIB@ LINT_FLAGS = @LINT_FLAGS@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -131,8 +138,12 @@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -172,17 +183,14 @@ XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@ XPROTO_CFLAGS = @XPROTO_CFLAGS@ XPROTO_LIBS = @XPROTO_LIBS@ XTHREADLIB = @XTHREADLIB@ -XTHREADS = @XTHREADS@ XTHREAD_CFLAGS = @XTHREAD_CFLAGS@ XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@ -XUSE_MTSAFE_API = @XUSE_MTSAFE_API@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -197,6 +205,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -213,6 +222,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -225,12 +235,10 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ makekeys_CFLAGS = $(X11_CFLAGS) - -#override CC = gcc -LINK = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ EXTRA_DIST = mkks.sh # Check source code with tools like lint & sparse @@ -245,14 +253,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/util/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/util/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/util/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/util/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -270,13 +278,16 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list makekeys$(EXEEXT): $(makekeys_OBJECTS) $(makekeys_DEPENDENCIES) @rm -f makekeys$(EXEEXT) $(makekeys_LINK) $(makekeys_OBJECTS) $(makekeys_LDADD) $(LIBS) @@ -291,35 +302,35 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< makekeys-makekeys.o: makekeys.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.o -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/makekeys-makekeys.Tpo $(DEPDIR)/makekeys-makekeys.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/makekeys-makekeys.Tpo $(DEPDIR)/makekeys-makekeys.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='makekeys.c' object='makekeys-makekeys.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c makekeys-makekeys.obj: makekeys.c @am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.obj -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.obj `if test -f 'makekeys.c'; then $(CYGPATH_W) 'makekeys.c'; else $(CYGPATH_W) '$(srcdir)/makekeys.c'; fi` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/makekeys-makekeys.Tpo $(DEPDIR)/makekeys-makekeys.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/makekeys-makekeys.Tpo $(DEPDIR)/makekeys-makekeys.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='makekeys.c' object='makekeys-makekeys.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -c -o makekeys-makekeys.obj `if test -f 'makekeys.c'; then $(CYGPATH_W) 'makekeys.c'; else $(CYGPATH_W) '$(srcdir)/makekeys.c'; fi` @@ -335,14 +346,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -350,29 +361,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -393,13 +409,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -427,6 +447,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -448,6 +469,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -456,18 +479,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -508,6 +541,7 @@ uninstall-am: @LINT_TRUE@lint: @LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) makekeys.c + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libX11/src/util/makekeys.c b/libX11/src/util/makekeys.c index 214ea5c80..3fe8a96e6 100644 --- a/libX11/src/util/makekeys.c +++ b/libX11/src/util/makekeys.c @@ -36,13 +36,10 @@ from The Open Group. #include #include #include -#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */ -char *malloc(); -#endif /* macII */ typedef unsigned long Signature; -#define KTNUM 3000 +#define KTNUM 4000 static struct info { char *name; @@ -52,11 +49,11 @@ static struct info { #define MIN_REHASH 15 #define MATCHES 10 -char tab[KTNUM]; -unsigned short offsets[KTNUM]; -unsigned short indexes[KTNUM]; -KeySym values[KTNUM]; -char buf[1024]; +static char tab[KTNUM]; +static unsigned short offsets[KTNUM]; +static unsigned short indexes[KTNUM]; +static KeySym values[KTNUM]; +static char buf[1024]; int main(int argc, char *argv[]) @@ -103,12 +100,11 @@ main(int argc, char *argv[]) key); continue; } - name = malloc((unsigned)strlen(key)+1); + name = strdup(key); if (!name) { fprintf(stderr, "makekeys: out of memory!\n"); exit(1); } - (void)strcpy(name, key); info[ksnum].name = name; ksnum++; if (ksnum == KTNUM) { @@ -157,6 +153,11 @@ next1: ; } z = best_z; + if (z == 0) { + fprintf(stderr, "makekeys: failed to find small enough hash!\n" + "Try increasing KTNUM in makekeys.c\n"); + exit(1); + } printf("#ifdef NEEDKTABLE\n"); printf("const unsigned char _XkeyTable[] = {\n"); printf("0,\n"); @@ -237,6 +238,11 @@ next2: ; } z = best_z; + if (z == 0) { + fprintf(stderr, "makekeys: failed to find small enough hash!\n" + "Try increasing KTNUM in makekeys.c\n"); + exit(1); + } for (i = z; --i >= 0;) offsets[i] = 0; for (i = 0; i < ksnum; i++) { diff --git a/libX11/src/x11_trans.c b/libX11/src/x11_trans.c index 3c4f85951..6620b4dca 100644 --- a/libX11/src/x11_trans.c +++ b/libX11/src/x11_trans.c @@ -19,12 +19,12 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ - + #ifdef HAVE_CONFIG_H #include "config.h" #endif -#define X11_t -#define TRANS_CLIENT +#define X11_t 1 +#define TRANS_CLIENT 1 #include diff --git a/libX11/src/xcb_disp.c b/libX11/src/xcb_disp.c index 079c87ffa..2625966da 100644 --- a/libX11/src/xcb_disp.c +++ b/libX11/src/xcb_disp.c @@ -16,11 +16,11 @@ static void *alloc_copy(const void *src, int *dstn, size_t n) if(n <= 0) { *dstn = 0; - return 0; + return NULL; } dst = Xmalloc(n); if(!dst) - return 0; + return NULL; memcpy(dst, src, n); *dstn = n; return dst; @@ -65,7 +65,7 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr #ifdef HAVE_LAUNCHD if(!display || !*display) display = getenv("DISPLAY"); - + if(display && strlen(display)>11 && !strncmp(display, "/tmp/launch", 11)) { /* do nothing -- the magic happens inside of xcb_connect */ } else @@ -76,15 +76,20 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr len = strlen(host) + (1 + 20 + 1 + 20 + 1); *fullnamep = Xmalloc(len); + if (!*fullnamep) { + free(host); + return 0; + } + snprintf(*fullnamep, len, "%s:%d.%d", host, n, *screenp); free(host); } _XLockMutex(_Xglobal_lock); if(xauth.name && xauth.data) - c = xcb_connect_to_display_with_auth_info(display, &xauth, 0); + c = xcb_connect_to_display_with_auth_info(display, &xauth, NULL); else - c = xcb_connect(display, 0); + c = xcb_connect(display, NULL); _XUnlockMutex(_Xglobal_lock); dpy->fd = xcb_get_file_descriptor(c); @@ -93,6 +98,10 @@ int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *scr dpy->xcb->pending_requests_tail = &dpy->xcb->pending_requests; dpy->xcb->next_xid = xcb_generate_id(dpy->xcb->connection); + dpy->xcb->event_notify = xcondition_malloc(); + if (!dpy->xcb->event_notify) + return 0; + xcondition_init(dpy->xcb->event_notify); return !xcb_connection_has_error(c); } @@ -106,5 +115,6 @@ void _XFreeX11XCBStructure(Display *dpy) dpy->xcb->pending_requests = tmp->next; free(tmp); } + xcondition_free(dpy->xcb->event_notify); Xfree(dpy->xcb); } diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c index 5f0718496..4f0159c98 100644 --- a/libX11/src/xcb_io.c +++ b/libX11/src/xcb_io.c @@ -3,14 +3,53 @@ #include "Xlibint.h" #include "locking.h" +#include "Xprivate.h" #include "Xxcbint.h" #include -#include #include +#include +#include #include #include +static void return_socket(void *closure) +{ + Display *dpy = closure; + LockDisplay(dpy); + _XSend(dpy, NULL, 0); + dpy->bufmax = dpy->buffer; + UnlockDisplay(dpy); +} + +static void require_socket(Display *dpy) +{ + if(dpy->bufmax == dpy->buffer) + { + uint64_t sent; + int flags = 0; + /* if we don't own the event queue, we have to ask XCB + * to set our errors aside for us. */ + if(dpy->xcb->event_owner != XlibOwnsEventQueue) + flags = XCB_REQUEST_CHECKED; + if(!xcb_take_socket(dpy->xcb->connection, return_socket, dpy, + flags, &sent)) + _XIOError(dpy); + /* Xlib uses unsigned long for sequence numbers. XCB + * uses 64-bit internally, but currently exposes an + * unsigned int API. If these differ, Xlib cannot track + * the full 64-bit sequence number if 32-bit wrap + * happens while Xlib does not own the socket. A + * complete fix would be to make XCB's public API use + * 64-bit sequence numbers. */ + assert(!(sizeof(unsigned long) > sizeof(unsigned int) + && dpy->xcb->event_owner == XlibOwnsEventQueue + && (sent - dpy->last_request_read >= (UINT64_C(1) << 32)))); + dpy->xcb->last_flushed = dpy->request = sent; + dpy->bufmax = dpy->xcb->real_bufmax; + } +} + /* Call internal connection callbacks for any fds that are currently * ready to read. This function will not block unless one of the * callbacks blocks. @@ -30,7 +69,7 @@ */ static void check_internal_connections(Display *dpy) { - struct _XConnectionInfo *ilist; + struct _XConnectionInfo *ilist; fd_set r_mask; struct timeval tv; int result; @@ -68,15 +107,6 @@ static void check_internal_connections(Display *dpy) } } -static void condition_wait(Display *dpy, xcondition_t cv) -{ - _XPutXCBBuffer(dpy); - xcb_xlib_unlock(dpy->xcb->connection); - ConditionWait(dpy, cv); - xcb_xlib_lock(dpy->xcb->connection); - _XGetXCBBuffer(dpy); -} - static void call_handlers(Display *dpy, xcb_generic_reply_t *buf) { _XAsyncHandler *async, *next; @@ -96,16 +126,37 @@ static xcb_generic_event_t * wait_or_poll_for_event(Display *dpy, int wait) xcb_generic_event_t *event; if(wait) { - UnlockDisplay(dpy); - event = xcb_wait_for_event(c); - LockDisplay(dpy); + if(dpy->xcb->event_waiter) + { + ConditionWait(dpy, dpy->xcb->event_notify); + event = xcb_poll_for_event(c); + } + else + { + dpy->xcb->event_waiter = 1; + UnlockDisplay(dpy); + event = xcb_wait_for_event(c); + LockDisplay(dpy); + dpy->xcb->event_waiter = 0; + ConditionBroadcast(dpy, dpy->xcb->event_notify); + } } else event = xcb_poll_for_event(c); return event; } -static void process_responses(Display *dpy, int wait_for_first_event, xcb_generic_error_t **current_error, unsigned int current_request) +/* Widen a 32-bit sequence number into a native-word-size (unsigned long) + * sequence number. Treating the comparison as a 1 and shifting it avoids a + * conditional branch, and shifting by 16 twice avoids a compiler warning when + * sizeof(unsigned long) == 4. */ +static void widen(unsigned long *wide, unsigned int narrow) +{ + unsigned long new = (*wide & ~0xFFFFFFFFUL) | narrow; + *wide = new + ((unsigned long) (new < *wide) << 16 << 16); +} + +static void process_responses(Display *dpy, int wait_for_first_event, xcb_generic_error_t **current_error, unsigned long current_request) { void *reply; xcb_generic_event_t *event = dpy->xcb->next_event; @@ -114,24 +165,42 @@ static void process_responses(Display *dpy, int wait_for_first_event, xcb_generi if(!event && dpy->xcb->event_owner == XlibOwnsEventQueue) event = wait_or_poll_for_event(dpy, wait_for_first_event); + require_socket(dpy); + while(1) { PendingRequest *req = dpy->xcb->pending_requests; - assert(!(req && current_request && !XCB_SEQUENCE_COMPARE(req->sequence, <=, current_request))); - if(event && (!req || XCB_SEQUENCE_COMPARE(event->full_sequence, <=, req->sequence))) + unsigned long event_sequence = dpy->last_request_read; + if(event) + widen(&event_sequence, event->full_sequence); + assert(!(req && current_request && !XLIB_SEQUENCE_COMPARE(req->sequence, <=, current_request))); + if(event && (!req || XLIB_SEQUENCE_COMPARE(event_sequence, <=, req->sequence))) { - dpy->last_request_read = event->full_sequence; + dpy->last_request_read = event_sequence; if(event->response_type != X_Error) { + /* GenericEvents may be > 32 bytes. In this + * case, the event struct is trailed by the + * additional bytes. the xcb_generic_event_t + * struct uses 4 bytes for internal numbering, + * so we need to shift the trailing data to be + * after the first 32 bytes. */ + if (event->response_type == GenericEvent && + ((xcb_ge_event_t*)event)->length) + { + memmove(&event->full_sequence, + &event[1], + ((xcb_ge_event_t*)event)->length * 4); + } _XEnq(dpy, (xEvent *) event); wait_for_first_event = 0; } - else if(current_error && event->full_sequence == current_request) + else if(current_error && event_sequence == current_request) { /* This can only occur when called from * _XReply, which doesn't need a new event. */ *current_error = (xcb_generic_error_t *) event; - event = 0; + event = NULL; break; } else @@ -139,22 +208,13 @@ static void process_responses(Display *dpy, int wait_for_first_event, xcb_generi free(event); event = wait_or_poll_for_event(dpy, wait_for_first_event); } - else if(req && req->waiters != -1) + else if(req && req->sequence == current_request) { - if(req->sequence == current_request) - break; - if(!current_request && !wait_for_first_event) - break; - dpy->xcb->next_event = event; - req->waiters++; - assert(req->waiters > 0); - condition_wait(dpy, &req->condition); - --req->waiters; - event = dpy->xcb->next_event; + break; } else if(req && xcb_poll_for_reply(dpy->xcb->connection, req->sequence, &reply, &error)) { - unsigned int sequence = req->sequence; + uint64_t sequence = req->sequence; if(!reply) { dpy->xcb->pending_requests = req->next; @@ -179,8 +239,7 @@ static void process_responses(Display *dpy, int wait_for_first_event, xcb_generi if(xcb_connection_has_error(c)) _XIOError(dpy); - assert_sequence_less(dpy->last_request_read, dpy->request); - assert(!wait_for_first_event); + assert(XLIB_SEQUENCE_COMPARE(dpy->last_request_read, <=, dpy->request)); } int _XEventsQueued(Display *dpy, int mode) @@ -191,10 +250,10 @@ int _XEventsQueued(Display *dpy, int mode) return 0; if(mode == QueuedAfterFlush) - _XSend(dpy, 0, 0); + _XSend(dpy, NULL, 0); else check_internal_connections(dpy); - process_responses(dpy, 0, 0, 0); + process_responses(dpy, 0, NULL, 0); return dpy->qlen; } @@ -205,11 +264,13 @@ void _XReadEvents(Display *dpy) { if(dpy->flags & XlibDisplayIOError) return; - _XSend(dpy, 0, 0); + _XSend(dpy, NULL, 0); if(dpy->xcb->event_owner != XlibOwnsEventQueue) return; check_internal_connections(dpy); - process_responses(dpy, 1, 0, 0); + do { + process_responses(dpy, 1, NULL, 0); + } while (dpy->qlen == 0); } /* @@ -221,32 +282,61 @@ void _XReadEvents(Display *dpy) */ void _XSend(Display *dpy, const char *data, long size) { + static const xReq dummy_request; + static char const pad[3]; + struct iovec vec[3]; + uint64_t requests; + _XExtension *ext; xcb_connection_t *c = dpy->xcb->connection; if(dpy->flags & XlibDisplayIOError) return; - assert(!dpy->xcb->request_extra); - dpy->xcb->request_extra = data; - dpy->xcb->request_extra_size = size; + if(dpy->bufptr == dpy->buffer && !size) + return; - /* give dpy->buffer to XCB */ - _XPutXCBBuffer(dpy); + /* iff we asked XCB to set aside errors, we must pick those up + * eventually. iff there are async handlers, we may have just + * issued requests that will generate replies. in either case, + * we need to remember to check later. */ + if(dpy->xcb->event_owner != XlibOwnsEventQueue || dpy->async_handlers) + { + uint64_t sequence; + for(sequence = dpy->xcb->last_flushed; sequence < dpy->request; ++sequence) + { + PendingRequest *req = malloc(sizeof(PendingRequest)); + assert(req); + req->next = NULL; + req->sequence = sequence; + *dpy->xcb->pending_requests_tail = req; + dpy->xcb->pending_requests_tail = &req->next; + } + } + requests = dpy->request - dpy->xcb->last_flushed; + dpy->xcb->last_flushed = dpy->request; - if(xcb_flush(c) <= 0) - _XIOError(dpy); + vec[0].iov_base = dpy->buffer; + vec[0].iov_len = dpy->bufptr - dpy->buffer; + vec[1].iov_base = (caddr_t) data; + vec[1].iov_len = size; + vec[2].iov_base = (caddr_t) pad; + vec[2].iov_len = -size & 3; + + for(ext = dpy->flushes; ext; ext = ext->next_flush) + { + int i; + for(i = 0; i < 3; ++i) + if(vec[i].iov_len) + ext->before_flush(dpy, &ext->codes, vec[i].iov_base, vec[i].iov_len); + } - /* get a new dpy->buffer */ - _XGetXCBBuffer(dpy); + if(xcb_writev(c, vec, 3, requests) < 0) + _XIOError(dpy); + dpy->bufptr = dpy->buffer; + dpy->last_req = (char *) &dummy_request; check_internal_connections(dpy); - /* A straight port of XlibInt.c would call _XSetSeqSyncFunction - * here. However that does no good: unlike traditional Xlib, - * Xlib/XCB almost never calls _XFlush because _XPutXCBBuffer - * automatically pushes requests down into XCB, so Xlib's buffer - * is empty most of the time. Since setting a synchandler has no - * effect until after UnlockDisplay returns, we may as well do - * the check in _XUnlockDisplay. */ + _XSetSeqSyncFunction(dpy); } /* @@ -255,24 +345,29 @@ void _XSend(Display *dpy, const char *data, long size) */ void _XFlush(Display *dpy) { - _XSend(dpy, 0, 0); + require_socket(dpy); + _XSend(dpy, NULL, 0); _XEventsQueued(dpy, QueuedAfterReading); } -static int -_XIDHandler(Display *dpy) +static const XID inval_id = ~0UL; + +int _XIDHandler(Display *dpy) { - XID next = xcb_generate_id(dpy->xcb->connection); + XID next; + + if (dpy->xcb->next_xid != inval_id) + return 0; + + next = xcb_generate_id(dpy->xcb->connection); LockDisplay(dpy); dpy->xcb->next_xid = next; - if(dpy->flags & XlibDisplayPrivSync) - { - dpy->synchandler = dpy->savedsynchandler; - dpy->flags &= ~XlibDisplayPrivSync; - } +#ifdef XTHREADS + if (dpy->lock) + (*dpy->lock->user_unlock_display)(dpy); +#endif UnlockDisplay(dpy); - SyncHandle(); return 0; } @@ -280,14 +375,13 @@ _XIDHandler(Display *dpy) XID _XAllocID(Display *dpy) { XID ret = dpy->xcb->next_xid; - dpy->xcb->next_xid = 0; - - if(!(dpy->flags & XlibDisplayPrivSync)) - { - dpy->savedsynchandler = dpy->synchandler; - dpy->flags |= XlibDisplayPrivSync; - } - dpy->synchandler = _XIDHandler; + assert (ret != inval_id); +#ifdef XTHREADS + if (dpy->lock) + (*dpy->lock->user_lock_display)(dpy); +#endif + dpy->xcb->next_xid = inval_id; + _XSetPrivSyncFunction(dpy); return ret; } @@ -295,10 +389,18 @@ XID _XAllocID(Display *dpy) void _XAllocIDs(Display *dpy, XID *ids, int count) { int i; - _XPutXCBBuffer(dpy); +#ifdef XTHREADS + if (dpy->lock) + (*dpy->lock->user_lock_display)(dpy); + UnlockDisplay(dpy); +#endif for (i = 0; i < count; i++) ids[i] = xcb_generate_id(dpy->xcb->connection); - _XGetXCBBuffer(dpy); +#ifdef XTHREADS + LockDisplay(dpy); + if (dpy->lock) + (*dpy->lock->user_unlock_display)(dpy); +#endif } static void _XFreeReplyData(Display *dpy, Bool force) @@ -306,22 +408,15 @@ static void _XFreeReplyData(Display *dpy, Bool force) if(!force && dpy->xcb->reply_consumed < dpy->xcb->reply_length) return; free(dpy->xcb->reply_data); - dpy->xcb->reply_data = 0; + dpy->xcb->reply_data = NULL; } static PendingRequest * insert_pending_request(Display *dpy) { PendingRequest **cur = &dpy->xcb->pending_requests; - while(*cur && XCB_SEQUENCE_COMPARE((*cur)->sequence, <, dpy->request)) + while(*cur && XLIB_SEQUENCE_COMPARE((*cur)->sequence, <, dpy->request)) cur = &((*cur)->next); - if(*cur && (*cur)->sequence == dpy->request) - { - /* Replacing an existing PendingRequest should only happen once, - when calling _XReply, and the replaced PendingRequest must - not have a condition set. */ - assert((*cur)->waiters == -1); - } - else + if(!*cur || (*cur)->sequence != dpy->request) { PendingRequest *node = malloc(sizeof(PendingRequest)); assert(node); @@ -331,8 +426,6 @@ static PendingRequest * insert_pending_request(Display *dpy) dpy->xcb->pending_requests_tail = &(node->next); *cur = node; } - (*cur)->waiters = 0; - xcondition_init(&((*cur)->condition)); return *cur; } @@ -354,27 +447,15 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard) if(dpy->flags & XlibDisplayIOError) return 0; - /* Internals of UnlockDisplay done by hand here, so that we can - insert_pending_request *after* we _XPutXCBBuffer, but before we - unlock the display. */ - _XPutXCBBuffer(dpy); + _XSend(dpy, NULL, 0); current = insert_pending_request(dpy); - if(!dpy->lock || dpy->lock->locking_level == 0) - xcb_xlib_unlock(dpy->xcb->connection); - if(dpy->xcb->lock_fns.unlock_display) - dpy->xcb->lock_fns.unlock_display(dpy); + /* FIXME: drop the Display lock while waiting? + * Complicates process_responses. */ reply = xcb_wait_for_reply(c, current->sequence, &error); - LockDisplay(dpy); check_internal_connections(dpy); process_responses(dpy, 0, &error, current->sequence); - if(current->waiters) - { /* The ConditionBroadcast macro contains an if; braces needed here. */ - ConditionBroadcast(dpy, ¤t->condition); - } - --current->waiters; - if(error) { _XExtension *ext; @@ -396,27 +477,34 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard) { case X_LookupColor: case X_AllocNamedColor: + free(error); return 0; } break; case BadFont: - if(err->majorCode == X_QueryFont) + if(err->majorCode == X_QueryFont) { + free(error); return 0; + } break; case BadAlloc: case BadAccess: + free(error); return 0; } - /* + /* * we better see if there is an extension who may * want to suppress the error. */ for(ext = dpy->ext_procs; ext; ext = ext->next) - if(ext->error && ext->error(dpy, err, &ext->codes, &ret_code)) + if(ext->error && ext->error(dpy, err, &ext->codes, &ret_code)) { + free(error); return ret_code; + } - _XError(dpy, (xError *) error); + _XError(dpy, err); + free(error); return 0; } @@ -451,7 +539,7 @@ int _XRead(Display *dpy, char *data, long size) assert(size >= 0); if(size == 0) return 0; - assert(dpy->xcb->reply_data != 0); + assert(dpy->xcb->reply_data != NULL); assert(dpy->xcb->reply_consumed + size <= dpy->xcb->reply_length); memcpy(data, dpy->xcb->reply_data + dpy->xcb->reply_consumed, size); dpy->xcb->reply_consumed += size; diff --git a/libX11/src/xcb_lock.c b/libX11/src/xcb_lock.c deleted file mode 100644 index 71b238354..000000000 --- a/libX11/src/xcb_lock.c +++ /dev/null @@ -1,235 +0,0 @@ -/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett - * This file is licensed under the MIT license. See the file COPYING. */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include "Xlibint.h" -#include "locking.h" -#include "Xxcbint.h" -#include -#include - -#include - -static void _XCBLockDisplay(Display *dpy) -{ - if(dpy->xcb->lock_fns.lock_display) - dpy->xcb->lock_fns.lock_display(dpy); - if(!dpy->lock || dpy->lock->locking_level == 0) - xcb_xlib_lock(dpy->xcb->connection); - if(!(dpy->flags & XlibDisplayIOError)) - _XGetXCBBuffer(dpy); -} - -/* XXX: If you change this function, update _XReply's copy of its guts! */ -static void _XCBUnlockDisplay(Display *dpy) -{ - if(!(dpy->flags & XlibDisplayIOError)) - { - _XPutXCBBuffer(dpy); - assert(dpy->xcb->partial_request == 0); - assert(xcb_get_request_sent(dpy->xcb->connection) == dpy->request); - - /* Traditional Xlib does this in _XSend; see the Xlib/XCB version - * of that function for why we do it here instead. */ - _XSetSeqSyncFunction(dpy); - } - - if(!dpy->lock || dpy->lock->locking_level == 0) - xcb_xlib_unlock(dpy->xcb->connection); - if(dpy->xcb->lock_fns.unlock_display) - dpy->xcb->lock_fns.unlock_display(dpy); -} - -int _XCBInitDisplayLock(Display *dpy) -{ - if(!dpy->lock_fns && !(dpy->lock_fns = Xcalloc(1, sizeof(*dpy->lock_fns)))) - return 0; - dpy->xcb->lock_fns.lock_display = dpy->lock_fns->lock_display; - dpy->lock_fns->lock_display = _XCBLockDisplay; - dpy->xcb->lock_fns.unlock_display = dpy->lock_fns->unlock_display; - dpy->lock_fns->unlock_display = _XCBUnlockDisplay; - return 1; -} - -void _XCBShutdownDisplayLock(Display *dpy) -{ - if(dpy->lock_fns) { - Xfree((char *)dpy->lock_fns); - dpy->lock_fns = NULL; - } -} - -void _XGetXCBBuffer(Display *dpy) -{ - static const xReq dummy_request; - unsigned int xcb_req = xcb_get_request_sent(dpy->xcb->connection); - if(xcb_connection_has_error(dpy->xcb->connection)) - _XIOError(dpy); - - /* if Xlib has a partial request pending then XCB doesn't know about - * the current request yet */ - if(dpy->xcb->partial_request) - ++xcb_req; - - assert(XCB_SEQUENCE_COMPARE(xcb_req, >=, dpy->request)); - dpy->request = xcb_req; - - dpy->last_req = (char *) &dummy_request; -} - -static size_t request_length(struct iovec *vec) -{ - /* we have at least part of a request. dig out the length field. - * note that length fields are always in vec[0]: Xlib doesn't split - * fixed-length request parts. */ - size_t len; - assert(vec[0].iov_len >= 4); - len = ((uint16_t *) vec[0].iov_base)[1]; - if(len == 0) - { - /* it's a bigrequest. dig out the *real* length field. */ - assert(vec[0].iov_len >= 8); - len = ((uint32_t *) vec[0].iov_base)[1]; - } - return len << 2; -} - -static inline int issue_complete_request(Display *dpy, int veclen, struct iovec *vec) -{ - xcb_protocol_request_t xcb_req = { 0 }; - unsigned int sequence; - int flags = XCB_REQUEST_RAW; - int i; - size_t len; - - /* skip empty iovecs. if no iovecs remain, we're done. */ - assert(veclen >= 0); - while(veclen > 0 && vec[0].iov_len == 0) - --veclen, ++vec; - if(!veclen) - return 0; - - len = request_length(vec); - - /* do we have enough data for a complete request? how many iovec - * elements does it span? */ - for(i = 0; i < veclen; ++i) - { - size_t oldlen = len; - len -= vec[i].iov_len; - /* if len is now 0 or has wrapped, we have enough data. */ - if((len - 1) > oldlen) - break; - } - if(i == veclen) - return 0; - - /* we have enough data to issue one complete request. the remaining - * code can't fail. */ - - /* len says how far we overshot our data needs. (it's "negative" if - * we actually overshot, or 0 if we're right on.) */ - vec[i].iov_len += len; - xcb_req.count = i + 1; - xcb_req.opcode = ((uint8_t *) vec[0].iov_base)[0]; - - /* if we don't own the event queue, we have to ask XCB to set our - * errors aside for us. */ - if(dpy->xcb->event_owner != XlibOwnsEventQueue) - flags |= XCB_REQUEST_CHECKED; - - /* XCB will always skip request 0; account for that in the Xlib count */ - if (xcb_get_request_sent(dpy->xcb->connection) == 0xffffffff) - dpy->request++; - /* send the accumulated request. */ - sequence = xcb_send_request(dpy->xcb->connection, flags, vec, &xcb_req); - if(!sequence) - _XIOError(dpy); - - /* update the iovecs to refer only to data not yet sent. */ - vec[i].iov_len = -len; - - /* iff we asked XCB to set aside errors, we must pick those up - * eventually. iff there are async handlers, we may have just - * issued requests that will generate replies. in either case, - * we need to remember to check later. */ - if(flags & XCB_REQUEST_CHECKED || dpy->async_handlers) - { - PendingRequest *req = malloc(sizeof(PendingRequest)); - assert(req); - req->next = 0; - req->waiters = -1; - req->sequence = sequence; - *dpy->xcb->pending_requests_tail = req; - dpy->xcb->pending_requests_tail = &req->next; - } - return 1; -} - -void _XPutXCBBuffer(Display *dpy) -{ - static char const pad[3]; - const int padsize = -dpy->xcb->request_extra_size & 3; - xcb_connection_t *c = dpy->xcb->connection; - _XExtension *ext; - struct iovec iov[6]; - - assert_sequence_less(dpy->last_request_read, dpy->request); - assert_sequence_less(xcb_get_request_sent(c), dpy->request); - - for(ext = dpy->flushes; ext; ext = ext->next_flush) - { - ext->before_flush(dpy, &ext->codes, dpy->buffer, dpy->bufptr - dpy->buffer); - if(dpy->xcb->request_extra) - { - ext->before_flush(dpy, &ext->codes, dpy->xcb->request_extra, dpy->xcb->request_extra_size); - if(padsize) - ext->before_flush(dpy, &ext->codes, pad, padsize); - } - } - - iov[2].iov_base = dpy->xcb->partial_request; - iov[2].iov_len = dpy->xcb->partial_request_offset; - iov[3].iov_base = dpy->buffer; - iov[3].iov_len = dpy->bufptr - dpy->buffer; - iov[4].iov_base = (caddr_t) dpy->xcb->request_extra; - iov[4].iov_len = dpy->xcb->request_extra_size; - iov[5].iov_base = (caddr_t) pad; - iov[5].iov_len = padsize; - - while(issue_complete_request(dpy, 4, iov + 2)) - /* empty */; - - /* first discard any completed partial_request. */ - if(iov[2].iov_len == 0 && dpy->xcb->partial_request) - { - free(dpy->xcb->partial_request); - dpy->xcb->partial_request = 0; - dpy->xcb->partial_request_offset = 0; - } - - /* is there anything to copy into partial_request? */ - if(iov[3].iov_len != 0 || iov[4].iov_len != 0 || iov[5].iov_len != 0) - { - int i; - if(!dpy->xcb->partial_request) - { - size_t len = request_length(iov + 3); - assert(!dpy->xcb->partial_request_offset); - dpy->xcb->partial_request = malloc(len); - assert(dpy->xcb->partial_request); - } - for(i = 3; i < sizeof(iov) / sizeof(*iov); ++i) - { - memcpy(dpy->xcb->partial_request + dpy->xcb->partial_request_offset, iov[i].iov_base, iov[i].iov_len); - dpy->xcb->partial_request_offset += iov[i].iov_len; - } - } - - dpy->xcb->request_extra = 0; - dpy->xcb->request_extra_size = 0; - dpy->bufptr = dpy->buffer; -} diff --git a/libX11/src/xcms/AddDIC.c b/libX11/src/xcms/AddDIC.c index 6f2987fd0..8ac9852fc 100644 --- a/libX11/src/xcms/AddDIC.c +++ b/libX11/src/xcms/AddDIC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/AddSF.c b/libX11/src/xcms/AddSF.c index 395a23436..f7b1dd2da 100644 --- a/libX11/src/xcms/AddSF.c +++ b/libX11/src/xcms/AddSF.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/CCC.c b/libX11/src/xcms/CCC.c index 3ba62cd26..ba52f29d2 100644 --- a/libX11/src/xcms/CCC.c +++ b/libX11/src/xcms/CCC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -86,7 +86,7 @@ from The Open Group. * SYNOPSIS */ -XcmsCCC +XcmsCCC XcmsCreateCCC( Display *dpy, int screenNumber, @@ -115,7 +115,7 @@ XcmsCreateCCC( if (pDefaultCCC == NULL || !(newccc = (XcmsCCC) Xcalloc(1, (unsigned) sizeof(XcmsCCCRec)))) { return(NULL); - } + } /* * Should inherit the following as result of a memmove(): @@ -172,7 +172,7 @@ XcmsCreateCCC( * * SYNOPSIS */ -XcmsCCC +XcmsCCC XcmsDefaultCCC( Display *dpy, int screenNumber) diff --git a/libX11/src/xcms/CvColW.c b/libX11/src/xcms/CvColW.c index d57a7666f..50e95dea1 100644 --- a/libX11/src/xcms/CvColW.c +++ b/libX11/src/xcms/CvColW.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/CvCols.c b/libX11/src/xcms/CvCols.c index 0fcd55eb6..3a60b836d 100644 --- a/libX11/src/xcms/CvCols.c +++ b/libX11/src/xcms/CvCols.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -239,7 +239,7 @@ ConvertMixedColors( * batches: * DI to DD * DD to DI(not CIEXYZ) - * + * * format_flag: * 0x01 : convert Device-Dependent only specifications to the * target format. @@ -421,7 +421,7 @@ _XcmsDIConvertColors( * 3. The calling routine may want to convert only between * CIExyY <-> CIEXYZ <-> CIEuvY * therefore, this routine allows pWhitePt to equal NULL. - * + * * * RETURNS * XcmsFailure if failed, @@ -507,7 +507,7 @@ Continue: * complementary, i.e., * for an i, 0 <= i < n elements * from_CIEXYZ[i] is not the inverse of to_CIEXYZ[i] - * + * * Execute the functions all the way to CIEXYZ */ while (*src_to_CIEXYZ) { @@ -603,7 +603,7 @@ _XcmsDDConvertColors( /* * Its ok if pColors_in_out->format == XcmsCIEXYZFormat - * or + * or * if newFormat == XcmsCIEXYZFormat */ if ( !( ValidDDColorSpaceID(ccc, pColors_in_out->format) @@ -670,7 +670,7 @@ Continue: * complementary, i.e., * for an i, 0 <= i < n elements * from_CIEXYZ[i] is not the inverse of to_CIEXYZ[i] - * + * * Execute the functions all the way to CIEXYZ */ while (*src_to_CIEXYZ) { diff --git a/libX11/src/xcms/HVC.c b/libX11/src/xcms/HVC.c index c242bac77..60e5eb81b 100644 --- a/libX11/src/xcms/HVC.c +++ b/libX11/src/xcms/HVC.c @@ -4,7 +4,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -12,10 +12,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -25,10 +25,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -85,7 +85,7 @@ /************************************************************************* * Note: The DBL_EPSILON for ANSI is 1e-5 so my checks need to take * this into account. If your DBL_EPSILON is different then - * adjust this define. + * adjust this define. * * Also note that EPS is the error factor in the calculations * This may need to be the same as XMY_DBL_EPSILON in @@ -319,7 +319,7 @@ XcmsTekHVC_ValidSpec( } while (pColor->spec.TekHVC.H >= 360.0) { pColor->spec.TekHVC.H -= 360.0; - } + } return(XcmsSuccess); } @@ -416,9 +416,9 @@ XcmsTekHVCToCIEuvY( tempHue = radians(tempHue); /* Calculate u'v' for the obtained hue */ - u = (XcmsFloat) ((XCMS_COS(tempHue) * pColor->spec.TekHVC.C) / + u = (XcmsFloat) ((XCMS_COS(tempHue) * pColor->spec.TekHVC.C) / (pColor->spec.TekHVC.V * (double)CHROMA_SCALE_FACTOR)); - v = (XcmsFloat) ((XCMS_SIN(tempHue) * pColor->spec.TekHVC.C) / + v = (XcmsFloat) ((XCMS_SIN(tempHue) * pColor->spec.TekHVC.C) / (pColor->spec.TekHVC.V * (double)CHROMA_SCALE_FACTOR)); /* Based on the white point get the offset from best red */ @@ -623,6 +623,6 @@ _XcmsTekHVC_CheckModify( } else if (pColor->spec.TekHVC.H >= 360.0) { n = pColor->spec.TekHVC.H / 360.0; pColor->spec.TekHVC.H -= n * 360.0; - } + } return(1); } diff --git a/libX11/src/xcms/HVCGcC.c b/libX11/src/xcms/HVCGcC.c index 35981d75e..142a127e0 100644 --- a/libX11/src/xcms/HVCGcC.c +++ b/libX11/src/xcms/HVCGcC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -68,19 +68,19 @@ /* ARGSUSED */ Status XcmsTekHVCClipC ( - XcmsCCC ccc, - XcmsColor *pColors_in_out, + XcmsCCC ccc, + XcmsColor *pColors_in_out, unsigned int nColors, unsigned int i, Bool *pCompressed) /* * DESCRIPTION * Reduce the Chroma for a specific hue and value to - * to bring the given color into the gamut of the + * to bring the given color into the gamut of the * specified device. As required of gamut compression * functions in Xcms, this routine returns pColor_in_out * in XcmsCIEXYZFormat on successful completion. - * + * * Since this routine works with the value within * pColor_in_out intermediate results may be returned * even though it may be invalid. diff --git a/libX11/src/xcms/HVCGcV.c b/libX11/src/xcms/HVCGcV.c index b6761c8f6..80ff84ad0 100644 --- a/libX11/src/xcms/HVCGcV.c +++ b/libX11/src/xcms/HVCGcV.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -68,15 +68,15 @@ /* ARGSUSED */ Status XcmsTekHVCClipV ( - XcmsCCC ccc, - XcmsColor *pColors_in_out, + XcmsCCC ccc, + XcmsColor *pColors_in_out, unsigned int nColors, unsigned int i, Bool *pCompressed) /* * DESCRIPTION * Return the closest value for a specific hue and chroma. - * This routine takes any color as input and outputs + * This routine takes any color as input and outputs * a CIE XYZ color. * * Since this routine works with the value within @@ -116,7 +116,7 @@ XcmsTekHVCClipV ( */ pColor = pColors_in_out + i; - + if (ccc->visual->class < StaticColor && FunctionSetOfCCC(ccc) != (XPointer) &XcmsLinearRGBFunctionSet) { /* @@ -164,7 +164,7 @@ XcmsTekHVCClipV ( /* When the value input is less than the maximum value point */ /* compute the intersection of the line from 0,0 to max_V, max_C */ /* using the chroma input. */ - pColor->spec.TekHVC.V = pColor->spec.TekHVC.C * + pColor->spec.TekHVC.V = pColor->spec.TekHVC.C * hvc_max.spec.TekHVC.V / hvc_max.spec.TekHVC.C; if (pColor->spec.TekHVC.V >= hvc_max.spec.TekHVC.V) { pColor->spec.TekHVC.C = hvc_max.spec.TekHVC.C; diff --git a/libX11/src/xcms/HVCGcVC.c b/libX11/src/xcms/HVCGcVC.c index 4171c72d7..d7c5e40f2 100644 --- a/libX11/src/xcms/HVCGcVC.c +++ b/libX11/src/xcms/HVCGcVC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -76,14 +76,14 @@ /* ARGSUSED */ Status XcmsTekHVCClipVC ( - XcmsCCC ccc, - XcmsColor *pColors_in_out, + XcmsCCC ccc, + XcmsColor *pColors_in_out, unsigned int nColors, unsigned int i, Bool *pCompressed) /* * DESCRIPTION - * This routine will find the closest value and chroma + * This routine will find the closest value and chroma * for a specific hue. The color input is converted to * HVC format and returned as CIE XYZ format. * @@ -176,7 +176,7 @@ XcmsTekHVCClipVC ( /* the value and chroma given and the line from 0,0 and hvc_max. */ Chroma = pColor->spec.TekHVC.C; Value = pColor->spec.TekHVC.V; - pColor->spec.TekHVC.C = + pColor->spec.TekHVC.C = (Value + (hvc_max.spec.TekHVC.C / hvc_max.spec.TekHVC.V * Chroma)) / ((hvc_max.spec.TekHVC.V / hvc_max.spec.TekHVC.C) + (hvc_max.spec.TekHVC.C / hvc_max.spec.TekHVC.V)); @@ -223,7 +223,7 @@ XcmsTekHVCClipVC ( if (!_XcmsTekHVC_CheckModify(pColor)) { return (XcmsFailure); } - tmpDist = (XcmsFloat) XCMS_SQRT ((double) + tmpDist = (XcmsFloat) XCMS_SQRT ((double) (((Chroma - pColor->spec.TekHVC.C) * (Chroma - pColor->spec.TekHVC.C)) + ((Value - pColor->spec.TekHVC.V) * @@ -235,7 +235,7 @@ XcmsTekHVCClipVC ( nI = (nMaxCount + nI) / 2; saveDist = tmpDist; bestValue = pColor->spec.TekHVC.V; - bestChroma = pColor->spec.TekHVC.C; + bestChroma = pColor->spec.TekHVC.C; } if (nI == nILast || nI == 0) { break; diff --git a/libX11/src/xcms/HVCMnV.c b/libX11/src/xcms/HVCMnV.c index fd33d2fac..719efcd4f 100644 --- a/libX11/src/xcms/HVCMnV.c +++ b/libX11/src/xcms/HVCMnV.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -97,7 +97,7 @@ XcmsTekHVCQueryMinV ( * XcmsFailure - Failure * XcmsSuccess - Succeeded with no modifications * - */ + */ { XcmsCCCRec myCCC; XcmsColor tmp; diff --git a/libX11/src/xcms/HVCMxC.c b/libX11/src/xcms/HVCMxC.c index 6e6923704..3389b8d29 100644 --- a/libX11/src/xcms/HVCMxC.c +++ b/libX11/src/xcms/HVCMxC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -75,7 +75,7 @@ */ Status XcmsTekHVCQueryMaxC( - XcmsCCC ccc, + XcmsCCC ccc, XcmsFloat hue, XcmsFloat value, XcmsColor *pColor_return) @@ -212,7 +212,7 @@ XcmsTekHVCQueryMaxC( if (ftmp1 < ftmp2) { tmp.spec.TekHVC.V = lastValue; tmp.spec.TekHVC.C = lastChroma; - } + } if (_XcmsTekHVC_CheckModify (&tmp)) { memcpy((char *)pColor_return, (char *)&tmp, sizeof(XcmsColor)); return(XcmsSuccess); @@ -237,7 +237,7 @@ XcmsTekHVCQueryMaxC( tmp.spec.TekHVC.C = lastChroma; } } - } + } /* make sure to return the input hue */ tmp.spec.TekHVC.H = hue; memcpy((char *)pColor_return, (char *)&tmp, sizeof(XcmsColor)); diff --git a/libX11/src/xcms/HVCMxV.c b/libX11/src/xcms/HVCMxV.c index 72d0ccbcc..c54b83095 100644 --- a/libX11/src/xcms/HVCMxV.c +++ b/libX11/src/xcms/HVCMxV.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -144,7 +144,7 @@ XcmsTekHVCQueryMaxV( if (max_vc.spec.TekHVC.C < tmp.spec.TekHVC.C) { /* - * If the chroma is greater than the chroma for the + * If the chroma is greater than the chroma for the * maximum value/chroma point then the value is the * the value for the maximum value, chroma point. * This is an error but it I return the best approximation I can. @@ -156,7 +156,7 @@ XcmsTekHVCQueryMaxV( return(XcmsSuccess); } else if (max_vc.spec.TekHVC.C == tmp.spec.TekHVC.C) { /* - * If the chroma is equal to the chroma for the + * If the chroma is equal to the chroma for the * maximum value/chroma point then the value is the * the value for the maximum value, chroma point. */ @@ -198,7 +198,7 @@ XcmsTekHVCQueryMaxV( tmp.spec.TekHVC.H = hue; /* use the saved hue */ memcpy ((char *) pColor_return, (char *) &tmp, sizeof (XcmsColor)); return(XcmsSuccess); - } + } nChroma += savedChroma - tmp.spec.TekHVC.C; if (nChroma > max_vc.spec.TekHVC.C) { nChroma = max_vc.spec.TekHVC.C; diff --git a/libX11/src/xcms/HVCMxVC.c b/libX11/src/xcms/HVCMxVC.c index c3726f08b..ae22b89d1 100644 --- a/libX11/src/xcms/HVCMxVC.c +++ b/libX11/src/xcms/HVCMxVC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -104,7 +104,7 @@ _XcmsTekHVCQueryMaxVCRGB( * XcmsFailure - Failure * XCMS_SUCCUSS - Succeeded * - */ + */ { XcmsFloat nSmall, nLarge; XcmsColor tmp; @@ -124,14 +124,14 @@ _XcmsTekHVCQueryMaxVCRGB( * is NULL. */ if ((_XcmsConvertColorsWithWhitePt(ccc, &tmp, - &ccc->pPerScrnInfo->screenWhitePt, 1, XcmsRGBiFormat, (Bool *) NULL) + &ccc->pPerScrnInfo->screenWhitePt, 1, XcmsRGBiFormat, (Bool *) NULL) == XcmsFailure) && tmp.format != XcmsRGBiFormat) { return (XcmsFailure); } /* Now pick the smallest RGB */ - nSmall = MIN3(tmp.spec.RGBi.red, - tmp.spec.RGBi.green, + nSmall = MIN3(tmp.spec.RGBi.red, + tmp.spec.RGBi.green, tmp.spec.RGBi.blue); /* Make the smallest RGB equal to zero */ tmp.spec.RGBi.red -= nSmall; @@ -139,8 +139,8 @@ _XcmsTekHVCQueryMaxVCRGB( tmp.spec.RGBi.blue -= nSmall; /* Now pick the largest RGB */ - nLarge = MAX3(tmp.spec.RGBi.red, - tmp.spec.RGBi.green, + nLarge = MAX3(tmp.spec.RGBi.red, + tmp.spec.RGBi.green, tmp.spec.RGBi.blue); /* Scale the RGB values based on the largest one */ tmp.spec.RGBi.red /= nLarge; @@ -157,7 +157,7 @@ _XcmsTekHVCQueryMaxVCRGB( /* Convert from RGBi to HVC */ if (_XcmsConvertColorsWithWhitePt(ccc, &tmp, - &ccc->pPerScrnInfo->screenWhitePt, 1, XcmsTekHVCFormat, (Bool *) NULL) + &ccc->pPerScrnInfo->screenWhitePt, 1, XcmsTekHVCFormat, (Bool *) NULL) == XcmsFailure) { return (XcmsFailure); } @@ -165,7 +165,7 @@ _XcmsTekHVCQueryMaxVCRGB( /* make sure to return the input hue */ tmp.spec.TekHVC.H = hue; memcpy((char *)pColor_return, (char *)&tmp, sizeof(XcmsColor)); - return (XcmsSuccess); + return (XcmsSuccess); } @@ -202,7 +202,7 @@ XcmsTekHVCQueryMaxVC ( * XcmsFailure - Failure * XcmsSuccess - Succeeded * - */ + */ { XcmsCCCRec myCCC; @@ -219,7 +219,7 @@ XcmsTekHVCQueryMaxVC ( if (XcmsAddColorSpace(&XcmsTekHVCColorSpace) == XcmsFailure) { return(XcmsFailure); } - + /* Use my own CCC */ memcpy ((char *)&myCCC, (char *)ccc, sizeof(XcmsCCCRec)); myCCC.clientWhitePt.format = XcmsUndefinedFormat; @@ -230,8 +230,8 @@ XcmsTekHVCQueryMaxVC ( } while (hue >= 360.0) { hue -= 360.0; - } - + } + return(_XcmsTekHVCQueryMaxVCRGB (&myCCC, hue, pColor_return, (XcmsRGBi *)NULL)); } diff --git a/libX11/src/xcms/HVCMxVs.c b/libX11/src/xcms/HVCMxVs.c index 88376e558..7368792b2 100644 --- a/libX11/src/xcms/HVCMxVs.c +++ b/libX11/src/xcms/HVCMxVs.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -76,7 +76,7 @@ XcmsTekHVCQueryMaxVSamples( /* * DESCRIPTION * Return a set of values and chromas for the input Hue. - * This routine will take any color as input. + * This routine will take any color as input. * It returns TekHVC colors. * * Since this routine works with the value within diff --git a/libX11/src/xcms/HVCWpAj.c b/libX11/src/xcms/HVCWpAj.c index f9e2c38d1..c7469ddee 100644 --- a/libX11/src/xcms/HVCWpAj.c +++ b/libX11/src/xcms/HVCWpAj.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. TekColor is a * trademark of Tektronix, Inc. The term "TekHVC" designates a particular @@ -11,10 +11,10 @@ * foreign patents pending). Permission is hereby granted to use, copy, * modify, sell, and otherwise distribute this software and its * documentation for any purpose and without fee, provided that: - * + * * 1. This copyright, permission, and disclaimer notice is reproduced in * all copies of this software and any modification thereof and in - * supporting documentation; + * supporting documentation; * 2. Any color-handling application which displays TekHVC color * cooordinates identifies these as TekHVC color coordinates in any * interface that displays these coordinates and in any associated @@ -24,10 +24,10 @@ * including those provided in this file and any equivalent pathways and * mathematical derivations, regardless of digital (e.g., floating point * or integer) representation. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/IdOfPr.c b/libX11/src/xcms/IdOfPr.c index 47e4ec308..37c7a6317 100644 --- a/libX11/src/xcms/IdOfPr.c +++ b/libX11/src/xcms/IdOfPr.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/LRGB.c b/libX11/src/xcms/LRGB.c index dff677686..6ec2a1889 100644 --- a/libX11/src/xcms/LRGB.c +++ b/libX11/src/xcms/LRGB.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -189,7 +189,7 @@ XcmsColorSpace XcmsRGBColorSpace = }; /* - * Device-Independent Color Spaces known to the + * Device-Independent Color Spaces known to the * LINEAR_RGB Screen Color Characteristics Function Set. */ static XcmsColorSpace *DDColorSpaces[] = { @@ -483,17 +483,17 @@ LINEAR_RGB_InitSCCData( /* * Allocate memory for pScreenData */ - if (!(pScreenData = pScreenDefaultData = (LINEAR_RGB_SCCData *) + if (!(pScreenData = pScreenDefaultData = (LINEAR_RGB_SCCData *) Xcalloc (1, sizeof(LINEAR_RGB_SCCData)))) { return(XcmsFailure); } - /* + /* * 1. Get the XYZ->RGB and RGB->XYZ matrices */ if (MatrixAtom == None || - !_XcmsGetProperty (dpy, RootWindow(dpy, screenNumber), MatrixAtom, + !_XcmsGetProperty (dpy, RootWindow(dpy, screenNumber), MatrixAtom, &format_return, &nitems, &nbytes_return, &property_return) || nitems != 18 || format_return != 32) { /* @@ -658,7 +658,7 @@ LINEAR_RGB_InitSCCData( /* * This is a per-Visual intensity table */ - if (!(pScreenData = (LINEAR_RGB_SCCData *) + if (!(pScreenData = (LINEAR_RGB_SCCData *) Xcalloc (1, sizeof(LINEAR_RGB_SCCData)))) { return(XcmsFailure); } @@ -667,7 +667,7 @@ LINEAR_RGB_InitSCCData( 18 * sizeof(XcmsFloat)); /* Create, initialize, and add map */ - if (!(pNewMap = (XcmsIntensityMap *) + if (!(pNewMap = (XcmsIntensityMap *) Xcalloc (1, sizeof(XcmsIntensityMap)))) { Xfree((char *)pScreenData); return(XcmsFailure); @@ -721,7 +721,7 @@ LINEAR_RGB_InitSCCData( &nitems) == XcmsFailure) { goto FreeBlueTbl; } - } + } } else if (cType == 1) { /* Red Intensity Table */ if (!(pScreenData->pRedTbl = (IntensityTbl *) @@ -851,7 +851,7 @@ LINEAR_RGB_FreeSCCData( if (pScreenData && pScreenData != &Default_RGB_SCCData) { if (pScreenData->pRedTbl) { if (pScreenData->pGreenTbl) { - if (pScreenData->pRedTbl->pBase != + if (pScreenData->pRedTbl->pBase != pScreenData->pGreenTbl->pBase) { if (pScreenData->pGreenTbl->pBase) { Xfree ((char *)pScreenData->pGreenTbl->pBase); @@ -862,7 +862,7 @@ LINEAR_RGB_FreeSCCData( } } if (pScreenData->pBlueTbl) { - if (pScreenData->pRedTbl->pBase != + if (pScreenData->pRedTbl->pBase != pScreenData->pBlueTbl->pBase) { if (pScreenData->pBlueTbl->pBase) { Xfree ((char *)pScreenData->pBlueTbl->pBase); @@ -921,7 +921,7 @@ _XcmsGetTableType0( } switch (format) { - case 8: + case 8: for (; nElements--; pIRec++) { /* 0xFFFF/0xFF = 0x101 */ pIRec->value = _XcmsGetElement (format, pChar, pCount) * 0x101; @@ -929,14 +929,14 @@ _XcmsGetTableType0( _XcmsGetElement (format, pChar, pCount) / (XcmsFloat)255.0; } break; - case 16: + case 16: for (; nElements--; pIRec++) { pIRec->value = _XcmsGetElement (format, pChar, pCount); pIRec->intensity = _XcmsGetElement (format, pChar, pCount) / (XcmsFloat)65535.0; } break; - case 32: + case 32: for (; nElements--; pIRec++) { pIRec->value = _XcmsGetElement (format, pChar, pCount); pIRec->intensity = _XcmsGetElement (format, pChar, pCount) @@ -983,21 +983,21 @@ _XcmsGetTableType1( } switch (format) { - case 8: + case 8: for (count = 0; count < max_index+1; count++, pIRec++) { pIRec->value = (count * 65535) / max_index; pIRec->intensity = _XcmsGetElement (format, pChar, pCount) / (XcmsFloat)255.0; } break; - case 16: + case 16: for (count = 0; count < max_index+1; count++, pIRec++) { pIRec->value = (count * 65535) / max_index; pIRec->intensity = _XcmsGetElement (format, pChar, pCount) / (XcmsFloat)65535.0; } break; - case 32: + case 32: for (count = 0; count < max_index+1; count++, pIRec++) { pIRec->value = (count * 65535) / max_index; pIRec->intensity = _XcmsGetElement (format, pChar, pCount) @@ -1090,7 +1090,7 @@ _XcmsValueInterpolation( { XcmsFloat ratio; - ratio = ((XcmsFloat)key->value - (XcmsFloat)lo->value) / + ratio = ((XcmsFloat)key->value - (XcmsFloat)lo->value) / ((XcmsFloat)hi->value - (XcmsFloat)lo->value); answer->value = key->value; answer->intensity = (hi->intensity - lo->intensity) * ratio; @@ -1241,7 +1241,7 @@ static void _XcmsMatVec( XcmsFloat *pMat, XcmsFloat *pIn, XcmsFloat *pOut) /* * DESCRIPTION - * Multiply the passed vector by the passed matrix to return a + * Multiply the passed vector by the passed matrix to return a * vector. Matrix is 3x3, vectors are of length 3. * * RETURNS @@ -1468,7 +1468,7 @@ XcmsLRGB_RGBi_ParseString( * SYNOPSIS */ /* ARGSUSED */ -Status +Status XcmsCIEXYZToRGBi( XcmsCCC ccc, XcmsColor *pXcmsColors_in_out,/* pointer to XcmsColors to convert */ @@ -1534,7 +1534,7 @@ XcmsCIEXYZToRGBi( /* * Aha!! Here's that little trick that will allow * gamut compression routines to get the out of bound - * RGBi. + * RGBi. */ memcpy((char *)&pColor->spec, (char *)tmp, sizeof(tmp)); pColor->format = XcmsRGBiFormat; @@ -1590,7 +1590,7 @@ XcmsCIEXYZToRGBi( * SYNOPSIS */ /* ARGSUSED */ -Status +Status XcmsRGBiToCIEXYZ( XcmsCCC ccc, XcmsColor *pXcmsColors_in_out,/* pointer to XcmsColors to convert */ @@ -1643,7 +1643,7 @@ XcmsRGBiToCIEXYZ( * SYNOPSIS */ /* ARGSUSED */ -Status +Status XcmsRGBiToRGB( XcmsCCC ccc, XcmsColor *pXcmsColors_in_out,/* pointer to XcmsColors to convert */ @@ -1726,7 +1726,7 @@ XcmsRGBiToRGB( * SYNOPSIS */ /* ARGSUSED */ -Status +Status XcmsRGBToRGBi( XcmsCCC ccc, XcmsColor *pXcmsColors_in_out,/* pointer to XcmsColors to convert */ diff --git a/libX11/src/xcms/Lab.c b/libX11/src/xcms/Lab.c index ae83110ee..df19964df 100644 --- a/libX11/src/xcms/Lab.c +++ b/libX11/src/xcms/Lab.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/LabGcC.c b/libX11/src/xcms/LabGcC.c index 366f29366..1f929eb86 100644 --- a/libX11/src/xcms/LabGcC.c +++ b/libX11/src/xcms/LabGcC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -63,11 +63,11 @@ XcmsCIELabClipab ( /* * DESCRIPTION * Reduce the Chroma for a specific hue and chroma to - * to bring the given color into the gamut of the + * to bring the given color into the gamut of the * specified device. As required of gamut compression * functions, this routine returns pColor_in_out * in XcmsCIEXYZFormat on successful completion. - * + * * Since this routine works with the L* within * pColor_in_out intermediate results may be returned * even though it may be invalid. @@ -113,7 +113,7 @@ XcmsCIELabClipab ( } } if (XcmsCIELabQueryMaxC(ccc, - degrees(XCMS_CIELAB_PMETRIC_HUE(pColor->spec.CIELab.a_star, + degrees(XCMS_CIELAB_PMETRIC_HUE(pColor->spec.CIELab.a_star, pColor->spec.CIELab.b_star)), pColor->spec.CIELab.L_star, pColor) == XcmsFailure) { diff --git a/libX11/src/xcms/LabGcL.c b/libX11/src/xcms/LabGcL.c index 9722c21a4..fc82e5e83 100644 --- a/libX11/src/xcms/LabGcL.c +++ b/libX11/src/xcms/LabGcL.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -63,7 +63,7 @@ XcmsCIELabClipL ( /* * DESCRIPTION * Return the closest L* for a specific hue and chroma. - * This routine takes any color as input and outputs + * This routine takes any color as input and outputs * a CIE XYZ color. * * Since this routine works with the L* within @@ -97,7 +97,7 @@ XcmsCIELabClipL ( */ pColor = pColors_in_out + i; - + if (ccc->visual->class < StaticColor) { /* * GRAY ! @@ -138,7 +138,7 @@ XcmsCIELabClipL ( memcpy((char *)pColor, (char *)&Lab_max, sizeof(XcmsColor)); return (XcmsFailure); } else if (pColor->spec.CIELab.L_star < Lab_max.spec.CIELab.L_star) { - /* Find the minimum lightness for the given chroma. */ + /* Find the minimum lightness for the given chroma. */ if (pColor->format != XcmsCIELabFormat) { if (_XcmsDIConvertColors(ccc, pColor, ScreenWhitePointOfCCC(ccc), 1, XcmsCIELabFormat) diff --git a/libX11/src/xcms/LabGcLC.c b/libX11/src/xcms/LabGcLC.c index 47490cdee..e9b5a50b3 100644 --- a/libX11/src/xcms/LabGcLC.c +++ b/libX11/src/xcms/LabGcLC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -70,7 +70,7 @@ XcmsCIELabClipLab ( Bool *pCompressed) /* * DESCRIPTION - * This routine will find the closest L* and chroma + * This routine will find the closest L* and chroma * for a specific hue. The color input is converted to * CIE L*u*v* format and returned as CIE XYZ format. * @@ -140,12 +140,12 @@ XcmsCIELabClipLab ( chroma = XCMS_CIELAB_PMETRIC_CHROMA(pColor->spec.CIELab.a_star, pColor->spec.CIELab.b_star); memcpy((char *)&Lab_max, (char *)pColor, sizeof(XcmsColor)); - if (_XcmsCIELabQueryMaxLCRGB (&myCCC, hue, &Lab_max, &rgb_max) + if (_XcmsCIELabQueryMaxLCRGB (&myCCC, hue, &Lab_max, &rgb_max) == XcmsFailure) { return (XcmsFailure); } maxLstar = Lab_max.spec.CIELab.L_star; - + /* Now check and return the appropriate L* */ if (saveLstar == maxLstar) { /* When the L* input is equal to the maximum L* */ @@ -199,7 +199,7 @@ XcmsCIELabClipLab ( bestLstar = pColor->spec.CIELab.L_star; bestastar = pColor->spec.CIELab.a_star; bestbstar = pColor->spec.CIELab.b_star; - bestChroma = chroma; + bestChroma = chroma; } if (nI == nILast || nI == 0) { break; diff --git a/libX11/src/xcms/LabMnL.c b/libX11/src/xcms/LabMnL.c index 9b4cd3d3a..2c2b2be54 100644 --- a/libX11/src/xcms/LabMnL.c +++ b/libX11/src/xcms/LabMnL.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -108,7 +108,7 @@ XcmsCIELabQueryMinL( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } + } hue = radians(hue_angle); tmp.spec.CIELab.L_star = START_L_STAR; @@ -116,7 +116,7 @@ XcmsCIELabQueryMinL( tmp.spec.CIELab.b_star = XCMS_CIEBSTAROFHUE(hue, chroma); tmp.pixel = pColor_return->pixel; tmp.format = XcmsCIELabFormat; - + /* Step 1: Obtain the maximum L_star and chroma for this hue. */ if (_XcmsCIELabQueryMaxLCRGB(&myCCC, hue, &max_lc, &rgb_saved) == XcmsFailure) { @@ -128,7 +128,7 @@ XcmsCIELabQueryMinL( if (max_chroma <= chroma) { /* - * If the chroma is greater than the chroma for the + * If the chroma is greater than the chroma for the * maximum L/chroma point then the L_star is the * the L_star for the maximum L_star/chroma point. * This is an error but I return the best approximation I can. @@ -139,7 +139,7 @@ XcmsCIELabQueryMinL( } /* - * If the chroma is equal to the chroma for the + * If the chroma is equal to the chroma for the * maximum L_star/chroma point then the L_star is the * the L_star for the maximum L* and chroma point. */ @@ -182,15 +182,15 @@ XcmsCIELabQueryMinL( /* Found It! */ memcpy ((char *) pColor_return, (char *) &tmp, sizeof (XcmsColor)); return(XcmsSuccess); - } + } nChroma += chroma - tmp_chroma; if (nChroma > max_chroma) { nChroma = max_chroma; rFactor *= 0.5; /* selective relaxation employed */ } else if (nChroma < 0.0) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { - memcpy ((char *)pColor_return, (char *)&prev, + memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); } else { memcpy ((char *)pColor_return, (char *)&tmp, @@ -204,7 +204,7 @@ XcmsCIELabQueryMinL( } if (nCount >= nMaxCount) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); diff --git a/libX11/src/xcms/LabMxC.c b/libX11/src/xcms/LabMxC.c index acd83f2d5..be763d3e1 100644 --- a/libX11/src/xcms/LabMxC.c +++ b/libX11/src/xcms/LabMxC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -105,7 +105,7 @@ XcmsCIELabQueryMaxC( /* Use my own CCC and inherit screen white Pt */ memcpy ((char *)&myCCC, (char *)ccc, sizeof(XcmsCCCRec)); - myCCC.clientWhitePt.format = XcmsUndefinedFormat; + myCCC.clientWhitePt.format = XcmsUndefinedFormat; myCCC.gamutCompProc = (XcmsCompressionProc)NULL;/* no gamut comp func */ while (hue_angle < 0.0) { @@ -113,7 +113,7 @@ XcmsCIELabQueryMaxC( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } + } hue = radians(hue_angle); tmp.spec.CIELab.L_star = L_star; @@ -192,7 +192,7 @@ XcmsCIELabQueryMaxC( /* printf("rFactor = %lf\n", rFactor); */ } } - if (XCMS_FABS(last_L_star - L_star) < + if (XCMS_FABS(last_L_star - L_star) < XCMS_FABS(tmp.spec.CIELab.L_star - L_star)) { tmp.spec.CIELab.a_star = lastaStar; tmp.spec.CIELab.b_star = lastbStar; diff --git a/libX11/src/xcms/LabMxL.c b/libX11/src/xcms/LabMxL.c index fbc39eef3..6db122227 100644 --- a/libX11/src/xcms/LabMxL.c +++ b/libX11/src/xcms/LabMxL.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -108,7 +108,7 @@ XcmsCIELabQueryMaxL( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } + } hue = radians(hue_angle); tmp.spec.CIELab.L_star = START_L_STAR; @@ -116,7 +116,7 @@ XcmsCIELabQueryMaxL( tmp.spec.CIELab.b_star = XCMS_CIEBSTAROFHUE(hue, chroma); tmp.pixel = pColor_return->pixel; tmp.format = XcmsCIELabFormat; - + /* Step 1: Obtain the maximum L_star and chroma for this hue. */ if (_XcmsCIELabQueryMaxLCRGB(&myCCC, hue, &max_lc, &rgb_saved) == XcmsFailure) { @@ -128,7 +128,7 @@ XcmsCIELabQueryMaxL( if (max_chroma <= chroma) { /* - * If the chroma is greater than the chroma for the + * If the chroma is greater than the chroma for the * maximum L/chroma point then the L_star is the * the L_star for the maximum L_star/chroma point. * This is an error but I return the best approximation I can. @@ -139,7 +139,7 @@ XcmsCIELabQueryMaxL( } /* - * If the chroma is equal to the chroma for the + * If the chroma is equal to the chroma for the * maximum L_star/chroma point then the L_star is the * the L_star for the maximum L* and chroma point. */ @@ -182,13 +182,13 @@ XcmsCIELabQueryMaxL( /* Found It! */ memcpy ((char *) pColor_return, (char *) &tmp, sizeof (XcmsColor)); return(XcmsSuccess); - } + } nChroma += chroma - tmp_chroma; if (nChroma > max_chroma) { nChroma = max_chroma; rFactor *= 0.5; /* selective relaxation employed */ } else if (nChroma < 0.0) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); @@ -204,7 +204,7 @@ XcmsCIELabQueryMaxL( } if (nCount >= nMaxCount) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); diff --git a/libX11/src/xcms/LabMxLC.c b/libX11/src/xcms/LabMxLC.c index c24dd4b98..9efc86972 100644 --- a/libX11/src/xcms/LabMxLC.c +++ b/libX11/src/xcms/LabMxLC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -83,7 +83,7 @@ _XcmsCIELabQueryMaxLCRGB( * by a binary search of all possible chromas. An assumption * is made that there are no local maxima. Use the unrounded * Max psychometric chroma because the difference check can be - * small. + * small. * * NOTE: No local CCC is used because this is a private * routine and all routines that call it are expected @@ -98,7 +98,7 @@ _XcmsCIELabQueryMaxLCRGB( * XcmsFailure - Failure * XcmsSuccess - Succeeded * - */ + */ { XcmsFloat nSmall, nLarge; XcmsColor tmp; @@ -115,15 +115,15 @@ _XcmsCIELabQueryMaxLCRGB( * out of bounds RGBi values in tmp when the ccc->gamutCompProc * is NULL. */ - if ((_XcmsConvertColorsWithWhitePt(ccc, &tmp, ScreenWhitePointOfCCC(ccc), - (unsigned int)1, XcmsRGBiFormat, (Bool *) NULL) + if ((_XcmsConvertColorsWithWhitePt(ccc, &tmp, ScreenWhitePointOfCCC(ccc), + (unsigned int)1, XcmsRGBiFormat, (Bool *) NULL) == XcmsFailure) && tmp.format != XcmsRGBiFormat) { return (XcmsFailure); } /* Now pick the smallest RGB */ - nSmall = MIN3(tmp.spec.RGBi.red, - tmp.spec.RGBi.green, + nSmall = MIN3(tmp.spec.RGBi.red, + tmp.spec.RGBi.green, tmp.spec.RGBi.blue); /* Make the smallest RGB equal to zero */ tmp.spec.RGBi.red -= nSmall; @@ -131,8 +131,8 @@ _XcmsCIELabQueryMaxLCRGB( tmp.spec.RGBi.blue -= nSmall; /* Now pick the largest RGB */ - nLarge = MAX3(tmp.spec.RGBi.red, - tmp.spec.RGBi.green, + nLarge = MAX3(tmp.spec.RGBi.red, + tmp.spec.RGBi.green, tmp.spec.RGBi.blue); /* Scale the RGB values based on the largest one */ tmp.spec.RGBi.red /= nLarge; @@ -149,13 +149,13 @@ _XcmsCIELabQueryMaxLCRGB( /* Convert from RGBi to Lab */ if (_XcmsConvertColorsWithWhitePt(ccc, &tmp, - ScreenWhitePointOfCCC(ccc), 1, XcmsCIELabFormat, (Bool *) NULL) + ScreenWhitePointOfCCC(ccc), 1, XcmsCIELabFormat, (Bool *) NULL) == XcmsFailure) { return (XcmsFailure); } memcpy((char *)pColor_return, (char *)&tmp, sizeof(XcmsColor)); - return (XcmsSuccess); + return (XcmsSuccess); } @@ -192,7 +192,7 @@ XcmsCIELabQueryMaxLC ( * XcmsFailure - Failure * XcmsSuccess - Succeeded * - */ + */ { XcmsCCCRec myCCC; @@ -202,7 +202,7 @@ XcmsCIELabQueryMaxLC ( if (ccc == NULL || pColor_return == NULL) { return(XcmsFailure); } - + /* Use my own CCC */ memcpy ((char *)&myCCC, (char *)ccc, sizeof(XcmsCCCRec)); myCCC.clientWhitePt.format = XcmsUndefinedFormat; @@ -213,8 +213,8 @@ XcmsCIELabQueryMaxLC ( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } - + } + return(_XcmsCIELabQueryMaxLCRGB (&myCCC, radians(hue_angle), pColor_return, (XcmsRGBi *)NULL)); } diff --git a/libX11/src/xcms/LabWpAj.c b/libX11/src/xcms/LabWpAj.c index 3098a60c8..5959779e6 100644 --- a/libX11/src/xcms/LabWpAj.c +++ b/libX11/src/xcms/LabWpAj.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/Luv.c b/libX11/src/xcms/Luv.c index 9fe80a0f4..8dae87f4a 100644 --- a/libX11/src/xcms/Luv.c +++ b/libX11/src/xcms/Luv.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -303,7 +303,7 @@ XcmsCIELuvToCIEuvY( uvY_return.v_prime = pLuv_WhitePt->spec.CIEuvY.v_prime; } else { tmpVal = 13.0 * (pColor->spec.CIELuv.L_star / 100.0); - uvY_return.u_prime = pColor->spec.CIELuv.u_star/tmpVal + + uvY_return.u_prime = pColor->spec.CIELuv.u_star/tmpVal + pLuv_WhitePt->spec.CIEuvY.u_prime; uvY_return.v_prime = pColor->spec.CIELuv.v_star/tmpVal + pLuv_WhitePt->spec.CIEuvY.v_prime; @@ -381,7 +381,7 @@ XcmsCIEuvYToCIELuv( } /* Now convert the uvY to Luv */ - Luv_return.L_star = + Luv_return.L_star = (pColor->spec.CIEuvY.Y < 0.008856) ? (pColor->spec.CIEuvY.Y * 903.29) diff --git a/libX11/src/xcms/LuvGcC.c b/libX11/src/xcms/LuvGcC.c index c4fde28d7..868748bb3 100644 --- a/libX11/src/xcms/LuvGcC.c +++ b/libX11/src/xcms/LuvGcC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -63,11 +63,11 @@ XcmsCIELuvClipuv ( /* * DESCRIPTION * Reduce the Chroma for a specific hue and chroma to - * to bring the given color into the gamut of the + * to bring the given color into the gamut of the * specified device. As required of gamut compression * functions, this routine returns pColor_in_out * in XcmsCIEXYZFormat on successful completion. - * + * * Since this routine works with the L* within * pColor_in_out intermediate results may be returned * even though it may be invalid. @@ -113,7 +113,7 @@ XcmsCIELuvClipuv ( } } if (XcmsCIELuvQueryMaxC(ccc, - degrees(XCMS_CIELUV_PMETRIC_HUE(pColor->spec.CIELuv.u_star, + degrees(XCMS_CIELUV_PMETRIC_HUE(pColor->spec.CIELuv.u_star, pColor->spec.CIELuv.v_star)), pColor->spec.CIELuv.L_star, pColor) == XcmsFailure) { diff --git a/libX11/src/xcms/LuvGcL.c b/libX11/src/xcms/LuvGcL.c index c7ccc7503..e6dd58462 100644 --- a/libX11/src/xcms/LuvGcL.c +++ b/libX11/src/xcms/LuvGcL.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -63,7 +63,7 @@ XcmsCIELuvClipL ( /* * DESCRIPTION * Return the closest L* for a specific hue and chroma. - * This routine takes any color as input and outputs + * This routine takes any color as input and outputs * a CIE XYZ color. * * Since this routine works with the L* within @@ -97,7 +97,7 @@ XcmsCIELuvClipL ( */ pColor = pColors_in_out + i; - + if (ccc->visual->class < StaticColor) { /* * GRAY ! @@ -138,7 +138,7 @@ XcmsCIELuvClipL ( memcpy((char *)pColor, (char *)&Luv_max, sizeof(XcmsColor)); return (XcmsFailure); } else if (pColor->spec.CIELuv.L_star < Luv_max.spec.CIELuv.L_star) { - /* Find the minimum lightness for the given chroma. */ + /* Find the minimum lightness for the given chroma. */ if (pColor->format != XcmsCIELuvFormat) { if (_XcmsDIConvertColors(ccc, pColor, ScreenWhitePointOfCCC(ccc), 1, XcmsCIELuvFormat) diff --git a/libX11/src/xcms/LuvGcLC.c b/libX11/src/xcms/LuvGcLC.c index f2eab371e..a52d9fa1d 100644 --- a/libX11/src/xcms/LuvGcLC.c +++ b/libX11/src/xcms/LuvGcLC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -70,7 +70,7 @@ XcmsCIELuvClipLuv ( Bool *pCompressed) /* * DESCRIPTION - * This routine will find the closest L* and chroma + * This routine will find the closest L* and chroma * for a specific hue. The color input is converted to * CIE L*u*v* format and returned as CIE XYZ format. * @@ -140,12 +140,12 @@ XcmsCIELuvClipLuv ( chroma = XCMS_CIELUV_PMETRIC_CHROMA(pColor->spec.CIELuv.u_star, pColor->spec.CIELuv.v_star); memcpy((char *)&Luv_max, (char *)pColor, sizeof(XcmsColor)); - if (_XcmsCIELuvQueryMaxLCRGB (&myCCC, hue, &Luv_max, &rgb_max) + if (_XcmsCIELuvQueryMaxLCRGB (&myCCC, hue, &Luv_max, &rgb_max) == XcmsFailure) { return (XcmsFailure); } maxLstar = Luv_max.spec.CIELuv.L_star; - + /* Now check and return the appropriate L* */ if (saveLstar == maxLstar) { /* When the L* input is equal to the maximum L* */ @@ -199,7 +199,7 @@ XcmsCIELuvClipLuv ( bestLstar = pColor->spec.CIELuv.L_star; bestustar = pColor->spec.CIELuv.u_star; bestvstar = pColor->spec.CIELuv.v_star; - bestChroma = chroma; + bestChroma = chroma; } if (nI == nILast || nI == 0) { break; diff --git a/libX11/src/xcms/LuvMnL.c b/libX11/src/xcms/LuvMnL.c index 2286d7ee1..fa83e1fde 100644 --- a/libX11/src/xcms/LuvMnL.c +++ b/libX11/src/xcms/LuvMnL.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -108,7 +108,7 @@ XcmsCIELuvQueryMinL( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } + } hue = radians(hue_angle); tmp.spec.CIELuv.L_star = START_L_STAR; @@ -116,7 +116,7 @@ XcmsCIELuvQueryMinL( tmp.spec.CIELuv.v_star = XCMS_CIEVSTAROFHUE(hue, chroma); tmp.pixel = pColor_return->pixel; tmp.format = XcmsCIELuvFormat; - + /* Step 1: Obtain the maximum L_star and chroma for this hue. */ if (_XcmsCIELuvQueryMaxLCRGB(&myCCC, hue, &max_lc, &rgb_saved) == XcmsFailure) { @@ -128,7 +128,7 @@ XcmsCIELuvQueryMinL( if (max_chroma <= chroma) { /* - * If the chroma is greater than the chroma for the + * If the chroma is greater than the chroma for the * maximum L/chroma point then the L_star is the * the L_star for the maximum L_star/chroma point. * This is an error but I return the best approximation I can. @@ -139,7 +139,7 @@ XcmsCIELuvQueryMinL( } /* - * If the chroma is equal to the chroma for the + * If the chroma is equal to the chroma for the * maximum L_star/chroma point then the L_star is the * the L_star for the maximum L* and chroma point. */ @@ -182,15 +182,15 @@ XcmsCIELuvQueryMinL( /* Found It! */ memcpy ((char *) pColor_return, (char *) &tmp, sizeof (XcmsColor)); return(XcmsSuccess); - } + } nChroma += chroma - tmp_chroma; if (nChroma > max_chroma) { nChroma = max_chroma; rFactor *= 0.5; /* selective relaxation employed */ } else if (nChroma < 0.0) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { - memcpy ((char *)pColor_return, (char *)&prev, + memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); } else { memcpy ((char *)pColor_return, (char *)&tmp, @@ -204,7 +204,7 @@ XcmsCIELuvQueryMinL( } if (nCount >= nMaxCount) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); diff --git a/libX11/src/xcms/LuvMxC.c b/libX11/src/xcms/LuvMxC.c index d228c39dc..34abf6d46 100644 --- a/libX11/src/xcms/LuvMxC.c +++ b/libX11/src/xcms/LuvMxC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -105,7 +105,7 @@ XcmsCIELuvQueryMaxC( /* Use my own CCC and inherit screen white Pt */ memcpy ((char *)&myCCC, (char *)ccc, sizeof(XcmsCCCRec)); - myCCC.clientWhitePt.format = XcmsUndefinedFormat; + myCCC.clientWhitePt.format = XcmsUndefinedFormat; myCCC.gamutCompProc = (XcmsCompressionProc)NULL;/* no gamut comp func */ while (hue_angle < 0.0) { @@ -113,7 +113,7 @@ XcmsCIELuvQueryMaxC( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } + } hue = radians(hue_angle); tmp.spec.CIELuv.L_star = L_star; @@ -182,7 +182,7 @@ XcmsCIELuvQueryMaxC( return(XcmsSuccess); } if (nT > 0) { - n_L_star += ((TOPL - n_L_star) * + n_L_star += ((TOPL - n_L_star) * (L_star - tmp.spec.CIELuv.L_star)) / (TOPL - L_star); } else { n_L_star *= L_star / tmp.spec.CIELuv.L_star; @@ -193,7 +193,7 @@ XcmsCIELuvQueryMaxC( /* printf("rFactor = %lf\n", rFactor); */ } } - if (XCMS_FABS(last_L_star - L_star) < + if (XCMS_FABS(last_L_star - L_star) < XCMS_FABS(tmp.spec.CIELuv.L_star - L_star)) { tmp.spec.CIELuv.u_star = lastuStar; tmp.spec.CIELuv.v_star = lastvStar; diff --git a/libX11/src/xcms/LuvMxL.c b/libX11/src/xcms/LuvMxL.c index f24c41419..da06684a4 100644 --- a/libX11/src/xcms/LuvMxL.c +++ b/libX11/src/xcms/LuvMxL.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -108,7 +108,7 @@ XcmsCIELuvQueryMaxL( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } + } hue = radians(hue_angle); tmp.spec.CIELuv.L_star = START_L_STAR; @@ -116,7 +116,7 @@ XcmsCIELuvQueryMaxL( tmp.spec.CIELuv.v_star = XCMS_CIEVSTAROFHUE(hue, chroma); tmp.pixel = pColor_return->pixel; tmp.format = XcmsCIELuvFormat; - + /* Step 1: Obtain the maximum L_star and chroma for this hue. */ if (_XcmsCIELuvQueryMaxLCRGB(&myCCC, hue, &max_lc, &rgb_saved) == XcmsFailure) { @@ -128,7 +128,7 @@ XcmsCIELuvQueryMaxL( if (max_chroma <= chroma) { /* - * If the chroma is greater than the chroma for the + * If the chroma is greater than the chroma for the * maximum L/chroma point then the L_star is the * the L_star for the maximum L_star/chroma point. * This is an error but I return the best approximation I can. @@ -139,7 +139,7 @@ XcmsCIELuvQueryMaxL( } /* - * If the chroma is equal to the chroma for the + * If the chroma is equal to the chroma for the * maximum L_star/chroma point then the L_star is the * the L_star for the maximum L* and chroma point. */ @@ -182,13 +182,13 @@ XcmsCIELuvQueryMaxL( /* Found It! */ memcpy ((char *) pColor_return, (char *) &tmp, sizeof (XcmsColor)); return(XcmsSuccess); - } + } nChroma += chroma - tmp_chroma; if (nChroma > max_chroma) { nChroma = max_chroma; rFactor *= 0.5; /* selective relaxation employed */ } else if (nChroma < 0.0) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); @@ -204,7 +204,7 @@ XcmsCIELuvQueryMaxL( } if (nCount >= nMaxCount) { - if (XCMS_FABS(lastChroma - chroma) < + if (XCMS_FABS(lastChroma - chroma) < XCMS_FABS(tmp_chroma - chroma)) { memcpy ((char *)pColor_return, (char *)&prev, sizeof(XcmsColor)); diff --git a/libX11/src/xcms/LuvMxLC.c b/libX11/src/xcms/LuvMxLC.c index 941e45921..d8634038f 100644 --- a/libX11/src/xcms/LuvMxLC.c +++ b/libX11/src/xcms/LuvMxLC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -98,7 +98,7 @@ _XcmsCIELuvQueryMaxLCRGB( * XcmsFailure - Failure * XcmsSuccess - Succeeded * - */ + */ { XcmsFloat nSmall, nLarge; XcmsColor tmp; @@ -115,15 +115,15 @@ _XcmsCIELuvQueryMaxLCRGB( * out of bounds RGBi values in tmp when the ccc->gamutCompProc * is NULL. */ - if ((_XcmsConvertColorsWithWhitePt(ccc, &tmp, ScreenWhitePointOfCCC(ccc), - (unsigned int)1, XcmsRGBiFormat, (Bool *) NULL) + if ((_XcmsConvertColorsWithWhitePt(ccc, &tmp, ScreenWhitePointOfCCC(ccc), + (unsigned int)1, XcmsRGBiFormat, (Bool *) NULL) == XcmsFailure) && tmp.format != XcmsRGBiFormat) { return (XcmsFailure); } /* Now pick the smallest RGB */ - nSmall = MIN3(tmp.spec.RGBi.red, - tmp.spec.RGBi.green, + nSmall = MIN3(tmp.spec.RGBi.red, + tmp.spec.RGBi.green, tmp.spec.RGBi.blue); /* Make the smallest RGB equal to zero */ tmp.spec.RGBi.red -= nSmall; @@ -131,8 +131,8 @@ _XcmsCIELuvQueryMaxLCRGB( tmp.spec.RGBi.blue -= nSmall; /* Now pick the largest RGB */ - nLarge = MAX3(tmp.spec.RGBi.red, - tmp.spec.RGBi.green, + nLarge = MAX3(tmp.spec.RGBi.red, + tmp.spec.RGBi.green, tmp.spec.RGBi.blue); /* Scale the RGB values based on the largest one */ tmp.spec.RGBi.red /= nLarge; @@ -149,13 +149,13 @@ _XcmsCIELuvQueryMaxLCRGB( /* Convert from RGBi to Luv */ if (_XcmsConvertColorsWithWhitePt(ccc, &tmp, - ScreenWhitePointOfCCC(ccc), 1, XcmsCIELuvFormat, (Bool *) NULL) + ScreenWhitePointOfCCC(ccc), 1, XcmsCIELuvFormat, (Bool *) NULL) == XcmsFailure) { return (XcmsFailure); } memcpy((char *)pColor_return, (char *)&tmp, sizeof(XcmsColor)); - return (XcmsSuccess); + return (XcmsSuccess); } @@ -192,7 +192,7 @@ XcmsCIELuvQueryMaxLC ( * XcmsFailure - Failure * XcmsSuccess - Succeeded * - */ + */ { XcmsCCCRec myCCC; @@ -202,7 +202,7 @@ XcmsCIELuvQueryMaxLC ( if (ccc == NULL || pColor_return == NULL) { return(XcmsFailure); } - + /* Use my own CCC */ memcpy ((char *)&myCCC, (char *)ccc, sizeof(XcmsCCCRec)); myCCC.clientWhitePt.format = XcmsUndefinedFormat; @@ -213,8 +213,8 @@ XcmsCIELuvQueryMaxLC ( } while (hue_angle >= 360.0) { hue_angle -= 360.0; - } - + } + return(_XcmsCIELuvQueryMaxLCRGB (&myCCC, radians(hue_angle), pColor_return, (XcmsRGBi *)NULL)); } diff --git a/libX11/src/xcms/LuvWpAj.c b/libX11/src/xcms/LuvWpAj.c index 86a60b426..7ce643e89 100644 --- a/libX11/src/xcms/LuvWpAj.c +++ b/libX11/src/xcms/LuvWpAj.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/Makefile.in b/libX11/src/xcms/Makefile.in index ea990c1ef..3469812da 100644 --- a/libX11/src/xcms/Makefile.in +++ b/libX11/src/xcms/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,8 +18,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -45,6 +47,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h \ $(top_builddir)/include/X11/XlibConf.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxcms_la_LIBADD = am_libxcms_la_OBJECTS = AddDIC.lo AddSF.lo CCC.lo CvColW.lo CvCols.lo \ @@ -62,11 +65,9 @@ libxcms_la_OBJECTS = $(am_libxcms_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -78,9 +79,23 @@ am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(X11dir)" -dist_X11DATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_X11_DATA) ETAGS = etags CTAGS = ctags @@ -100,27 +115,26 @@ BIGFONT_CFLAGS = @BIGFONT_CFLAGS@ BIGFONT_LIBS = @BIGFONT_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOLT_BASH = @DOLT_BASH@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ @@ -132,6 +146,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KEYSYMDEF = @KEYSYMDEF@ LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -141,7 +156,10 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINTLIB = @LINTLIB@ LINT_FLAGS = @LINT_FLAGS@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -149,8 +167,12 @@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -190,17 +212,14 @@ XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@ XPROTO_CFLAGS = @XPROTO_CFLAGS@ XPROTO_LIBS = @XPROTO_LIBS@ XTHREADLIB = @XTHREADLIB@ -XTHREADS = @XTHREADS@ XTHREAD_CFLAGS = @XTHREAD_CFLAGS@ XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@ -XUSE_MTSAFE_API = @XUSE_MTSAFE_API@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -215,6 +234,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -231,6 +251,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -243,6 +264,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libxcms.la @@ -343,14 +365,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xcms/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/xcms/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xcms/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/xcms/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -368,6 +390,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @@ -452,21 +475,21 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -479,34 +502,37 @@ clean-libtool: install-dist_X11DATA: $(dist_X11_DATA) @$(NORMAL_INSTALL) test -z "$(X11dir)" || $(MKDIR_P) "$(DESTDIR)$(X11dir)" - @list='$(dist_X11_DATA)'; for p in $$list; do \ + @list='$(dist_X11_DATA)'; test -n "$(X11dir)" || list=; \ + for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(dist_X11DATA_INSTALL) '$$d$$p' '$(DESTDIR)$(X11dir)/$$f'"; \ - $(dist_X11DATA_INSTALL) "$$d$$p" "$(DESTDIR)$(X11dir)/$$f"; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(X11dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(X11dir)" || exit $$?; \ done uninstall-dist_X11DATA: @$(NORMAL_UNINSTALL) - @list='$(dist_X11_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(X11dir)/$$f'"; \ - rm -f "$(DESTDIR)$(X11dir)/$$f"; \ - done + @list='$(dist_X11_DATA)'; test -n "$(X11dir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + test -n "$$files" || exit 0; \ + echo " ( cd '$(DESTDIR)$(X11dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(X11dir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -514,29 +540,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -557,13 +588,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -594,6 +629,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -615,6 +651,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -623,18 +661,28 @@ install-data-am: install-dist_X11DATA install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -676,6 +724,7 @@ uninstall-am: uninstall-dist_X11DATA @LINT_TRUE@lint: @LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(libxcms_la_SOURCES) -lm + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libX11/src/xcms/OfCCC.c b/libX11/src/xcms/OfCCC.c index 1c9e16b4c..29d37e6ef 100644 --- a/libX11/src/xcms/OfCCC.c +++ b/libX11/src/xcms/OfCCC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/PrOfId.c b/libX11/src/xcms/PrOfId.c index 01d2c264b..72f75b3fe 100644 --- a/libX11/src/xcms/PrOfId.c +++ b/libX11/src/xcms/PrOfId.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/QBlack.c b/libX11/src/xcms/QBlack.c index cdeae0333..c3d1f949f 100644 --- a/libX11/src/xcms/QBlack.c +++ b/libX11/src/xcms/QBlack.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/QBlue.c b/libX11/src/xcms/QBlue.c index eae77dde2..6aac33041 100644 --- a/libX11/src/xcms/QBlue.c +++ b/libX11/src/xcms/QBlue.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/QGreen.c b/libX11/src/xcms/QGreen.c index deb24ccce..449704d5a 100644 --- a/libX11/src/xcms/QGreen.c +++ b/libX11/src/xcms/QGreen.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/QRed.c b/libX11/src/xcms/QRed.c index 51b6be407..5d119dbaa 100644 --- a/libX11/src/xcms/QRed.c +++ b/libX11/src/xcms/QRed.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/QWhite.c b/libX11/src/xcms/QWhite.c index d23443db2..956bc8a89 100644 --- a/libX11/src/xcms/QWhite.c +++ b/libX11/src/xcms/QWhite.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/QuCol.c b/libX11/src/xcms/QuCol.c index 7944faaa0..673058712 100644 --- a/libX11/src/xcms/QuCol.c +++ b/libX11/src/xcms/QuCol.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/QuCols.c b/libX11/src/xcms/QuCols.c index 7a0816df3..b6f620528 100644 --- a/libX11/src/xcms/QuCols.c +++ b/libX11/src/xcms/QuCols.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/SetCCC.c b/libX11/src/xcms/SetCCC.c index a7094b170..17d3de0b0 100644 --- a/libX11/src/xcms/SetCCC.c +++ b/libX11/src/xcms/SetCCC.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/SetGetCols.c b/libX11/src/xcms/SetGetCols.c index 03f7a2f72..ce482553b 100644 --- a/libX11/src/xcms/SetGetCols.c +++ b/libX11/src/xcms/SetGetCols.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -55,7 +55,7 @@ /* * NAME - * XcmsSetColor - + * XcmsSetColor - * * SYNOPSIS */ @@ -172,7 +172,7 @@ Query: /* * NAME - * XcmsSetColors - + * XcmsSetColors - * * SYNOPSIS */ diff --git a/libX11/src/xcms/StCol.c b/libX11/src/xcms/StCol.c index fef449e7e..e93b0dd37 100644 --- a/libX11/src/xcms/StCol.c +++ b/libX11/src/xcms/StCol.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/StCols.c b/libX11/src/xcms/StCols.c index 163d62171..65355f6d7 100644 --- a/libX11/src/xcms/StCols.c +++ b/libX11/src/xcms/StCols.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/UNDEFINED.c b/libX11/src/xcms/UNDEFINED.c index 2c0563077..9c9094ed2 100644 --- a/libX11/src/xcms/UNDEFINED.c +++ b/libX11/src/xcms/UNDEFINED.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/XRGB.c b/libX11/src/xcms/XRGB.c index 0d7e24c7d..e2697d2ab 100644 --- a/libX11/src/xcms/XRGB.c +++ b/libX11/src/xcms/XRGB.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -76,7 +76,7 @@ static unsigned short const MASK[17] = { /* * NAME - * _XcmsRGB_to_XColor - + * _XcmsRGB_to_XColor - * * SYNOPSIS */ @@ -163,7 +163,7 @@ _XcmsResolveColor( * On a display with N-bit DACs, the "hardware" color is computed as: * * ((unsignedlong)(ClientValue >> (16-N)) * 0xFFFF) / ((1 << N) - 1) - * + * * * RETURNS * void. diff --git a/libX11/src/xcms/XYZ.c b/libX11/src/xcms/XYZ.c index 5c93dad3d..2868c925a 100644 --- a/libX11/src/xcms/XYZ.c +++ b/libX11/src/xcms/XYZ.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/Xcmsint.h b/libX11/src/xcms/Xcmsint.h index 1bf02ba2f..7ec0d1b00 100644 --- a/libX11/src/xcms/Xcmsint.h +++ b/libX11/src/xcms/Xcmsint.h @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/cmsAllCol.c b/libX11/src/xcms/cmsAllCol.c index 145d11776..1b2bc76f5 100644 --- a/libX11/src/xcms/cmsAllCol.c +++ b/libX11/src/xcms/cmsAllCol.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/cmsAllNCol.c b/libX11/src/xcms/cmsAllNCol.c index efee0f6b3..b17f7e4c6 100644 --- a/libX11/src/xcms/cmsAllNCol.c +++ b/libX11/src/xcms/cmsAllNCol.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -46,7 +46,7 @@ /* * NAME - * XcmsAllocNamedColor - + * XcmsAllocNamedColor - * * SYNOPSIS */ diff --git a/libX11/src/xcms/cmsCmap.c b/libX11/src/xcms/cmsCmap.c index e21368280..932743b2b 100644 --- a/libX11/src/xcms/cmsCmap.c +++ b/libX11/src/xcms/cmsCmap.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -411,7 +411,7 @@ _XcmsFreeClientCmaps( * * SYNOPSIS */ -XcmsCCC +XcmsCCC XcmsCCCOfColormap( Display *dpy, Colormap cmap) diff --git a/libX11/src/xcms/cmsColNm.c b/libX11/src/xcms/cmsColNm.c index e3ca5183d..8aa495857 100644 --- a/libX11/src/xcms/cmsColNm.c +++ b/libX11/src/xcms/cmsColNm.c @@ -4,7 +4,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -12,10 +12,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -187,7 +187,7 @@ _XcmsParseColorString( * DESCRIPTION * Assuming color_string contains a numerical string color * specification, attempts to parse a string into an - * XcmsColor structure. + * XcmsColor structure. * * RETURNS * 0 if failed; otherwise non-zero. @@ -470,7 +470,7 @@ Retry: pair->flag = CYCLE; return(XcmsFailure); } - + if (_XcmsParseColorString(ccc, pair->second, pColor) == XcmsSuccess) { /* f2 contains a numerical string specification */ return(XcmsSuccess); @@ -816,7 +816,7 @@ _XcmsCopyISOLatin1Lowered( /* * NAME - * _XcmsResolveColorString - + * _XcmsResolveColorString - * * SYNOPSIS */ @@ -872,7 +872,7 @@ _XcmsResolveColorString ( if (result_format != XcmsUndefinedFormat && pColor_exact_return->format != result_format) { /* need to be converted to the target format */ - return(XcmsConvertColors(ccc, pColor_exact_return, 1, + return(XcmsConvertColors(ccc, pColor_exact_return, 1, result_format, (Bool *)NULL)); } else { return(XcmsSuccess); diff --git a/libX11/src/xcms/cmsGlobls.c b/libX11/src/xcms/cmsGlobls.c index abe711c6a..3453bef1c 100644 --- a/libX11/src/xcms/cmsGlobls.c +++ b/libX11/src/xcms/cmsGlobls.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/cmsInt.c b/libX11/src/xcms/cmsInt.c index 68cfebd74..cab123538 100644 --- a/libX11/src/xcms/cmsInt.c +++ b/libX11/src/xcms/cmsInt.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -189,7 +189,7 @@ _XcmsInitDefaultCCCs( if (!(ccc = (XcmsCCC) Xcalloc((unsigned)nScrn, (unsigned) sizeof(XcmsCCCRec)))) { return(0); - } + } dpy->cms.defaultCCCs = (XPointer)ccc; dpy->free_funcs->defaultCCCs = _XcmsFreeDefaultCCCs; @@ -328,7 +328,7 @@ _XcmsInitScrnInfo( if (!(defaultccc->pPerScrnInfo = (XcmsPerScrnInfo *) Xcalloc(1, (unsigned) sizeof(XcmsPerScrnInfo)))) { return(0); - } + } defaultccc->pPerScrnInfo->state = XcmsInitNone; } diff --git a/libX11/src/xcms/cmsLkCol.c b/libX11/src/xcms/cmsLkCol.c index f19f21d03..5c15bce78 100644 --- a/libX11/src/xcms/cmsLkCol.c +++ b/libX11/src/xcms/cmsLkCol.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -46,7 +46,7 @@ /* * NAME - * XcmsLookupColor - + * XcmsLookupColor - * * SYNOPSIS */ diff --git a/libX11/src/xcms/cmsMath.c b/libX11/src/xcms/cmsMath.c index 5e8cae72f..fd48b9ffc 100644 --- a/libX11/src/xcms/cmsMath.c +++ b/libX11/src/xcms/cmsMath.c @@ -91,7 +91,7 @@ _XcmsCubeRoot(double a) #endif return cur_guess; } - + /* for square roots, x^2 - a = 0, x_new = x - 1/2 (x - a/x) */ @@ -135,4 +135,4 @@ _XcmsSquareRoot(double a) #endif return cur_guess; } - + diff --git a/libX11/src/xcms/cmsProp.c b/libX11/src/xcms/cmsProp.c index 4040a05ce..191d66366 100644 --- a/libX11/src/xcms/cmsProp.c +++ b/libX11/src/xcms/cmsProp.c @@ -4,7 +4,7 @@ * * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -12,10 +12,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -123,10 +123,10 @@ _XcmsGetProperty( long len = 6516; unsigned long nitems_ret, after_ret; Atom atom_ret; - - while (XGetWindowProperty (pDpy, w, property, 0, len, False, - XA_INTEGER, &atom_ret, &format_ret, - &nitems_ret, &after_ret, + + while (XGetWindowProperty (pDpy, w, property, 0, len, False, + XA_INTEGER, &atom_ret, &format_ret, + &nitems_ret, &after_ret, (unsigned char **)&prop_ret)) { if (after_ret > 0) { len += nitems_ret * (format_ret >> 3); @@ -135,7 +135,7 @@ _XcmsGetProperty( break; } } - if (format_ret == 0 || nitems_ret == 0) { + if (format_ret == 0 || nitems_ret == 0) { /* the property does not exist or is of an unexpected type */ return(XcmsFailure); } diff --git a/libX11/src/xcms/cmsTrig.c b/libX11/src/xcms/cmsTrig.c index 4e17e7da4..0ab4426fc 100644 --- a/libX11/src/xcms/cmsTrig.c +++ b/libX11/src/xcms/cmsTrig.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -165,7 +165,7 @@ static double const sin_qcoeffs[] = { * to the range over which the polynomial approximation * is valid, and as the polynomial is evaluated using * finite-precision arithmetic. - * + * * PROGRAMMER * * Fred Fish @@ -225,7 +225,7 @@ static double const sin_qcoeffs[] = { * HART satisfies this requirement, although not explicitly * stated in the text. This may not be true of other * approximations given in the reference. - * + * */ double _XcmsCosine(double x) @@ -444,7 +444,7 @@ static double _XcmsPolynomial( * to the range over which the polynomial approximation * is valid, and as the polynomial is evaluated using * finite-precision arithmetic. - * + * * PROGRAMMER * * Fred Fish @@ -505,7 +505,7 @@ static double _XcmsPolynomial( * HART satisfies this requirement, although not explicitly * stated in the text. This may not be true of other * approximations given in the reference. - * + * */ double @@ -559,7 +559,7 @@ _XcmsArcTangent(double x) * New York, NY, Harper & Row, 1970. * * RETURNS - * Returns the arctangent + * Returns the arctangent */ { double ai, a1 = 0.0, bi, b1 = 0.0, l, d; diff --git a/libX11/src/xcms/uvY.c b/libX11/src/xcms/uvY.c index da9fd0f7d..0567b2063 100644 --- a/libX11/src/xcms/uvY.c +++ b/libX11/src/xcms/uvY.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of XCMS based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY diff --git a/libX11/src/xcms/xyY.c b/libX11/src/xcms/xyY.c index 2e56a0862..555afe4fe 100644 --- a/libX11/src/xcms/xyY.c +++ b/libX11/src/xcms/xyY.c @@ -3,7 +3,7 @@ /* * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. * All Rights Reserved - * + * * This file is a component of an X Window System-specific implementation * of Xcms based on the TekColor Color Management System. Permission is * hereby granted to use, copy, modify, sell, and otherwise distribute this @@ -11,10 +11,10 @@ * that this copyright, permission, and disclaimer notice is reproduced in * all copies of this software and in supporting documentation. TekColor * is a trademark of Tektronix, Inc. - * + * * Tektronix makes no representation about the suitability of this software * for any purpose. It is provided "as is" and with all faults. - * + * * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY @@ -382,7 +382,7 @@ XcmsCIEXYZToCIExyY( /* Now convert for XYZ to xyY */ if ((div = pColor->spec.CIEXYZ.X + pColor->spec.CIEXYZ.Y + pColor->spec.CIEXYZ.Z) == 0.0) { div = EPS; - } + } xyY_return.x = pColor->spec.CIEXYZ.X / div; xyY_return.y = pColor->spec.CIEXYZ.Y / div; xyY_return.Y = pColor->spec.CIEXYZ.Y; diff --git a/libX11/src/xkb/Makefile.in b/libX11/src/xkb/Makefile.in index 4b94f15a9..f3cb50532 100644 --- a/libX11/src/xkb/Makefile.in +++ b/libX11/src/xkb/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -43,6 +45,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h \ $(top_builddir)/include/X11/XlibConf.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxkb_la_LIBADD = am_libxkb_la_OBJECTS = XKB.lo XKBBind.lo XKBCompat.lo XKBCtrls.lo \ @@ -54,11 +57,9 @@ libxkb_la_OBJECTS = $(am_libxkb_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -83,27 +84,26 @@ BIGFONT_CFLAGS = @BIGFONT_CFLAGS@ BIGFONT_LIBS = @BIGFONT_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOLT_BASH = @DOLT_BASH@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ @@ -115,6 +115,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KEYSYMDEF = @KEYSYMDEF@ LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -124,7 +125,10 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINTLIB = @LINTLIB@ LINT_FLAGS = @LINT_FLAGS@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -132,8 +136,12 @@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -173,17 +181,14 @@ XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@ XPROTO_CFLAGS = @XPROTO_CFLAGS@ XPROTO_LIBS = @XPROTO_LIBS@ XTHREADLIB = @XTHREADLIB@ -XTHREADS = @XTHREADS@ XTHREAD_CFLAGS = @XTHREAD_CFLAGS@ XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@ -XUSE_MTSAFE_API = @XUSE_MTSAFE_API@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -198,6 +203,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -214,6 +220,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -226,6 +233,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = \ @@ -280,14 +288,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xkb/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/xkb/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xkb/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/xkb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -305,6 +313,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @@ -347,21 +356,21 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -377,14 +386,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -392,29 +401,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -435,13 +449,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -469,6 +487,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -490,6 +509,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -498,18 +519,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -550,6 +581,7 @@ uninstall-am: @LINT_TRUE@lint: @LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(libxkb_la_SOURCES) -lm + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libX11/src/xkb/XKB.c b/libX11/src/xkb/XKB.c index ecc5ddf0a..202a9bd0b 100644 --- a/libX11/src/xkb/XKB.c +++ b/libX11/src/xkb/XKB.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -39,7 +39,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. XkbInternAtomFunc _XkbInternAtomFunc= XInternAtom; XkbGetAtomNameFunc _XkbGetAtomNameFunc= XGetAtomName; -Bool +Bool XkbQueryExtension( Display *dpy, int * opcodeReturn, int * eventBaseReturn, @@ -62,7 +62,7 @@ XkbQueryExtension( Display *dpy, return True; } -Bool +Bool XkbLibraryVersion(int *libMajorRtrn,int *libMinorRtrn) { int supported; @@ -73,7 +73,7 @@ int supported; supported= True; else supported= False; } - else { + else { supported = True; } @@ -117,7 +117,7 @@ XkbSelectEvents( Display * dpy, else xkbi->selected_map_details= 0; } if (affect&XkbNewKeyboardNotifyMask) { - if (selectAll&XkbNewKeyboardNotifyMask) + if (selectAll&XkbNewKeyboardNotifyMask) xkbi->selected_nkn_details= XkbAllNewKeyboardEventsMask; else xkbi->selected_nkn_details= 0; if (!(xkbi->xlib_ctrls&XkbLC_IgnoreNewKeyboards)) { diff --git a/libX11/src/xkb/XKBAlloc.c b/libX11/src/xkb/XKBAlloc.c index 9430ac0ed..567235ddc 100644 --- a/libX11/src/xkb/XKBAlloc.c +++ b/libX11/src/xkb/XKBAlloc.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -43,7 +43,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "XKBlibint.h" -#else +#else #include #include @@ -163,7 +163,7 @@ XkbNamesPtr names; if ((which&XkbKeyNamesMask)&&(names->keys==NULL)) { if ((!XkbIsLegalKeycode(xkb->min_key_code))|| (!XkbIsLegalKeycode(xkb->max_key_code))|| - (xkb->max_key_codemin_key_code)) + (xkb->max_key_codemin_key_code)) return BadValue; names->keys= _XkbTypedCalloc((xkb->max_key_code+1),XkbKeyNameRec); if (names->keys==NULL) @@ -223,7 +223,7 @@ XkbNamesPtr names; return; names= xkb->names; if (freeMap) - which= XkbAllNamesMask; + which= XkbAllNamesMask; if (which&XkbKTLevelNamesMask) { XkbClientMapPtr map= xkb->map; if ((map!=NULL)&&(map->types!=NULL)) { @@ -290,7 +290,7 @@ XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap) /***===================================================================***/ -Status +Status XkbAllocIndicatorMaps(XkbDescPtr xkb) { if (xkb==NULL) @@ -368,7 +368,7 @@ register int i; } if (devi->num_leds>=devi->sz_leds) { XkbDeviceLedInfoRec *prev_leds = devi->leds; - + if (devi->sz_leds>0) devi->sz_leds*= 2; else devi->sz_leds= 1; devi->leds= _XkbTypedRealloc(devi->leds,devi->sz_leds, @@ -465,7 +465,7 @@ XkbDeviceInfoPtr devi; } -void +void XkbFreeDeviceInfo(XkbDeviceInfoPtr devi,unsigned which,Bool freeDevI) { if (devi) { diff --git a/libX11/src/xkb/XKBBell.c b/libX11/src/xkb/XKBBell.c index 6ea30855e..d2fed0a97 100644 --- a/libX11/src/xkb/XKBBell.c +++ b/libX11/src/xkb/XKBBell.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -42,7 +42,7 @@ XkbDeviceBell( Display * dpy, Window window, int deviceID, int bellClass, - int bellID, + int bellID, int percent, Atom name) { diff --git a/libX11/src/xkb/XKBBind.c b/libX11/src/xkb/XKBBind.c index 4dc92654e..556917bdc 100644 --- a/libX11/src/xkb/XKBBind.c +++ b/libX11/src/xkb/XKBBind.c @@ -77,7 +77,7 @@ XkbKeycodeToKeysym(Display *dpy, int level) { XkbDescRec *xkb; - + if (_XkbUnavailable(dpy)) return NoSymbol; @@ -112,7 +112,7 @@ XKeycodeToKeysym(Display *dpy, int col) { XkbDescRec *xkb; - + if (_XkbUnavailable(dpy)) return _XKeycodeToKeysym(dpy, kc, col); @@ -121,7 +121,7 @@ XKeycodeToKeysym(Display *dpy, xkb = dpy->xkb_info->desc; if ((kcmin_key_code)||(kc>xkb->max_key_code)) return NoSymbol; - + if (col>3) { int lastSym,tmp,nGrp; @@ -229,8 +229,8 @@ XLookupKeysym(register XKeyEvent *event, int col) } /* - * Not a public entry point -- XkbTranslateKey is an obsolete name - * that is preserved here so that functions linked against the old + * Not a public entry point -- XkbTranslateKey is an obsolete name + * that is preserved here so that functions linked against the old * version will continue to work in a shared library environment. */ int @@ -328,10 +328,10 @@ XkbTranslateKeyCode( register XkbDescPtr xkb, if (mods_rtrn) { *mods_rtrn= type->mods.mask&(~preserve); /* The Motif VTS doesn't get the help callback called if help - * is bound to Shift+, and it appears as though it - * is XkbTranslateKeyCode that is causing the problem. The - * core X version of XTranslateKey always OR's in ShiftMask - * and LockMask for mods_rtrn, so this "fix" keeps this behavior + * is bound to Shift+, and it appears as though it + * is XkbTranslateKeyCode that is causing the problem. The + * core X version of XTranslateKey always OR's in ShiftMask + * and LockMask for mods_rtrn, so this "fix" keeps this behavior * and solves the VTS problem. */ if ((xkb->dpy)&&(xkb->dpy->xkb_info)&& @@ -632,7 +632,7 @@ XkbTranslateKeySym( register Display * dpy, } if (change) { if (n==1) - *sym_rtrn=(*xkb->cvt.MBToKS)(xkb->cvt.MBToKSPriv,buffer,n,0); + *sym_rtrn=(*xkb->cvt.MBToKS)(xkb->cvt.MBToKSPriv,buffer,n,NULL); else *sym_rtrn= NoSymbol; } } @@ -698,7 +698,7 @@ XLookupString ( register XKeyEvent * event, } } } - } + } #ifdef USE_OWN_COMPOSE if ( status ) { @@ -711,7 +711,7 @@ XLookupString ( register XKeyEvent * event, status->compose_ptr = NULL; status->chars_matched = 0; } - if ( ((status->chars_matched>0)&&(status->compose_ptr!=NULL)) || + if ( ((status->chars_matched>0)&&(status->compose_ptr!=NULL)) || XimCompIsComposeKey(*keysym,event->keycode,status) ) { XimCompRtrn rtrn; @@ -817,7 +817,7 @@ XkbLookupKeyBinding( Display * dpy, int nbytes, int * extra_rtrn) { - register struct _XKeytrans *p; + register struct _XKeytrans *p; if (extra_rtrn) *extra_rtrn= 0; @@ -841,7 +841,7 @@ char XkbToControl( char ch ) { register char c = ch; - + if ((c >= '@' && c < '\177') || c == ' ') c &= 0x1F; else if (c == '2') c = '\000'; else if (c >= '3' && c <= '7') c -= ('3' - '\033'); diff --git a/libX11/src/xkb/XKBCompat.c b/libX11/src/xkb/XKBCompat.c index 5886e4d26..d52fd131b 100644 --- a/libX11/src/xkb/XKBCompat.c +++ b/libX11/src/xkb/XKBCompat.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -46,7 +46,7 @@ _XkbReadGetCompatMapReply( Display * dpy, register int i; XkbReadBufferRec buf; - if (!_XkbInitReadBuffer(dpy,&buf,(int)rep->length*4)) + if (!_XkbInitReadBuffer(dpy,&buf,(int)rep->length*4)) return BadAlloc; if (nread_rtrn) @@ -99,7 +99,7 @@ XkbReadBufferRec buf; } } i= _XkbFreeReadBuffer(&buf); - if (i) + if (i) fprintf(stderr,"CompatMapReply! Bad length (%d extra bytes)\n",i); if (i || buf.error) return BadLength; diff --git a/libX11/src/xkb/XKBCtrls.c b/libX11/src/xkb/XKBCtrls.c index 0ea131aa0..aadcccd3d 100644 --- a/libX11/src/xkb/XKBCtrls.c +++ b/libX11/src/xkb/XKBCtrls.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -51,10 +51,10 @@ xkbSetControlsReq *req; return req; } -Bool +Bool XkbSetAutoRepeatRate( Display *dpy, - unsigned int deviceSpec, - unsigned int timeout, + unsigned int deviceSpec, + unsigned int timeout, unsigned int interval) { register xkbSetControlsReq *req; @@ -72,7 +72,7 @@ XkbSetAutoRepeatRate( Display *dpy, return True; } -Bool +Bool XkbGetAutoRepeatRate( Display * dpy, unsigned int deviceSpec, unsigned int * timeoutp, @@ -91,7 +91,7 @@ XkbGetAutoRepeatRate( Display * dpy, req->reqType = xkbi->codes->major_opcode; req->xkbReqType = X_kbGetControls; req->deviceSpec = deviceSpec; - if (!_XReply(dpy, (xReply *)&rep, + if (!_XReply(dpy, (xReply *)&rep, (SIZEOF(xkbGetControlsReply)-SIZEOF(xReply))>>2, xFalse)) { UnlockDisplay(dpy); SyncHandle(); @@ -175,7 +175,7 @@ XkbChangeEnabledControls( Display * dpy, return True; } -Status +Status XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb) { register xkbGetControlsReq *req; @@ -198,12 +198,12 @@ XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb) UnlockDisplay(dpy); SyncHandle(); return BadAlloc; - } + } } req->reqType = xkbi->codes->major_opcode; req->xkbReqType = X_kbGetControls; req->deviceSpec = xkb->device_spec; - if (!_XReply(dpy, (xReply *)&rep, + if (!_XReply(dpy, (xReply *)&rep, (SIZEOF(xkbGetControlsReply)-SIZEOF(xReply))>>2, xFalse)) { UnlockDisplay(dpy); SyncHandle(); @@ -264,14 +264,14 @@ XkbGetControls(Display *dpy, unsigned long which, XkbDescPtr xkb) } if (which&XkbPerKeyRepeatMask) { memcpy(ctrls->per_key_repeat,rep.perKeyRepeat, - XkbPerKeyBitArraySize); + XkbPerKeyBitArraySize); } UnlockDisplay(dpy); SyncHandle(); return Success; } -Bool +Bool XkbSetControls(Display *dpy, unsigned long which, XkbDescPtr xkb) { register xkbSetControlsReq *req; diff --git a/libX11/src/xkb/XKBCvt.c b/libX11/src/xkb/XKBCvt.c index 056f39f40..2f7f1a142 100644 --- a/libX11/src/xkb/XKBCvt.c +++ b/libX11/src/xkb/XKBCvt.c @@ -57,7 +57,7 @@ from The Open Group. #define XKB_EXTEND_LOOKUP_STRING #endif -static int +static int _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn) { @@ -65,14 +65,14 @@ _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn) if (!(((keysym >= XK_BackSpace) && (keysym <= XK_Clear)) || (keysym == XK_Return) || (keysym == XK_Escape) || (keysym == XK_KP_Space) || (keysym == XK_KP_Tab) || - (keysym == XK_KP_Enter) || + (keysym == XK_KP_Enter) || ((keysym >= XK_KP_Multiply) && (keysym <= XK_KP_9)) || (keysym == XK_KP_Equal) || (keysym == XK_Delete))) return 0; if (nbytes<1) { - if (extra_rtrn) + if (extra_rtrn) *extra_rtrn= 1; return 0; } @@ -86,7 +86,7 @@ _XkbHandleSpecialSym(KeySym keysym, char *buffer, int nbytes, int *extra_rtrn) } /*ARGSUSED*/ -static int +static int _XkbKSToKnownSet ( XPointer priv, KeySym keysym, char * buffer, @@ -144,7 +144,7 @@ _XkbKnownSetToKS(XPointer priv,char *buffer,int nbytes,Status *status) return NoSymbol; if (((buffer[0]&0x80)==0)&&(buffer[0]>=32)) return buffer[0]; - else if ((buffer[0]&0x7f)>=32) { + else if ((buffer[0]&0x7f)>=32) { XkbToKS *map= (XkbToKS *)priv; if ( map ) { if ( map->map ) return map->prefix|map->map[buffer[0]&0x7f]; @@ -188,7 +188,7 @@ Strcmp(char *str1, char *str2) } #endif -int +int _XkbGetConverters(const char *encoding_name, XkbConverters *cvt_rtrn) { if ( !cvt_rtrn ) return 0; @@ -203,14 +203,14 @@ _XkbGetConverters(const char *encoding_name, XkbConverters *cvt_rtrn) /***====================================================================***/ -/* +/* * The function _XkbGetCharset seems to be missnamed as what it seems to * be used for is to determine the encoding-name for the locale. ??? */ #ifdef XKB_EXTEND_LOOKUP_STRING -/* +/* * XKB_EXTEND_LOOKUP_STRING is not used by the SI. It is used by various * X Consortium/X Project Team members, so we leave it in the source as * an simplify integration by these companies. @@ -258,7 +258,7 @@ _XkbGetCharset(void) return buf; } } - else { + else { charset = NULL; } @@ -278,7 +278,7 @@ _XkbGetCharset(void) #ifndef S_ISREG # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) #endif - + if ( (stat(cf,&sbuf)==0) && S_ISREG(sbuf.st_mode) && (file = fopen(cf,"r")) ) { tmp = _XkbAlloc(sbuf.st_size+1); @@ -301,7 +301,7 @@ _XkbGetCharset(void) if ( (set=strchr(tmp,'=')) == NULL ) break; *set++ = '\0'; - if ( (next=strchr(set,':')) != NULL ) + if ( (next=strchr(set,':')) != NULL ) *next++ = '\0'; while ( tmp && *tmp ) { if ( (end=strchr(tmp,',')) != NULL ) diff --git a/libX11/src/xkb/XKBExtDev.c b/libX11/src/xkb/XKBExtDev.c index a22a29981..011f3bc33 100644 --- a/libX11/src/xkb/XKBExtDev.c +++ b/libX11/src/xkb/XKBExtDev.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -176,7 +176,7 @@ XkbReadBufferRec buf; XkbAction * act; int tmp; - if (!_XkbInitReadBuffer(dpy,&buf,(int)rep->length*4)) + if (!_XkbInitReadBuffer(dpy,&buf,(int)rep->length*4)) return BadAlloc; if ((rep->totalBtns>0)&&(rep->totalBtns!=devi->num_btns)) { @@ -207,7 +207,7 @@ int tmp; } } tmp= _XkbFreeReadBuffer(&buf); - if (tmp) + if (tmp) fprintf(stderr,"GetDeviceInfo! Bad length (%d extra bytes)\n",tmp); if (tmp || buf.error) return BadLength; @@ -337,7 +337,7 @@ XkbGetDeviceButtonActions( Display * dpy, xkbGetDeviceInfoReply rep; Status status; - if ((dpy->flags & XlibDisplayNoXkb) || + if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) return BadMatch; if (!devi) @@ -378,7 +378,7 @@ XkbGetDeviceLedInfo( Display * dpy, xkbGetDeviceInfoReply rep; Status status; - if ((dpy->flags & XlibDisplayNoXkb) || + if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) return BadMatch; if (((which&XkbXI_IndicatorsMask)==0)||(which&(~XkbXI_IndicatorsMask))) @@ -399,7 +399,7 @@ XkbGetDeviceLedInfo( Display * dpy, UnlockDisplay(dpy); SyncHandle(); return BadLength; - } + } devi->type= rep.devType; devi->supported= rep.supported; devi->unsupported= rep.unsupported; @@ -759,7 +759,7 @@ XkbChangeDeviceInfo( Display * dpy, return ok; } -Bool +Bool XkbSetDeviceLedInfo( Display * dpy, XkbDeviceInfoPtr devi, unsigned ledClass, @@ -769,7 +769,7 @@ XkbSetDeviceLedInfo( Display * dpy, return False; } -Bool +Bool XkbSetDeviceButtonActions( Display * dpy, XkbDeviceInfoPtr devi, unsigned int first, diff --git a/libX11/src/xkb/XKBGAlloc.c b/libX11/src/xkb/XKBGAlloc.c index fddb770b6..b3c3e342c 100644 --- a/libX11/src/xkb/XKBGAlloc.c +++ b/libX11/src/xkb/XKBGAlloc.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -43,7 +43,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#else +#else #include #include @@ -63,7 +63,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ -static void +static void _XkbFreeGeomLeafElems( Bool freeAll, int first, int count, @@ -77,14 +77,14 @@ _XkbFreeGeomLeafElems( Bool freeAll, if (*elems!=NULL) { _XkbFree(*elems); *elems= NULL; - } + } return; } if ((first>=(*num_inout))||(first<0)||(count<1)) return; - if (first+count>=(*num_inout)) { + if (first+count>=(*num_inout)) { /* truncating the array is easy */ (*num_inout)= first; } @@ -104,7 +104,7 @@ typedef void (*ContentsClearFunc)( char * /* priv */ ); -static void +static void _XkbFreeGeomNonLeafElems( Bool freeAll, int first, int count, @@ -192,7 +192,7 @@ XkbFreeGeomKeyAliases( XkbGeometryPtr geom, int first, int count, Bool freeAll) -{ +{ _XkbFreeGeomLeafElems(freeAll,first,count, &geom->num_key_aliases,&geom->sz_key_aliases, (char **)&geom->key_aliases, @@ -253,7 +253,7 @@ XkbFreeGeomOutlines(XkbShapePtr shape,int first,int count,Bool freeAll) &shape->num_outlines,&shape->sz_outlines, (char **)&shape->outlines, sizeof(XkbOutlineRec),_XkbClearOutline); - + return; } @@ -281,7 +281,7 @@ XkbFreeGeomShapes(XkbGeometryPtr geom,int first,int count,Bool freeAll) /***====================================================================***/ -void +void XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row,int first,int count,Bool freeAll) { _XkbFreeGeomLeafElems(freeAll,first,count, @@ -402,7 +402,7 @@ _XkbClearDoodad(char *doodad_in) XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; switch (doodad->any.type) { - case XkbTextDoodad: + case XkbTextDoodad: { if (doodad->text.text!=NULL) { _XkbFree(doodad->text.text); @@ -414,7 +414,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; } } break; - case XkbLogoDoodad: + case XkbLogoDoodad: { if (doodad->logo.logo_name!=NULL) { _XkbFree(doodad->logo.logo_name); @@ -547,7 +547,7 @@ _XkbGeomAlloc( XPointer * old, #define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((XPointer *)&(r)->keys,\ &(r)->num_keys,&(r)->sz_keys,\ (n),sizeof(XkbOverlayKeyRec)) - + Status XkbAllocGeomProps(XkbGeometryPtr geom,int nProps) { @@ -693,7 +693,7 @@ register XkbPropertyPtr prop; if (prop->value) strcpy(prop->value,value); return prop; - } + } } if ((geom->num_properties>=geom->sz_properties)&& (_XkbAllocProps(geom,1)!=Success)) { @@ -950,7 +950,7 @@ Bool found; } } if (!found) - return NULL; + return NULL; if ((row->num_keys>=row->sz_keys)&&(_XkbAllocOverlayKeys(row,1)!=Success)) return NULL; key= &row->keys[row->num_keys]; diff --git a/libX11/src/xkb/XKBGeom.c b/libX11/src/xkb/XKBGeom.c index 6eca6d5b0..d0590da4c 100644 --- a/libX11/src/xkb/XKBGeom.c +++ b/libX11/src/xkb/XKBGeom.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -620,7 +620,7 @@ XkbGeometryPtr geom; status= _XkbReadGeomKeyAliases(&buf,geom,rep); left= _XkbFreeReadBuffer(&buf); if ((status!=Success) || left || buf.error) { - if (status==Success) + if (status==Success) status= BadLength; XkbFreeGeometry(geom,XkbGeomAllMask,True); xkb->geom= NULL; @@ -648,7 +648,7 @@ Status status; if ( (!xkb) || (dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) return BadAccess; - + LockDisplay(dpy); GetReq(kbGetGeometry, req); req->reqType = dpy->xkb_info->codes->major_opcode; @@ -676,7 +676,7 @@ Status status; if ( (name==None) || (dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL)) ) return BadAccess; - + LockDisplay(dpy); GetReq(kbGetGeometry, req); req->reqType = dpy->xkb_info->codes->major_opcode; diff --git a/libX11/src/xkb/XKBGetByName.c b/libX11/src/xkb/XKBGetByName.c index 2c6ff0849..c44bd4bbf 100644 --- a/libX11/src/xkb/XKBGetByName.c +++ b/libX11/src/xkb/XKBGetByName.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. diff --git a/libX11/src/xkb/XKBGetMap.c b/libX11/src/xkb/XKBGetMap.c index 59e996216..54d9f335a 100644 --- a/libX11/src/xkb/XKBGetMap.c +++ b/libX11/src/xkb/XKBGetMap.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -108,7 +108,7 @@ XkbKeyTypePtr type; type->num_levels = desc->numLevels; type->map_count = desc->nMapEntries; if (desc->nMapEntries>0) { - register xkbKTMapEntryWireDesc *wire; + register xkbKTMapEntryWireDesc *wire; register XkbKTMapEntryPtr entry; register int size; @@ -126,7 +126,7 @@ XkbKeyTypePtr type; } if (desc->preserve) { - register xkbModsWireDesc * pwire; + register xkbModsWireDesc * pwire; register XkbModsPtr preserve; register int sz; @@ -519,7 +519,7 @@ _XkbHandleGetMapReply(Display *dpy,XkbDescPtr xkb) xkbGetMapReply rep; if (!_XReply(dpy, (xReply *)&rep, - ( (SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply)) >> 2 ), + ( (SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply)) >> 2 ), xFalse)) { return BadImplementation; } diff --git a/libX11/src/xkb/XKBList.c b/libX11/src/xkb/XKBList.c index 2f4a53490..f348f1c70 100644 --- a/libX11/src/xkb/XKBList.c +++ b/libX11/src/xkb/XKBList.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -188,7 +188,7 @@ int extraLen,len,mapLen,codesLen,typesLen,compatLen,symsLen,geomLen; } if (_XkbInitReadBuffer(dpy,&buf,extraLen)) { Status status; - + status= Success; list= _XkbTypedCalloc(1,XkbComponentListRec); if (!list) { diff --git a/libX11/src/xkb/XKBMAlloc.c b/libX11/src/xkb/XKBMAlloc.c index 08f29bb00..b1ba3ed20 100644 --- a/libX11/src/xkb/XKBMAlloc.c +++ b/libX11/src/xkb/XKBMAlloc.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -42,7 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "XKBlibint.h" -#else +#else #include #include @@ -104,7 +104,7 @@ fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n", return BadAlloc; } map->size_types= nTotalTypes; - bzero(&map->types[map->num_types], + bzero(&map->types[map->num_types], ((map->size_types-map->num_types)*sizeof(XkbKeyTypeRec))); } } @@ -197,7 +197,7 @@ XkbServerMapPtr map; return BadAlloc; } map->size_acts= need; - bzero(&map->acts[map->num_acts], + bzero(&map->acts[map->num_acts], ((map->size_acts-map->num_acts)*sizeof(XkbAction))); } if (map->key_acts==NULL) { @@ -409,7 +409,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; if ((map_count>type->map_count)||(type->map==NULL)) type->map=_XkbTypedRealloc(type->map,map_count,XkbKTMapEntryRec); if (!type->map) { - if (prev_map) + if (prev_map) _XkbFree(prev_map); return BadAlloc; } @@ -421,7 +421,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; XkbModsRec); } if (!type->preserve) { - if (prev_preserve) + if (prev_preserve) _XkbFree(prev_preserve); return BadAlloc; } @@ -438,7 +438,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; type->level_names=_XkbTypedRealloc(type->level_names,new_num_lvls,Atom); if (!type->level_names) { - if (prev_level_names) + if (prev_level_names) _XkbFree(prev_level_names); return BadAlloc; } @@ -457,7 +457,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; * might have to be enlarged. * If the key type decreased in size: * - keys that have a group width > the old width don't have to be - * resized (because they must have some other wider type associated + * resized (because they must have some other wider type associated * with some group). * + keys that have a group width == the old width might have to be * shrunk. diff --git a/libX11/src/xkb/XKBMisc.c b/libX11/src/xkb/XKBMisc.c index 515b2937e..3205b808e 100644 --- a/libX11/src/xkb/XKBMisc.c +++ b/libX11/src/xkb/XKBMisc.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -42,7 +42,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "XKBlibint.h" -#else +#else #include #include @@ -60,11 +60,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ #define mapSize(m) (sizeof(m)/sizeof(XkbKTMapEntryRec)) -static XkbKTMapEntryRec map2Level[]= { +static XkbKTMapEntryRec map2Level[]= { { True, ShiftMask, {1, ShiftMask, 0} } }; -static XkbKTMapEntryRec mapAlpha[]= { +static XkbKTMapEntryRec mapAlpha[]= { { True, ShiftMask, { 1, ShiftMask, 0 } }, { True, LockMask, { 0, LockMask, 0 } } }; @@ -75,25 +75,25 @@ static XkbModsRec preAlpha[]= { }; #define NL_VMOD_MASK 0 -static XkbKTMapEntryRec mapKeypad[]= { +static XkbKTMapEntryRec mapKeypad[]= { { True, ShiftMask, { 1, ShiftMask, 0 } }, { False, 0, { 1, 0, NL_VMOD_MASK } } }; static XkbKeyTypeRec canonicalTypes[XkbNumRequiredTypes] = { - { { 0, 0, 0 }, + { { 0, 0, 0 }, 1, /* num_levels */ 0, /* map_count */ NULL, NULL, None, NULL }, - { { ShiftMask, ShiftMask, 0 }, + { { ShiftMask, ShiftMask, 0 }, 2, /* num_levels */ mapSize(map2Level), /* map_count */ map2Level, NULL, None, NULL }, - { { ShiftMask|LockMask, ShiftMask|LockMask, 0 }, + { { ShiftMask|LockMask, ShiftMask|LockMask, 0 }, 2, /* num_levels */ mapSize(mapAlpha), /* map_count */ mapAlpha, preAlpha, @@ -427,7 +427,7 @@ XkbApplyCompatMapToKey(XkbDescPtr xkb,KeyCode key,XkbChangesPtr changes) { KeySym * syms; unsigned char explicit,mods; -XkbSymInterpretPtr *interps,ibuf[IBUF_SIZE]; +XkbSymInterpretPtr *interps,ibuf[IBUF_SIZE]; int n,nSyms,found; unsigned changed,tmp; @@ -669,7 +669,7 @@ register int i; int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups]; if ((!xkb) || (!XkbKeycodeInRange(xkb,key)) || (!xkb->map) || - (!xkb->map->types)||(!newTypes)||((groups&XkbAllGroupsMask)==0)|| + (!xkb->map->types)||((groups&XkbAllGroupsMask)==0)|| (nGroups>XkbNumKbdGroups)) { return BadMatch; } diff --git a/libX11/src/xkb/XKBNames.c b/libX11/src/xkb/XKBNames.c index a8eeb2adf..aad72c15a 100644 --- a/libX11/src/xkb/XKBNames.c +++ b/libX11/src/xkb/XKBNames.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -362,7 +362,7 @@ XkbSetNames( Display * dpy, } } } - + nVMods= nLEDs= nRG= nKA= nAtoms= nGroups= 0; LockDisplay(dpy); xkbi = dpy->xkb_info; @@ -407,7 +407,7 @@ XkbSetNames( Display * dpy, else req->indicators= leds= 0; if (which&XkbVirtualModNamesMask) { - vmods= req->virtualMods= (CARD16) + vmods= req->virtualMods= (CARD16) _XkbCountAtoms(names->vmods,XkbNumVirtualMods,&nVMods); if (nVMods>0) nAtoms+= nVMods; @@ -563,7 +563,7 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes) firstLvlType= changes->first_lvl;; nLvlTypes= changes->num_lvls; if (which&XkbKeyTypeNamesMask) { - if (nTypes<1) + if (nTypes<1) which&= ~XkbKeyTypeNamesMask; else if (firstType<=XkbLastRequiredType) { int adjust; @@ -622,7 +622,7 @@ XkbChangeNames(Display *dpy,XkbDescPtr xkb,XkbNameChangesPtr changes) changes->changed_groups= 0; else if (changes->changed_groups==0) which&= ~XkbGroupNamesMask; - + nVMods= nLEDs= nRG= nKA= nAtoms= nGroups= 0; LockDisplay(dpy); xkbi = dpy->xkb_info; @@ -882,9 +882,9 @@ int first,last,old_last,new_last; old->changed_groups|= new->changed_groups; else old->changed_groups= new->changed_groups; } - if (wanted&XkbRGNamesMask) + if (wanted&XkbRGNamesMask) old->num_rg= new->num_radio_groups; - if (wanted&XkbKeyAliasesMask) + if (wanted&XkbKeyAliasesMask) old->num_aliases= new->num_aliases; old->changed|= wanted; return; diff --git a/libX11/src/xkb/XKBRdBuf.c b/libX11/src/xkb/XKBRdBuf.c index 097630f07..7fe845298 100644 --- a/libX11/src/xkb/XKBRdBuf.c +++ b/libX11/src/xkb/XKBRdBuf.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -38,7 +38,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. /***====================================================================***/ -int +int _XkbInitReadBuffer(Display *dpy,XkbReadBufferPtr buf,int size) { if ((dpy!=NULL) && (buf!=NULL) && (size>0)) { diff --git a/libX11/src/xkb/XKBSetGeom.c b/libX11/src/xkb/XKBSetGeom.c index 8e4d8b1b3..afda18660 100644 --- a/libX11/src/xkb/XKBSetGeom.c +++ b/libX11/src/xkb/XKBSetGeom.c @@ -8,19 +8,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -71,7 +71,7 @@ _SizeGeomProperties(XkbGeometryPtr geom) { register int i,size; XkbPropertyPtr prop; - + for (size=i=0,prop=geom->properties;inum_properties;i++,prop++) { size+= _SizeCountedString(prop->name); size+= _SizeCountedString(prop->value); @@ -175,7 +175,7 @@ _WriteGeomProperties(char *wire,XkbGeometryPtr geom) { register int i; register XkbPropertyPtr prop; - + for (i=0,prop=geom->properties;inum_properties;i++,prop++) { wire= _WriteCountedString(wire,prop->name); wire= _WriteCountedString(wire,prop->value); @@ -378,7 +378,7 @@ static char * _WriteGeomKeyAliases(char *wire,XkbGeometryPtr geom) { register int sz; - + sz= geom->num_key_aliases*(XkbKeyNameLength*2); if (sz>0) { memcpy(wire,(char *)geom->key_aliases,sz); @@ -445,7 +445,7 @@ Status ret; if ( (!geom) || (dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) return BadAccess; - + LockDisplay(dpy); GetReq(kbSetGeometry, req); req->reqType = dpy->xkb_info->codes->major_opcode; diff --git a/libX11/src/xkb/XKBSetMap.c b/libX11/src/xkb/XKBSetMap.c index 4a3b15c70..d513c49ce 100644 --- a/libX11/src/xkb/XKBSetMap.c +++ b/libX11/src/xkb/XKBSetMap.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -324,7 +324,7 @@ CARD8 * wire; if ((req->present&XkbExplicitComponentsMask)==0) return; first= req->firstKeyExplicit; - last= first+req->nKeyExplicit; + last= first+req->nKeyExplicit - 1; i= XkbPaddedSize((req->totalKeyExplicit*2)); BufAlloc(CARD8 *,wire,i); for (i=first;i<=last;i++) { diff --git a/libX11/src/xkb/XKBUse.c b/libX11/src/xkb/XKBUse.c index ad18bb6fc..5bc3c4bd5 100644 --- a/libX11/src/xkb/XKBUse.c +++ b/libX11/src/xkb/XKBUse.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -232,7 +232,7 @@ wire_to_event(Display *dpy,XEvent *re,xEvent *event) (xGenericReply *)event); sev->send_event = ((event->u.u.type & 0x80) != 0); sev->display = dpy; - sev->time = sn->time; + sev->time = sn->time; sev->device = sn->deviceID; sev->keycode = sn->keycode; sev->event_type = sn->eventType; @@ -749,7 +749,7 @@ XkbUseExtension(Display *dpy,int *major_rtrn,int *minor_rtrn) fail= True; if (debugMsg) fprintf(stderr, - "XKEYBOARD version mismatch (want %d.%02d, got %d.%02d)\n", + "XKEYBOARD version mismatch (want %d.%02d, got %d.%02d)\n", XkbMajorVersion,XkbMinorVersion, rep.serverMajor, rep.serverMinor); diff --git a/libX11/src/xkb/XKBleds.c b/libX11/src/xkb/XKBleds.c index 865342c46..e0cc14b44 100644 --- a/libX11/src/xkb/XKBleds.c +++ b/libX11/src/xkb/XKBleds.c @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -43,7 +43,7 @@ XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn) xkbGetIndicatorStateReply rep; XkbInfoPtr xkbi; Bool ok; - + if ((dpy->flags & XlibDisplayNoXkb) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) return BadAccess; @@ -61,7 +61,7 @@ XkbGetIndicatorState(Display *dpy,unsigned deviceSpec,unsigned *pStateRtrn) return (ok?Success:BadImplementation); } -Status +Status _XkbReadGetIndicatorMapReply( Display * dpy, xkbGetIndicatorMapReply * rep, XkbDescPtr xkb, @@ -210,7 +210,7 @@ XkbGetNamedDeviceIndicator( Display * dpy, register xkbGetNamedIndicatorReq *req; xkbGetNamedIndicatorReply rep; XkbInfoPtr xkbi; - + if ((dpy->flags & XlibDisplayNoXkb) || (name==None) || (!dpy->xkb_info && !XkbUseExtension(dpy,NULL,NULL))) return False; @@ -246,7 +246,7 @@ XkbGetNamedDeviceIndicator( Display * dpy, pMapRtrn->mods.vmods= rep.virtualMods; pMapRtrn->ctrls= rep.ctrls; } - if (pRealRtrn!=NULL) + if (pRealRtrn!=NULL) *pRealRtrn= rep.realIndicator; return True; } diff --git a/libX11/src/xkb/XKBlibint.h b/libX11/src/xkb/XKBlibint.h index ededdaa72..158288ecd 100644 --- a/libX11/src/xkb/XKBlibint.h +++ b/libX11/src/xkb/XKBlibint.h @@ -7,19 +7,19 @@ software and its documentation for any purpose and without fee is hereby granted, 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 Silicon Graphics not be -used in advertising or publicity pertaining to distribution +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability +Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS 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 +GRAPHICS 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. @@ -106,7 +106,7 @@ typedef struct _XkbInfoRec { #define XKB_XLIB_MAP_MASK (XkbAllClientInfoMask) /* - * Handy helper macros + * Handy helper macros */ #define XKB_INSURE_SIZE(f,t,nNum,oNum) {\ if ((f)==NULL) \ @@ -159,7 +159,7 @@ extern KeySym _XLookupKeysym( ); extern int _XRefreshKeyboardMapping( - XMappingEvent* /* event_map */ + XMappingEvent* /* event_map */ ); extern unsigned _XKeysymToModifiers( @@ -167,7 +167,7 @@ extern unsigned _XKeysymToModifiers( KeySym /* ks */ ); -extern int _XTranslateKey( +extern int _XTranslateKey( register Display * /* dpy */, KeyCode /* keycode */, register unsigned int /* modifiers */, diff --git a/libX11/src/xlibi18n/ICWrap.c b/libX11/src/xlibi18n/ICWrap.c index b51da6f41..3708229b9 100644 --- a/libX11/src/xlibi18n/ICWrap.c +++ b/libX11/src/xlibi18n/ICWrap.c @@ -13,30 +13,30 @@ * 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 names of OMRON, NTT Software, NTT, and - * Open Software Foundation not be used in advertising or publicity - * pertaining to distribution of the software without specific, + * Open Software Foundation not be used in advertising or publicity + * pertaining to distribution of the software without specific, * written prior permission. OMRON, NTT Software, NTT, and Open Software * Foundation make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * - * OMRON, NTT SOFTWARE, NTT, AND OPEN SOFTWARE FOUNDATION - * DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT + * OMRON, NTT SOFTWARE, NTT, AND OPEN SOFTWARE FOUNDATION + * DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT * SHALL OMRON, NTT SOFTWARE, NTT, OR OPEN SOFTWARE FOUNDATION BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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: Li Yuhong OMRON Corporation * Tatsuya Kato NTT Software Corporation * Hiroshi Kuribayashi OMRON Coproration * Muneiyoshi Suzuki Nippon Telegraph and Telephone Co. - * - * M. Collins OSF + * + * M. Collins OSF * Takashi Fujiwara FUJITSU LIMITED - */ + */ /* Copyright 1991, 1998 The Open Group @@ -224,7 +224,7 @@ XGetIMValues(XIM im, ...) } /* - * Create an input context within the input method, + * Create an input context within the input method, * and return a pointer to the input context. */ @@ -235,7 +235,7 @@ XCreateIC(XIM im, ...) int total_count; XIMArg *args; XIC ic; - + /* * so count the stuff dangling here */ @@ -263,8 +263,7 @@ XCreateIC(XIM im, ...) * Free the input context. */ void -XDestroyIC(ic) - XIC ic; +XDestroyIC(XIC ic) { XIM im = ic->core.im; XIC *prev; @@ -283,7 +282,7 @@ XDestroyIC(ic) char * XGetICValues(XIC ic, ...) -{ +{ va_list var; int total_count; XIMArg *args; @@ -346,8 +345,7 @@ XSetICValues(XIC ic, ...) * argument. */ void -XSetICFocus(ic) - XIC ic; +XSetICFocus(XIC ic) { if (ic && ic->core.im) (*ic->methods->set_focus) (ic); @@ -358,8 +356,7 @@ XSetICFocus(ic) * argument. */ void -XUnsetICFocus(ic) - XIC ic; +XUnsetICFocus(XIC ic) { if (ic->core.im) (*ic->methods->unset_focus) (ic); @@ -369,15 +366,13 @@ XUnsetICFocus(ic) * Return the XIM associated with the input context. */ XIM -XIMOfIC(ic) - XIC ic; +XIMOfIC(XIC ic) { return ic->core.im; } char * -XmbResetIC(ic) - XIC ic; +XmbResetIC(XIC ic) { if (ic->core.im) return (*ic->methods->mb_reset)(ic); @@ -385,8 +380,7 @@ XmbResetIC(ic) } wchar_t * -XwcResetIC(ic) - XIC ic; +XwcResetIC(XIC ic) { if (ic->core.im) return (*ic->methods->wc_reset)(ic); @@ -394,8 +388,7 @@ XwcResetIC(ic) } char * -Xutf8ResetIC(ic) - XIC ic; +Xutf8ResetIC(XIC ic) { if (ic->core.im) { if (ic->methods->utf8_reset) @@ -407,13 +400,8 @@ Xutf8ResetIC(ic) } int -XmbLookupString(ic, ev, buffer, nbytes, keysym, status) - XIC ic; - register XKeyEvent *ev; - char *buffer; - int nbytes; - KeySym *keysym; - Status *status; +XmbLookupString(XIC ic, XKeyEvent *ev, char *buffer, int nbytes, + KeySym *keysym, Status *status) { if (ic->core.im) return (*ic->methods->mb_lookup_string) (ic, ev, buffer, nbytes, @@ -422,13 +410,8 @@ XmbLookupString(ic, ev, buffer, nbytes, keysym, status) } int -XwcLookupString(ic, ev, buffer, nchars, keysym, status) - XIC ic; - register XKeyEvent *ev; - wchar_t *buffer; - int nchars; - KeySym *keysym; - Status *status; +XwcLookupString(XIC ic, XKeyEvent *ev, wchar_t *buffer, int nchars, + KeySym *keysym, Status *status) { if (ic->core.im) return (*ic->methods->wc_lookup_string) (ic, ev, buffer, nchars, @@ -437,13 +420,8 @@ XwcLookupString(ic, ev, buffer, nchars, keysym, status) } int -Xutf8LookupString(ic, ev, buffer, nbytes, keysym, status) - XIC ic; - register XKeyEvent *ev; - char *buffer; - int nbytes; - KeySym *keysym; - Status *status; +Xutf8LookupString(XIC ic, XKeyEvent *ev, char *buffer, int nbytes, + KeySym *keysym, Status *status) { if (ic->core.im) { if (ic->methods->utf8_lookup_string) diff --git a/libX11/src/xlibi18n/IMWrap.c b/libX11/src/xlibi18n/IMWrap.c index a90b40675..1e5b8f0b4 100644 --- a/libX11/src/xlibi18n/IMWrap.c +++ b/libX11/src/xlibi18n/IMWrap.c @@ -11,10 +11,10 @@ * 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 names of Open Software Foundation and - * Sony Corporation not be used in advertising or publicity pertaining to - * distribution of the software without specific, written prior permission. - * Open Software Foundation and Sony Corporation make no - * representations about the suitability of this software for any purpose. + * Sony Corporation not be used in advertising or publicity pertaining to + * distribution of the software without specific, written prior permission. + * Open Software Foundation and Sony Corporation make no + * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * OPEN SOFTWARE FOUNDATION AND SONY CORPORATION DISCLAIM ALL @@ -24,11 +24,11 @@ * 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. - * - * M. Collins OSF + * PERFORMANCE OF THIS SOFTWARE. + * + * M. Collins OSF * Makoto Wakamatsu Sony Corporation - */ + */ /* Copyright 1991, 1998 The Open Group @@ -69,9 +69,7 @@ from The Open Group. * Compile the resource name. (resource_name ---> xrm_name) */ void -_XIMCompileResourceList(res, num_res) - register XIMResourceList res; - unsigned int num_res; +_XIMCompileResourceList(XIMResourceList res, unsigned int num_res) { register unsigned int count; @@ -81,10 +79,7 @@ _XIMCompileResourceList(res, num_res) } void -_XCopyToArg(src, dst, size) - XPointer src; - XPointer *dst; - register unsigned int size; +_XCopyToArg(XPointer src, XPointer *dst, unsigned int size) { if (!*dst) { union { @@ -121,12 +116,8 @@ _XCopyToArg(src, dst, size) * a XIM object and return a pointer the newly created XIM back to the caller. */ -XIM -XOpenIM( display, rdb, res_name, res_class ) - Display *display; - XrmDatabase rdb; - char *res_name; - char *res_class; +XIM +XOpenIM(Display *display, XrmDatabase rdb, char *res_name, char *res_class) { XLCd lcd = _XOpenLC( (char *)NULL ); @@ -139,13 +130,12 @@ XOpenIM( display, rdb, res_name, res_class ) * Close the connection to the input manager, and free the XIM structure */ Status -XCloseIM(im) - XIM im; +XCloseIM(XIM im) { Status s; XIC ic; XLCd lcd = im->core.lcd; - + s = (im->methods->close) (im); for (ic = im->core.ic_chain; ic; ic = ic->core.next) ic->core.im = (XIM)NULL; @@ -158,8 +148,7 @@ XCloseIM(im) * Return the Display associated with the input method. */ Display * -XDisplayOfIM(im) - XIM im; +XDisplayOfIM(XIM im) { return im->core.display; } @@ -168,8 +157,7 @@ XDisplayOfIM(im) * Return the Locale associated with the input method. */ char * -XLocaleOfIM(im) - XIM im; +XLocaleOfIM(XIM im) { return im->core.lcd->core->name; } diff --git a/libX11/src/xlibi18n/Makefile.am b/libX11/src/xlibi18n/Makefile.am index b97316a1b..9582a6561 100644 --- a/libX11/src/xlibi18n/Makefile.am +++ b/libX11/src/xlibi18n/Makefile.am @@ -91,11 +91,13 @@ libi18n_la_SOURCES = \ lcUniConv/ascii.h\ lcUniConv/big5.h\ lcUniConv/big5_emacs.h\ + lcUniConv/big5hkscs.h\ lcUniConv/cp1133.h\ lcUniConv/cp1251.h\ lcUniConv/cp1255.h\ lcUniConv/cp1256.h\ lcUniConv/gb2312.h\ + lcUniConv/gbk.h\ lcUniConv/georgian_academy.h\ lcUniConv/georgian_ps.h\ lcUniConv/iso8859_1.h\ diff --git a/libX11/src/xlibi18n/Makefile.in b/libX11/src/xlibi18n/Makefile.in index dab91b7dc..8c2e0d89b 100644 --- a/libX11/src/xlibi18n/Makefile.in +++ b/libX11/src/xlibi18n/Makefile.in @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.10.1 from Makefile.am. +# Makefile.in generated by automake 1.11 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,8 +17,9 @@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -43,6 +45,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h \ $(top_builddir)/include/X11/XlibConf.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libi18n_la_DEPENDENCIES = $(IM_LIBS) $(LC_LIBS) $(OM_LIBS) am__libi18n_la_SOURCES_DIST = XlcDL.c XlcSL.c XDefaultIMIF.c \ @@ -54,23 +57,23 @@ am__libi18n_la_SOURCES_DIST = XlcDL.c XlcSL.c XDefaultIMIF.c \ XimImSw.h XimProto.h XimThai.h XimTrInt.h XimTrX.h XimTrans.h \ Ximint.h XimintL.h XimintP.h XlcGeneric.h XlcPubI.h \ XlcPublic.h Xlcint.h lcUniConv/armscii_8.h lcUniConv/ascii.h \ - lcUniConv/big5.h lcUniConv/big5_emacs.h lcUniConv/cp1133.h \ - lcUniConv/cp1251.h lcUniConv/cp1255.h lcUniConv/cp1256.h \ - lcUniConv/gb2312.h lcUniConv/georgian_academy.h \ - lcUniConv/georgian_ps.h lcUniConv/iso8859_1.h \ - lcUniConv/iso8859_10.h lcUniConv/iso8859_11.h \ - lcUniConv/iso8859_13.h lcUniConv/iso8859_14.h \ - lcUniConv/iso8859_15.h lcUniConv/iso8859_16.h \ - lcUniConv/iso8859_2.h lcUniConv/iso8859_3.h \ - lcUniConv/iso8859_4.h lcUniConv/iso8859_5.h \ - lcUniConv/iso8859_6.h lcUniConv/iso8859_7.h \ - lcUniConv/iso8859_8.h lcUniConv/iso8859_9.h \ - lcUniConv/iso8859_9e.h lcUniConv/jisx0201.h \ - lcUniConv/jisx0208.h lcUniConv/jisx0212.h lcUniConv/koi8_c.h \ - lcUniConv/koi8_r.h lcUniConv/koi8_u.h lcUniConv/ksc5601.h \ - lcUniConv/mulelao.h lcUniConv/tatar_cyr.h lcUniConv/tcvn.h \ - lcUniConv/tis620.h lcUniConv/ucs2be.h lcUniConv/utf8.h \ - lcUniConv/viscii.h + lcUniConv/big5.h lcUniConv/big5_emacs.h lcUniConv/big5hkscs.h \ + lcUniConv/cp1133.h lcUniConv/cp1251.h lcUniConv/cp1255.h \ + lcUniConv/cp1256.h lcUniConv/gb2312.h lcUniConv/gbk.h \ + lcUniConv/georgian_academy.h lcUniConv/georgian_ps.h \ + lcUniConv/iso8859_1.h lcUniConv/iso8859_10.h \ + lcUniConv/iso8859_11.h lcUniConv/iso8859_13.h \ + lcUniConv/iso8859_14.h lcUniConv/iso8859_15.h \ + lcUniConv/iso8859_16.h lcUniConv/iso8859_2.h \ + lcUniConv/iso8859_3.h lcUniConv/iso8859_4.h \ + lcUniConv/iso8859_5.h lcUniConv/iso8859_6.h \ + lcUniConv/iso8859_7.h lcUniConv/iso8859_8.h \ + lcUniConv/iso8859_9.h lcUniConv/iso8859_9e.h \ + lcUniConv/jisx0201.h lcUniConv/jisx0208.h lcUniConv/jisx0212.h \ + lcUniConv/koi8_c.h lcUniConv/koi8_r.h lcUniConv/koi8_u.h \ + lcUniConv/ksc5601.h lcUniConv/mulelao.h lcUniConv/tatar_cyr.h \ + lcUniConv/tcvn.h lcUniConv/tis620.h lcUniConv/ucs2be.h \ + lcUniConv/utf8.h lcUniConv/viscii.h @XLIB_LOADABLE_I18N_TRUE@am__objects_1 = XlcDL.lo XlcSL.lo am_libi18n_la_OBJECTS = $(am__objects_1) XDefaultIMIF.lo \ XDefaultOMIF.lo xim_trans.lo ICWrap.lo IMWrap.lo imKStoUCS.lo \ @@ -82,11 +85,9 @@ libi18n_la_OBJECTS = $(am_libi18n_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src -I$(top_builddir)/include/X11 depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -111,27 +112,26 @@ BIGFONT_CFLAGS = @BIGFONT_CFLAGS@ BIGFONT_LIBS = @BIGFONT_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ +CC_FOR_BUILD = @CC_FOR_BUILD@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DOLT_BASH = @DOLT_BASH@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DSYMUTIL = @DSYMUTIL@ -ECHO = @ECHO@ +DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ +FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ @@ -143,6 +143,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KEYSYMDEF = @KEYSYMDEF@ LAUNCHD = @LAUNCHD@ +LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @@ -152,7 +153,10 @@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LINT = @LINT@ LINTLIB = @LINTLIB@ LINT_FLAGS = @LINT_FLAGS@ +LIPO = @LIPO@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -160,8 +164,12 @@ MALLOC_ZERO_CFLAGS = @MALLOC_ZERO_CFLAGS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ +NM = @NM@ NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -201,17 +209,14 @@ XMALLOC_ZERO_CFLAGS = @XMALLOC_ZERO_CFLAGS@ XPROTO_CFLAGS = @XPROTO_CFLAGS@ XPROTO_LIBS = @XPROTO_LIBS@ XTHREADLIB = @XTHREADLIB@ -XTHREADS = @XTHREADS@ XTHREAD_CFLAGS = @XTHREAD_CFLAGS@ XTMALLOC_ZERO_CFLAGS = @XTMALLOC_ZERO_CFLAGS@ -XUSE_MTSAFE_API = @XUSE_MTSAFE_API@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -226,6 +231,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ @@ -242,6 +248,7 @@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ +lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ @@ -254,6 +261,7 @@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = \ @@ -346,11 +354,13 @@ libi18n_la_SOURCES = \ lcUniConv/ascii.h\ lcUniConv/big5.h\ lcUniConv/big5_emacs.h\ + lcUniConv/big5hkscs.h\ lcUniConv/cp1133.h\ lcUniConv/cp1251.h\ lcUniConv/cp1255.h\ lcUniConv/cp1256.h\ lcUniConv/gb2312.h\ + lcUniConv/gbk.h\ lcUniConv/georgian_academy.h\ lcUniConv/georgian_ps.h\ lcUniConv/iso8859_1.h\ @@ -403,14 +413,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xlibi18n/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/xlibi18n/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/xlibi18n/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/xlibi18n/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -428,6 +438,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @@ -479,21 +490,21 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< @@ -509,14 +520,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -524,29 +535,34 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -567,13 +583,17 @@ distdir: $(DISTFILES) if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -601,6 +621,7 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -622,6 +643,8 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: @@ -630,18 +653,28 @@ install-data-am: install-dvi: install-dvi-am +install-dvi-am: + install-exec-am: install-html: install-html-am +install-html-am: + install-info: install-info-am +install-info-am: + install-man: install-pdf: install-pdf-am +install-pdf-am: + install-ps: install-ps-am +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -682,6 +715,7 @@ uninstall-am: @LINT_TRUE@lint: @LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(libi18n_la_SOURCES) + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libX11/src/xlibi18n/XDefaultIMIF.c b/libX11/src/xlibi18n/XDefaultIMIF.c index fd6a84725..a8677f78a 100644 --- a/libX11/src/xlibi18n/XDefaultIMIF.c +++ b/libX11/src/xlibi18n/XDefaultIMIF.c @@ -162,7 +162,7 @@ _XDefaultOpenIM( XlcNCompoundText, lcd, XlcNMultiByte))) { return((XIM)NULL); } - + if (!(ctow_conv = _XlcOpenConverter(lcd, XlcNCompoundText, lcd, XlcNWideChar))) { return((XIM)NULL); @@ -413,7 +413,7 @@ _MbLookupString( { XComposeStatus NotSupportedYet ; int length; - + length = XLookupString(ev, buffer, bytes, keysym, &NotSupportedYet); if (keysym && *keysym == NoSymbol){ diff --git a/libX11/src/xlibi18n/XDefaultOMIF.c b/libX11/src/xlibi18n/XDefaultOMIF.c index 13f0d9cff..a6b891b08 100644 --- a/libX11/src/xlibi18n/XDefaultOMIF.c +++ b/libX11/src/xlibi18n/XDefaultOMIF.c @@ -97,7 +97,7 @@ typedef struct _XOCGenericPart { typedef struct _XOCGenericRec { XOCMethods methods; - XOCCoreRec core; + XOCCoreRec core; XOCGenericPart gen; } XOCGenericRec, *XOCGeneric; @@ -133,7 +133,7 @@ get_prop_name( unsigned long fp; if (XGetFontProperty(fs, XA_FONT, &fp)) - return XGetAtomName(dpy, fp); + return XGetAtomName(dpy, fp); return (char *) NULL; } @@ -159,7 +159,7 @@ check_charset( if (length > name_len) return(NULL); - + if (_XlcCompareISOLatin1(last - length, font_data->name) == 0) return font_data; } @@ -262,7 +262,7 @@ load_font_info( return False; if (fn_num > 0) font_set->info->fid = XLoadFont(dpy, font_set->font_name); - + if (fn_list) XFreeFontNames(fn_list); } return True; @@ -374,7 +374,7 @@ get_font_name( name = (char *) Xmalloc(strlen(*list) + 1); if (name) strcpy(name, *list); - + XFreeFontNames(list); } else { fs = XLoadQueryFont(dpy, pattern); @@ -480,7 +480,7 @@ Limit the length of the string copy to prevent stack corruption. continue; } else { if (num_fields == 13 || num_fields == 14) { - /* + /* * There are 14 fields in an XLFD name -- make certain the * charset (& encoding) is placed in the correct field. */ @@ -545,11 +545,11 @@ Limit the length of the string copy to prevent stack corruption. strcpy(base_name, oc->core.base_name_list); oc->core.base_name_list = base_name; - XFreeStringList(name_list); + XFreeStringList(name_list); return found_num; err: - XFreeStringList(name_list); + XFreeStringList(name_list); return -1; } @@ -660,7 +660,7 @@ destroy_oc( if (oc->core.res_class) Xfree(oc->core.res_class); #endif - + Xfree(oc); } @@ -714,7 +714,7 @@ wcs_to_mbs( &to_left, NULL, 0); if (ret != 0 || length > 0) return False; - + return True; } @@ -843,7 +843,7 @@ _XmbDefaultTextPerCharExtents(XOC oc, _Xconst char *text, int length, cs->rbearing); overall.width += cs->width; } - (*num_chars)++; + (*num_chars)++; } if (overall_ink) { @@ -998,12 +998,12 @@ create_oc( if (oc == NULL) return (XOC) NULL; bzero((char *) oc, sizeof(XOCGenericRec)); - + oc->core.om = om; if (oc_resources[0].xrm_name == NULLQUARK) _XlcCompileResourceList(oc_resources, XlcNumber(oc_resources)); - + if (_XlcSetValues((XPointer) oc, oc_resources, XlcNumber(oc_resources), args, num_args, XlcCreateMask | XlcDefaultMask)) goto err; @@ -1039,7 +1039,7 @@ close_om( if ((data = gen->data)) { if (data->font_data) { for (font_data = data->font_data, count = data->font_data_count; - count-- > 0 ; font_data++) { + count-- > 0 ; font_data++) { if (font_data->name) Xfree(font_data->name); } @@ -1137,7 +1137,7 @@ static _Xconst char *supported_charset_list[] = { "SUNOLCURSOR-1", "SUNOLGLYPH-1" }; - + static Bool init_om( XOM om) @@ -1230,7 +1230,7 @@ _XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb, if (om == NULL) return (XOM) NULL; bzero((char *) om, sizeof(XOMGenericRec)); - + om->methods = (XOMMethods)&methods; om->core.lcd = lcd; om->core.display = dpy; @@ -1250,7 +1250,7 @@ _XDefaultOpenOM(XLCd lcd, Display *dpy, XrmDatabase rdb, if (om_resources[0].xrm_name == NULLQUARK) _XlcCompileResourceList(om_resources, XlcNumber(om_resources)); - + om->core.resources = om_resources; om->core.num_resources = XlcNumber(om_resources); diff --git a/libX11/src/xlibi18n/Xaixlcint.h b/libX11/src/xlibi18n/Xaixlcint.h index 2e4f3f521..b7d344e96 100644 --- a/libX11/src/xlibi18n/Xaixlcint.h +++ b/libX11/src/xlibi18n/Xaixlcint.h @@ -14,7 +14,7 @@ * software without specific, written prior permission. * * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, diff --git a/libX11/src/xlibi18n/XimImSw.h b/libX11/src/xlibi18n/XimImSw.h index 8ad5d2872..d13d43c24 100644 --- a/libX11/src/xlibi18n/XimImSw.h +++ b/libX11/src/xlibi18n/XimImSw.h @@ -11,7 +11,7 @@ in supporting documentation, and that the name of FUJITSU LIMITED not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. FUJITSU LIMITED makes no representations about the suitability of -this software for any purpose. +this software for any purpose. It is provided "as is" without express or implied warranty. FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, @@ -22,7 +22,7 @@ USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Author: Takashi Fujiwara FUJITSU LIMITED + Author: Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ diff --git a/libX11/src/xlibi18n/XimProto.h b/libX11/src/xlibi18n/XimProto.h index fe6e5f693..c7458b089 100644 --- a/libX11/src/xlibi18n/XimProto.h +++ b/libX11/src/xlibi18n/XimProto.h @@ -11,7 +11,7 @@ in supporting documentation, and that the name of FUJITSU LIMITED not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. FUJITSU LIMITED makes no representations about the suitability of -this software for any purpose. +this software for any purpose. It is provided "as is" without express or implied warranty. FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, @@ -22,7 +22,7 @@ USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Author: Takashi Fujiwara FUJITSU LIMITED + Author: Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ diff --git a/libX11/src/xlibi18n/XimThai.h b/libX11/src/xlibi18n/XimThai.h index 5b2666ebf..28e909568 100644 --- a/libX11/src/xlibi18n/XimThai.h +++ b/libX11/src/xlibi18n/XimThai.h @@ -28,13 +28,13 @@ Copyright 1993 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -48,17 +48,17 @@ SOFTWARE. /* $XFree86: xc/lib/X11/XimThai.h,v 1.5 2001/12/14 19:54:08 dawes Exp $ */ /* -**++ -** FACILITY: -** -** Xlib -** -** ABSTRACT: -** -** Definition file for Thai specific functions. -** -** MODIFICATION HISTORY: -** +**++ +** FACILITY: +** +** Xlib +** +** ABSTRACT: +** +** Definition file for Thai specific functions. +** +** MODIFICATION HISTORY: +** **/ #ifndef _XIMTHAI_H_ diff --git a/libX11/src/xlibi18n/XimTrX.h b/libX11/src/xlibi18n/XimTrX.h index a43784397..edf8a8a86 100644 --- a/libX11/src/xlibi18n/XimTrX.h +++ b/libX11/src/xlibi18n/XimTrX.h @@ -24,7 +24,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. - Takashi Fujiwara FUJITSU LIMITED + Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ diff --git a/libX11/src/xlibi18n/XimTrans.h b/libX11/src/xlibi18n/XimTrans.h index f75270b27..3123879d5 100644 --- a/libX11/src/xlibi18n/XimTrans.h +++ b/libX11/src/xlibi18n/XimTrans.h @@ -24,7 +24,7 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. - Takashi Fujiwara FUJITSU LIMITED + Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp ******************************************************************/ @@ -84,12 +84,6 @@ extern void _XimFreeTransIntrCallback( Xim im ); -extern Bool _XimTransIntrCallbackCheck( - Xim im, - INT16 len, - XPointer data -); - extern Bool _XimTransFilterWaitEvent( Display *d, Window w, diff --git a/libX11/src/xlibi18n/Ximint.h b/libX11/src/xlibi18n/Ximint.h index 3cbcfc4b9..1b1ad3377 100644 --- a/libX11/src/xlibi18n/Ximint.h +++ b/libX11/src/xlibi18n/Ximint.h @@ -13,7 +13,7 @@ Sony Corporation not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. FUJITSU LIMITED and Sony Corporation makes no representations about the suitability of this software for any -purpose. It is provided "as is" without express or implied warranty. +purpose. It is provided "as is" without express or implied warranty. FUJITSU LIMITED AND SONY CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF @@ -22,9 +22,9 @@ SONY CORPORATION 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. +PERFORMANCE OF THIS SOFTWARE. - Author: Takashi Fujiwara FUJITSU LIMITED + Author: Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp Motifier: Makoto Wakamatsu Sony Corporation makoto@sm.sony.co.jp @@ -585,7 +585,7 @@ extern char * _XimEncodeIMATTRIBUTE( Xim im, XIMResourceList res_list, unsigned int res_num, - XIMArg *arg, + XIMArg *arg, XIMArg **arg_ret, char *buf, int size, @@ -598,7 +598,7 @@ extern char * _XimEncodeICATTRIBUTE( Xic ic, XIMResourceList res_list, unsigned int res_num, - XIMArg *arg, + XIMArg *arg, XIMArg **arg_ret, char *buf, int size, @@ -841,14 +841,6 @@ extern Bool _XimRead( XPointer arg ); -extern Bool _XimIntrCallback( - Xim im, - Bool (*callback)( - Xim, INT16, XPointer, XPointer - ), - XPointer call_data -); - extern void _XimFlush( Xim im ); @@ -870,9 +862,9 @@ extern CARD32 _XimExtenArgCheck( #endif extern Bool _XimCbDispatch( - Xim im, - INT16 len, - XPointer data, + Xim im, + INT16 len, + XPointer data, XPointer call_data ); diff --git a/libX11/src/xlibi18n/XimintL.h b/libX11/src/xlibi18n/XimintL.h index 5eeb21f23..1ac4d478f 100644 --- a/libX11/src/xlibi18n/XimintL.h +++ b/libX11/src/xlibi18n/XimintL.h @@ -16,17 +16,17 @@ makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. -FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION 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 +FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION DISCLAIM ALL +WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +FUJITSU LIMITED AND DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR +ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER +IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - Author: Takashi Fujiwara FUJITSU LIMITED + Author: Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp Modifier: Franky Ling Digital Equipment Corporation frankyling@hgrd01.enet.dec.com diff --git a/libX11/src/xlibi18n/XimintP.h b/libX11/src/xlibi18n/XimintP.h index d36abdc64..bb99313d2 100644 --- a/libX11/src/xlibi18n/XimintP.h +++ b/libX11/src/xlibi18n/XimintP.h @@ -15,7 +15,7 @@ pertaining to distribution of the software without specific, written prior permission. Sun Microsystems, Inc., FUJITSU LIMITED and Sony Corporation makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or -implied warranty. +implied warranty. Sun Microsystems Inc. ,FUJITSU LIMITED AND SONY CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES @@ -27,7 +27,7 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. - Takashi Fujiwara FUJITSU LIMITED + Takashi Fujiwara FUJITSU LIMITED fujiwara@a80.tech.yk.fujitsu.co.jp Makoto Wakamatsu Sony Corporation makoto@sm.sony.co.jp diff --git a/libX11/src/xlibi18n/XlcDL.c b/libX11/src/xlibi18n/XlcDL.c index 96a9e9535..30dee0c41 100644 --- a/libX11/src/xlibi18n/XlcDL.c +++ b/libX11/src/xlibi18n/XlcDL.c @@ -143,7 +143,7 @@ strdup_with_underscore(const char *symbol) { char *result; - if ((result = malloc(strlen(symbol) + 2)) == NULL) + if ((result = malloc(strlen(symbol) + 2)) == NULL) return NULL; result[0] = '_'; strcpy(result + 1, symbol); @@ -213,7 +213,7 @@ Limit the length of path to prevent stack buffer corruption. if (!xi18n_objects_list) return; } n = parse_line(p, args, 6); - + if (n == 3 || n == 5) { if (!strcmp(args[0], "XLC")){ xi18n_objects_list[lc_count].type = XLC_OBJECT; @@ -323,7 +323,7 @@ open_object( char *lc_dir) { char *path; - + if (object->refcount == 0) { path = __lc_path(object->dl_name, lc_dir); if (!path) @@ -430,7 +430,7 @@ _XlcDynamicLoad(const char *lc_name) if (lcd != (XLCd)NULL) { break; } - + close_object (objects_list); } return (XLCd)lcd; @@ -468,7 +468,7 @@ _XDynamicOpenIM(XLCd lcd, Display *display, XrmDatabase rdb, if (im != (XIM)NULL) { break; } - + close_object (objects_list); } return (XIM)im; @@ -612,7 +612,7 @@ _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb, strcmp(objects_list->locale_name, lc_name)) continue; if (!open_object (objects_list, lc_dir)) continue; - + om_openOM = (dynamicIOpenProcp)fetch_symbol(objects_list, objects_list->open); if (!om_openOM) continue; om = (*om_openOM)(lcd, display, rdb, res_name, res_class); diff --git a/libX11/src/xlibi18n/XlcGeneric.h b/libX11/src/xlibi18n/XlcGeneric.h index f1d14e710..1b9c68b1f 100644 --- a/libX11/src/xlibi18n/XlcGeneric.h +++ b/libX11/src/xlibi18n/XlcGeneric.h @@ -136,9 +136,9 @@ typedef struct _XLCdGenericPart { } XLCdGenericPart; typedef struct _XLCdGenericRec { - XLCdCoreRec core; + XLCdCoreRec core; XLCdPublicPart pub; - XLCdGenericPart gen; + XLCdGenericPart gen; } XLCdGenericRec, *XLCdGeneric; extern XLCdMethods _XlcGenericMethods; diff --git a/libX11/src/xlibi18n/XlcPubI.h b/libX11/src/xlibi18n/XlcPubI.h index 4544fb8cf..51219305e 100644 --- a/libX11/src/xlibi18n/XlcPubI.h +++ b/libX11/src/xlibi18n/XlcPubI.h @@ -98,7 +98,7 @@ typedef struct _XLCdPublicPart { } XLCdPublicPart; typedef struct _XLCdPublicRec { - XLCdCoreRec core; + XLCdCoreRec core; XLCdPublicPart pub; } XLCdPublicRec, *XLCdPublic; diff --git a/libX11/src/xlibi18n/Xlcint.h b/libX11/src/xlibi18n/Xlcint.h index 53704c542..a8c991bab 100644 --- a/libX11/src/xlibi18n/Xlcint.h +++ b/libX11/src/xlibi18n/Xlcint.h @@ -42,31 +42,31 @@ from The Open Group. * copyright notice and this permission notice appear in supporting * documentation, and that the names of OMRON, NTT Software, NTT, Open * Software Foundation, and Sony Corporation not be used in advertising - * or publicity pertaining to distribution of the software without specific, + * or publicity pertaining to distribution of the software without specific, * written prior permission. OMRON, NTT Software, NTT, Open Software - * Foundation, and Sony Corporation make no representations about the - * suitability of this software for any purpose. It is provided "as is" + * Foundation, and Sony Corporation make no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY - * CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT - * SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY + * OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, AND SONY + * CORPORATION DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT + * SHALL OMRON, NTT SOFTWARE, NTT, OPEN SOFTWARE FOUNDATION, OR SONY * CORPORATION 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 + * 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: Li Yuhong OMRON Corporation * Tatsuya Kato NTT Software Corporation * Hiroshi Kuribayashi OMRON Coproration * Muneiyoshi Suzuki Nippon Telegraph and Telephone Co. - * - * M. Collins OSF + * + * M. Collins OSF * Katsuhisa Yano TOSHIBA Corp. * Makoto Wakamatsu Sony Corporation * Takashi Fujiwara FUJITSU LIMITED - */ + */ #ifndef _XLCINT_H_ @@ -436,11 +436,11 @@ typedef char* (*XGetOCValuesProc)( ); /* - * X Font Sets are an instantiable object, so we define it, the + * X Font Sets are an instantiable object, so we define it, the * object itself, a method list and data */ -/* +/* * XFontSet object method list */ @@ -598,7 +598,7 @@ typedef struct _XOC { /* - * X Input Managers are an instantiable object, so we define it, the + * X Input Managers are an instantiable object, so we define it, the * object itself, a method list and data. */ @@ -656,7 +656,7 @@ typedef struct { /* - * An X Input Manager (IM). Implementations may need to extend this data + * An X Input Manager (IM). Implementations may need to extend this data * structure to accomodate additional data, state information etc. */ typedef struct _XIM { @@ -667,13 +667,13 @@ typedef struct _XIM { /* - * X Input Contexts (IC) are an instantiable object, so we define it, the + * X Input Contexts (IC) are an instantiable object, so we define it, the * object itself, a method list and data for this object */ /* * Input Context method list - */ + */ typedef struct { void (*destroy)( XIC @@ -740,7 +740,7 @@ typedef struct { /* - * an Input Context. Implementations may need to extend this data + * an Input Context. Implementations may need to extend this data * structure to accomodate additional data, state information etc. */ typedef struct _XIC { @@ -912,6 +912,11 @@ extern void _XlcAddUtf8LocaleConverters( XLCd lcd ); +/* Registers GB18030 converters for a GB18030 locale. */ +extern void _XlcAddGB18030LocaleConverters( + XLCd lcd +); + /* The default locale loader. Assumes an ASCII encoding. */ extern XLCd _XlcDefaultLoader( const char* name diff --git a/libX11/src/xlibi18n/imKStoUCS.c b/libX11/src/xlibi18n/imKStoUCS.c index 7d8d5b92d..940d3ed2e 100644 --- a/libX11/src/xlibi18n/imKStoUCS.c +++ b/libX11/src/xlibi18n/imKStoUCS.c @@ -66,7 +66,7 @@ static unsigned short const keysym_to_unicode_590_5fe[] = { 0x06f0, 0x06f1, 0x06f2, 0x06f3, 0x06f4, 0x06f5, 0x06f6, 0x06f7, /* 0x0590-0x0597 */ 0x06f8, 0x06f9, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x0598-0x059f */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x066a, 0x0670, 0x0679, /* 0x05a0-0x05a7 */ - + 0x067e, 0x0686, 0x0688, 0x0691, 0x060c, 0x0000, 0x06d4, 0x0000, /* 0x05ac-0x05af */ 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, /* 0x05b0-0x05b7 */ 0x0668, 0x0669, 0x0000, 0x061b, 0x0000, 0x0000, 0x0000, 0x061f, /* 0x05b8-0x05bf */ @@ -120,11 +120,11 @@ static unsigned short const keysym_to_unicode_8a4_8fe[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08b0-0x08b7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x2264, 0x2260, 0x2265, 0x222b, /* 0x08b8-0x08bf */ 0x2234, 0x0000, 0x221e, 0x0000, 0x0000, 0x2207, 0x0000, 0x0000, /* 0x08c0-0x08c7 */ - 0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x22a2, 0x0000, /* 0x08c8-0x08cf */ + 0x2245, 0x2246, 0x0000, 0x0000, 0x0000, 0x0000, 0x21d2, 0x0000, /* 0x08c8-0x08cf */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x221a, 0x0000, /* 0x08d0-0x08d7 */ 0x0000, 0x0000, 0x2282, 0x2283, 0x2229, 0x222a, 0x2227, 0x2228, /* 0x08d8-0x08df */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e0-0x08e7 */ - 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, /* 0x08e8-0x08ef */ + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2202, /* 0x08e8-0x08ef */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0192, 0x0000, /* 0x08f0-0x08f7 */ 0x0000, 0x0000, 0x0000, 0x2190, 0x2191, 0x2192, 0x2193 /* 0x08f8-0x08ff */ }; @@ -206,7 +206,7 @@ static unsigned short keysym_to_unicode_12a1_12fe[] = { 0x0175, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x1e6b, /* 0x12f0-0x12f7 */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0177 /* 0x12f0-0x12ff */ }; - + static unsigned short const keysym_to_unicode_13bc_13be[] = { 0x0152, 0x0153, 0x0178 /* 0x13b8-0x13bf */ }; @@ -318,6 +318,6 @@ KeySymToUcs4(KeySym keysym) return keysym_to_unicode_1e9f_1eff[keysym - 0x1e9f]; else if (keysym > 0x209f && keysym < 0x20ad) return keysym_to_unicode_20a0_20ac[keysym - 0x20a0]; - else + else return 0; } diff --git a/libX11/src/xlibi18n/lcCT.c b/libX11/src/xlibi18n/lcCT.c index f3a91e6c0..4eee21dcf 100644 --- a/libX11/src/xlibi18n/lcCT.c +++ b/libX11/src/xlibi18n/lcCT.c @@ -125,6 +125,8 @@ static const CTDataRec default_ct_data[] = #endif /* For use by utf8 -> ctext */ { "BIG5-0:GLGR", "\033%/2"}, + { "BIG5HKSCS-0:GLGR", "\033%/2"}, + { "GBK-0:GLGR", "\033%/2"}, /* used by Emacs, but not backed by ISO-IR */ { "BIG5-E0:GL", "\033$(0" }, { "BIG5-E0:GR", "\033$)0" }, @@ -319,7 +321,7 @@ _XlcParseCharSet( const char *ptr = charset->ct_sequence; int length; int char_size; - + if (*ptr == '\0') return False; @@ -751,7 +753,7 @@ cttocs( or stop the current run. */ if (charset) { if (charset != ch_charset) - break; + break; } else { state->charset = charset = ch_charset; } @@ -791,7 +793,7 @@ cttocs( or stop the current run. */ if (charset) { if (charset != state->charset) - break; + break; } else { charset = state->charset; } @@ -1097,7 +1099,7 @@ strtocs( while (side == (*((unsigned char *) src) & 0x80) && length-- > 0) *dst++ = *src++; - + *from_left -= src - (const char *) *from; *from = (XPointer) src; *to_left -= dst - (char *) *to; @@ -1133,7 +1135,7 @@ cstostr( || !((XlcCharSet) args[0] == state->GL_charset || (XlcCharSet) args[0] == state->GR_charset)) return -1; - + csptr = *((const char **) from); string_ptr = *((char **) to); csstr_len = *from_left; @@ -1262,7 +1264,7 @@ open_cstostr( /* =========================== Initialization =========================== */ Bool -_XlcInitCTInfo() +_XlcInitCTInfo(void) { if (ct_list == NULL) { const CTDataRec *ct_data; diff --git a/libX11/src/xlibi18n/lcCharSet.c b/libX11/src/xlibi18n/lcCharSet.c index 006a0be23..ceb07095a 100644 --- a/libX11/src/xlibi18n/lcCharSet.c +++ b/libX11/src/xlibi18n/lcCharSet.c @@ -50,7 +50,7 @@ _XlcGetCharSet( { XlcCharSetList list; XrmQuark xrm_name; - + xrm_name = XrmStringToQuark(name); for (list = charset_list; list; list = list->next) { @@ -71,7 +71,7 @@ _XlcGetCharSetWithSide( { XlcCharSetList list; XrmQuark xrm_encoding_name; - + xrm_encoding_name = XrmStringToQuark(encoding_name); for (list = charset_list; list; list = list->next) { @@ -97,7 +97,7 @@ _XlcAddCharSet( list = (XlcCharSetList) Xmalloc(sizeof(XlcCharSetListRec)); if (list == NULL) return False; - + list->charset = charset; list->next = charset_list; charset_list = list; @@ -158,7 +158,7 @@ _XlcGetCSValues(XlcCharSet charset, ...) if (args == (XlcArgList) NULL) return (char *) NULL; - + ret = get_values(charset, args, num_args); Xfree(args); diff --git a/libX11/src/xlibi18n/lcConv.c b/libX11/src/xlibi18n/lcConv.c index 2f65ac7bd..9acb3519d 100644 --- a/libX11/src/xlibi18n/lcConv.c +++ b/libX11/src/xlibi18n/lcConv.c @@ -62,7 +62,7 @@ get_converter( XlcConverterList list, prev = NULL; for (list = conv_list; list; list = list->next) { - if (list->from_lcd == from_lcd && list->to_lcd == to_lcd + if (list->from_lcd == from_lcd && list->to_lcd == to_lcd && list->from_type == from_type && list->to_type == to_type) { if (prev && prev != conv_list) { /* XXX */ @@ -95,7 +95,7 @@ _XlcSetConverter( to_type = XrmStringToQuark(to); for (list = conv_list; list; list = list->next) { - if (list->from_lcd == from_lcd && list->to_lcd == to_lcd + if (list->from_lcd == from_lcd && list->to_lcd == to_lcd && list->from_type == from_type && list->to_type == to_type) { list->converter = converter; diff --git a/libX11/src/xlibi18n/lcDB.c b/libX11/src/xlibi18n/lcDB.c index 5228a0068..31ef9b800 100644 --- a/libX11/src/xlibi18n/lcDB.c +++ b/libX11/src/xlibi18n/lcDB.c @@ -14,7 +14,7 @@ * software without specific, written prior permission. * * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, @@ -551,7 +551,7 @@ append_value_list (void) return 0; } -static int +static int construct_name( char *name, int size) @@ -836,7 +836,7 @@ f_double_quote( len = get_quoted_word(str, wordp); if (len < 1) goto err; - if ((parse_info.bufsize + (int)strlen(wordp) + 1) + if ((parse_info.bufsize + (int)strlen(wordp) + 1) >= parse_info.bufMaxSize) { if (realloc_parse_info(strlen(wordp)+1) == False) { goto err; @@ -898,7 +898,7 @@ f_numeric( len = get_word(p, wordp); if (len < 1) goto err; - if ((parse_info.bufsize + token_len + (int)strlen(wordp) + 1) + if ((parse_info.bufsize + token_len + (int)strlen(wordp) + 1) >= parse_info.bufMaxSize) { if (realloc_parse_info(token_len + strlen(wordp) + 1) == False) goto err; @@ -975,7 +975,7 @@ f_default( break; case S_NAME: case S_VALUE: - if ((parse_info.bufsize + (int)strlen(wordp) + 1) + if ((parse_info.bufsize + (int)strlen(wordp) + 1) >= parse_info.bufMaxSize) { if (realloc_parse_info(strlen(wordp) + 1) == False) goto err; diff --git a/libX11/src/xlibi18n/lcFile.c b/libX11/src/xlibi18n/lcFile.c index 65008fa37..778e26903 100644 --- a/libX11/src/xlibi18n/lcFile.c +++ b/libX11/src/xlibi18n/lcFile.c @@ -14,7 +14,7 @@ * software without specific, written prior permission. * * IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS, AND * NONINFRINGEMENT OF THIRD PARTY RIGHTS, IN NO EVENT SHALL * IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, @@ -266,7 +266,7 @@ xlocaledir( priv = 0; } else { if (seteuid(oldeuid) == -1) { - /* XXX ouch, coudn't get back to original uid + /* XXX ouch, coudn't get back to original uid what can we do ??? */ _exit(127); } @@ -344,7 +344,7 @@ xlocalelibdir( priv = 0; } else { if (seteuid(oldeuid) == -1) { - /* XXX ouch, coudn't get back to original uid + /* XXX ouch, coudn't get back to original uid what can we do ??? */ _exit(127); } @@ -463,11 +463,11 @@ normalize_lcname (const char *name) { char *p, *ret; const char *tmp = name; - + p = ret = Xmalloc(strlen(name) + 1); if (!p) return NULL; - + if (tmp) { while (*tmp && *tmp != '.' && *tmp != '@') *p++ = *tmp++; @@ -504,15 +504,17 @@ _XlcFileName( siname = XLC_PUBLIC(lcd, siname); - lowercase(cat, category); + if (category) + lowercase(cat, category); + else + cat[0] = '\0'; xlocaledir(dir,XLC_BUFSIZE); n = _XlcParsePath(dir, args, NUM_LOCALEDIR); for (i = 0; i < n; ++i) { char buf[PATH_MAX], *name; name = NULL; - if ((5 + (args[i] ? strlen (args[i]) : 0) + - (cat ? strlen (cat) : 0)) < PATH_MAX) { + if ((5 + (args[i] ? strlen (args[i]) : 0) + strlen(cat)) < PATH_MAX) { sprintf(buf, "%s/%s.dir", args[i], cat); name = resolve_name(siname, buf, RtoL); } @@ -560,7 +562,7 @@ _XlcResolveLocaleName( xlocaledir (dir, PATH_MAX); n = _XlcParsePath(dir, args, NUM_LOCALEDIR); for (i = 0; i < n; ++i) { - if ((2 + (args[i] ? strlen (args[i]) : 0) + + if ((2 + (args[i] ? strlen (args[i]) : 0) + strlen (locale_alias)) < PATH_MAX) { sprintf (buf, "%s/%s", args[i], locale_alias); name = resolve_name (lc_name, buf, LtoR); @@ -592,7 +594,7 @@ _XlcResolveLocaleName( return 1; } - /* + /* * pub->siname is in the format _., typical would * be "en_US.ISO8859-1", "en_US.utf8", "ru_RU.KOI-8", or ja_JP.SJIS, * although it could be ja.SJIS too. @@ -628,9 +630,7 @@ _XlcResolveLocaleName( /************************************************************************/ int -_XlcResolveI18NPath(buf, buf_len) - char *buf; - int buf_len; +_XlcResolveI18NPath(char *buf, int buf_len) { if (buf != NULL) { xlocaledir(buf, buf_len); @@ -639,10 +639,7 @@ _XlcResolveI18NPath(buf, buf_len) } char * -_XlcLocaleDirName(dir_name, dir_len, lc_name) - char *dir_name; - size_t dir_len; - char *lc_name; +_XlcLocaleDirName(char *dir_name, size_t dir_len, char *lc_name) { char dir[PATH_MAX], buf[PATH_MAX], *name = NULL; int i, n; @@ -664,8 +661,8 @@ _XlcLocaleDirName(dir_name, dir_len, lc_name) xlocaledir (dir, PATH_MAX); n = _XlcParsePath(dir, args, 256); for (i = 0; i < n; ++i) { - - if ((2 + (args[i] ? strlen(args[i]) : 0) + + + if ((2 + (args[i] ? strlen(args[i]) : 0) + strlen(locale_alias)) < PATH_MAX) { sprintf (buf, "%s/%s", args[i], locale_alias); name = resolve_name(lc_name, buf, LtoR); @@ -676,13 +673,13 @@ _XlcLocaleDirName(dir_name, dir_len, lc_name) name = resolve_name (nlc_name, buf, LtoR); } } - + /* If name is not an alias, use lc_name for locale.dir search */ if (name == NULL) name = lc_name; - + /* look at locale.dir */ - + target_dir = args[i]; if (!target_dir) { /* something wrong */ @@ -722,7 +719,7 @@ _XlcLocaleDirName(dir_name, dir_len, lc_name) } else { strcat(dir_name, "/"); strncat(dir_name, target_name, dir_len - strlen(dir_name) - 1); - if (strlen(target_name) >= dir_len - strlen(dir_name) - 1) + if (strlen(target_name) >= dir_len - strlen(dir_name) - 1) dir_name[dir_len - 1] = '\0'; } if (target_name != lc_name) @@ -742,10 +739,7 @@ _XlcLocaleDirName(dir_name, dir_len, lc_name) } char * -_XlcLocaleLibDirName(dir_name, dir_len, lc_name) - char *dir_name; - size_t dir_len; - char *lc_name; +_XlcLocaleLibDirName(char *dir_name, size_t dir_len, char *lc_name) { char dir[PATH_MAX], buf[PATH_MAX], *name = NULL; int i, n; @@ -767,8 +761,8 @@ _XlcLocaleLibDirName(dir_name, dir_len, lc_name) xlocalelibdir (dir, PATH_MAX); n = _XlcParsePath(dir, args, 256); for (i = 0; i < n; ++i) { - - if ((2 + (args[i] ? strlen(args[i]) : 0) + + + if ((2 + (args[i] ? strlen(args[i]) : 0) + strlen(locale_alias)) < PATH_MAX) { sprintf (buf, "%s/%s", args[i], locale_alias); name = resolve_name(lc_name, buf, LtoR); @@ -779,13 +773,13 @@ _XlcLocaleLibDirName(dir_name, dir_len, lc_name) name = resolve_name (nlc_name, buf, LtoR); } } - + /* If name is not an alias, use lc_name for locale.dir search */ if (name == NULL) name = lc_name; - + /* look at locale.dir */ - + target_dir = args[i]; if (!target_dir) { /* something wrong */ @@ -825,7 +819,7 @@ _XlcLocaleLibDirName(dir_name, dir_len, lc_name) } else { strcat(dir_name, "/"); strncat(dir_name, target_name, dir_len - strlen(dir_name) - 1); - if (strlen(target_name) >= dir_len - strlen(dir_name) - 1) + if (strlen(target_name) >= dir_len - strlen(dir_name) - 1) dir_name[dir_len - 1] = '\0'; } if (target_name != lc_name) diff --git a/libX11/src/xlibi18n/lcGeneric.c b/libX11/src/xlibi18n/lcGeneric.c index dead30561..5cb8c5234 100644 --- a/libX11/src/xlibi18n/lcGeneric.c +++ b/libX11/src/xlibi18n/lcGeneric.c @@ -716,7 +716,7 @@ load_generic( /***** wc_encoding_mask *****/ _XlcGetResource(lcd, "XLC_XLOCALE", "wc_encoding_mask", &value, &num); if (num > 0) { - if (string_to_ulong(value[0], &l) == False) + if (string_to_ulong(value[0], &l) == False) goto err; gen->wc_encode_mask = l; } @@ -738,7 +738,7 @@ load_generic( gen->force_convert_to_mb = True; else gen->force_convert_to_mb = False; - + for (i = 0; ; i++) { CodeSetRec *codeset = NULL; char cs[16]; @@ -788,7 +788,7 @@ load_generic( sprintf(name, "%s.%s", cs, "mb_encoding"); _XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num); if (num > 0) { - static struct { + static struct { const char *str; EncodingType type; } shifts[] = { @@ -813,7 +813,7 @@ load_generic( break; } } - if (strlen (tmp) > sizeof encoding || + if (strlen (tmp) > sizeof encoding || string_to_encoding(tmp, encoding) == False) goto err; add_parse_list(gen, type, encoding, codeset); @@ -826,11 +826,11 @@ load_generic( if (num > 0) { if (codeset == NULL && (codeset = add_codeset(gen)) == NULL) goto err; - if (string_to_ulong(value[0], &l) == False) + if (string_to_ulong(value[0], &l) == False) goto err; codeset->wc_encoding = l; } - + /***** codeset.ct_encoding *****/ sprintf(name, "%s.%s", cs, "ct_encoding"); _XlcGetResource(lcd, "XLC_XLOCALE", name, &value, &num); @@ -950,7 +950,7 @@ load_generic( /* For VW/UDC end */ } - + read_charset_define(lcd,gen); /* For VW/UDC */ read_segmentconversion(lcd,gen); /* For VW/UDC */ @@ -1007,8 +1007,7 @@ initialize_core( #endif static Bool -initialize(lcd) - XLCd lcd; +initialize(XLCd lcd) { XLCdPublicMethods superclass = (XLCdPublicMethods) _XlcPublicMethods; @@ -1031,7 +1030,7 @@ initialize(lcd) } /* VW/UDC start 95.01.08 */ -static void +static void freeByteM( CodeSet codeset) { @@ -1047,11 +1046,11 @@ freeByteM( blst[i].byteinfo = NULL; } } - Xfree(codeset->byteM); + Xfree(codeset->byteM); codeset->byteM = NULL; } -static void +static void freeConversion( CodeSet codeset) { @@ -1078,7 +1077,7 @@ freeConversion( } } -static void +static void freeExtdSegment( CodeSet codeset) { @@ -1095,11 +1094,11 @@ freeExtdSegment( Xfree(ctextseg->area); ctextseg->area = NULL; } - Xfree(codeset->ctextseg); + Xfree(codeset->ctextseg); codeset->ctextseg = NULL; } -static void +static void freeParseInfo( CodeSet codeset) { @@ -1112,7 +1111,7 @@ freeParseInfo( Xfree(parse_info->encoding); parse_info->encoding = NULL; } - Xfree(codeset->parse_info); + Xfree(codeset->parse_info); codeset->parse_info = NULL; } @@ -1154,7 +1153,7 @@ destroy_SegConv( seg[i].source_encoding = NULL; } if (seg[i].destination_encoding) { - Xfree(seg[i].destination_encoding); + Xfree(seg[i].destination_encoding); seg[i].destination_encoding = NULL; } if (seg[i].conv) { diff --git a/libX11/src/xlibi18n/lcInit.c b/libX11/src/xlibi18n/lcInit.c index 6375de805..db774a92e 100644 --- a/libX11/src/xlibi18n/lcInit.c +++ b/libX11/src/xlibi18n/lcInit.c @@ -71,7 +71,7 @@ Sun Microsystems, Inc. or its licensors is granted. * This is source code modified by FUJITSU LIMITED under the Joint * Development Agreement for the CDE/Motif PST. * - * Modifier: Masayoshi Shimamura FUJITSU LIMITED + * Modifier: Masayoshi Shimamura FUJITSU LIMITED * */ /* $XFree86: xc/lib/X11/lcInit.c,v 3.9 2001/11/16 00:52:27 dawes Exp $ */ @@ -103,7 +103,7 @@ Sun Microsystems, Inc. or its licensors is granted. */ void -_XlcInitLoader() +_XlcInitLoader(void) { #ifdef USE_DYNAMIC_LC @@ -142,7 +142,7 @@ _XlcInitLoader() } void -_XlcDeInitLoader() +_XlcDeInitLoader(void) { #ifdef USE_DYNAMIC_LC diff --git a/libX11/src/xlibi18n/lcPrTxt.c b/libX11/src/xlibi18n/lcPrTxt.c index 5a781280e..644759075 100644 --- a/libX11/src/xlibi18n/lcPrTxt.c +++ b/libX11/src/xlibi18n/lcPrTxt.c @@ -81,7 +81,7 @@ copy_list( if (is_wide_char) { wchar_t *wc_text, *wstr, **wstr_list; - + wc_text = (wchar_t *) text; wstr_list = (wchar_t **) list; @@ -94,7 +94,7 @@ copy_list( } } else { char *mb_text, *str, **str_list; - + mb_text = (char *) text; str_list = (char **) list; diff --git a/libX11/src/xlibi18n/lcPubWrap.c b/libX11/src/xlibi18n/lcPubWrap.c index e30a55c08..b579f956f 100644 --- a/libX11/src/xlibi18n/lcPubWrap.c +++ b/libX11/src/xlibi18n/lcPubWrap.c @@ -50,7 +50,7 @@ _XGetLCValues(XLCd lcd, ...) if (args == (XlcArgList) NULL) return (char *) NULL; - + ret = (*methods->get_values)(lcd, args, num_args); Xfree(args); @@ -81,17 +81,17 @@ _XlcCreateLC( if (lcd->core->name == NULL) { lcd->core->name = (char*) Xmalloc(strlen(name) + 1); - if (lcd->core->name == NULL) + if (lcd->core->name == NULL) goto err; strcpy(lcd->core->name, name); } - + if (lcd->methods == NULL) lcd->methods = methods; if ((*pub_methods->pub.initialize)(lcd) == False) goto err; - + return lcd; err: diff --git a/libX11/src/xlibi18n/lcPublic.c b/libX11/src/xlibi18n/lcPublic.c index d80451610..851e2f535 100644 --- a/libX11/src/xlibi18n/lcPublic.c +++ b/libX11/src/xlibi18n/lcPublic.c @@ -61,7 +61,7 @@ static XLCdPublicMethodsRec publicMethods = { default_string, NULL, NULL - }, + }, { NULL, create, @@ -218,9 +218,9 @@ initialize( name = lcd->core->name; #if !defined(X_LOCALE) - /* - * _XlMapOSLocaleName will return the same string or a substring - * of name, so strlen(name) is okay + /* + * _XlMapOSLocaleName will return the same string or a substring + * of name, so strlen(name) is okay */ if ((len = strlen(name)) < sizeof sinamebuf) siname = sinamebuf; diff --git a/libX11/src/xlibi18n/lcStd.c b/libX11/src/xlibi18n/lcStd.c index e112dceac..1c52013af 100644 --- a/libX11/src/xlibi18n/lcStd.c +++ b/libX11/src/xlibi18n/lcStd.c @@ -135,7 +135,7 @@ _Xlcmbstowcs( if (lcd == NULL) return -1; } - + conv = _XlcOpenConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar); if (conv == NULL) return -1; @@ -290,7 +290,7 @@ _Xwcslen( while (*wstr_ptr) wstr_ptr++; - + return wstr_ptr - wstr; } diff --git a/libX11/src/xlibi18n/lcTxtPr.c b/libX11/src/xlibi18n/lcTxtPr.c index 1f9765f6e..82071b109 100644 --- a/libX11/src/xlibi18n/lcTxtPr.c +++ b/libX11/src/xlibi18n/lcTxtPr.c @@ -93,7 +93,7 @@ _XTextListToTextProperty( buf_len = get_buf_size(is_wide_char, list, count); if ((buf = (char *) Xmalloc(buf_len)) == NULL) return XNoMemory; - + switch (style) { case XStringStyle: case XStdICCTextStyle: @@ -116,7 +116,7 @@ _XTextListToTextProperty( mb_list = (char **) list; to = buf; for (i = 0; i < count && buf_len > 0; i++) { - if (*mb_list) + if (*mb_list) strcpy(to, *mb_list); else *to = '\0'; diff --git a/libX11/src/xlibi18n/lcUTF8.c b/libX11/src/xlibi18n/lcUTF8.c index 405250039..95c68ad75 100644 --- a/libX11/src/xlibi18n/lcUTF8.c +++ b/libX11/src/xlibi18n/lcUTF8.c @@ -212,6 +212,8 @@ typedef struct { #include "lcUniConv/ksc5601.h" #include "lcUniConv/big5.h" #include "lcUniConv/big5_emacs.h" +#include "lcUniConv/big5hkscs.h" +#include "lcUniConv/gbk.h" static Utf8ConvRec all_charsets[] = { /* The ISO10646-1/UTF-8 entry occurs twice, once at the beginning @@ -332,14 +334,20 @@ static Utf8ConvRec all_charsets[] = { cp1256_mbtowc, cp1256_wctomb }, { "BIG5-0", NULLQUARK, - big5_mbtowc, big5_wctomb - }, + big5_mbtowc, big5_wctomb + }, { "BIG5-E0", NULLQUARK, big5_0_mbtowc, big5_0_wctomb }, { "BIG5-E1", NULLQUARK, big5_1_mbtowc, big5_1_wctomb }, + { "GBK-0", NULLQUARK, + gbk_mbtowc, gbk_wctomb + }, + { "BIG5HKSCS-0", NULLQUARK, + big5hkscs_mbtowc, big5hkscs_wctomb + }, /* The ISO10646-1/UTF-8 entry occurs twice, once at the beginning (for lookup speed), once at the end (as a fallback). */ @@ -1807,6 +1815,515 @@ open_utf8tofcs( return create_tofontcs_conv(from_lcd, &methods_utf8tocs); } +/* ========================== iconv Stuff ================================ */ + +/* from XlcNCharSet to XlcNMultiByte */ + +static int +iconv_cstombs(XlcConv conv, XPointer *from, int *from_left, + XPointer *to, int *to_left, XPointer *args, int num_args) +{ + XlcCharSet charset; + char *name; + Utf8Conv convptr; + int i; + unsigned char const *src; + unsigned char const *srcend; + unsigned char *dst; + unsigned char *dstend; + int unconv_num; + + if (from == NULL || *from == NULL) + return 0; + + if (num_args < 1) + return -1; + + charset = (XlcCharSet) args[0]; + name = charset->encoding_name; + /* not charset->name because the latter has a ":GL"/":GR" suffix */ + + for (convptr = all_charsets, i = all_charsets_count-1; i > 0; convptr++, i--) + if (!strcmp(convptr->name, name)) + break; + if (i == 0) + return -1; + + src = (unsigned char const *) *from; + srcend = src + *from_left; + dst = (unsigned char *) *to; + dstend = dst + *to_left; + unconv_num = 0; + + while (src < srcend) { + ucs4_t wc; + int consumed; + int count; + + consumed = convptr->cstowc(conv, &wc, src, srcend-src); + if (consumed == RET_ILSEQ) + return -1; + if (consumed == RET_TOOFEW(0)) + break; + + /* Use stdc iconv to convert widechar -> multibyte */ + + count = wctomb(dst, wc); + if (count == 0) + break; + if (count == -1) { + count = wctomb(dst, BAD_WCHAR); + if (count == 0) + break; + unconv_num++; + } + src += consumed; + dst += count; + } + + *from = (XPointer) src; + *from_left = srcend - src; + *to = (XPointer) dst; + *to_left = dstend - dst; + + return unconv_num; + +} + +static XlcConvMethodsRec iconv_cstombs_methods = { + close_converter, + iconv_cstombs, + NULL +}; + +static XlcConv +open_iconv_cstombs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type) +{ + lazy_init_all_charsets(); + return create_conv(from_lcd, &iconv_cstombs_methods); +} + +static int +iconv_mbstocs(XlcConv conv, XPointer *from, int *from_left, + XPointer *to, int *to_left, XPointer *args, int num_args) +{ + Utf8Conv *preferred_charsets; + XlcCharSet last_charset = NULL; + unsigned char const *src; + unsigned char const *srcend; + unsigned char *dst; + unsigned char *dstend; + int unconv_num; + + if (from == NULL || *from == NULL) + return 0; + + preferred_charsets = (Utf8Conv *) conv->state; + src = (unsigned char const *) *from; + srcend = src + *from_left; + dst = (unsigned char *) *to; + dstend = dst + *to_left; + unconv_num = 0; + + while (src < srcend && dst < dstend) { + Utf8Conv chosen_charset = NULL; + XlcSide chosen_side = XlcNONE; + wchar_t wc; + int consumed; + int count; + + /* Uses stdc iconv to convert multibyte -> widechar */ + + consumed = mbtowc(&wc, src, srcend-src); + if (consumed == 0) + break; + if (consumed == -1) { + src++; + unconv_num++; + continue; + } + + count = charset_wctocs(preferred_charsets, &chosen_charset, &chosen_side, conv, dst, wc, dstend-dst); + + if (count == RET_TOOSMALL) + break; + if (count == RET_ILSEQ) { + src += consumed; + unconv_num++; + continue; + } + + if (last_charset == NULL) { + last_charset = + _XlcGetCharSetWithSide(chosen_charset->name, chosen_side); + if (last_charset == NULL) { + src += consumed; + unconv_num++; + continue; + } + } else { + if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name + && (last_charset->side == XlcGLGR + || last_charset->side == chosen_side))) + break; + } + src += consumed; + dst += count; + } + + if (last_charset == NULL) + return -1; + + *from = (XPointer) src; + *from_left = srcend - src; + *to = (XPointer) dst; + *to_left = dstend - dst; + + if (num_args >= 1) + *((XlcCharSet *)args[0]) = last_charset; + + return unconv_num; +} + +static XlcConvMethodsRec iconv_mbstocs_methods = { + close_tocs_converter, + iconv_mbstocs, + NULL +}; + +static XlcConv +open_iconv_mbstocs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type) +{ + return create_tocs_conv(from_lcd, &iconv_mbstocs_methods); +} + +/* from XlcNMultiByte to XlcNChar */ + +static int +iconv_mbtocs(XlcConv conv, XPointer *from, int *from_left, + XPointer *to, int *to_left, XPointer *args, int num_args) +{ + Utf8Conv *preferred_charsets; + XlcCharSet last_charset = NULL; + unsigned char const *src; + unsigned char const *srcend; + unsigned char *dst; + unsigned char *dstend; + int unconv_num; + + if (from == NULL || *from == NULL) + return 0; + + preferred_charsets = (Utf8Conv *) conv->state; + src = (unsigned char const *) *from; + srcend = src + *from_left; + dst = (unsigned char *) *to; + dstend = dst + *to_left; + unconv_num = 0; + + while (src < srcend && dst < dstend) { + Utf8Conv chosen_charset = NULL; + XlcSide chosen_side = XlcNONE; + wchar_t wc; + int consumed; + int count; + + /* Uses stdc iconv to convert multibyte -> widechar */ + + consumed = mbtowc(&wc, src, srcend-src); + if (consumed == 0) + break; + if (consumed == -1) { + src++; + unconv_num++; + continue; + } + + count = charset_wctocs(preferred_charsets, &chosen_charset, &chosen_side, conv, dst, wc, dstend-dst); + if (count == RET_TOOSMALL) + break; + if (count == RET_ILSEQ) { + src += consumed; + unconv_num++; + continue; + } + + if (last_charset == NULL) { + last_charset = + _XlcGetCharSetWithSide(chosen_charset->name, chosen_side); + if (last_charset == NULL) { + src += consumed; + unconv_num++; + continue; + } + } else { + if (!(last_charset->xrm_encoding_name == chosen_charset->xrm_name + && (last_charset->side == XlcGLGR + || last_charset->side == chosen_side))) + break; + } + src += consumed; + dst += count; + } + + if (last_charset == NULL) + return -1; + + *from = (XPointer) src; + *from_left = srcend - src; + *to = (XPointer) dst; + *to_left = dstend - dst; + + if (num_args >= 1) + *((XlcCharSet *)args[0]) = last_charset; + + return unconv_num; +} + +static XlcConvMethodsRec iconv_mbtocs_methods = { + close_tocs_converter, + iconv_mbtocs, + NULL +}; + +static XlcConv +open_iconv_mbtocs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type) +{ + return create_tocs_conv(from_lcd, &iconv_mbtocs_methods ); +} + +/* from XlcNMultiByte to XlcNString */ + +static int +iconv_mbstostr(XlcConv conv, XPointer *from, int *from_left, + XPointer *to, int *to_left, XPointer *args, int num_args) +{ + unsigned char const *src; + unsigned char const *srcend; + unsigned char *dst; + unsigned char *dstend; + int unconv_num; + + if (from == NULL || *from == NULL) + return 0; + + src = (unsigned char const *) *from; + srcend = src + *from_left; + dst = (unsigned char *) *to; + dstend = dst + *to_left; + unconv_num = 0; + + while (src < srcend) { + unsigned char c; + wchar_t wc; + int consumed; + + /* Uses stdc iconv to convert multibyte -> widechar */ + + consumed = mbtowc(&wc, src, srcend-src); + if (consumed == 0) + break; + if (dst == dstend) + break; + if (consumed == -1) { + consumed = 1; + c = BAD_CHAR; + unconv_num++; + } else { + if ((wc & ~(wchar_t)0xff) != 0) { + c = BAD_CHAR; + unconv_num++; + } else + c = (unsigned char) wc; + } + *dst++ = c; + src += consumed; + } + + *from = (XPointer) src; + *from_left = srcend - src; + *to = (XPointer) dst; + *to_left = dstend - dst; + + return unconv_num; +} + +static XlcConvMethodsRec iconv_mbstostr_methods = { + close_converter, + iconv_mbstostr, + NULL +}; + +static XlcConv +open_iconv_mbstostr(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type) +{ + return create_conv(from_lcd, &iconv_mbstostr_methods); +} + +/* from XlcNString to XlcNMultiByte */ +static int +iconv_strtombs(XlcConv conv, XPointer *from, int *from_left, + XPointer *to, int *to_left, XPointer *args, int num_args) +{ + unsigned char const *src; + unsigned char const *srcend; + unsigned char *dst; + unsigned char *dstend; + + if (from == NULL || *from == NULL) + return 0; + + src = (unsigned char const *) *from; + srcend = src + *from_left; + dst = (unsigned char *) *to; + dstend = dst + *to_left; + + while (src < srcend) { + int count = wctomb(dst, *src); + if (count < 0) + break; + dst += count; + src++; + } + + *from = (XPointer) src; + *from_left = srcend - src; + *to = (XPointer) dst; + *to_left = dstend - dst; + + return 0; +} + +static XlcConvMethodsRec iconv_strtombs_methods= { + close_converter, + iconv_strtombs, + NULL +}; + +static XlcConv +open_iconv_strtombs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type) +{ + return create_conv(from_lcd, &iconv_strtombs_methods); +} + +/***************************************************************************/ +/* Part II: An iconv locale loader. + * + *Here we can assume that "multi-byte" is iconv and that `wchar_t' is Unicode. + */ + +/* from XlcNMultiByte to XlcNWideChar */ +static int +iconv_mbstowcs(XlcConv conv, XPointer *from, int *from_left, + XPointer *to, int *to_left, XPointer *args, int num_args) +{ + char *src = *((char **) from); + wchar_t *dst = *((wchar_t **) to); + int src_left = *from_left; + int dst_left = *to_left; + int length, unconv_num = 0; + + while (src_left > 0 && dst_left > 0) { + length = mbtowc(dst, src, src_left); + + if (length > 0) { + src += length; + src_left -= length; + if (dst) + dst++; + dst_left--; + } else if (length < 0) { + src++; + src_left--; + unconv_num++; + } else { + /* null ? */ + src++; + src_left--; + if (dst) + *dst++ = L'\0'; + dst_left--; + } + } + + *from = (XPointer) src; + if (dst) + *to = (XPointer) dst; + *from_left = src_left; + *to_left = dst_left; + + return unconv_num; +} + +static XlcConvMethodsRec iconv_mbstowcs_methods = { + close_converter, + iconv_mbstowcs, + NULL +} ; + +static XlcConv +open_iconv_mbstowcs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type) +{ + return create_conv(from_lcd, &iconv_mbstowcs_methods); +} + +static int +iconv_wcstombs(XlcConv conv, XPointer *from, int *from_left, + XPointer *to, int *to_left, XPointer *args, int num_args) +{ + wchar_t *src = *((wchar_t **) from); + char *dst = *((char **) to); + int src_left = *from_left; + int dst_left = *to_left; + int length, unconv_num = 0; + + while (src_left > 0 && dst_left >= MB_CUR_MAX) { + length = wctomb(dst, *src); /* XXX */ + + if (length > 0) { + src++; + src_left--; + if (dst) + dst += length; + dst_left -= length; + } else if (length < 0) { + src++; + src_left--; + unconv_num++; + } + } + + *from = (XPointer) src; + if (dst) + *to = (XPointer) dst; + *from_left = src_left; + *to_left = dst_left; + + return unconv_num; +} + +static XlcConvMethodsRec iconv_wcstombs_methods = { + close_converter, + iconv_wcstombs, + NULL +} ; + +static XlcConv +open_iconv_wcstombs(XLCd from_lcd, char *from_type, XLCd to_lcd, char *to_type) +{ + return create_conv(from_lcd, &iconv_wcstombs_methods); +} + +static XlcConv +open_iconv_mbstofcs( + XLCd from_lcd, + const char *from_type, + XLCd to_lcd, + const char *to_type) +{ + return create_tofontcs_conv(from_lcd, &iconv_mbstocs_methods); +} + /* Registers UTF-8 converters for a UTF-8 locale. */ void @@ -1842,3 +2359,34 @@ _XlcAddUtf8LocaleConverters( _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNFontCharSet, open_utf8tofcs); _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNFontCharSet, open_wcstofcs); } + +void +_XlcAddGB18030LocaleConverters( + XLCd lcd) +{ + + /* Register elementary converters. */ + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNWideChar, open_iconv_mbstowcs); + _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNMultiByte, open_iconv_wcstombs); + + /* Register converters for XlcNCharSet. This implicitly provides + * converters from and to XlcNCompoundText. */ + + _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNMultiByte, open_iconv_cstombs); + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNCharSet, open_iconv_mbstocs); + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNChar, open_iconv_mbtocs); + _XlcSetConverter(lcd, XlcNString, lcd, XlcNMultiByte, open_iconv_strtombs); + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNString, open_iconv_mbstostr); + + /* Register converters for XlcNFontCharSet */ + _XlcSetConverter(lcd, XlcNMultiByte, lcd, XlcNFontCharSet, open_iconv_mbstofcs); + + _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNString, open_wcstostr); + _XlcSetConverter(lcd, XlcNString, lcd, XlcNWideChar, open_strtowcs); + _XlcSetConverter(lcd, XlcNCharSet, lcd, XlcNWideChar, open_cstowcs); + _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNCharSet, open_wcstocs); + _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNChar, open_wcstocs1); + + /* Register converters for XlcNFontCharSet */ + _XlcSetConverter(lcd, XlcNWideChar, lcd, XlcNFontCharSet, open_wcstofcs); +} diff --git a/libX11/src/xlibi18n/lcUniConv/cjk_tab_to_h.c b/libX11/src/xlibi18n/lcUniConv/cjk_tab_to_h.c index f3cc1e0e4..971314476 100644 --- a/libX11/src/xlibi18n/lcUniConv/cjk_tab_to_h.c +++ b/libX11/src/xlibi18n/lcUniConv/cjk_tab_to_h.c @@ -18,6 +18,8 @@ * ./cjk_tab_to_h BIG5 big5 > big5.h < BIG5.TXT * * ./cjk_tab_to_h JOHAB johab > johab.h < JOHAB.TXT + * + * ./cjk_tab_to_h BIG5HKSCS-0 big5hkscs >big5hkscs.h < BIG5HKSCS.TXT */ #include @@ -892,6 +894,49 @@ static void do_big5 (const char* name) invert(&enc); output_uni2charset_sparse(name,&enc); } +/* Big5-HKSCS specifics */ + +static int row_byte_big5hkscs (int row) { + return 0x81+row; +} +static int col_byte_big5hkscs (int col) { + return (col >= 0x3f ? 0x62 : 0x40) + col; +} +static int byte_row_big5hkscs (int byte) { + if (byte >= 0x81 && byte < 0xff) + return byte-0x81; + else + return -1; +} +static int byte_col_big5hkscs (int byte) { + if (byte >= 0x40 && byte < 0x7f) + return byte-0x40; + else if (byte >= 0xa1 && byte < 0xff) + return byte-0x62; + else + return -1; +} + +static void do_big5hkscs (const char* name) +{ + Encoding enc; + + enc.rows = 126; + enc.cols = 157; + enc.row_byte = row_byte_big5hkscs; + enc.col_byte = col_byte_big5hkscs; + enc.byte_row = byte_row_big5hkscs; + enc.byte_col = byte_col_big5hkscs; + enc.check_row_expr = "%1$s >= 0x81 && %1$s < 0xff"; + enc.check_col_expr = "(%1$s >= 0x40 && %1$s < 0x7f) || (%1$s >= 0xa1 && %1$s < 0xff)"; + enc.byte_row_expr = "%1$s - 0x81"; + enc.byte_col_expr = "%1$s - (%1$s >= 0xa1 ? 0x62 : 0x40)"; + + read_table(&enc); + output_charset2uni(name,&enc); + invert(&enc); output_uni2charset_sparse(name,&enc); +} + /* Johab Hangul specifics */ static int row_byte_johab_hangul (int row) { @@ -1014,6 +1059,8 @@ int main (int argc, char *argv[]) do_ksc5601(name); else if (!strcmp(name,"big5") || !strcmp(name,"cp950ext")) do_big5(name); + else if (!strcmp(name,"big5hkscs")) + do_big5hkscs(name); else if (!strcmp(name,"johab_hangul")) do_johab_hangul(name); else if (!strcmp(name,"cp932ext")) diff --git a/libX11/src/xlibi18n/lcUniConv/ksc5601.h b/libX11/src/xlibi18n/lcUniConv/ksc5601.h index 7e2a4623e..1b5c62d07 100644 --- a/libX11/src/xlibi18n/lcUniConv/ksc5601.h +++ b/libX11/src/xlibi18n/lcUniConv/ksc5601.h @@ -2968,17 +2968,17 @@ ksc5601_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n) const Summary16 *summary = NULL; if (wc < 0x0460) summary = &ksc5601_uni2indx_page00[(wc>>4)]; - else if (wc >= 0x2000 && wc < 0x2670) + else if (wc >= 0x2000 && wc < 0x2670) /* General Punctuation (2000, 206F) */ summary = &ksc5601_uni2indx_page20[(wc>>4)-0x200]; - else if (wc >= 0x3000 && wc < 0x33e0) + else if (wc >= 0x3000 && wc < 0x33e0) /* CJK Symbols and Punctuation (3000, 303F) */ summary = &ksc5601_uni2indx_page30[(wc>>4)-0x300]; - else if (wc >= 0x4e00 && wc < 0x9fa0) + else if (wc >= 0x4e00 && wc < 0x9fa0) /* CJK Unified Ideographs (4E00, 9FFF) */ summary = &ksc5601_uni2indx_page4e[(wc>>4)-0x4e0]; - else if (wc >= 0xac00 && wc < 0xd7a0) + else if (wc >= 0xac00 && wc < 0xd7a0) /* Hangul Syllables (AC00, D7AF) 11183 */ summary = &ksc5601_uni2indx_pageac[(wc>>4)-0xac0]; - else if (wc >= 0xf900 && wc < 0xfa10) + else if (wc >= 0xf900 && wc < 0xfa10) /* CJK Compatibility Ideographs (F900, FAFF) */ summary = &ksc5601_uni2indx_pagef9[(wc>>4)-0xf90]; - else if (wc >= 0xff00 && wc < 0xfff0) + else if (wc >= 0xff00 && wc < 0xfff0) /* Halfwidth and Fullwidth Forms (FF00, FFEF) */ summary = &ksc5601_uni2indx_pageff[(wc>>4)-0xff0]; if (summary) { unsigned short used = summary->used; diff --git a/libX11/src/xlibi18n/lcUtil.c b/libX11/src/xlibi18n/lcUtil.c index ab1db0083..2fbbd0210 100644 --- a/libX11/src/xlibi18n/lcUtil.c +++ b/libX11/src/xlibi18n/lcUtil.c @@ -40,7 +40,7 @@ /* Compares two ISO 8859-1 strings, ignoring case of ASCII letters. Like strcasecmp in an ASCII locale. */ -int +int _XlcCompareISOLatin1( const char *str1, const char *str2) @@ -63,7 +63,7 @@ _XlcCompareISOLatin1( /* Compares two ISO 8859-1 strings, at most len bytes of each, ignoring case of ASCII letters. Like strncasecmp in an ASCII locale. */ -int +int _XlcNCompareISOLatin1( const char *str1, const char *str2, diff --git a/libX11/src/xlibi18n/lcWrap.c b/libX11/src/xlibi18n/lcWrap.c index c0cee44b8..fc6e95566 100644 --- a/libX11/src/xlibi18n/lcWrap.c +++ b/libX11/src/xlibi18n/lcWrap.c @@ -44,15 +44,15 @@ from The Open Group. * OPEN SOFTWARE FOUNDATION AND TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN OR TOSHIBA BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. - * - * M. Collins OSF + * + * M. Collins OSF * * Katsuhisa Yano TOSHIBA Corp. - */ + */ /* $XFree86: xc/lib/X11/lcWrap.c,v 3.15 2003/04/13 19:22:22 dawes Exp $ */ #ifdef HAVE_CONFIG_H @@ -96,7 +96,7 @@ XSetLocaleModifiers( } Bool -XSupportsLocale() +XSupportsLocale(void) { return _XlcCurrentLC() != (XLCd)NULL; } @@ -236,7 +236,7 @@ _XlcAddLoader( last = loader_list; while (last->next) last = last->next; - + loader->next = NULL; last->next = loader; } @@ -260,9 +260,9 @@ _XOpenLC( if (name == NULL) { name = setlocale (LC_CTYPE, (char *)NULL); #if !defined(X_LOCALE) - /* - * _XlMapOSLocaleName will return the same string or a substring - * of name, so strlen(name) is okay + /* + * _XlMapOSLocaleName will return the same string or a substring + * of name, so strlen(name) is okay */ if ((len = strlen(name)) >= sizeof sinamebuf) { siname = Xmalloc (len + 1); @@ -349,7 +349,7 @@ _XCloseLC( */ XLCd -_XlcCurrentLC() +_XlcCurrentLC(void) { XLCd lcd; static XLCd last_lcd = NULL; @@ -358,7 +358,7 @@ _XlcCurrentLC() if (last_lcd) _XCloseLC(last_lcd); - + last_lcd = lcd; return lcd; @@ -369,10 +369,10 @@ _XrmInitParseInfo( XPointer *state) { XLCd lcd = _XOpenLC((char *) NULL); - + if (lcd == (XLCd) NULL) return (XrmMethods) NULL; - + return (*lcd->methods->init_parse_info)(lcd, state); } @@ -384,7 +384,7 @@ XmbTextPropertyToTextList( int *count_ret) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return XLocaleNotSupported; @@ -400,7 +400,7 @@ XwcTextPropertyToTextList( int *count_ret) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return XLocaleNotSupported; @@ -416,7 +416,7 @@ Xutf8TextPropertyToTextList( int *count_ret) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return XLocaleNotSupported; @@ -433,7 +433,7 @@ XmbTextListToTextProperty( XTextProperty *text_prop) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return XLocaleNotSupported; @@ -450,7 +450,7 @@ XwcTextListToTextProperty( XTextProperty *text_prop) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return XLocaleNotSupported; @@ -467,7 +467,7 @@ Xutf8TextListToTextProperty( XTextProperty *text_prop) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return XLocaleNotSupported; @@ -480,7 +480,7 @@ XwcFreeStringList( wchar_t **list) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return; @@ -488,13 +488,13 @@ XwcFreeStringList( } const char * -XDefaultString() +XDefaultString(void) { XLCd lcd = _XlcCurrentLC(); - + if (lcd == NULL) return (char *) NULL; - + return (*lcd->methods->default_string)(lcd); } @@ -555,7 +555,7 @@ _XlcCountVaList( for (count = 0; va_arg(var, char *); count++) (void)va_arg(var, XPointer); - + *count_ret = count; } @@ -570,7 +570,7 @@ _XlcVaToArgList( *args_ret = args = (XlcArgList) Xmalloc(sizeof(XlcArg) * count); if (args == (XlcArgList) NULL) return; - + for ( ; count-- > 0; args++) { args->name = va_arg(var, char *); args->value = va_arg(var, XPointer); diff --git a/libX11/src/xlibi18n/mbWrap.c b/libX11/src/xlibi18n/mbWrap.c index 827c10b1c..5c1a9dd75 100644 --- a/libX11/src/xlibi18n/mbWrap.c +++ b/libX11/src/xlibi18n/mbWrap.c @@ -33,7 +33,7 @@ from The Open Group. * 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 Open Software Foundation + * documentation, and that the name of Open Software Foundation * not be used in advertising or publicity pertaining to distribution of the * software without specific, written prior permission. Open Software * Foundation makes no representations about the suitability of this @@ -43,13 +43,13 @@ from The Open Group. * OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. - * - * M. Collins OSF - */ + * + * M. Collins OSF + */ /* $XFree86: xc/lib/X11/mbWrap.c,v 1.6 2001/12/14 19:54:10 dawes Exp $ */ #ifdef HAVE_CONFIG_H @@ -122,7 +122,7 @@ XmbDrawImageString( (char *)text, text_len); } -int +int XmbTextEscapement( XFontSet font_set, _Xconst char *text, @@ -159,7 +159,7 @@ XmbTextPerCharExtents( XRectangle *max_logical_extents) { return (*font_set->methods->mb_extents_per_char) - (font_set, (char *)text, text_len, + (font_set, (char *)text, text_len, ink_extents_buffer, logical_extents_buffer, buffer_size, num_chars, max_ink_extents, max_logical_extents); } diff --git a/libX11/src/xlibi18n/utf8Wrap.c b/libX11/src/xlibi18n/utf8Wrap.c index bde3f041c..8d902509b 100644 --- a/libX11/src/xlibi18n/utf8Wrap.c +++ b/libX11/src/xlibi18n/utf8Wrap.c @@ -33,7 +33,7 @@ from The Open Group. * 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 Open Software Foundation + * documentation, and that the name of Open Software Foundation * not be used in advertising or publicity pertaining to distribution of the * software without specific, written prior permission. Open Software * Foundation makes no representations about the suitability of this @@ -43,13 +43,13 @@ from The Open Group. * OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. - * - * M. Collins OSF - */ + * + * M. Collins OSF + */ /* * Copyright 2000 by Bruno Haible * @@ -144,7 +144,7 @@ Xutf8DrawImageString( (char *)text, text_len); } -int +int Xutf8TextEscapement( XFontSet font_set, _Xconst char *text, @@ -181,7 +181,7 @@ Xutf8TextPerCharExtents( XRectangle *max_logical_extents) { return (*font_set->methods->utf8_extents_per_char) - (font_set, (char *)text, text_len, + (font_set, (char *)text, text_len, ink_extents_buffer, logical_extents_buffer, buffer_size, num_chars, max_ink_extents, max_logical_extents); } diff --git a/libX11/src/xlibi18n/wcWrap.c b/libX11/src/xlibi18n/wcWrap.c index a0314da7f..41161d590 100644 --- a/libX11/src/xlibi18n/wcWrap.c +++ b/libX11/src/xlibi18n/wcWrap.c @@ -44,13 +44,13 @@ from The Open Group. * OPEN SOFTWARE FOUNDATION DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL OPEN SOFTWARE FOUNDATIONN BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * 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. - * - * M. Collins OSF - */ + * + * M. Collins OSF + */ /* $XFree86: xc/lib/X11/wcWrap.c,v 1.6 2001/12/14 19:54:11 dawes Exp $ */ #ifdef HAVE_CONFIG_H @@ -122,7 +122,7 @@ XwcDrawImageString( text, text_len); } -int +int XwcTextEscapement( XFontSet font_set, _Xconst wchar_t *text, @@ -156,8 +156,8 @@ XwcTextPerCharExtents( XRectangle *max_ink_extents, XRectangle *max_logical_extents) { - return (*font_set->methods->wc_extents_per_char) - (font_set, text, text_len, + return (*font_set->methods->wc_extents_per_char) + (font_set, text, text_len, ink_extents_buffer, logical_extents_buffer, buffer_size, num_chars, max_ink_extents, max_logical_extents); } -- cgit v1.2.3