Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
687d44b6
Commit
687d44b6
authored
Jul 29, 2016
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update src files *[ch] to libX11 1.3.4
parent
ea24f0b0
Show whitespace changes
Inline
Side-by-side
Showing
238 changed files
with
1854 additions
and
1825 deletions
+1854
-1825
AllCells.c
nx-X11/lib/X11/AllCells.c
+10
-8
AllPlanes.c
nx-X11/lib/X11/AllPlanes.c
+12
-9
AllowEv.c
nx-X11/lib/X11/AllowEv.c
+4
-4
AutoRep.c
nx-X11/lib/X11/AutoRep.c
+2
-4
Backgnd.c
nx-X11/lib/X11/Backgnd.c
+4
-4
BdrWidth.c
nx-X11/lib/X11/BdrWidth.c
+4
-4
Bell.c
nx-X11/lib/X11/Bell.c
+3
-3
Border.c
nx-X11/lib/X11/Border.c
+4
-4
ChAccCon.c
nx-X11/lib/X11/ChAccCon.c
+5
-9
ChActPGb.c
nx-X11/lib/X11/ChActPGb.c
+5
-5
ChClMode.c
nx-X11/lib/X11/ChClMode.c
+3
-4
ChCmap.c
nx-X11/lib/X11/ChCmap.c
+4
-4
ChGC.c
nx-X11/lib/X11/ChGC.c
+5
-5
ChKeyCon.c
nx-X11/lib/X11/ChKeyCon.c
+4
-4
ChPntCon.c
nx-X11/lib/X11/ChPntCon.c
+7
-5
ChSaveSet.c
nx-X11/lib/X11/ChSaveSet.c
+10
-10
ChWAttrs.c
nx-X11/lib/X11/ChWAttrs.c
+5
-5
ChWindow.c
nx-X11/lib/X11/ChWindow.c
+5
-4
ChkMaskEv.c
nx-X11/lib/X11/ChkMaskEv.c
+9
-5
ChkTypEv.c
nx-X11/lib/X11/ChkTypEv.c
+8
-4
ChkTypWEv.c
nx-X11/lib/X11/ChkTypWEv.c
+9
-5
ChkWinEv.c
nx-X11/lib/X11/ChkWinEv.c
+10
-6
CirWin.c
nx-X11/lib/X11/CirWin.c
+4
-4
CirWinDn.c
nx-X11/lib/X11/CirWinDn.c
+3
-3
CirWinUp.c
nx-X11/lib/X11/CirWinUp.c
+3
-3
ClDisplay.c
nx-X11/lib/X11/ClDisplay.c
+8
-0
Clear.c
nx-X11/lib/X11/Clear.c
+3
-3
ClearArea.c
nx-X11/lib/X11/ClearArea.c
+8
-6
Cmap.h
nx-X11/lib/X11/Cmap.h
+0
-1
ConfWind.c
nx-X11/lib/X11/ConfWind.c
+7
-5
Context.c
nx-X11/lib/X11/Context.c
+2
-9
ConvSel.c
nx-X11/lib/X11/ConvSel.c
+7
-6
CopyArea.c
nx-X11/lib/X11/CopyArea.c
+11
-9
CopyCmap.c
nx-X11/lib/X11/CopyCmap.c
+3
-3
CopyGC.c
nx-X11/lib/X11/CopyGC.c
+5
-4
CopyPlane.c
nx-X11/lib/X11/CopyPlane.c
+12
-10
Cr.h
nx-X11/lib/X11/Cr.h
+0
-1
CrBFData.c
nx-X11/lib/X11/CrBFData.c
+0
-1
CrCmap.c
nx-X11/lib/X11/CrCmap.c
+7
-5
CrCursor.c
nx-X11/lib/X11/CrCursor.c
+8
-6
CrGC.c
nx-X11/lib/X11/CrGC.c
+22
-20
CrGlCur.c
nx-X11/lib/X11/CrGlCur.c
+17
-13
CrPFBData.c
nx-X11/lib/X11/CrPFBData.c
+9
-7
CrPixmap.c
nx-X11/lib/X11/CrPixmap.c
+6
-5
CrWindow.c
nx-X11/lib/X11/CrWindow.c
+10
-8
Cursor.c
nx-X11/lib/X11/Cursor.c
+3
-3
DefCursor.c
nx-X11/lib/X11/DefCursor.c
+4
-4
DelProp.c
nx-X11/lib/X11/DelProp.c
+4
-4
Depths.c
nx-X11/lib/X11/Depths.c
+4
-4
DestSubs.c
nx-X11/lib/X11/DestSubs.c
+3
-3
DestWind.c
nx-X11/lib/X11/DestWind.c
+3
-3
DisName.c
nx-X11/lib/X11/DisName.c
+0
-0
DrArc.c
nx-X11/lib/X11/DrArc.c
+10
-7
DrArcs.c
nx-X11/lib/X11/DrArcs.c
+6
-6
DrLine.c
nx-X11/lib/X11/DrLine.c
+8
-5
DrLines.c
nx-X11/lib/X11/DrLines.c
+7
-7
DrPoint.c
nx-X11/lib/X11/DrPoint.c
+6
-5
DrPoints.c
nx-X11/lib/X11/DrPoints.c
+7
-7
DrRect.c
nx-X11/lib/X11/DrRect.c
+8
-6
DrRects.c
nx-X11/lib/X11/DrRects.c
+6
-6
DrSegs.c
nx-X11/lib/X11/DrSegs.c
+6
-6
ErrDes.c
nx-X11/lib/X11/ErrDes.c
+33
-28
EvToWire.c
nx-X11/lib/X11/EvToWire.c
+6
-4
FSSaver.c
nx-X11/lib/X11/FSSaver.c
+5
-10
FSWrap.c
nx-X11/lib/X11/FSWrap.c
+16
-19
FetchName.c
nx-X11/lib/X11/FetchName.c
+8
-8
FillArc.c
nx-X11/lib/X11/FillArc.c
+10
-7
FillArcs.c
nx-X11/lib/X11/FillArcs.c
+6
-6
FillPoly.c
nx-X11/lib/X11/FillPoly.c
+8
-8
FillRct.c
nx-X11/lib/X11/FillRct.c
+8
-6
FillRcts.c
nx-X11/lib/X11/FillRcts.c
+6
-7
FilterEv.c
nx-X11/lib/X11/FilterEv.c
+4
-4
Flush.c
nx-X11/lib/X11/Flush.c
+2
-3
Font.c
nx-X11/lib/X11/Font.c
+19
-20
FontInfo.c
nx-X11/lib/X11/FontInfo.c
+4
-4
FontNames.c
nx-X11/lib/X11/FontNames.c
+1
-2
FreeCmap.c
nx-X11/lib/X11/FreeCmap.c
+3
-0
FreeCols.c
nx-X11/lib/X11/FreeCols.c
+6
-6
FreeCurs.c
nx-X11/lib/X11/FreeCurs.c
+3
-3
FreeEData.c
nx-X11/lib/X11/FreeEData.c
+1
-2
FreeGC.c
nx-X11/lib/X11/FreeGC.c
+3
-4
FreePix.c
nx-X11/lib/X11/FreePix.c
+3
-4
GCMisc.c
nx-X11/lib/X11/GCMisc.c
+20
-20
Geom.c
nx-X11/lib/X11/Geom.c
+0
-1
GetAtomNm.c
nx-X11/lib/X11/GetAtomNm.c
+8
-8
GetColor.c
nx-X11/lib/X11/GetColor.c
+2
-0
GetDflt.c
nx-X11/lib/X11/GetDflt.c
+6
-6
GetFPath.c
nx-X11/lib/X11/GetFPath.c
+4
-5
GetFProp.c
nx-X11/lib/X11/GetFProp.c
+5
-8
GetGCVals.c
nx-X11/lib/X11/GetGCVals.c
+5
-5
GetGeom.c
nx-X11/lib/X11/GetGeom.c
+10
-6
GetHColor.c
nx-X11/lib/X11/GetHColor.c
+4
-4
GetHints.c
nx-X11/lib/X11/GetHints.c
+34
-34
GetIFocus.c
nx-X11/lib/X11/GetIFocus.c
+4
-4
GetImage.c
nx-X11/lib/X11/GetImage.c
+21
-17
GetKCnt.c
nx-X11/lib/X11/GetKCnt.c
+4
-4
GetMoEv.c
nx-X11/lib/X11/GetMoEv.c
+6
-5
GetNrmHint.c
nx-X11/lib/X11/GetNrmHint.c
+11
-11
GetPCnt.c
nx-X11/lib/X11/GetPCnt.c
+5
-4
GetPntMap.c
nx-X11/lib/X11/GetPntMap.c
+4
-4
GetProp.c
nx-X11/lib/X11/GetProp.c
+13
-13
GetRGBCMap.c
nx-X11/lib/X11/GetRGBCMap.c
+6
-6
GetSOwner.c
nx-X11/lib/X11/GetSOwner.c
+3
-3
GetSSaver.c
nx-X11/lib/X11/GetSSaver.c
+6
-4
GetStCmap.c
nx-X11/lib/X11/GetStCmap.c
+5
-5
GetTxtProp.c
nx-X11/lib/X11/GetTxtProp.c
+17
-17
GetWMCMapW.c
nx-X11/lib/X11/GetWMCMapW.c
+5
-5
GetWMProto.c
nx-X11/lib/X11/GetWMProto.c
+5
-5
GrButton.c
nx-X11/lib/X11/GrButton.c
+11
-11
GrKey.c
nx-X11/lib/X11/GrKey.c
+8
-8
GrKeybd.c
nx-X11/lib/X11/GrKeybd.c
+7
-6
GrPointer.c
nx-X11/lib/X11/GrPointer.c
+10
-10
GrServer.c
nx-X11/lib/X11/GrServer.c
+1
-2
Host.c
nx-X11/lib/X11/Host.c
+24
-1
Iconify.c
nx-X11/lib/X11/Iconify.c
+4
-4
ImText.c
nx-X11/lib/X11/ImText.c
+0
-0
ImText16.c
nx-X11/lib/X11/ImText16.c
+0
-0
ImUtil.c
nx-X11/lib/X11/ImUtil.c
+68
-72
Imakefile
nx-X11/lib/X11/Imakefile
+7
-1
InitExt.c
nx-X11/lib/X11/InitExt.c
+107
-66
InsCmap.c
nx-X11/lib/X11/InsCmap.c
+3
-3
IntAtom.c
nx-X11/lib/X11/IntAtom.c
+14
-15
Key.h
nx-X11/lib/X11/Key.h
+0
-1
KeyBind.c
nx-X11/lib/X11/KeyBind.c
+23
-24
KeysymStr.c
nx-X11/lib/X11/KeysymStr.c
+1
-2
KillCl.c
nx-X11/lib/X11/KillCl.c
+3
-3
LiHosts.c
nx-X11/lib/X11/LiHosts.c
+26
-3
LiICmaps.c
nx-X11/lib/X11/LiICmaps.c
+4
-4
LiProps.c
nx-X11/lib/X11/LiProps.c
+4
-4
ListExt.c
nx-X11/lib/X11/ListExt.c
+4
-5
LockDis.c
nx-X11/lib/X11/LockDis.c
+0
-1
LookupCol.c
nx-X11/lib/X11/LookupCol.c
+2
-0
LowerWin.c
nx-X11/lib/X11/LowerWin.c
+3
-3
Macros.c
nx-X11/lib/X11/Macros.c
+124
-94
MapRaised.c
nx-X11/lib/X11/MapRaised.c
+3
-3
MapSubs.c
nx-X11/lib/X11/MapSubs.c
+3
-3
MapWindow.c
nx-X11/lib/X11/MapWindow.c
+3
-3
Misc.c
nx-X11/lib/X11/Misc.c
+9
-13
ModMap.c
nx-X11/lib/X11/ModMap.c
+6
-9
MoveWin.c
nx-X11/lib/X11/MoveWin.c
+5
-4
OCWrap.c
nx-X11/lib/X11/OCWrap.c
+2
-4
OMWrap.c
nx-X11/lib/X11/OMWrap.c
+3
-6
ParseCmd.c
nx-X11/lib/X11/ParseCmd.c
+1
-1
ParseCol.c
nx-X11/lib/X11/ParseCol.c
+2
-0
ParseGeom.c
nx-X11/lib/X11/ParseGeom.c
+0
-18
PixFormats.c
nx-X11/lib/X11/PixFormats.c
+3
-3
PmapBgnd.c
nx-X11/lib/X11/PmapBgnd.c
+4
-4
PmapBord.c
nx-X11/lib/X11/PmapBord.c
+4
-4
PolyReg.c
nx-X11/lib/X11/PolyReg.c
+7
-5
PolyTxt.c
nx-X11/lib/X11/PolyTxt.c
+8
-7
PolyTxt16.c
nx-X11/lib/X11/PolyTxt16.c
+8
-7
PropAlloc.c
nx-X11/lib/X11/PropAlloc.c
+5
-5
PutBEvent.c
nx-X11/lib/X11/PutBEvent.c
+17
-1
PutImage.c
nx-X11/lib/X11/PutImage.c
+11
-9
QuBest.c
nx-X11/lib/X11/QuBest.c
+8
-6
QuColor.c
nx-X11/lib/X11/QuColor.c
+5
-4
QuColors.c
nx-X11/lib/X11/QuColors.c
+5
-5
QuCurShp.c
nx-X11/lib/X11/QuCurShp.c
+7
-5
QuExt.c
nx-X11/lib/X11/QuExt.c
+0
-1
QuKeybd.c
nx-X11/lib/X11/QuKeybd.c
+3
-4
QuPntr.c
nx-X11/lib/X11/QuPntr.c
+10
-6
QuStipShp.c
nx-X11/lib/X11/QuStipShp.c
+7
-5
QuTileShp.c
nx-X11/lib/X11/QuTileShp.c
+7
-5
QuTree.c
nx-X11/lib/X11/QuTree.c
+7
-7
Quarks.c
nx-X11/lib/X11/Quarks.c
+2
-3
RaiseWin.c
nx-X11/lib/X11/RaiseWin.c
+3
-3
RdBitF.c
nx-X11/lib/X11/RdBitF.c
+17
-40
RecolorC.c
nx-X11/lib/X11/RecolorC.c
+5
-4
ReconfWM.c
nx-X11/lib/X11/ReconfWM.c
+6
-6
ReconfWin.c
nx-X11/lib/X11/ReconfWin.c
+6
-6
Region.c
nx-X11/lib/X11/Region.c
+0
-146
RepWindow.c
nx-X11/lib/X11/RepWindow.c
+6
-4
RestackWs.c
nx-X11/lib/X11/RestackWs.c
+5
-7
RotProp.c
nx-X11/lib/X11/RotProp.c
+7
-7
ScrResStr.c
nx-X11/lib/X11/ScrResStr.c
+1
-2
SelInput.c
nx-X11/lib/X11/SelInput.c
+4
-4
SendEvent.c
nx-X11/lib/X11/SendEvent.c
+11
-6
SetBack.c
nx-X11/lib/X11/SetBack.c
+4
-4
SetCRects.c
nx-X11/lib/X11/SetCRects.c
+8
-9
SetClMask.c
nx-X11/lib/X11/SetClMask.c
+4
-4
SetClOrig.c
nx-X11/lib/X11/SetClOrig.c
+5
-4
SetFPath.c
nx-X11/lib/X11/SetFPath.c
+4
-4
SetFont.c
nx-X11/lib/X11/SetFont.c
+4
-4
SetFore.c
nx-X11/lib/X11/SetFore.c
+4
-4
SetFunc.c
nx-X11/lib/X11/SetFunc.c
+4
-4
SetHints.c
nx-X11/lib/X11/SetHints.c
+57
-35
SetIFocus.c
nx-X11/lib/X11/SetIFocus.c
+5
-5
SetLStyle.c
nx-X11/lib/X11/SetLStyle.c
+7
-7
SetLocale.c
nx-X11/lib/X11/SetLocale.c
+2
-2
SetNrmHint.c
nx-X11/lib/X11/SetNrmHint.c
+26
-9
SetPMask.c
nx-X11/lib/X11/SetPMask.c
+4
-4
SetPntMap.c
nx-X11/lib/X11/SetPntMap.c
+7
-10
SetRGBCMap.c
nx-X11/lib/X11/SetRGBCMap.c
+6
-6
SetSOwner.c
nx-X11/lib/X11/SetSOwner.c
+5
-5
SetSSaver.c
nx-X11/lib/X11/SetSSaver.c
+6
-3
SetStCmap.c
nx-X11/lib/X11/SetStCmap.c
+8
-5
SetState.c
nx-X11/lib/X11/SetState.c
+7
-6
SetStip.c
nx-X11/lib/X11/SetStip.c
+4
-4
SetTSOrig.c
nx-X11/lib/X11/SetTSOrig.c
+5
-4
SetTile.c
nx-X11/lib/X11/SetTile.c
+4
-4
SetTxtProp.c
nx-X11/lib/X11/SetTxtProp.c
+17
-17
SetWMCMapW.c
nx-X11/lib/X11/SetWMCMapW.c
+5
-5
SetWMProto.c
nx-X11/lib/X11/SetWMProto.c
+5
-5
StBytes.c
nx-X11/lib/X11/StBytes.c
+15
-12
StColor.c
nx-X11/lib/X11/StColor.c
+4
-4
StColors.c
nx-X11/lib/X11/StColors.c
+5
-5
StNColor.c
nx-X11/lib/X11/StNColor.c
+2
-0
StName.c
nx-X11/lib/X11/StName.c
+0
-0
StrKeysym.c
nx-X11/lib/X11/StrKeysym.c
+1
-1
StrToText.c
nx-X11/lib/X11/StrToText.c
+4
-4
Sync.c
nx-X11/lib/X11/Sync.c
+3
-3
Text16.c
nx-X11/lib/X11/Text16.c
+0
-0
TextToStr.c
nx-X11/lib/X11/TextToStr.c
+5
-6
TrCoords.c
nx-X11/lib/X11/TrCoords.c
+9
-7
UIThrStubs.c
nx-X11/lib/X11/UIThrStubs.c
+0
-1
UndefCurs.c
nx-X11/lib/X11/UndefCurs.c
+3
-3
UngrabBut.c
nx-X11/lib/X11/UngrabBut.c
+5
-5
UngrabKbd.c
nx-X11/lib/X11/UngrabKbd.c
+3
-3
UngrabKey.c
nx-X11/lib/X11/UngrabKey.c
+5
-6
UngrabPtr.c
nx-X11/lib/X11/UngrabPtr.c
+3
-3
UngrabSvr.c
nx-X11/lib/X11/UngrabSvr.c
+2
-2
UninsCmap.c
nx-X11/lib/X11/UninsCmap.c
+3
-3
UnldFont.c
nx-X11/lib/X11/UnldFont.c
+3
-3
UnmapSubs.c
nx-X11/lib/X11/UnmapSubs.c
+3
-3
UnmapWin.c
nx-X11/lib/X11/UnmapWin.c
+3
-3
VisUtil.c
nx-X11/lib/X11/VisUtil.c
+11
-12
WMProps.c
nx-X11/lib/X11/WMProps.c
+11
-11
WarpPtr.c
nx-X11/lib/X11/WarpPtr.c
+10
-7
Window.c
nx-X11/lib/X11/Window.c
+13
-11
Withdraw.c
nx-X11/lib/X11/Withdraw.c
+4
-4
WrBitF.c
nx-X11/lib/X11/WrBitF.c
+1
-1
Xintatom.h
nx-X11/lib/X11/Xintatom.h
+0
-1
Xintconn.h
nx-X11/lib/X11/Xintconn.h
+2
-0
Xresinternal.h
nx-X11/lib/X11/Xresinternal.h
+0
-1
Xrm.c
nx-X11/lib/X11/Xrm.c
+4
-12
globals.c
nx-X11/lib/X11/globals.c
+0
-0
imConv.c
nx-X11/lib/X11/imConv.c
+24
-25
locking.c
nx-X11/lib/X11/locking.c
+42
-70
No files found.
nx-X11/lib/X11/AllCells.c
View file @
687d44b6
...
...
@@ -24,19 +24,21 @@ in this Software without prior written authorization from The Open Group.
*/
#define NEED_REPLIES
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xlibint.h"
Status
XAllocColorCells
(
dpy
,
cmap
,
contig
,
masks
,
nplanes
,
pixels
,
ncolors
)
register
Display
*
dpy
;
Colormap
cmap
;
Bool
contig
;
unsigned
int
ncolors
;
/* CARD16
*/
unsigned
int
nplanes
;
/* CARD16 */
unsigned
long
*
masks
;
/* LISTofCARD32 */
/* RETURN */
unsigned
long
*
pixels
;
/* LISTofCARD32 */
/* RETURN
*/
Status
XAllocColorCells
(
register
Display
*
dpy
,
Colormap
cmap
,
Bool
contig
,
unsigned
long
*
masks
,
/* LISTofCARD32 */
/* RETURN
*/
unsigned
int
nplanes
,
/* CARD16 */
unsigned
long
*
pixels
,
/* LISTofCARD32 */
/* RETURN */
unsigned
int
ncolors
)
/* CARD16
*/
{
Status
status
;
...
...
nx-X11/lib/X11/AllPlanes.c
View file @
687d44b6
...
...
@@ -29,15 +29,18 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XAllocColorPlanes
(
dpy
,
cmap
,
contig
,
pixels
,
ncolors
,
nreds
,
ngreens
,
nblues
,
rmask
,
gmask
,
bmask
)
register
Display
*
dpy
;
Colormap
cmap
;
Bool
contig
;
unsigned
long
*
pixels
;
/* LISTofCARD32 */
/* RETURN */
int
ncolors
;
int
nreds
,
ngreens
,
nblues
;
unsigned
long
*
rmask
,
*
gmask
,
*
bmask
;
/* CARD32 */
/* RETURN */
Status
XAllocColorPlanes
(
register
Display
*
dpy
,
Colormap
cmap
,
Bool
contig
,
unsigned
long
*
pixels
,
/* LISTofCARD32 */
/* RETURN */
int
ncolors
,
int
nreds
,
int
ngreens
,
int
nblues
,
unsigned
long
*
rmask
,
unsigned
long
*
gmask
,
unsigned
long
*
bmask
)
/* CARD32 */
/* RETURN */
{
xAllocColorPlanesReply
rep
;
Status
status
;
...
...
nx-X11/lib/X11/AllowEv.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XAllowEvents
(
dpy
,
mode
,
time
)
register
Display
*
dpy
;
int
mode
;
Time
time
;
XAllowEvents
(
register
Display
*
dpy
,
int
mode
,
Time
time
)
{
register
xAllowEventsReq
*
req
;
...
...
nx-X11/lib/X11/AutoRep.c
View file @
687d44b6
...
...
@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XAutoRepeatOn
(
dpy
)
register
Display
*
dpy
;
XAutoRepeatOn
(
register
Display
*
dpy
)
{
XKeyboardControl
values
;
values
.
auto_repeat_mode
=
AutoRepeatModeOn
;
...
...
@@ -40,8 +39,7 @@ register Display *dpy;
}
int
XAutoRepeatOff
(
dpy
)
register
Display
*
dpy
;
XAutoRepeatOff
(
register
Display
*
dpy
)
{
XKeyboardControl
values
;
values
.
auto_repeat_mode
=
AutoRepeatModeOff
;
...
...
nx-X11/lib/X11/Backgnd.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowBackground
(
dpy
,
w
,
pixel
)
register
Display
*
dpy
;
Window
w
;
unsigned
long
pixel
;
XSetWindowBackground
(
register
Display
*
dpy
,
Window
w
,
unsigned
long
pixel
)
{
register
xChangeWindowAttributesReq
*
req
;
...
...
nx-X11/lib/X11/BdrWidth.c
View file @
687d44b6
...
...
@@ -33,10 +33,10 @@ from The Open Group.
#include "Xlibint.h"
int
XSetWindowBorderWidth
(
dpy
,
w
,
width
)
Display
*
dpy
;
Window
w
;
unsigned
int
width
;
XSetWindowBorderWidth
(
Display
*
dpy
,
Window
w
,
unsigned
int
width
)
{
unsigned
long
lwidth
=
width
;
/* must be CARD32 */
...
...
nx-X11/lib/X11/Bell.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XBell
(
dpy
,
percent
)
register
Display
*
dpy
;
int
percent
;
XBell
(
register
Display
*
dpy
,
int
percent
)
{
register
xBellReq
*
req
;
...
...
nx-X11/lib/X11/Border.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowBorder
(
dpy
,
w
,
pixel
)
register
Display
*
dpy
;
Window
w
;
unsigned
long
pixel
;
XSetWindowBorder
(
register
Display
*
dpy
,
Window
w
,
unsigned
long
pixel
)
{
register
xChangeWindowAttributesReq
*
req
;
...
...
nx-X11/lib/X11/ChAccCon.c
View file @
687d44b6
...
...
@@ -30,25 +30,21 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XEnableAccessControl
(
dpy
)
register
Display
*
dpy
;
XEnableAccessControl
(
register
Display
*
dpy
)
{
return
XSetAccessControl
(
dpy
,
EnableAccess
);
}
int
XDisableAccessControl
(
dpy
)
register
Display
*
dpy
;
XDisableAccessControl
(
register
Display
*
dpy
)
{
return
XSetAccessControl
(
dpy
,
DisableAccess
);
}
int
XSetAccessControl
(
dpy
,
mode
)
register
Display
*
dpy
;
int
mode
;
XSetAccessControl
(
register
Display
*
dpy
,
int
mode
)
{
register
xSetAccessControlReq
*
req
;
...
...
nx-X11/lib/X11/ChActPGb.c
View file @
687d44b6
...
...
@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangeActivePointerGrab
(
dpy
,
event_mask
,
curs
,
time
)
register
Display
*
dpy
;
unsigned
int
event_mask
;
/* CARD16 */
Cursor
curs
;
Time
time
;
XChangeActivePointerGrab
(
register
Display
*
dpy
,
unsigned
int
event_mask
,
/* CARD16 */
Cursor
curs
,
Time
time
)
{
register
xChangeActivePointerGrabReq
*
req
;
...
...
nx-X11/lib/X11/ChClMode.c
View file @
687d44b6
...
...
@@ -30,10 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetCloseDownMode
(
dpy
,
mode
)
register
Display
*
dpy
;
int
mode
;
XSetCloseDownMode
(
register
Display
*
dpy
,
int
mode
)
{
register
xSetCloseDownModeReq
*
req
;
...
...
nx-X11/lib/X11/ChCmap.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowColormap
(
dpy
,
w
,
colormap
)
register
Display
*
dpy
;
Window
w
;
Colormap
colormap
;
XSetWindowColormap
(
register
Display
*
dpy
,
Window
w
,
Colormap
colormap
)
{
register
xChangeWindowAttributesReq
*
req
;
...
...
nx-X11/lib/X11/ChGC.c
View file @
687d44b6
...
...
@@ -31,11 +31,11 @@ in this Software without prior written authorization from The Open Group.
#include "Cr.h"
int
XChangeGC
(
dpy
,
gc
,
valuemask
,
values
)
register
Display
*
dpy
;
GC
gc
;
unsigned
long
valuemask
;
XGCValues
*
values
;
XChangeGC
(
register
Display
*
dpy
,
GC
gc
,
unsigned
long
valuemask
,
XGCValues
*
values
)
{
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/ChKeyCon.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangeKeyboardControl
(
dpy
,
mask
,
value_list
)
register
Display
*
dpy
;
unsigned
long
mask
;
XKeyboardControl
*
value_list
;
XChangeKeyboardControl
(
register
Display
*
dpy
,
unsigned
long
mask
,
XKeyboardControl
*
value_list
)
{
unsigned
long
values
[
8
];
register
unsigned
long
*
value
=
values
;
...
...
nx-X11/lib/X11/ChPntCon.c
View file @
687d44b6
...
...
@@ -30,11 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangePointerControl
(
dpy
,
do_acc
,
do_thresh
,
acc_numerator
,
acc_denominator
,
threshold
)
register
Display
*
dpy
;
Bool
do_acc
,
do_thresh
;
int
acc_numerator
,
acc_denominator
,
threshold
;
XChangePointerControl
(
register
Display
*
dpy
,
Bool
do_acc
,
Bool
do_thresh
,
int
acc_numerator
,
int
acc_denominator
,
int
threshold
)
{
register
xChangePointerControlReq
*
req
;
...
...
nx-X11/lib/X11/ChSaveSet.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XChangeSaveSet
(
dpy
,
win
,
mode
)
register
Display
*
dpy
;
Window
win
;
int
mode
;
XChangeSaveSet
(
register
Display
*
dpy
,
Window
win
,
int
mode
)
{
register
xChangeSaveSetReq
*
req
;
...
...
@@ -47,17 +47,17 @@ int mode;
}
int
XAddToSaveSet
(
dpy
,
win
)
register
Display
*
dpy
;
Window
win
;
XAddToSaveSet
(
register
Display
*
dpy
,
Window
win
)
{
return
XChangeSaveSet
(
dpy
,
win
,
SetModeInsert
);
}
int
XRemoveFromSaveSet
(
dpy
,
win
)
register
Display
*
dpy
;
Window
win
;
XRemoveFromSaveSet
(
register
Display
*
dpy
,
Window
win
)
{
return
XChangeSaveSet
(
dpy
,
win
,
SetModeDelete
);
}
nx-X11/lib/X11/ChWAttrs.c
View file @
687d44b6
...
...
@@ -36,11 +36,11 @@ in this Software without prior written authorization from The Open Group.
CWDontPropagate|CWColormap|CWCursor)
int
XChangeWindowAttributes
(
dpy
,
w
,
valuemask
,
attributes
)
register
Display
*
dpy
;
Window
w
;
unsigned
long
valuemask
;
XSetWindowAttributes
*
attributes
;
XChangeWindowAttributes
(
register
Display
*
dpy
,
Window
w
,
unsigned
long
valuemask
,
XSetWindowAttributes
*
attributes
)
{
register
xChangeWindowAttributesReq
*
req
;
...
...
nx-X11/lib/X11/ChWindow.c
View file @
687d44b6
...
...
@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XResizeWindow
(
dpy
,
w
,
width
,
height
)
register
Display
*
dpy
;
Window
w
;
unsigned
int
width
,
height
;
XResizeWindow
(
register
Display
*
dpy
,
Window
w
,
unsigned
int
width
,
unsigned
int
height
)
{
register
xConfigureWindowReq
*
req
;
...
...
nx-X11/lib/X11/ChkMaskEv.c
View file @
687d44b6
...
...
@@ -41,22 +41,26 @@ extern long const _Xevent_to_mask[];
* matches, return. If all else fails, tell the user no events found.
*/
Bool
XCheckMaskEvent
(
dpy
,
mask
,
event
)
register
Display
*
dpy
;
long
mask
;
/* Selected event mask. */
register
XEvent
*
event
;
/* XEvent to be filled in. */
Bool
XCheckMaskEvent
(
register
Display
*
dpy
,
long
mask
,
/* Selected event mask. */
register
XEvent
*
event
)
/* XEvent to be filled in. */
{
register
_XQEvent
*
prev
,
*
qelt
;
unsigned
long
qe_serial
=
0
;
int
n
;
/* time through count */
LockDisplay
(
dpy
);
/* Delete unclaimed cookies */
_XFreeEventCookies
(
dpy
);
prev
=
NULL
;
for
(
n
=
3
;
--
n
>=
0
;)
{
for
(
qelt
=
prev
?
prev
->
next
:
dpy
->
head
;
qelt
;
prev
=
qelt
,
qelt
=
qelt
->
next
)
{
if
((
qelt
->
event
.
type
<
LAST
Event
)
&&
if
((
qelt
->
event
.
type
<
Generic
Event
)
&&
(
_Xevent_to_mask
[
qelt
->
event
.
type
]
&
mask
)
&&
((
qelt
->
event
.
type
!=
MotionNotify
)
||
(
mask
&
AllPointers
)
||
...
...
nx-X11/lib/X11/ChkTypEv.c
View file @
687d44b6
...
...
@@ -35,16 +35,20 @@ in this Software without prior written authorization from The Open Group.
* matches, return. If all else fails, tell the user no events found.
*/
Bool
XCheckTypedEvent
(
dpy
,
type
,
event
)
register
Display
*
dpy
;
int
type
;
/* Selected event type. */
register
XEvent
*
event
;
/* XEvent to be filled in. */
Bool
XCheckTypedEvent
(
register
Display
*
dpy
,
int
type
,
/* Selected event type. */
register
XEvent
*
event
)
/* XEvent to be filled in. */
{
register
_XQEvent
*
prev
,
*
qelt
;
unsigned
long
qe_serial
=
0
;
int
n
;
/* time through count */
LockDisplay
(
dpy
);
/* Delete unclaimed cookies */
_XFreeEventCookies
(
dpy
);
prev
=
NULL
;
for
(
n
=
3
;
--
n
>=
0
;)
{
for
(
qelt
=
prev
?
prev
->
next
:
dpy
->
head
;
...
...
nx-X11/lib/X11/ChkTypWEv.c
View file @
687d44b6
...
...
@@ -35,17 +35,21 @@ in this Software without prior written authorization from The Open Group.
* matches, return. If all else fails, tell the user no events found.
*/
Bool
XCheckTypedWindowEvent
(
dpy
,
w
,
type
,
event
)
register
Display
*
dpy
;
Window
w
;
/* Selected window. */
int
type
;
/* Selected event type. */
register
XEvent
*
event
;
/* XEvent to be filled in. */
Bool
XCheckTypedWindowEvent
(
register
Display
*
dpy
,
Window
w
,
/* Selected window. */
int
type
,
/* Selected event type. */
register
XEvent
*
event
)
/* XEvent to be filled in. */
{
register
_XQEvent
*
prev
,
*
qelt
;
unsigned
long
qe_serial
=
0
;
int
n
;
/* time through count */
LockDisplay
(
dpy
);
/* Delete unclaimed cookies */
_XFreeEventCookies
(
dpy
);
prev
=
NULL
;
for
(
n
=
3
;
--
n
>=
0
;)
{
for
(
qelt
=
prev
?
prev
->
next
:
dpy
->
head
;
...
...
nx-X11/lib/X11/ChkWinEv.c
View file @
687d44b6
...
...
@@ -40,24 +40,28 @@ extern long const _Xevent_to_mask[];
* matches, return. If all else fails, tell the user no events found.
*/
Bool
XCheckWindowEvent
(
dpy
,
w
,
mask
,
event
)
register
Display
*
dpy
;
Window
w
;
/* Selected window. */
long
mask
;
/* Selected event mask. */
register
XEvent
*
event
;
/* XEvent to be filled in. */
Bool
XCheckWindowEvent
(
register
Display
*
dpy
,
Window
w
,
/* Selected window. */
long
mask
,
/* Selected event mask. */
register
XEvent
*
event
)
/* XEvent to be filled in. */
{
register
_XQEvent
*
prev
,
*
qelt
;
unsigned
long
qe_serial
=
0
;
int
n
;
/* time through count */
LockDisplay
(
dpy
);
/* Delete unclaimed cookies */
_XFreeEventCookies
(
dpy
);
prev
=
NULL
;
for
(
n
=
3
;
--
n
>=
0
;)
{
for
(
qelt
=
prev
?
prev
->
next
:
dpy
->
head
;
qelt
;
prev
=
qelt
,
qelt
=
qelt
->
next
)
{
if
((
qelt
->
event
.
xany
.
window
==
w
)
&&
(
qelt
->
event
.
type
<
LAST
Event
)
&&
(
qelt
->
event
.
type
<
Generic
Event
)
&&
(
_Xevent_to_mask
[
qelt
->
event
.
type
]
&
mask
)
&&
((
qelt
->
event
.
type
!=
MotionNotify
)
||
(
mask
&
AllPointers
)
||
...
...
nx-X11/lib/X11/CirWin.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCirculateSubwindows
(
dpy
,
w
,
direction
)
register
Display
*
dpy
;
Window
w
;
int
direction
;
XCirculateSubwindows
(
register
Display
*
dpy
,
Window
w
,
int
direction
)
{
register
xCirculateWindowReq
*
req
;
...
...
nx-X11/lib/X11/CirWinDn.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCirculateSubwindowsDown
(
dpy
,
w
)
register
Display
*
dpy
;
Window
w
;
XCirculateSubwindowsDown
(
register
Display
*
dpy
,
Window
w
)
{
register
xCirculateWindowReq
*
req
;
...
...
nx-X11/lib/X11/CirWinUp.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCirculateSubwindowsUp
(
dpy
,
w
)
register
Display
*
dpy
;
Window
w
;
XCirculateSubwindowsUp
(
register
Display
*
dpy
,
Window
w
)
{
register
xCirculateWindowReq
*
req
;
...
...
nx-X11/lib/X11/ClDisplay.c
View file @
687d44b6
...
...
@@ -30,7 +30,11 @@ from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#if USE_XCB
#include "Xxcbint.h"
#else
/* !USE_XCB */
#include <nx-X11/Xtrans/Xtrans.h>
#endif
/* USE_XCB */
#include "Xlib.h"
#include "Xlibint.h"
#include "Xintconn.h"
...
...
@@ -68,7 +72,11 @@ XCloseDisplay (
if
(
dpy
->
request
!=
dpy
->
last_request_read
)
XSync
(
dpy
,
1
);
}
#if USE_XCB
xcb_disconnect
(
dpy
->
xcb
->
connection
);
#else
/* !USE_XCB */
_XDisconnectDisplay
(
dpy
->
trans_conn
);
#endif
/* USE_XCB */
_XFreeDisplayStructure
(
dpy
);
return
0
;
}
nx-X11/lib/X11/Clear.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XClearWindow
(
dpy
,
w
)
register
Display
*
dpy
;
Window
w
;
XClearWindow
(
register
Display
*
dpy
,
Window
w
)
{
register
xClearAreaReq
*
req
;
...
...
nx-X11/lib/X11/ClearArea.c
View file @
687d44b6
...
...
@@ -30,12 +30,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XClearArea
(
dpy
,
w
,
x
,
y
,
width
,
height
,
exposures
)
register
Display
*
dpy
;
Window
w
;
int
x
,
y
;
unsigned
int
width
,
height
;
Bool
exposures
;
XClearArea
(
register
Display
*
dpy
,
Window
w
,
int
x
,
int
y
,
unsigned
int
width
,
unsigned
int
height
,
Bool
exposures
)
{
register
xClearAreaReq
*
req
;
...
...
nx-X11/lib/X11/Cmap.h
View file @
687d44b6
/* $XFree86$ */
#ifndef _CMAP_H_
#define _CMAP_H_
...
...
nx-X11/lib/X11/ConfWind.c
View file @
687d44b6
...
...
@@ -30,11 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XMoveResizeWindow
(
dpy
,
w
,
x
,
y
,
width
,
height
)
register
Display
*
dpy
;
Window
w
;
int
x
,
y
;
unsigned
int
width
,
height
;
XMoveResizeWindow
(
register
Display
*
dpy
,
Window
w
,
int
x
,
int
y
,
unsigned
int
width
,
unsigned
int
height
)
{
register
xConfigureWindowReq
*
req
;
...
...
nx-X11/lib/X11/Context.c
View file @
687d44b6
...
...
@@ -233,11 +233,7 @@ int XSaveContext(
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
;
...
...
@@ -272,10 +268,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
;
...
...
nx-X11/lib/X11/ConvSel.c
View file @
687d44b6
...
...
@@ -30,12 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XConvertSelection
(
dpy
,
selection
,
target
,
property
,
requestor
,
time
)
register
Display
*
dpy
;
Atom
selection
,
target
;
Atom
property
;
Window
requestor
;
Time
time
;
XConvertSelection
(
register
Display
*
dpy
,
Atom
selection
,
Atom
target
,
Atom
property
,
Window
requestor
,
Time
time
)
{
register
xConvertSelectionReq
*
req
;
...
...
nx-X11/lib/X11/CopyArea.c
View file @
687d44b6
...
...
@@ -30,15 +30,17 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCopyArea
(
dpy
,
src_drawable
,
dst_drawable
,
gc
,
src_x
,
src_y
,
width
,
height
,
dst_x
,
dst_y
)
register
Display
*
dpy
;
Drawable
src_drawable
,
dst_drawable
;
GC
gc
;
int
src_x
,
src_y
;
unsigned
int
width
,
height
;
int
dst_x
,
dst_y
;
XCopyArea
(
register
Display
*
dpy
,
Drawable
src_drawable
,
Drawable
dst_drawable
,
GC
gc
,
int
src_x
,
int
src_y
,
unsigned
int
width
,
unsigned
int
height
,
int
dst_x
,
int
dst_y
)
{
register
xCopyAreaReq
*
req
;
...
...
nx-X11/lib/X11/CopyCmap.c
View file @
687d44b6
...
...
@@ -40,9 +40,9 @@ extern XcmsCmapRec * _XcmsCopyCmapRecAndFree(Display *dpy,
Colormap
copy_cmap
);
#endif
Colormap
XCopyColormapAndFree
(
dpy
,
src_cmap
)
register
Display
*
dpy
;
Colormap
src_cmap
;
Colormap
XCopyColormapAndFree
(
register
Display
*
dpy
,
Colormap
src_cmap
)
{
Colormap
mid
;
register
xCopyColormapAndFreeReq
*
req
;
...
...
nx-X11/lib/X11/CopyGC.c
View file @
687d44b6
...
...
@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCopyGC
(
dpy
,
srcGC
,
mask
,
destGC
)
register
Display
*
dpy
;
unsigned
long
mask
;
/* which ones to set initially */
GC
srcGC
,
destGC
;
XCopyGC
(
register
Display
*
dpy
,
GC
srcGC
,
unsigned
long
mask
,
/* which ones to set initially */
GC
destGC
)
{
register
XGCValues
*
destgv
=
&
destGC
->
values
,
*
srcgv
=
&
srcGC
->
values
;
...
...
nx-X11/lib/X11/CopyPlane.c
View file @
687d44b6
...
...
@@ -30,16 +30,18 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XCopyPlane
(
dpy
,
src_drawable
,
dst_drawable
,
gc
,
src_x
,
src_y
,
width
,
height
,
dst_x
,
dst_y
,
bit_plane
)
register
Display
*
dpy
;
Drawable
src_drawable
,
dst_drawable
;
GC
gc
;
int
src_x
,
src_y
;
unsigned
int
width
,
height
;
int
dst_x
,
dst_y
;
unsigned
long
bit_plane
;
XCopyPlane
(
register
Display
*
dpy
,
Drawable
src_drawable
,
Drawable
dst_drawable
,
GC
gc
,
int
src_x
,
int
src_y
,
unsigned
int
width
,
unsigned
int
height
,
int
dst_x
,
int
dst_y
,
unsigned
long
bit_plane
)
{
register
xCopyPlaneReq
*
req
;
...
...
nx-X11/lib/X11/Cr.h
View file @
687d44b6
/* $XFree86$ */
#ifndef _CR_H_
#define _CR_H_
...
...
nx-X11/lib/X11/CrBFData.c
View file @
687d44b6
...
...
@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#include <config.h>
...
...
nx-X11/lib/X11/CrCmap.c
View file @
687d44b6
...
...
@@ -31,11 +31,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xcmsint.h"
Colormap
XCreateColormap
(
dpy
,
w
,
visual
,
alloc
)
register
Display
*
dpy
;
Window
w
;
Visual
*
visual
;
int
alloc
;
Colormap
XCreateColormap
(
register
Display
*
dpy
,
Window
w
,
Visual
*
visual
,
int
alloc
)
{
register
xCreateColormapReq
*
req
;
Colormap
mid
;
...
...
@@ -51,7 +51,9 @@ int alloc;
UnlockDisplay
(
dpy
);
SyncHandle
();
#ifdef XCMS
_XcmsAddCmapRec
(
dpy
,
mid
,
w
,
visual
);
#endif
return
(
mid
);
}
nx-X11/lib/X11/CrCursor.c
View file @
687d44b6
...
...
@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#include <config.h>
...
...
@@ -41,11 +40,14 @@ _XTryShapeBitmapCursor (Display *dpy,
unsigned
int
y
);
#endif
Cursor
XCreatePixmapCursor
(
dpy
,
source
,
mask
,
foreground
,
background
,
x
,
y
)
register
Display
*
dpy
;
Pixmap
source
,
mask
;
XColor
*
foreground
,
*
background
;
unsigned
int
x
,
y
;
Cursor
XCreatePixmapCursor
(
register
Display
*
dpy
,
Pixmap
source
,
Pixmap
mask
,
XColor
*
foreground
,
XColor
*
background
,
unsigned
int
x
,
unsigned
int
y
)
{
register
xCreateCursorReq
*
req
;
...
...
nx-X11/lib/X11/CrGC.c
View file @
687d44b6
...
...
@@ -61,11 +61,11 @@ static void _XGenerateGCList(
GC
gc
,
xReq
*
req
);
GC
XCreateGC
(
dpy
,
d
,
valuemask
,
values
)
register
Display
*
dpy
;
Drawable
d
;
/* Window or Pixmap for which depth matches */
unsigned
long
valuemask
;
/* which ones to set initially */
XGCValues
*
values
;
/* the values themselves */
GC
XCreateGC
(
register
Display
*
dpy
,
Drawable
d
,
/* Window or Pixmap for which depth matches */
unsigned
long
valuemask
,
/* which ones to set initially */
XGCValues
*
values
)
/* the values themselves */
{
register
GC
gc
;
register
xCreateGCReq
*
req
;
...
...
@@ -161,11 +161,11 @@ _XGenerateGCList (
int
_XUpdateGCCache
(
gc
,
mask
,
attr
)
register
unsigned
long
mask
;
register
XGCValues
*
attr
;
register
GC
gc
;
{
_XUpdateGCCache
(
register
GC
gc
,
register
unsigned
long
mask
,
register
XGCValues
*
attr
)
{
register
XGCValues
*
gv
=
&
gc
->
values
;
if
(
mask
&
GCFunction
)
...
...
@@ -308,13 +308,13 @@ _XUpdateGCCache (gc, mask, attr)
gc
->
dashes
=
0
;
}
return
0
;
}
}
/* can only call when display is already locked. */
void
_XFlushGCCache
(
dpy
,
gc
)
Display
*
dpy
;
GC
gc
;
void
_XFlushGCCache
(
Display
*
dpy
,
GC
gc
)
{
register
xChangeGCReq
*
req
;
register
_XExtension
*
ext
;
...
...
@@ -331,13 +331,15 @@ void _XFlushGCCache(dpy, gc)
}
}
void
XFlushGC
(
dpy
,
gc
)
Display
*
dpy
;
GC
gc
;
void
XFlushGC
(
Display
*
dpy
,
GC
gc
)
{
FlushGC
(
dpy
,
gc
);
}
GContext
XGContextFromGC
(
gc
)
GC
gc
;
{
return
(
gc
->
gid
);
}
GContext
XGContextFromGC
(
GC
gc
)
{
return
(
gc
->
gid
);
}
nx-X11/lib/X11/CrGlCur.c
View file @
687d44b6
...
...
@@ -44,14 +44,18 @@ 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_
d
t
XModuleType
;
typedef
shl_t
XModuleType
;
#else
typedef
void
*
XModuleType
;
#endif
#ifndef LIBXCURSOR
#define LIBXCURSOR "libXcursor.so"
#define LIBXCURSOR "libXcursor.so
.1
"
#endif
static
char
libraryName
[]
=
LIBXCURSOR
;
...
...
@@ -76,14 +80,14 @@ open_library (void)
break
;
*
dot
=
'\0'
;
}
return
0
;
return
NULL
;
}
static
void
*
fetch_symbol
(
XModuleType
module
,
char
*
under_symbol
)
fetch_symbol
(
XModuleType
module
,
c
onst
c
har
*
under_symbol
)
{
void
*
result
=
NULL
;
char
*
symbol
=
under_symbol
+
1
;
c
onst
c
har
*
symbol
=
under_symbol
+
1
;
#if defined(hpux)
int
getsyms_cnt
,
i
;
struct
shl_symbol
*
symbols
;
...
...
@@ -218,14 +222,14 @@ _XTryShapeBitmapCursor (Display *dpy,
}
#endif
Cursor
XCreateGlyphCursor
(
dpy
,
source_font
,
mask_font
,
source_char
,
mask_char
,
foreground
,
background
)
register
Display
*
dpy
;
Font
source_font
,
mask_font
;
unsigned
int
source_char
,
mask_char
;
XColor
_Xconst
*
foreground
,
*
background
;
Cursor
XCreateGlyphCursor
(
register
Display
*
dpy
,
Font
source_font
,
Font
mask_font
,
unsigned
int
source_char
,
unsigned
int
mask_char
,
XColor
_Xconst
*
foreground
,
XColor
_Xconst
*
background
)
{
Cursor
cid
;
register
xCreateGlyphCursorReq
*
req
;
...
...
nx-X11/lib/X11/CrPFBData.c
View file @
687d44b6
...
...
@@ -48,13 +48,15 @@ in this Software without prior written authorization from The Open Group.
* xoffset=0
* no extra bytes per line
*/
Pixmap
XCreatePixmapFromBitmapData
(
display
,
d
,
data
,
width
,
height
,
fg
,
bg
,
depth
)
Display
*
display
;
Drawable
d
;
char
*
data
;
unsigned
int
width
,
height
;
unsigned
long
fg
,
bg
;
unsigned
int
depth
;
Pixmap
XCreatePixmapFromBitmapData
(
Display
*
display
,
Drawable
d
,
char
*
data
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
long
fg
,
unsigned
long
bg
,
unsigned
int
depth
)
{
XImage
ximage
;
GC
gc
;
...
...
nx-X11/lib/X11/CrPixmap.c
View file @
687d44b6
...
...
@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#include <config.h>
...
...
@@ -38,10 +37,12 @@ _XNoticeCreateBitmap (Display *dpy,
unsigned
int
height
);
#endif
Pixmap
XCreatePixmap
(
dpy
,
d
,
width
,
height
,
depth
)
register
Display
*
dpy
;
Drawable
d
;
unsigned
int
width
,
height
,
depth
;
Pixmap
XCreatePixmap
(
register
Display
*
dpy
,
Drawable
d
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
depth
)
{
Pixmap
pid
;
register
xCreatePixmapReq
*
req
;
...
...
nx-X11/lib/X11/CrWindow.c
View file @
687d44b6
...
...
@@ -29,14 +29,16 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Window
XCreateSimpleWindow
(
dpy
,
parent
,
x
,
y
,
width
,
height
,
borderWidth
,
border
,
background
)
register
Display
*
dpy
;
Window
parent
;
int
x
,
y
;
unsigned
int
width
,
height
,
borderWidth
;
unsigned
long
border
;
unsigned
long
background
;
Window
XCreateSimpleWindow
(
register
Display
*
dpy
,
Window
parent
,
int
x
,
int
y
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
borderWidth
,
unsigned
long
border
,
unsigned
long
background
)
{
Window
wid
;
register
xCreateWindowReq
*
req
;
...
...
nx-X11/lib/X11/Cursor.c
View file @
687d44b6
...
...
@@ -31,9 +31,9 @@ in this Software without prior written authorization from The Open Group.
static
XColor
_Xconst
foreground
=
{
0
,
0
,
0
,
0
};
/* black */
static
XColor
_Xconst
background
=
{
0
,
65535
,
65535
,
65535
};
/* white */
Cursor
XCreateFontCursor
(
dpy
,
which
)
Display
*
dpy
;
unsigned
int
which
;
Cursor
XCreateFontCursor
(
Display
*
dpy
,
unsigned
int
which
)
{
/*
* the cursor font contains the shape glyph followed by the mask
...
...
nx-X11/lib/X11/DefCursor.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDefineCursor
(
dpy
,
w
,
cursor
)
register
Display
*
dpy
;
Window
w
;
Cursor
cursor
;
XDefineCursor
(
register
Display
*
dpy
,
Window
w
,
Cursor
cursor
)
{
register
xChangeWindowAttributesReq
*
req
;
...
...
nx-X11/lib/X11/DelProp.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDeleteProperty
(
dpy
,
window
,
property
)
register
Display
*
dpy
;
Window
window
;
Atom
property
;
XDeleteProperty
(
register
Display
*
dpy
,
Window
window
,
Atom
property
)
{
register
xDeletePropertyReq
*
req
;
...
...
nx-X11/lib/X11/Depths.c
View file @
687d44b6
...
...
@@ -33,10 +33,10 @@ in this Software without prior written authorization from The Open Group.
/*
* XListDepths - return info from connection setup
*/
int
*
XListDepths
(
dpy
,
scrnum
,
countp
)
Display
*
dpy
;
int
scrnum
;
int
*
countp
;
int
*
XListDepths
(
Display
*
dpy
,
int
scrnum
,
int
*
countp
)
{
Screen
*
scr
;
int
count
;
...
...
nx-X11/lib/X11/DestSubs.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDestroySubwindows
(
dpy
,
win
)
register
Display
*
dpy
;
Window
win
;
XDestroySubwindows
(
register
Display
*
dpy
,
Window
win
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/DestWind.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDestroyWindow
(
dpy
,
w
)
register
Display
*
dpy
;
Window
w
;
XDestroyWindow
(
register
Display
*
dpy
,
Window
w
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/DisName.c
View file @
687d44b6
nx-X11/lib/X11/DrArc.c
View file @
687d44b6
...
...
@@ -36,13 +36,16 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDrawArc
(
dpy
,
d
,
gc
,
x
,
y
,
width
,
height
,
angle1
,
angle2
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x
,
y
;
/* INT16 */
unsigned
int
width
,
height
;
/* CARD16 */
int
angle1
,
angle2
;
/* INT16 */
XDrawArc
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
,
/* INT16 */
unsigned
int
width
,
unsigned
int
height
,
/* CARD16 */
int
angle1
,
int
angle2
)
/* INT16 */
{
register
xPolyArcReq
*
req
;
register
xArc
*
arc
;
...
...
nx-X11/lib/X11/DrArcs.c
View file @
687d44b6
...
...
@@ -32,12 +32,12 @@ in this Software without prior written authorization from The Open Group.
#define arc_scale (SIZEOF(xArc) / 4)
int
XDrawArcs
(
dpy
,
d
,
gc
,
arcs
,
n_arcs
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XArc
*
arcs
;
int
n_arcs
;
XDrawArcs
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XArc
*
arcs
,
int
n_arcs
)
{
register
xPolyArcReq
*
req
;
register
long
len
;
...
...
nx-X11/lib/X11/DrLine.c
View file @
687d44b6
...
...
@@ -35,11 +35,14 @@ in this Software without prior written authorization from The Open Group.
#define zsize (SIZEOF(xPolySegmentReq) + ZLNSPERBATCH * SIZEOF(xSegment))
int
XDrawLine
(
dpy
,
d
,
gc
,
x1
,
y1
,
x2
,
y2
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x1
,
y1
,
x2
,
y2
;
XDrawLine
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x1
,
int
y1
,
int
x2
,
int
y2
)
{
register
xSegment
*
segment
;
...
...
nx-X11/lib/X11/DrLines.c
View file @
687d44b6
...
...
@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDrawLines
(
dpy
,
d
,
gc
,
points
,
npoints
,
mode
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XPoint
*
points
;
int
npoints
;
int
mode
;
XDrawLines
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XPoint
*
points
,
int
npoints
,
int
mode
)
{
register
xPolyLineReq
*
req
;
register
long
length
;
...
...
nx-X11/lib/X11/DrPoint.c
View file @
687d44b6
...
...
@@ -34,11 +34,12 @@ in this Software without prior written authorization from The Open Group.
#define size (SIZEOF(xPolyPointReq) + PTSPERBATCH * SIZEOF(xPoint))
int
XDrawPoint
(
dpy
,
d
,
gc
,
x
,
y
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x
,
y
;
/* INT16 */
XDrawPoint
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
)
/* INT16 */
{
xPoint
*
point
;
...
...
nx-X11/lib/X11/DrPoints.c
View file @
687d44b6
...
...
@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDrawPoints
(
dpy
,
d
,
gc
,
points
,
n_points
,
mode
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XPoint
*
points
;
int
n_points
;
int
mode
;
/* CoordMode */
XDrawPoints
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XPoint
*
points
,
int
n_points
,
int
mode
)
/* CoordMode */
{
register
xPolyPointReq
*
req
;
register
long
nbytes
;
...
...
nx-X11/lib/X11/DrRect.c
View file @
687d44b6
...
...
@@ -35,12 +35,14 @@ in this Software without prior written authorization from The Open Group.
#define zsize (SIZEOF(xPolyRectangleReq) + ZRCTSPERBATCH * SIZEOF(xRectangle))
int
XDrawRectangle
(
dpy
,
d
,
gc
,
x
,
y
,
width
,
height
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x
,
y
;
/* INT16 */
unsigned
int
width
,
height
;
/* CARD16 */
XDrawRectangle
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
,
/* INT16 */
unsigned
int
width
,
unsigned
int
height
)
/* CARD16 */
{
xRectangle
*
rect
;
...
...
nx-X11/lib/X11/DrRects.c
View file @
687d44b6
...
...
@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDrawRectangles
(
dpy
,
d
,
gc
,
rects
,
n_rects
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XRectangle
*
rects
;
int
n_rects
;
XDrawRectangles
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XRectangle
*
rects
,
int
n_rects
)
{
register
xPolyRectangleReq
*
req
;
long
len
;
...
...
nx-X11/lib/X11/DrSegs.c
View file @
687d44b6
...
...
@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDrawSegments
(
dpy
,
d
,
gc
,
segments
,
nsegments
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XSegment
*
segments
;
int
nsegments
;
XDrawSegments
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XSegment
*
segments
,
int
nsegments
)
{
register
xPolySegmentReq
*
req
;
long
len
;
...
...
nx-X11/lib/X11/ErrDes.c
View file @
687d44b6
/*
* $Xorg: ErrDes.c,v 1.4 2001/02/09 02:03:32 xorgcvs Exp $
* $XdotOrg: xc/lib/X11/ErrDes.c,v 1.8 2005/08/26 05:16:46 daniels Exp $
*/
/***********************************************************
...
...
@@ -70,34 +68,40 @@ SOFTWARE.
* descriptions of errors in Section 4 of Protocol doc (pp. 350-351); more
* verbose descriptions are given in the error database
*/
static
const
char
*
const
_XErrorList
[]
=
{
/* No error */
"no error"
,
/* BadRequest */
"BadRequest"
,
/* BadValue */
"BadValue"
,
/* BadWindow */
"BadWindow"
,
/* BadPixmap */
"BadPixmap"
,
/* BadAtom */
"BadAtom"
,
/* BadCursor */
"BadCursor"
,
/* BadFont */
"BadFont"
,
/* BadMatch */
"BadMatch"
,
/* BadDrawable */
"BadDrawable"
,
/* BadAccess */
"BadAccess"
,
/* BadAlloc */
"BadAlloc"
,
/* BadColor */
"BadColor"
,
/* BadGC */
"BadGC"
,
/* BadIDChoice */
"BadIDChoice"
,
/* BadName */
"BadName"
,
/* BadLength */
"BadLength"
,
/* BadImplementation */
"BadImplementation"
,
static
const
char
_XErrorList
[]
=
/* No error */
"no error
\0
"
/* BadRequest */
"BadRequest
\0
"
/* BadValue */
"BadValue
\0
"
/* BadWindow */
"BadWindow
\0
"
/* BadPixmap */
"BadPixmap
\0
"
/* BadAtom */
"BadAtom
\0
"
/* BadCursor */
"BadCursor
\0
"
/* BadFont */
"BadFont
\0
"
/* BadMatch */
"BadMatch
\0
"
/* BadDrawable */
"BadDrawable
\0
"
/* BadAccess */
"BadAccess
\0
"
/* BadAlloc */
"BadAlloc
\0
"
/* BadColor */
"BadColor
\0
"
/* BadGC */
"BadGC
\0
"
/* BadIDChoice */
"BadIDChoice
\0
"
/* BadName */
"BadName
\0
"
/* BadLength */
"BadLength
\0
"
/* BadImplementation */
"BadImplementation"
;
/* offsets into _XErrorList */
static
const
unsigned
char
_XErrorOffsets
[]
=
{
0
,
9
,
20
,
29
,
39
,
49
,
57
,
67
,
75
,
84
,
96
,
106
,
115
,
124
,
130
,
142
,
150
,
160
};
int
XGetErrorText
(
dpy
,
code
,
buffer
,
nbytes
)
register
int
code
;
register
Display
*
dpy
;
char
*
buffer
;
int
nbytes
;
XGetErrorText
(
register
Display
*
dpy
,
register
int
code
,
char
*
buffer
,
int
nbytes
)
{
char
buf
[
150
];
register
_XExtension
*
ext
;
...
...
@@ -106,7 +110,8 @@ XGetErrorText(dpy, code, buffer, nbytes)
if
(
nbytes
==
0
)
return
0
;
if
(
code
<=
BadImplementation
&&
code
>
0
)
{
sprintf
(
buf
,
"%d"
,
code
);
(
void
)
XGetErrorDatabaseText
(
dpy
,
"XProtoError"
,
buf
,
_XErrorList
[
code
],
(
void
)
XGetErrorDatabaseText
(
dpy
,
"XProtoError"
,
buf
,
_XErrorList
+
_XErrorOffsets
[
code
],
buffer
,
nbytes
);
}
else
buffer
[
0
]
=
'\0'
;
...
...
@@ -115,7 +120,7 @@ XGetErrorText(dpy, code, buffer, nbytes)
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
;
}
...
...
nx-X11/lib/X11/EvToWire.c
View file @
687d44b6
...
...
@@ -38,13 +38,15 @@ from The Open Group.
#include "Xlibint.h"
/*
* reformat a wire event into an XEvent structure of the right type.
* Reformat an XEvent structure to a wire event of the right type.
* Return True on success. If the type is unrecognized, return what
* _XUnknownNativeEvent returns (i.e., False).
*/
Status
_XEventToWire
(
register
Display
*
dpy
,
/* pointer to display structure */
register
XEvent
*
re
,
/* pointer to where event should be reformatted
*/
register
xEvent
*
event
)
/* wire protocol event
*/
register
Display
*
dpy
,
register
XEvent
*
re
,
/* in: from
*/
register
xEvent
*
event
)
/* out: to
*/
{
switch
(
event
->
u
.
u
.
type
=
re
->
type
)
{
case
KeyPress
:
...
...
nx-X11/lib/X11/FSSaver.c
View file @
687d44b6
...
...
@@ -30,28 +30,23 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XActivateScreenSaver
(
dpy
)
register
Display
*
dpy
;
XActivateScreenSaver
(
register
Display
*
dpy
)
{
XForceScreenSaver
(
dpy
,
ScreenSaverActive
);
return
1
;
}
int
XResetScreenSaver
(
dpy
)
register
Display
*
dpy
;
XResetScreenSaver
(
register
Display
*
dpy
)
{
XForceScreenSaver
(
dpy
,
ScreenSaverReset
);
return
1
;
}
int
XForceScreenSaver
(
dpy
,
mode
)
register
Display
*
dpy
;
int
mode
;
XForceScreenSaver
(
register
Display
*
dpy
,
int
mode
)
{
register
xForceScreenSaverReq
*
req
;
...
...
nx-X11/lib/X11/FSWrap.c
View file @
687d44b6
...
...
@@ -206,10 +206,10 @@ XCreateFontSet (
}
int
XFontsOfFontSet
(
font_set
,
font_struct_list
,
font_name_list
)
XFontSet
font_set
;
XFontStruct
***
font_struct_list
;
char
***
font_name_list
;
XFontsOfFontSet
(
XFontSet
font_set
,
XFontStruct
***
font_struct_list
,
char
***
font_name_list
)
{
*
font_name_list
=
font_set
->
core
.
font_info
.
font_name_list
;
*
font_struct_list
=
font_set
->
core
.
font_info
.
font_struct_list
;
...
...
@@ -217,50 +217,47 @@ XFontsOfFontSet(font_set, font_struct_list, font_name_list)
}
char
*
XBaseFontNameListOfFontSet
(
font_set
)
XFontSet
font_set
;
XBaseFontNameListOfFontSet
(
XFontSet
font_set
)
{
return
font_set
->
core
.
base_name_list
;
}
char
*
XLocaleOfFontSet
(
font_set
)
XFontSet
font_set
;
XLocaleOfFontSet
(
XFontSet
font_set
)
{
return
font_set
->
core
.
om
->
core
.
lcd
->
core
->
name
;
}
extern
Bool
XContextDependentDrawing
(
font_set
)
XFontSet
font_set
;
Bool
XContextDependentDrawing
(
XFontSet
font_set
)
{
return
font_set
->
core
.
om
->
core
.
context_dependent
;
}
Bool
XDirectionalDependentDrawing
(
font_set
)
XFontSet
font_set
;
XDirectionalDependentDrawing
(
XFontSet
font_set
)
{
return
font_set
->
core
.
om
->
core
.
directional_dependent
;
}
Bool
XContextualDrawing
(
font_set
)
XFontSet
font_set
;
XContextualDrawing
(
XFontSet
font_set
)
{
return
font_set
->
core
.
om
->
core
.
contextual_drawing
;
}
XFontSetExtents
*
XExtentsOfFontSet
(
font_set
)
XFontSet
font_set
;
XExtentsOfFontSet
(
XFontSet
font_set
)
{
if
(
!
font_set
)
return
NULL
;
return
&
font_set
->
core
.
font_set_extents
;
}
void
XFreeFontSet
(
dpy
,
font_set
)
Display
*
dpy
;
XFontSet
font_set
;
XFreeFontSet
(
Display
*
dpy
,
XFontSet
font_set
)
{
XCloseOM
(
font_set
->
core
.
om
);
}
nx-X11/lib/X11/FetchName.c
View file @
687d44b6
...
...
@@ -33,10 +33,10 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
Status
XFetchName
(
dpy
,
w
,
name
)
register
Display
*
dpy
;
Window
w
;
char
**
name
;
Status
XFetchName
(
register
Display
*
dpy
,
Window
w
,
char
**
name
)
{
Atom
actual_type
;
int
actual_format
;
...
...
@@ -63,10 +63,10 @@ Status XFetchName (dpy, w, name)
return
(
0
);
}
Status
XGetIconName
(
dpy
,
w
,
icon_name
)
register
Display
*
dpy
;
Window
w
;
char
**
icon_name
;
Status
XGetIconName
(
register
Display
*
dpy
,
Window
w
,
char
**
icon_name
)
{
Atom
actual_type
;
int
actual_format
;
...
...
nx-X11/lib/X11/FillArc.c
View file @
687d44b6
...
...
@@ -34,13 +34,16 @@ in this Software without prior written authorization from The Open Group.
#define size (SIZEOF(xPolyFillArcReq) + FARCSPERBATCH * SIZEOF(xArc))
int
XFillArc
(
dpy
,
d
,
gc
,
x
,
y
,
width
,
height
,
angle1
,
angle2
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x
,
y
;
/* INT16 */
unsigned
int
width
,
height
;
/* CARD16 */
int
angle1
,
angle2
;
/* INT16 */
XFillArc
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
,
/* INT16 */
unsigned
int
width
,
unsigned
int
height
,
/* CARD16 */
int
angle1
,
int
angle2
)
/* INT16 */
{
xArc
*
arc
;
...
...
nx-X11/lib/X11/FillArcs.c
View file @
687d44b6
...
...
@@ -32,12 +32,12 @@ in this Software without prior written authorization from The Open Group.
#define arc_scale (SIZEOF(xArc) / 4)
int
XFillArcs
(
dpy
,
d
,
gc
,
arcs
,
n_arcs
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XArc
*
arcs
;
int
n_arcs
;
XFillArcs
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XArc
*
arcs
,
int
n_arcs
)
{
register
xPolyFillArcReq
*
req
;
long
len
;
...
...
nx-X11/lib/X11/FillPoly.c
View file @
687d44b6
...
...
@@ -30,14 +30,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XFillPolygon
(
dpy
,
d
,
gc
,
points
,
n_points
,
shape
,
mode
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XPoint
*
points
;
int
n_points
;
int
shape
;
int
mode
;
XFillPolygon
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XPoint
*
points
,
int
n_points
,
int
shape
,
int
mode
)
{
register
xFillPolyReq
*
req
;
register
long
nbytes
;
...
...
nx-X11/lib/X11/FillRct.c
View file @
687d44b6
...
...
@@ -34,12 +34,14 @@ in this Software without prior written authorization from The Open Group.
#define size (SIZEOF(xPolyFillRectangleReq) + FRCTSPERBATCH * SIZEOF(xRectangle))
int
XFillRectangle
(
dpy
,
d
,
gc
,
x
,
y
,
width
,
height
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x
,
y
;
/* INT16 */
unsigned
int
width
,
height
;
/* CARD16 */
XFillRectangle
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
,
/* INT16 */
unsigned
int
width
,
unsigned
int
height
)
/* CARD16 */
{
xRectangle
*
rect
;
...
...
nx-X11/lib/X11/FillRcts.c
View file @
687d44b6
...
...
@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XFillRectangles
(
dpy
,
d
,
gc
,
rectangles
,
n_rects
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
XRectangle
*
rectangles
;
int
n_rects
;
XFillRectangles
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
XRectangle
*
rectangles
,
int
n_rects
)
{
register
xPolyFillRectangleReq
*
req
;
long
len
;
...
...
@@ -63,4 +63,3 @@ int n_rects;
SyncHandle
();
return
1
;
}
nx-X11/lib/X11/FilterEv.c
View file @
687d44b6
...
...
@@ -69,9 +69,9 @@ extern long const _Xevent_to_mask[];
* Look up if there is a specified filter for the event.
*/
Bool
XFilterEvent
(
ev
,
window
)
XEvent
*
ev
;
Window
window
;
XFilterEvent
(
XEvent
*
ev
,
Window
window
)
{
#if XLOCALE
XFilterEventList
p
;
...
...
@@ -93,9 +93,9 @@ XFilterEvent(ev, window)
if
(
win
==
p
->
window
)
{
if
((
mask
&
p
->
event_mask
)
||
(
ev
->
type
>=
p
->
start_type
&&
ev
->
type
<=
p
->
end_type
))
{
UnlockDisplay
(
ev
->
xany
.
display
);
ret
=
(
*
(
p
->
filter
))(
ev
->
xany
.
display
,
p
->
window
,
ev
,
p
->
client_data
);
UnlockDisplay
(
ev
->
xany
.
display
);
return
(
ret
);
}
}
...
...
nx-X11/lib/X11/Flush.c
View file @
687d44b6
...
...
@@ -33,9 +33,8 @@ in this Software without prior written authorization from The Open Group.
/* NOTE: NOT necessary when calling any of the Xlib routines. */
int
XFlush
(
dpy
)
register
Display
*
dpy
;
{
XFlush
(
register
Display
*
dpy
)
{
LockDisplay
(
dpy
);
_XFlush
(
dpy
);
UnlockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/Font.c
View file @
687d44b6
...
...
@@ -123,9 +123,9 @@ XFontStruct *XLoadQueryFont(
return
font_result
;
}
XFontStruct
*
XQueryFont
(
dpy
,
fid
)
register
Display
*
dpy
;
Font
fid
;
XFontStruct
*
XQueryFont
(
register
Display
*
dpy
,
Font
fid
)
{
XFontStruct
*
font_result
;
#ifdef USE_XF86BIGFONT
...
...
@@ -147,9 +147,9 @@ XFontStruct *XQueryFont (dpy, fid)
}
int
XFreeFont
(
dpy
,
fs
)
register
Display
*
dpy
;
XFontStruct
*
fs
;
XFreeFont
(
register
Display
*
dpy
,
XFontStruct
*
fs
)
{
register
xResourceReq
*
req
;
register
_XExtension
*
ext
;
...
...
@@ -177,10 +177,10 @@ XFreeFont(dpy, fs)
static
XFontStruct
*
_XQueryFont
(
dpy
,
fid
,
seq
)
register
Display
*
dpy
;
Font
fid
;
unsigned
long
seq
;
_XQueryFont
(
register
Display
*
dpy
,
Font
fid
,
unsigned
long
seq
)
{
register
XFontStruct
*
fs
;
register
long
nbytes
;
...
...
@@ -384,11 +384,11 @@ _XF86BigfontFreeNop (
}
static
XFontStruct
*
_XF86BigfontQueryFont
(
dpy
,
extcodes
,
fid
,
seq
)
register
Display
*
dpy
;
XF86BigfontCodes
*
extcodes
;
Font
fid
;
unsigned
long
seq
;
_XF86BigfontQueryFont
(
register
Display
*
dpy
,
XF86BigfontCodes
*
extcodes
,
Font
fid
,
unsigned
long
seq
)
{
register
XFontStruct
*
fs
;
register
long
nbytes
;
...
...
@@ -554,7 +554,7 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq)
signature. Then we set the CAP_VerifiedLocal bit to indicate
the verification was successful. */
if
((
addr
=
shmat
(
reply
.
shmid
,
0
,
SHM_RDONLY
))
==
(
char
*
)
-
1
)
{
if
((
addr
=
shmat
(
reply
.
shmid
,
NULL
,
SHM_RDONLY
))
==
(
char
*
)
-
1
)
{
if
(
extcodes
->
serverCapabilities
&
CAP_VerifiedLocal
)
fprintf
(
stderr
,
"_XF86BigfontQueryFont: could not attach shm segment
\n
"
);
Xfree
((
char
*
)
pData
);
...
...
@@ -606,8 +606,7 @@ _XF86BigfontQueryFont (dpy, extcodes, fid, seq)
}
void
_XF86BigfontFreeFontMetrics
(
fs
)
XFontStruct
*
fs
;
_XF86BigfontFreeFontMetrics
(
XFontStruct
*
fs
)
{
#ifdef HAS_SHM
XExtData
*
pData
;
...
...
@@ -633,7 +632,7 @@ int _XF86LoadQueryLocaleFont(
Font
*
fidp
)
{
int
l
;
char
*
charset
,
*
p
;
c
onst
c
har
*
charset
,
*
p
;
char
buf
[
256
];
XFontStruct
*
fs
;
XLCd
lcd
;
...
...
@@ -643,7 +642,7 @@ int _XF86LoadQueryLocaleFont(
l
=
strlen
(
name
);
if
(
l
<
2
||
name
[
l
-
1
]
!=
'*'
||
name
[
l
-
2
]
!=
'-'
)
return
0
;
charset
=
0
;
charset
=
NULL
;
/* next three lines stolen from _XkbGetCharset() */
lcd
=
_XlcCurrentLC
();
if
((
lcd
=
_XlcCurrentLC
())
!=
0
)
...
...
nx-X11/lib/X11/FontInfo.c
View file @
687d44b6
...
...
@@ -201,10 +201,10 @@ XFontStruct **info) /* RETURN */
}
int
XFreeFontInfo
(
names
,
info
,
actualCount
)
char
**
names
;
XFontStruct
*
info
;
int
actualCount
;
XFreeFontInfo
(
char
**
names
,
XFontStruct
*
info
,
int
actualCount
)
{
register
int
i
;
if
(
names
)
{
...
...
nx-X11/lib/X11/FontNames.c
View file @
687d44b6
...
...
@@ -98,8 +98,7 @@ int *actualCount) /* RETURN */
}
int
XFreeFontNames
(
list
)
char
**
list
;
XFreeFontNames
(
char
**
list
)
{
if
(
list
)
{
if
(
!*
(
list
[
0
]
-
1
))
{
/* from ListFontsWithInfo */
...
...
nx-X11/lib/X11/FreeCmap.c
View file @
687d44b6
...
...
@@ -44,6 +44,9 @@ XFreeColormap(
UnlockDisplay
(
dpy
);
SyncHandle
();
#ifdef XCMS
_XcmsDeleteCmapRec
(
dpy
,
cmap
);
#endif
return
1
;
}
nx-X11/lib/X11/FreeCols.c
View file @
687d44b6
...
...
@@ -30,12 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XFreeColors
(
dpy
,
cmap
,
pixels
,
npixels
,
planes
)
register
Display
*
dpy
;
Colormap
cmap
;
unsigned
long
*
pixels
;
/* LISTofCARD32 */
int
npixels
;
unsigned
long
planes
;
/* CARD32 */
XFreeColors
(
register
Display
*
dpy
,
Colormap
cmap
,
unsigned
long
*
pixels
,
/* LISTofCARD32 */
int
npixels
,
unsigned
long
planes
)
/* CARD32 */
{
register
xFreeColorsReq
*
req
;
register
long
nbytes
;
...
...
nx-X11/lib/X11/FreeCurs.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XFreeCursor
(
dpy
,
cursor
)
register
Display
*
dpy
;
Cursor
cursor
;
XFreeCursor
(
register
Display
*
dpy
,
Cursor
cursor
)
{
register
xResourceReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/FreeEData.c
View file @
687d44b6
...
...
@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
_XFreeExtData
(
extension
)
XExtData
*
extension
;
_XFreeExtData
(
XExtData
*
extension
)
{
XExtData
*
temp
;
while
(
extension
)
{
...
...
nx-X11/lib/X11/FreeGC.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XFreeGC
(
dpy
,
gc
)
register
Display
*
dpy
;
GC
gc
;
XFreeGC
(
register
Display
*
dpy
,
GC
gc
)
{
register
xResourceReq
*
req
;
register
_XExtension
*
ext
;
...
...
@@ -47,4 +47,3 @@ XFreeGC (dpy, gc)
Xfree
((
char
*
)
gc
);
return
1
;
}
nx-X11/lib/X11/FreePix.c
View file @
687d44b6
...
...
@@ -30,10 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XFreePixmap
(
dpy
,
pixmap
)
register
Display
*
dpy
;
Pixmap
pixmap
;
XFreePixmap
(
register
Display
*
dpy
,
Pixmap
pixmap
)
{
register
xResourceReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/GCMisc.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetArcMode
(
dpy
,
gc
,
arc_mode
)
register
Display
*
dpy
;
register
GC
gc
;
int
arc_mode
;
XSetArcMode
(
register
Display
*
dpy
,
register
GC
gc
,
int
arc_mode
)
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
arc_mode
!=
arc_mode
)
{
...
...
@@ -46,10 +46,10 @@ int arc_mode;
}
int
XSetFillRule
(
dpy
,
gc
,
fill_rule
)
register
Display
*
dpy
;
register
GC
gc
;
int
fill_rule
;
XSetFillRule
(
register
Display
*
dpy
,
register
GC
gc
,
int
fill_rule
)
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
fill_rule
!=
fill_rule
)
{
...
...
@@ -62,10 +62,10 @@ int fill_rule;
}
int
XSetFillStyle
(
dpy
,
gc
,
fill_style
)
register
Display
*
dpy
;
register
GC
gc
;
int
fill_style
;
XSetFillStyle
(
register
Display
*
dpy
,
register
GC
gc
,
int
fill_style
)
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
fill_style
!=
fill_style
)
{
...
...
@@ -78,10 +78,10 @@ int fill_style;
}
int
XSetGraphicsExposures
(
dpy
,
gc
,
graphics_exposures
)
register
Display
*
dpy
;
register
GC
gc
;
Bool
graphics_exposures
;
XSetGraphicsExposures
(
register
Display
*
dpy
,
register
GC
gc
,
Bool
graphics_exposures
)
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
graphics_exposures
!=
graphics_exposures
)
{
...
...
@@ -94,10 +94,10 @@ Bool graphics_exposures;
}
int
XSetSubwindowMode
(
dpy
,
gc
,
subwindow_mode
)
register
Display
*
dpy
;
register
GC
gc
;
int
subwindow_mode
;
XSetSubwindowMode
(
register
Display
*
dpy
,
register
GC
gc
,
int
subwindow_mode
)
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
subwindow_mode
!=
subwindow_mode
)
{
...
...
nx-X11/lib/X11/Geom.c
View file @
687d44b6
...
...
@@ -26,7 +26,6 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#include <config.h>
...
...
nx-X11/lib/X11/GetAtomNm.c
View file @
687d44b6
...
...
@@ -56,9 +56,9 @@ char *_XGetAtomName(
return
(
char
*
)
NULL
;
}
char
*
XGetAtomName
(
dpy
,
atom
)
register
Display
*
dpy
;
Atom
atom
;
char
*
XGetAtomName
(
register
Display
*
dpy
,
Atom
atom
)
{
xGetAtomNameReply
rep
;
char
*
name
;
...
...
@@ -139,11 +139,11 @@ Bool _XGetAtomNameHandler(
}
Status
XGetAtomNames
(
dpy
,
atoms
,
count
,
names_return
)
Display
*
dpy
;
Atom
*
atoms
;
int
count
;
char
**
names_return
;
XGetAtomNames
(
Display
*
dpy
,
Atom
*
atoms
,
int
count
,
char
**
names_return
)
{
_XAsyncHandler
async
;
_XGetAtomNameState
async_state
;
...
...
nx-X11/lib/X11/GetColor.c
View file @
687d44b6
...
...
@@ -48,6 +48,7 @@ XColor *exact_def) /* RETURN */
XcmsColor
cmsColor_exact
;
Status
ret
;
#ifdef XCMS
/*
* Let's Attempt to use Xcms and i18n approach to Parse Color
*/
...
...
@@ -73,6 +74,7 @@ XColor *exact_def) /* RETURN */
break
;
}
}
#endif
/*
* Xcms and i18n approach failed.
...
...
nx-X11/lib/X11/GetDflt.c
View file @
687d44b6
...
...
@@ -96,16 +96,16 @@ GetHomeDir(
int
len
)
{
#ifdef WIN32
register
char
*
ptr1
;
register
char
*
ptr2
;
register
char
*
ptr1
=
NULL
;
register
char
*
ptr2
=
NULL
;
int
len1
=
0
,
len2
=
0
;
if
(
ptr1
=
getenv
(
"HOME"
))
{
/* old, deprecated */
if
(
(
ptr1
=
getenv
(
"HOME"
)
))
{
/* old, deprecated */
len1
=
strlen
(
ptr1
);
}
else
if
((
ptr1
=
getenv
(
"HOMEDRIVE"
))
&&
(
ptr2
=
getenv
(
"HOMEDIR"
)))
{
len1
=
strlen
(
ptr1
);
len2
=
strlen
(
ptr2
);
}
else
if
(
ptr2
=
getenv
(
"USERNAME"
))
{
}
else
if
(
(
ptr2
=
getenv
(
"USERNAME"
)
))
{
len1
=
strlen
(
ptr1
=
"/users/"
);
len2
=
strlen
(
ptr2
);
}
...
...
@@ -162,7 +162,7 @@ InitDefaults(
*/
if
(
dpy
->
xdefaults
==
NULL
)
{
char
*
slashDotXdefaults
=
"/.Xdefaults"
;
c
onst
c
har
*
slashDotXdefaults
=
"/.Xdefaults"
;
(
void
)
GetHomeDir
(
fname
,
PATH_MAX
-
strlen
(
slashDotXdefaults
)
-
1
);
(
void
)
strcat
(
fname
,
slashDotXdefaults
);
...
...
@@ -172,7 +172,7 @@ InitDefaults(
}
if
(
!
(
xenv
=
getenv
(
"XENVIRONMENT"
)))
{
char
*
slashDotXdefaultsDash
=
"/.Xdefaults-"
;
c
onst
c
har
*
slashDotXdefaultsDash
=
"/.Xdefaults-"
;
int
len
;
(
void
)
GetHomeDir
(
fname
,
PATH_MAX
-
strlen
(
slashDotXdefaultsDash
)
-
1
);
...
...
nx-X11/lib/X11/GetFPath.c
View file @
687d44b6
...
...
@@ -29,9 +29,9 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
char
**
XGetFontPath
(
dpy
,
npaths
)
register
Display
*
dpy
;
int
*
npaths
;
/* RETURN */
char
**
XGetFontPath
(
register
Display
*
dpy
,
int
*
npaths
)
/* RETURN */
{
xGetFontPathReply
rep
;
register
long
nbytes
;
...
...
@@ -81,8 +81,7 @@ int *npaths; /* RETURN */
}
int
XFreeFontPath
(
list
)
char
**
list
;
XFreeFontPath
(
char
**
list
)
{
if
(
list
!=
NULL
)
{
Xfree
(
list
[
0
]
-
1
);
...
...
nx-X11/lib/X11/GetFProp.c
View file @
687d44b6
...
...
@@ -29,11 +29,11 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Bool
XGetFontProperty
(
fs
,
name
,
valuePtr
)
XFontStruct
*
fs
;
register
Atom
name
;
unsigned
long
*
valuePtr
;
{
Bool
XGetFontProperty
(
XFontStruct
*
fs
,
register
Atom
name
,
unsigned
long
*
valuePtr
)
{
/* XXX this is a simple linear search for now. If the
protocol is changed to sort the property list, this should
become a binary search. */
...
...
@@ -50,6 +50,3 @@ Bool XGetFontProperty (fs, name, valuePtr)
}
nx-X11/lib/X11/GetGCVals.c
View file @
687d44b6
...
...
@@ -43,11 +43,11 @@ in this Software without prior written authorization from The Open Group.
GCArcMode)
/*ARGSUSED*/
Status
XGetGCValues
(
dpy
,
gc
,
valuemask
,
values
)
Display
*
dpy
;
GC
gc
;
unsigned
long
valuemask
;
XGCValues
*
values
;
Status
XGetGCValues
(
Display
*
dpy
,
GC
gc
,
unsigned
long
valuemask
,
XGCValues
*
values
)
{
if
(
valuemask
==
ValidGCValuesBits
)
{
char
dashes
=
values
->
dashes
;
...
...
nx-X11/lib/X11/GetGeom.c
View file @
687d44b6
...
...
@@ -29,12 +29,16 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XGetGeometry
(
dpy
,
d
,
root
,
x
,
y
,
width
,
height
,
borderWidth
,
depth
)
register
Display
*
dpy
;
Drawable
d
;
Window
*
root
;
/* RETURN */
int
*
x
,
*
y
;
/* RETURN */
unsigned
int
*
width
,
*
height
,
*
borderWidth
,
*
depth
;
/* RETURN */
Status
XGetGeometry
(
register
Display
*
dpy
,
Drawable
d
,
Window
*
root
,
/* RETURN */
int
*
x
,
int
*
y
,
/* RETURN */
unsigned
int
*
width
,
unsigned
int
*
height
,
unsigned
int
*
borderWidth
,
unsigned
int
*
depth
)
/* RETURN */
{
xGetGeometryReply
rep
;
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/GetHColor.c
View file @
687d44b6
...
...
@@ -29,10 +29,10 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XAllocColor
(
dpy
,
cmap
,
def
)
register
Display
*
dpy
;
Colormap
cmap
;
XColor
*
def
;
Status
XAllocColor
(
register
Display
*
dpy
,
Colormap
cmap
,
XColor
*
def
)
{
Status
status
;
xAllocColorReply
rep
;
...
...
nx-X11/lib/X11/GetHints.c
View file @
687d44b6
...
...
@@ -56,11 +56,11 @@ SOFTWARE.
#include <nx-X11/Xatom.h>
#include <stdio.h>
Status
XGetSizeHints
(
dpy
,
w
,
hints
,
property
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
Atom
property
;
Status
XGetSizeHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
,
Atom
property
)
{
xPropSizeHints
*
prop
=
NULL
;
Atom
actual_type
;
...
...
@@ -103,9 +103,9 @@ Status XGetSizeHints (dpy, w, hints, property)
* on.
*/
XWMHints
*
XGetWMHints
(
dpy
,
w
)
Display
*
dpy
;
Window
w
;
XWMHints
*
XGetWMHints
(
Display
*
dpy
,
Window
w
)
{
xPropWMHints
*
prop
=
NULL
;
register
XWMHints
*
hints
;
...
...
@@ -147,19 +147,19 @@ XWMHints *XGetWMHints (dpy, w)
}
Status
XGetZoomHints
(
dpy
,
w
,
zhints
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
zhints
;
XGetZoomHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
zhints
)
{
return
(
XGetSizeHints
(
dpy
,
w
,
zhints
,
XA_WM_ZOOM_HINTS
));
}
Status
XGetNormalHints
(
dpy
,
w
,
hints
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
XGetNormalHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
)
{
return
(
XGetSizeHints
(
dpy
,
w
,
hints
,
XA_WM_NORMAL_HINTS
));
}
...
...
@@ -170,11 +170,11 @@ XGetNormalHints (dpy, w, hints)
* ICONSIZE_ATOM type: ICONSIZE_ATOM format: 32
*/
Status
XGetIconSizes
(
dpy
,
w
,
size_list
,
count
)
Display
*
dpy
;
Window
w
;
/* typically, root */
XIconSize
**
size_list
;
/* RETURN */
int
*
count
;
/* RETURN number of items on the list */
Status
XGetIconSizes
(
Display
*
dpy
,
Window
w
,
/* typically, root */
XIconSize
**
size_list
,
/* RETURN */
int
*
count
)
/* RETURN number of items on the list */
{
xPropIconSize
*
prop
=
NULL
;
register
xPropIconSize
*
pp
;
...
...
@@ -227,11 +227,11 @@ Status XGetIconSizes (dpy, w, size_list, count)
}
Status
XGetCommand
(
dpy
,
w
,
argvp
,
argcp
)
Display
*
dpy
;
Window
w
;
char
***
argvp
;
int
*
argcp
;
Status
XGetCommand
(
Display
*
dpy
,
Window
w
,
char
***
argvp
,
int
*
argcp
)
{
XTextProperty
tp
;
int
argc
;
...
...
@@ -267,10 +267,10 @@ Status XGetCommand (dpy, w, argvp, argcp)
Status
XGetTransientForHint
(
dpy
,
w
,
propWindow
)
Display
*
dpy
;
Window
w
;
Window
*
propWindow
;
XGetTransientForHint
(
Display
*
dpy
,
Window
w
,
Window
*
propWindow
)
{
Atom
actual_type
;
int
actual_format
;
...
...
@@ -297,10 +297,10 @@ XGetTransientForHint(dpy, w, propWindow)
}
Status
XGetClassHint
(
dpy
,
w
,
classhint
)
Display
*
dpy
;
Window
w
;
XClassHint
*
classhint
;
/* RETURN */
XGetClassHint
(
Display
*
dpy
,
Window
w
,
XClassHint
*
classhint
)
/* RETURN */
{
int
len_name
,
len_class
;
...
...
nx-X11/lib/X11/GetIFocus.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGetInputFocus
(
dpy
,
focus
,
revert_to
)
register
Display
*
dpy
;
Window
*
focus
;
int
*
revert_to
;
XGetInputFocus
(
register
Display
*
dpy
,
Window
*
focus
,
int
*
revert_to
)
{
xGetInputFocusReply
rep
;
register
xReq
*
req
;
...
...
nx-X11/lib/X11/GetImage.c
View file @
687d44b6
...
...
@@ -43,13 +43,15 @@ static unsigned int Ones( /* HACKMEM 169 */
return
((
unsigned
int
)
(((
y
+
(
y
>>
3
))
&
030707070707
)
%
077
));
}
XImage
*
XGetImage
(
dpy
,
d
,
x
,
y
,
width
,
height
,
plane_mask
,
format
)
register
Display
*
dpy
;
Drawable
d
;
int
x
,
y
;
unsigned
int
width
,
height
;
unsigned
long
plane_mask
;
int
format
;
/* either XYPixmap or ZPixmap */
XImage
*
XGetImage
(
register
Display
*
dpy
,
Drawable
d
,
int
x
,
int
y
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
long
plane_mask
,
int
format
)
/* either XYPixmap or ZPixmap */
{
xGetImageReply
rep
;
register
xGetImageReq
*
req
;
...
...
@@ -102,16 +104,18 @@ XImage *XGetImage (dpy, d, x, y, width, height, plane_mask, format)
return
(
image
);
}
XImage
*
XGetSubImage
(
dpy
,
d
,
x
,
y
,
width
,
height
,
plane_mask
,
format
,
dest_image
,
dest_x
,
dest_y
)
register
Display
*
dpy
;
Drawable
d
;
int
x
,
y
;
unsigned
int
width
,
height
;
unsigned
long
plane_mask
;
int
format
;
/* either XYPixmap or ZPixmap */
XImage
*
dest_image
;
int
dest_x
,
dest_y
;
XImage
*
XGetSubImage
(
register
Display
*
dpy
,
Drawable
d
,
int
x
,
int
y
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
long
plane_mask
,
int
format
,
/* either XYPixmap or ZPixmap */
XImage
*
dest_image
,
int
dest_x
,
int
dest_y
)
{
XImage
*
temp_image
;
temp_image
=
XGetImage
(
dpy
,
d
,
x
,
y
,
width
,
height
,
...
...
nx-X11/lib/X11/GetKCnt.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGetKeyboardControl
(
dpy
,
state
)
register
Display
*
dpy
;
register
XKeyboardState
*
state
;
{
XGetKeyboardControl
(
register
Display
*
dpy
,
register
XKeyboardState
*
state
)
{
xGetKeyboardControlReply
rep
;
register
xReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/GetMoEv.c
View file @
687d44b6
...
...
@@ -29,11 +29,12 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
XTimeCoord
*
XGetMotionEvents
(
dpy
,
w
,
start
,
stop
,
nEvents
)
register
Display
*
dpy
;
Time
start
,
stop
;
Window
w
;
int
*
nEvents
;
/* RETURN */
XTimeCoord
*
XGetMotionEvents
(
register
Display
*
dpy
,
Window
w
,
Time
start
,
Time
stop
,
int
*
nEvents
)
/* RETURN */
{
xGetMotionEventsReply
rep
;
register
xGetMotionEventsReq
*
req
;
...
...
nx-X11/lib/X11/GetNrmHint.c
View file @
687d44b6
...
...
@@ -60,12 +60,12 @@ from The Open Group.
#include <nx-X11/Xutil.h>
#include <stdio.h>
Status
XGetWMSizeHints
(
dpy
,
w
,
hints
,
supplied
,
property
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
long
*
supplied
;
Atom
property
;
Status
XGetWMSizeHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
,
long
*
supplied
,
Atom
property
)
{
xPropSizeHints
*
prop
=
NULL
;
Atom
actual_type
;
...
...
@@ -117,11 +117,11 @@ Status XGetWMSizeHints (dpy, w, hints, supplied, property)
}
Status
XGetWMNormalHints
(
dpy
,
w
,
hints
,
supplied
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
long
*
supplied
;
Status
XGetWMNormalHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
,
long
*
supplied
)
{
return
(
XGetWMSizeHints
(
dpy
,
w
,
hints
,
supplied
,
XA_WM_NORMAL_HINTS
));
}
nx-X11/lib/X11/GetPCnt.c
View file @
687d44b6
...
...
@@ -30,11 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGetPointerControl
(
dpy
,
accel_numer
,
accel_denom
,
threshold
)
register
Display
*
dpy
;
XGetPointerControl
(
register
Display
*
dpy
,
/* the following are return only vars */
int
*
accel_numer
,
*
accel_denom
;
int
*
threshold
;
int
*
accel_numer
,
int
*
accel_denom
,
int
*
threshold
)
{
xGetPointerControlReply
rep
;
xReq
*
req
;
...
...
nx-X11/lib/X11/GetPntMap.c
View file @
687d44b6
...
...
@@ -35,10 +35,10 @@ in this Software without prior written authorization from The Open Group.
#endif
#define MIN(a, b) ((a) < (b) ? (a) : (b))
int
XGetPointerMapping
(
dpy
,
map
,
nmaps
)
register
Display
*
dpy
;
unsigned
char
*
map
;
/* RETURN */
int
nmaps
;
int
XGetPointerMapping
(
register
Display
*
dpy
,
unsigned
char
*
map
,
/* RETURN */
int
nmaps
)
{
unsigned
char
mapping
[
256
];
/* known fixed size */
...
...
nx-X11/lib/X11/GetProp.c
View file @
687d44b6
...
...
@@ -30,19 +30,19 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGetWindowProperty
(
dpy
,
w
,
property
,
offset
,
length
,
delete
,
req_type
,
actual_type
,
actual_format
,
nitems
,
bytesafter
,
prop
)
register
Display
*
dpy
;
Window
w
;
Atom
property
;
Bool
delete
;
Atom
req_type
;
Atom
*
actual_type
;
/* RETURN */
int
*
actual_format
;
/* RETURN 8, 16, or 32
*/
long
offset
,
length
;
unsigned
long
*
nitems
;
/* RETURN # of 8-, 16-, or 32-bit entities */
unsigned
long
*
bytesafter
;
/* RETURN */
unsigned
char
**
prop
;
/* RETURN */
XGetWindowProperty
(
register
Display
*
dpy
,
Window
w
,
Atom
property
,
long
offset
,
long
length
,
Bool
delete
,
Atom
req_type
,
Atom
*
actual_type
,
/* RETURN
*/
int
*
actual_format
,
/* RETURN 8, 16, or 32 */
unsigned
long
*
nitems
,
/* RETURN # of 8-, 16-, or 32-bit entities */
unsigned
long
*
bytesafter
,
/* RETURN */
unsigned
char
**
prop
)
/* RETURN */
{
xGetPropertyReply
reply
;
register
xGetPropertyReq
*
req
;
...
...
nx-X11/lib/X11/GetRGBCMap.c
View file @
687d44b6
...
...
@@ -35,12 +35,12 @@ from The Open Group.
#include "Xatomtype.h"
#include <nx-X11/Xatom.h>
Status
XGetRGBColormaps
(
dpy
,
w
,
stdcmap
,
count
,
property
)
Display
*
dpy
;
Window
w
;
XStandardColormap
**
stdcmap
;
/* RETURN */
int
*
count
;
/* RETURN */
Atom
property
;
/* XA_RGB_BEST_MAP, etc. */
Status
XGetRGBColormaps
(
Display
*
dpy
,
Window
w
,
XStandardColormap
**
stdcmap
,
/* RETURN */
int
*
count
,
/* RETURN */
Atom
property
)
/* XA_RGB_BEST_MAP, etc. */
{
register
int
i
;
/* iterator variable */
xPropStandardColormap
*
data
=
NULL
;
/* data read in from prop */
...
...
nx-X11/lib/X11/GetSOwner.c
View file @
687d44b6
...
...
@@ -29,9 +29,9 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Window
XGetSelectionOwner
(
dpy
,
selection
)
register
Display
*
dpy
;
Atom
selection
;
Window
XGetSelectionOwner
(
register
Display
*
dpy
,
Atom
selection
)
{
xGetSelectionOwnerReply
rep
;
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/GetSSaver.c
View file @
687d44b6
...
...
@@ -30,11 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGetScreenSaver
(
dpy
,
timeout
,
interval
,
prefer_blanking
,
allow_exp
)
register
Display
*
dpy
;
XGetScreenSaver
(
register
Display
*
dpy
,
/* the following are return only vars */
int
*
timeout
,
*
interval
;
int
*
prefer_blanking
,
*
allow_exp
;
/*boolean */
int
*
timeout
,
int
*
interval
,
int
*
prefer_blanking
,
int
*
allow_exp
)
/*boolean */
{
xGetScreenSaverReply
rep
;
...
...
nx-X11/lib/X11/GetStCmap.c
View file @
687d44b6
...
...
@@ -61,11 +61,11 @@ SOFTWARE.
* in the XStandardColormap structure.
*/
Status
XGetStandardColormap
(
dpy
,
w
,
cmap
,
property
)
Display
*
dpy
;
Window
w
;
XStandardColormap
*
cmap
;
Atom
property
;
/* XA_RGB_BEST_MAP, etc. */
Status
XGetStandardColormap
(
Display
*
dpy
,
Window
w
,
XStandardColormap
*
cmap
,
Atom
property
)
/* XA_RGB_BEST_MAP, etc. */
{
Status
stat
;
/* return value */
XStandardColormap
*
stdcmaps
;
/* will get malloced value */
...
...
nx-X11/lib/X11/GetTxtProp.c
View file @
687d44b6
...
...
@@ -57,11 +57,11 @@ from The Open Group.
#include <nx-X11/Xos.h>
#include <stdio.h>
Status
XGetTextProperty
(
display
,
window
,
tp
,
property
)
Display
*
display
;
Window
window
;
XTextProperty
*
tp
;
Atom
property
;
Status
XGetTextProperty
(
Display
*
display
,
Window
window
,
XTextProperty
*
tp
,
Atom
property
)
{
Atom
actual_type
;
int
actual_format
=
0
;
...
...
@@ -87,26 +87,26 @@ Status XGetTextProperty (display, window, tp, property)
return
False
;
}
Status
XGetWMName
(
dpy
,
w
,
tp
)
Display
*
dpy
;
Window
w
;
XTextProperty
*
tp
;
Status
XGetWMName
(
Display
*
dpy
,
Window
w
,
XTextProperty
*
tp
)
{
return
(
XGetTextProperty
(
dpy
,
w
,
tp
,
XA_WM_NAME
));
}
Status
XGetWMIconName
(
dpy
,
w
,
tp
)
Display
*
dpy
;
Window
w
;
XTextProperty
*
tp
;
Status
XGetWMIconName
(
Display
*
dpy
,
Window
w
,
XTextProperty
*
tp
)
{
return
(
XGetTextProperty
(
dpy
,
w
,
tp
,
XA_WM_ICON_NAME
));
}
Status
XGetWMClientMachine
(
dpy
,
w
,
tp
)
Display
*
dpy
;
Window
w
;
XTextProperty
*
tp
;
Status
XGetWMClientMachine
(
Display
*
dpy
,
Window
w
,
XTextProperty
*
tp
)
{
return
(
XGetTextProperty
(
dpy
,
w
,
tp
,
XA_WM_CLIENT_MACHINE
));
}
...
...
nx-X11/lib/X11/GetWMCMapW.c
View file @
687d44b6
...
...
@@ -53,11 +53,11 @@ SOFTWARE.
#include <nx-X11/Xatom.h>
#include <stdio.h>
Status
XGetWMColormapWindows
(
dpy
,
w
,
colormapWindows
,
countReturn
)
Display
*
dpy
;
Window
w
;
Window
**
colormapWindows
;
int
*
countReturn
;
Status
XGetWMColormapWindows
(
Display
*
dpy
,
Window
w
,
Window
**
colormapWindows
,
int
*
countReturn
)
{
Atom
*
data
=
NULL
;
Atom
actual_type
;
...
...
nx-X11/lib/X11/GetWMProto.c
View file @
687d44b6
...
...
@@ -53,11 +53,11 @@ SOFTWARE.
#include <nx-X11/Xatom.h>
#include <stdio.h>
Status
XGetWMProtocols
(
dpy
,
w
,
protocols
,
countReturn
)
Display
*
dpy
;
Window
w
;
Atom
**
protocols
;
int
*
countReturn
;
Status
XGetWMProtocols
(
Display
*
dpy
,
Window
w
,
Atom
**
protocols
,
int
*
countReturn
)
{
Atom
*
data
=
NULL
;
Atom
actual_type
;
...
...
nx-X11/lib/X11/GrButton.c
View file @
687d44b6
...
...
@@ -30,17 +30,17 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGrabButton
(
dpy
,
button
,
modifiers
,
grab_window
,
owner_events
,
event_mask
,
pointer_mode
,
keyboard_mode
,
confine_to
,
curs
)
register
Display
*
dpy
;
unsigned
int
modifiers
;
/* CARD16 */
unsigned
int
button
;
/* CARD8 */
Window
grab_window
;
Bool
owner_events
;
unsigned
int
event_mask
;
/* CARD16 */
int
pointer_mode
,
keyboard_mode
;
Window
confine_to
;
Cursor
curs
;
XGrabButton
(
register
Display
*
dpy
,
unsigned
int
button
,
/* CARD8 */
unsigned
int
modifiers
,
/* CARD16 */
Window
grab_window
,
Bool
owner_events
,
unsigned
int
event_mask
,
/* CARD16 */
int
pointer_mode
,
int
keyboard_mode
,
Window
confine_to
,
Cursor
curs
)
{
register
xGrabButtonReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/GrKey.c
View file @
687d44b6
...
...
@@ -30,14 +30,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGrabKey
(
dpy
,
key
,
modifiers
,
grab_window
,
owner_events
,
pointer_mode
,
keyboard_mode
)
register
Display
*
dpy
;
int
key
;
unsigned
int
modifiers
;
Window
grab_window
;
Bool
owner_events
;
int
pointer_mode
,
keyboard_mode
;
XGrabKey
(
register
Display
*
dpy
,
int
key
,
unsigned
int
modifiers
,
Window
grab_window
,
Bool
owner_events
,
int
pointer_mode
,
int
keyboard_mode
)
{
register
xGrabKeyReq
*
req
;
...
...
nx-X11/lib/X11/GrKeybd.c
View file @
687d44b6
...
...
@@ -28,12 +28,13 @@ in this Software without prior written authorization from The Open Group.
#include <config.h>
#endif
#include "Xlibint.h"
int
XGrabKeyboard
(
dpy
,
window
,
ownerEvents
,
pointerMode
,
keyboardMode
,
time
)
register
Display
*
dpy
;
Window
window
;
Bool
ownerEvents
;
int
pointerMode
,
keyboardMode
;
Time
time
;
int
XGrabKeyboard
(
register
Display
*
dpy
,
Window
window
,
Bool
ownerEvents
,
int
pointerMode
,
int
keyboardMode
,
Time
time
)
{
xGrabKeyboardReply
rep
;
register
xGrabKeyboardReq
*
req
;
...
...
nx-X11/lib/X11/GrPointer.c
View file @
687d44b6
...
...
@@ -29,16 +29,16 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
int
XGrabPointer
(
dpy
,
grab_window
,
owner_events
,
event_mask
,
pointer_mode
,
keyboard_mode
,
confine_to
,
curs
,
time
)
register
Display
*
dpy
;
Window
grab_window
;
Bool
owner_events
;
unsigned
int
event_mask
;
/* CARD16 */
int
pointer_mode
,
keyboard_mode
;
Window
confine_to
;
Cursor
curs
;
Time
time
;
int
XGrabPointer
(
register
Display
*
dpy
,
Window
grab_window
,
Bool
owner_events
,
unsigned
int
event_mask
,
/* CARD16 */
int
pointer_mode
,
int
keyboard_mode
,
Window
confine_to
,
Cursor
curs
,
Time
time
)
{
xGrabPointerReply
rep
;
register
xGrabPointerReq
*
req
;
...
...
nx-X11/lib/X11/GrServer.c
View file @
687d44b6
...
...
@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XGrabServer
(
dpy
)
register
Display
*
dpy
;
XGrabServer
(
register
Display
*
dpy
)
{
register
xReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/Host.c
View file @
687d44b6
/*
Copyright 1986, 1998 The Open Group
Copyright 2004 Sun Microsystems, Inc.
All rights reserved.
...
...
@@ -34,6 +33,30 @@ X Window System is a trademark of The Open Group.
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* this might be rightly regarded an os dependent file */
#ifdef HAVE_CONFIG_H
...
...
nx-X11/lib/X11/Iconify.c
View file @
687d44b6
...
...
@@ -62,10 +62,10 @@ from The Open Group.
* This function instructs the window manager to change this window from
* NormalState to IconicState.
*/
Status
XIconifyWindow
(
dpy
,
w
,
screen
)
Display
*
dpy
;
Window
w
;
int
screen
;
Status
XIconifyWindow
(
Display
*
dpy
,
Window
w
,
int
screen
)
{
XClientMessageEvent
ev
;
Window
root
=
RootWindow
(
dpy
,
screen
);
...
...
nx-X11/lib/X11/ImText.c
View file @
687d44b6
nx-X11/lib/X11/ImText16.c
View file @
687d44b6
nx-X11/lib/X11/ImUtil.c
View file @
687d44b6
...
...
@@ -305,20 +305,19 @@ void _XInitImageFuncPtrs (
*
*/
XImage
*
XCreateImage
(
dpy
,
visual
,
depth
,
format
,
offset
,
data
,
width
,
height
,
xpad
,
image_bytes_per_line
)
register
Display
*
dpy
;
register
Visual
*
visual
;
unsigned
int
depth
;
int
format
;
int
offset
;
/*How many pixels from the start of the data does the
XImage
*
XCreateImage
(
register
Display
*
dpy
,
register
Visual
*
visual
,
unsigned
int
depth
,
int
format
,
int
offset
,
/*How many pixels from the start of the data does the
picture to be transmitted start?*/
char
*
data
;
unsigned
int
width
;
unsigned
int
height
;
int
xpad
;
int
image_bytes_per_line
;
char
*
data
,
unsigned
int
width
,
unsigned
int
height
,
int
xpad
,
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.*/
...
...
@@ -373,7 +372,7 @@ XImage *XCreateImage (dpy, visual, depth, format, offset, data, width, height,
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
;
}
...
...
@@ -385,8 +384,7 @@ XImage *XCreateImage (dpy, visual, depth, format, offset, data, width, height,
return
image
;
}
Status
XInitImage
(
image
)
XImage
*
image
;
Status
XInitImage
(
XImage
*
image
)
{
int
min_bytes_per_line
;
...
...
@@ -433,9 +431,7 @@ Status XInitImage (image)
* entirely by the library.
*/
static
int
_XDestroyImage
(
ximage
)
XImage
*
ximage
;
static
int
_XDestroyImage
(
XImage
*
ximage
)
{
if
(
ximage
->
data
!=
NULL
)
Xfree
((
char
*
)
ximage
->
data
);
if
(
ximage
->
obdata
!=
NULL
)
Xfree
((
char
*
)
ximage
->
obdata
);
...
...
@@ -470,10 +466,10 @@ static unsigned long const low_bits_table[] = {
0xffffffff
};
static
unsigned
long
_XGetPixel
(
ximage
,
x
,
y
)
register
XImage
*
ximage
;
int
x
;
int
y
;
static
unsigned
long
_XGetPixel
(
register
XImage
*
ximage
,
int
x
,
int
y
)
{
unsigned
long
pixel
,
px
;
...
...
@@ -533,10 +529,10 @@ static unsigned long _XGetPixel (ximage, x, y)
static
CARD32
const
byteorderpixel
=
MSBFirst
<<
24
;
static
unsigned
long
_XGetPixel32
(
ximage
,
x
,
y
)
register
XImage
*
ximage
;
int
x
;
int
y
;
static
unsigned
long
_XGetPixel32
(
register
XImage
*
ximage
,
int
x
,
int
y
)
{
register
unsigned
char
*
addr
;
unsigned
long
pixel
;
...
...
@@ -566,10 +562,10 @@ static unsigned long _XGetPixel32 (ximage, x, y)
}
}
static
unsigned
long
_XGetPixel16
(
ximage
,
x
,
y
)
register
XImage
*
ximage
;
int
x
;
int
y
;
static
unsigned
long
_XGetPixel16
(
register
XImage
*
ximage
,
int
x
,
int
y
)
{
register
unsigned
char
*
addr
;
unsigned
long
pixel
;
...
...
@@ -590,10 +586,10 @@ static unsigned long _XGetPixel16 (ximage, x, y)
}
}
static
unsigned
long
_XGetPixel8
(
ximage
,
x
,
y
)
register
XImage
*
ximage
;
int
x
;
int
y
;
static
unsigned
long
_XGetPixel8
(
register
XImage
*
ximage
,
int
x
,
int
y
)
{
unsigned
char
pixel
;
...
...
@@ -609,10 +605,10 @@ static unsigned long _XGetPixel8 (ximage, x, y)
}
}
static
unsigned
long
_XGetPixel1
(
ximage
,
x
,
y
)
register
XImage
*
ximage
;
int
x
;
int
y
;
static
unsigned
long
_XGetPixel1
(
register
XImage
*
ximage
,
int
x
,
int
y
)
{
unsigned
char
bit
;
int
xoff
,
yoff
;
...
...
@@ -649,11 +645,11 @@ static unsigned long _XGetPixel1 (ximage, x, y)
*
*/
static
int
_XPutPixel
(
ximage
,
x
,
y
,
pixel
)
register
XImage
*
ximage
;
int
x
;
int
y
;
unsigned
long
pixel
;
static
int
_XPutPixel
(
register
XImage
*
ximage
,
int
x
,
int
y
,
unsigned
long
pixel
)
{
unsigned
long
px
,
npixel
;
...
...
@@ -722,11 +718,11 @@ static int _XPutPixel (ximage, x, y, pixel)
return
1
;
}
static
int
_XPutPixel32
(
ximage
,
x
,
y
,
pixel
)
register
XImage
*
ximage
;
int
x
;
int
y
;
unsigned
long
pixel
;
static
int
_XPutPixel32
(
register
XImage
*
ximage
,
int
x
,
int
y
,
unsigned
long
pixel
)
{
unsigned
char
*
addr
;
...
...
@@ -754,11 +750,11 @@ static int _XPutPixel32 (ximage, x, y, pixel)
}
}
static
int
_XPutPixel16
(
ximage
,
x
,
y
,
pixel
)
register
XImage
*
ximage
;
int
x
;
int
y
;
unsigned
long
pixel
;
static
int
_XPutPixel16
(
register
XImage
*
ximage
,
int
x
,
int
y
,
unsigned
long
pixel
)
{
unsigned
char
*
addr
;
...
...
@@ -779,11 +775,11 @@ static int _XPutPixel16 (ximage, x, y, pixel)
}
}
static
int
_XPutPixel8
(
ximage
,
x
,
y
,
pixel
)
register
XImage
*
ximage
;
int
x
;
int
y
;
unsigned
long
pixel
;
static
int
_XPutPixel8
(
register
XImage
*
ximage
,
int
x
,
int
y
,
unsigned
long
pixel
)
{
if
((
ximage
->
format
==
ZPixmap
)
&&
(
ximage
->
bits_per_pixel
==
8
))
{
ximage
->
data
[
y
*
ximage
->
bytes_per_line
+
x
]
=
pixel
;
...
...
@@ -794,11 +790,11 @@ static int _XPutPixel8 (ximage, x, y, pixel)
}
}
static
int
_XPutPixel1
(
ximage
,
x
,
y
,
pixel
)
register
XImage
*
ximage
;
int
x
;
int
y
;
unsigned
long
pixel
;
static
int
_XPutPixel1
(
register
XImage
*
ximage
,
int
x
,
int
y
,
unsigned
long
pixel
)
{
unsigned
char
bit
;
int
xoff
,
yoff
;
...
...
@@ -833,12 +829,12 @@ static int _XPutPixel1 (ximage, x, y, pixel)
*
*/
static
XImage
*
_XSubImage
(
ximage
,
x
,
y
,
width
,
height
)
XImage
*
ximage
;
register
int
x
;
/* starting x coordinate in existing image */
register
int
y
;
/* starting y coordinate in existing image */
unsigned
int
width
;
/* width in pixels of new subimage */
unsigned
int
height
;
/* height in pixels of new subimage */
static
XImage
*
_XSubImage
(
XImage
*
ximage
,
register
int
x
,
/* starting x coordinate in existing image */
register
int
y
,
/* starting y coordinate in existing image */
unsigned
int
width
,
/* width in pixels of new subimage */
unsigned
int
height
)
/* height in pixels of new subimage */
{
register
XImage
*
subimage
;
...
...
@@ -965,9 +961,9 @@ int _XSetImage(
*/
static
int
_XAddPixel
(
ximage
,
value
)
register
XImage
*
ximage
;
register
long
value
;
_XAddPixel
(
register
XImage
*
ximage
,
register
long
value
)
{
register
int
x
;
register
int
y
;
...
...
nx-X11/lib/X11/Imakefile
View file @
687d44b6
...
...
@@ -90,6 +90,12 @@ NX_XCOMPEXTCONFIGTARGET = $(NX_XCOMPEXTLIBDIR)/config.status
SUBDIRS = xlibi18n
#endif
/*
FIXME: This is switchable upstream via configure option, we leave it
on for now as this is the upstream default.
*/
XCMS_DEFINES = -DXCMS
#include <Threads.tmpl>
#ifndef MotifBC
...
...
@@ -187,7 +193,7 @@ XCURSOR_DEFINES = -DUSE_DYNAMIC_XCURSOR -DLIBXCURSOR=\"libXcursor.so.$(SOXCURSOR
POSTLOCALELIBDEFINES = -DPOSTLOCALELIBDIR=\"$(POSTLOCALELIBDIR)\"
#endif
DEFINES = $(MALLOC_DEFINES) $(LIB_DEFINES) $(MISC_DEFINES)\
$(POSTLOCALELIBDEFINES) $(NX_INCLUDES) $(NX_DEFINES)
$(POSTLOCALELIBDEFINES) $(NX_INCLUDES) $(NX_DEFINES)
${XCMS_DEFINES}
OPEN_DEFINES = -I$(EXTINCSRC) $(K5INCL) $(K5DEFS)
DEPEND_DEFINES = $(OPEN_DEFINES) $(TRANS_INCLUDES) $(CONN_DEFINES) $(THREADS_DEFINES) DependDefines
AUTHOBJS = AuDispose.o AuGetBest.o AuFileName.o AuRead.o
...
...
nx-X11/lib/X11/InitExt.c
View file @
687d44b6
...
...
@@ -67,8 +67,7 @@ XExtCodes *XInitExtension (
return
(
&
ext
->
codes
);
/* tell him which extension */
}
XExtCodes
*
XAddExtension
(
dpy
)
Display
*
dpy
;
XExtCodes
*
XAddExtension
(
Display
*
dpy
)
{
register
_XExtension
*
ext
;
...
...
@@ -97,25 +96,24 @@ static _XExtension *XLookupExtension (
return
(
NULL
);
}
XExtData
**
XEHeadOfExtensionList
(
object
)
XEDataObject
object
;
XExtData
**
XEHeadOfExtensionList
(
XEDataObject
object
)
{
return
*
(
XExtData
***
)
&
object
;
}
int
XAddToExtensionList
(
structure
,
ext_data
)
XExtData
**
structure
;
XExtData
*
ext_data
;
XAddToExtensionList
(
XExtData
**
structure
,
XExtData
*
ext_data
)
{
ext_data
->
next
=
*
structure
;
*
structure
=
ext_data
;
return
1
;
}
XExtData
*
XFindOnExtensionList
(
structure
,
number
)
XExtData
**
structure
;
int
number
;
XExtData
*
XFindOnExtensionList
(
XExtData
**
structure
,
int
number
)
{
XExtData
*
ext
;
...
...
@@ -128,10 +126,10 @@ XExtData *XFindOnExtensionList(structure, number)
/*
* Routines to hang procs on the extension structure.
*/
CreateGCType
XESetCreateGC
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
CreateGCType
proc
;
/* routine to call when GC created */
CreateGCType
XESetCreateGC
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
CreateGCType
proc
)
/* routine to call when GC created */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
CreateGCType
oldproc
;
...
...
@@ -143,10 +141,10 @@ CreateGCType XESetCreateGC(dpy, extension, proc)
return
(
CreateGCType
)
oldproc
;
}
CopyGCType
XESetCopyGC
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
CopyGCType
proc
;
/* routine to call when GC copied */
CopyGCType
XESetCopyGC
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
CopyGCType
proc
)
/* routine to call when GC copied */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
CopyGCType
oldproc
;
...
...
@@ -158,10 +156,10 @@ CopyGCType XESetCopyGC(dpy, extension, proc)
return
(
CopyGCType
)
oldproc
;
}
FlushGCType
XESetFlushGC
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
FlushGCType
proc
;
/* routine to call when GC copied */
FlushGCType
XESetFlushGC
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
FlushGCType
proc
)
/* routine to call when GC copied */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
FlushGCType
oldproc
;
...
...
@@ -173,10 +171,10 @@ FlushGCType XESetFlushGC(dpy, extension, proc)
return
(
FlushGCType
)
oldproc
;
}
FreeGCType
XESetFreeGC
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
FreeGCType
proc
;
/* routine to call when GC freed */
FreeGCType
XESetFreeGC
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
FreeGCType
proc
)
/* routine to call when GC freed */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
FreeGCType
oldproc
;
...
...
@@ -188,10 +186,10 @@ FreeGCType XESetFreeGC(dpy, extension, proc)
return
(
FreeGCType
)
oldproc
;
}
CreateFontType
XESetCreateFont
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
CreateFontType
proc
;
/* routine to call when font created */
CreateFontType
XESetCreateFont
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
CreateFontType
proc
)
/* routine to call when font created */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
CreateFontType
oldproc
;
...
...
@@ -203,10 +201,10 @@ CreateFontType XESetCreateFont(dpy, extension, proc)
return
(
CreateFontType
)
oldproc
;
}
FreeFontType
XESetFreeFont
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
FreeFontType
proc
;
/* routine to call when font freed */
FreeFontType
XESetFreeFont
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
FreeFontType
proc
)
/* routine to call when font freed */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
FreeFontType
oldproc
;
...
...
@@ -218,10 +216,10 @@ FreeFontType XESetFreeFont(dpy, extension, proc)
return
(
FreeFontType
)
oldproc
;
}
CloseDisplayType
XESetCloseDisplay
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
CloseDisplayType
proc
;
/* routine to call when display closed */
CloseDisplayType
XESetCloseDisplay
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
CloseDisplayType
proc
)
/* routine to call when display closed */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
CloseDisplayType
oldproc
;
...
...
@@ -239,10 +237,10 @@ typedef Bool (*WireToEventType) (
xEvent
*
/* event */
);
WireToEventType
XESetWireToEvent
(
dpy
,
event_number
,
proc
)
Display
*
dpy
;
/* display */
WireToEventType
proc
;
/* routine to call when converting event
*/
int
event_number
;
/* event routine to replace
*/
WireToEventType
XESetWireToEvent
(
Display
*
dpy
,
/* display */
int
event_number
,
/* event routine to replace
*/
WireToEventType
proc
)
/* routine to call when converting event
*/
{
register
WireToEventType
oldproc
;
if
(
proc
==
NULL
)
proc
=
(
WireToEventType
)
_XUnknownWireEvent
;
...
...
@@ -253,16 +251,59 @@ WireToEventType XESetWireToEvent(dpy, event_number, proc)
return
(
WireToEventType
)
oldproc
;
}
typedef
Bool
(
*
WireToEventCookieType
)
(
Display
*
/* display */
,
XGenericEventCookie
*
/* re */
,
xEvent
*
/* event */
);
WireToEventCookieType
XESetWireToEventCookie
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension major opcode */
WireToEventCookieType
proc
/* routine to call for generic events */
)
{
WireToEventCookieType
oldproc
;
if
(
proc
==
NULL
)
proc
=
(
WireToEventCookieType
)
_XUnknownWireEventCookie
;
LockDisplay
(
dpy
);
oldproc
=
dpy
->
generic_event_vec
[
extension
&
0x7F
];
dpy
->
generic_event_vec
[
extension
&
0x7F
]
=
proc
;
UnlockDisplay
(
dpy
);
return
(
WireToEventCookieType
)
oldproc
;
}
typedef
Bool
(
*
CopyEventCookieType
)
(
Display
*
/* display */
,
XGenericEventCookie
*
/* in */
,
XGenericEventCookie
*
/* out */
);
CopyEventCookieType
XESetCopyEventCookie
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension major opcode */
CopyEventCookieType
proc
/* routine to copy generic events */
)
{
CopyEventCookieType
oldproc
;
if
(
proc
==
NULL
)
proc
=
(
CopyEventCookieType
)
_XUnknownCopyEventCookie
;
LockDisplay
(
dpy
);
oldproc
=
dpy
->
generic_event_copy_vec
[
extension
&
0x7F
];
dpy
->
generic_event_copy_vec
[
extension
&
0x7F
]
=
proc
;
UnlockDisplay
(
dpy
);
return
(
CopyEventCookieType
)
oldproc
;
}
typedef
Status
(
*
EventToWireType
)
(
Display
*
/* display */
,
XEvent
*
/* re */
,
xEvent
*
/* event */
);
EventToWireType
XESetEventToWire
(
dpy
,
event_number
,
proc
)
Display
*
dpy
;
/* display */
EventToWireType
proc
;
/* routine to call when converting event
*/
int
event_number
;
/* event routine to replace
*/
EventToWireType
XESetEventToWire
(
Display
*
dpy
,
/* display */
int
event_number
,
/* event routine to replace
*/
EventToWireType
proc
)
/* routine to call when converting event
*/
{
register
EventToWireType
oldproc
;
if
(
proc
==
NULL
)
proc
=
(
EventToWireType
)
_XUnknownNativeEvent
;
...
...
@@ -279,10 +320,10 @@ typedef Bool (*WireToErrorType) (
xError
*
/* we */
);
WireToErrorType
XESetWireToError
(
dpy
,
error_number
,
proc
)
Display
*
dpy
;
/* display */
WireToErrorType
proc
;
/* routine to call when converting error
*/
int
error_number
;
/* error routine to replace
*/
WireToErrorType
XESetWireToError
(
Display
*
dpy
,
/* display */
int
error_number
,
/* error routine to replace
*/
WireToErrorType
proc
)
/* routine to call when converting error
*/
{
register
WireToErrorType
oldproc
=
NULL
;
if
(
proc
==
NULL
)
proc
=
(
WireToErrorType
)
_XDefaultWireError
;
...
...
@@ -301,10 +342,10 @@ WireToErrorType XESetWireToError(dpy, error_number, proc)
return
(
WireToErrorType
)
oldproc
;
}
ErrorType
XESetError
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
ErrorType
proc
;
/* routine to call when X error happens */
ErrorType
XESetError
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
ErrorType
proc
)
/* routine to call when X error happens */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
ErrorType
oldproc
;
...
...
@@ -316,10 +357,10 @@ ErrorType XESetError(dpy, extension, proc)
return
(
ErrorType
)
oldproc
;
}
ErrorStringType
XESetErrorString
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
ErrorStringType
proc
;
/* routine to call when I/O error happens */
ErrorStringType
XESetErrorString
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
ErrorStringType
proc
)
/* routine to call when I/O error happens */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
ErrorStringType
oldproc
;
...
...
@@ -331,10 +372,10 @@ ErrorStringType XESetErrorString(dpy, extension, proc)
return
(
ErrorStringType
)
oldproc
;
}
PrintErrorType
XESetPrintErrorValues
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
PrintErrorType
proc
;
/* routine to call to print */
PrintErrorType
XESetPrintErrorValues
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
PrintErrorType
proc
)
/* routine to call to print */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
PrintErrorType
oldproc
;
...
...
@@ -346,10 +387,10 @@ PrintErrorType XESetPrintErrorValues(dpy, extension, proc)
return
(
PrintErrorType
)
oldproc
;
}
BeforeFlushType
XESetBeforeFlush
(
dpy
,
extension
,
proc
)
Display
*
dpy
;
/* display */
int
extension
;
/* extension number */
BeforeFlushType
proc
;
/* routine to call on flush */
BeforeFlushType
XESetBeforeFlush
(
Display
*
dpy
,
/* display */
int
extension
,
/* extension number */
BeforeFlushType
proc
)
/* routine to call on flush */
{
register
_XExtension
*
e
;
/* for lookup of extension */
register
BeforeFlushType
oldproc
;
...
...
nx-X11/lib/X11/InsCmap.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XInstallColormap
(
dpy
,
cmap
)
register
Display
*
dpy
;
Colormap
cmap
;
XInstallColormap
(
register
Display
*
dpy
,
Colormap
cmap
)
{
register
xResourceReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/IntAtom.c
View file @
687d44b6
...
...
@@ -37,8 +37,7 @@ from The Open Group.
#define REHASH(idx,rehash) ((idx + rehash) & (TABLESIZE-1))
void
_XFreeAtomTable
(
dpy
)
Display
*
dpy
;
_XFreeAtomTable
(
Display
*
dpy
)
{
register
Entry
*
table
;
register
int
i
;
...
...
@@ -113,13 +112,13 @@ nomatch: if (idx == firstidx)
}
void
_XUpdateAtomCache
(
dpy
,
name
,
atom
,
sig
,
idx
,
n
)
Display
*
dpy
;
const
char
*
name
;
Atom
atom
;
unsigned
long
sig
;
int
idx
;
int
n
;
_XUpdateAtomCache
(
Display
*
dpy
,
const
char
*
name
,
Atom
atom
,
unsigned
long
sig
,
int
idx
,
int
n
)
{
Entry
e
,
oe
;
register
char
*
s1
;
...
...
@@ -238,12 +237,12 @@ Bool _XIntAtomHandler(
}
Status
XInternAtoms
(
dpy
,
names
,
count
,
onlyIfExists
,
atoms_return
)
Display
*
dpy
;
char
**
names
;
int
count
;
Bool
onlyIfExists
;
Atom
*
atoms_return
;
XInternAtoms
(
Display
*
dpy
,
char
**
names
,
int
count
,
Bool
onlyIfExists
,
Atom
*
atoms_return
)
{
int
i
,
idx
,
n
,
tidx
;
unsigned
long
sig
;
...
...
nx-X11/lib/X11/Key.h
View file @
687d44b6
/* $XFree86$ */
#ifndef _KEY_H_
#define _KEY_H_
...
...
nx-X11/lib/X11/KeyBind.c
View file @
687d44b6
...
...
@@ -133,9 +133,9 @@ XKeycodeToKeysym(Display *dpy,
}
KeyCode
XKeysymToKeycode
(
dpy
,
ks
)
Display
*
dpy
;
KeySym
ks
;
XKeysymToKeycode
(
Display
*
dpy
,
KeySym
ks
)
{
register
int
i
,
j
;
...
...
@@ -151,9 +151,9 @@ XKeysymToKeycode(dpy, ks)
}
KeySym
XLookupKeysym
(
event
,
col
)
register
XKeyEvent
*
event
;
int
col
;
XLookupKeysym
(
register
XKeyEvent
*
event
,
int
col
)
{
if
((
!
event
->
display
->
keysyms
)
&&
(
!
_XKeyInitialize
(
event
->
display
)))
return
NoSymbol
;
...
...
@@ -229,8 +229,7 @@ InitModMap(
}
int
XRefreshKeyboardMapping
(
event
)
register
XMappingEvent
*
event
;
XRefreshKeyboardMapping
(
register
XMappingEvent
*
event
)
{
if
(
event
->
request
==
MappingKeyboard
)
{
...
...
@@ -642,10 +641,10 @@ UCSConvertCase( register unsigned code,
}
void
XConvertCase
(
sym
,
lower
,
upper
)
register
KeySym
sym
;
KeySym
*
lower
;
KeySym
*
upper
;
XConvertCase
(
register
KeySym
sym
,
KeySym
*
lower
,
KeySym
*
upper
)
{
/* Latin 1 keysym */
if
(
sym
<
0x100
)
{
...
...
@@ -817,12 +816,12 @@ _XTranslateKey( register Display *dpy,
}
int
_XTranslateKeySym
(
dpy
,
symbol
,
modifiers
,
buffer
,
nbytes
)
Display
*
dpy
;
register
KeySym
symbol
;
unsigned
int
modifiers
;
char
*
buffer
;
int
nbytes
;
_XTranslateKeySym
(
Display
*
dpy
,
register
KeySym
symbol
,
unsigned
int
modifiers
,
char
*
buffer
,
int
nbytes
)
{
register
struct
_XKeytrans
*
p
;
int
length
;
...
...
@@ -877,12 +876,12 @@ _XTranslateKeySym(dpy, symbol, modifiers, buffer, nbytes)
/*ARGSUSED*/
int
XLookupString
(
event
,
buffer
,
nbytes
,
keysym
,
status
)
register
XKeyEvent
*
event
;
char
*
buffer
;
/* buffer */
int
nbytes
;
/* space in buffer for characters */
KeySym
*
keysym
;
XComposeStatus
*
status
;
/* not implemented */
XLookupString
(
register
XKeyEvent
*
event
,
char
*
buffer
,
/* buffer */
int
nbytes
,
/* space in buffer for characters */
KeySym
*
keysym
,
XComposeStatus
*
status
)
/* not implemented */
{
unsigned
int
modifiers
;
KeySym
symbol
;
...
...
nx-X11/lib/X11/KeysymStr.c
View file @
687d44b6
...
...
@@ -69,8 +69,7 @@ SameValue(
return
False
;
}
char
*
XKeysymToString
(
ks
)
KeySym
ks
;
char
*
XKeysymToString
(
KeySym
ks
)
{
register
int
i
,
n
;
int
h
;
...
...
nx-X11/lib/X11/KillCl.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XKillClient
(
dpy
,
resource
)
register
Display
*
dpy
;
XID
resource
;
XKillClient
(
register
Display
*
dpy
,
XID
resource
)
{
register
xResourceReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/LiHosts.c
View file @
687d44b6
/*
Copyright 1986, 1998 The Open Group
Copyright 2004 Sun Microsystems, Inc.
All rights reserved.
...
...
@@ -34,8 +33,32 @@ X Window System is a trademark of The Open Group.
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* This can really be considered an os dependent routine */
#define NEED_REPLIES
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
...
...
@@ -49,7 +72,7 @@ XHostAddress *XListHosts (
int
*
nhosts
,
/* RETURN */
Bool
*
enabled
)
/* RETURN */
{
register
XHostAddress
*
outbuf
=
0
,
*
op
;
register
XHostAddress
*
outbuf
=
NULL
,
*
op
;
xListHostsReply
reply
;
long
nbytes
;
unsigned
char
*
buf
,
*
bp
;
...
...
@@ -69,6 +92,7 @@ XHostAddress *XListHosts (
if
(
reply
.
nHosts
)
{
nbytes
=
reply
.
length
<<
2
;
/* compute number of bytes in reply */
op
=
outbuf
=
(
XHostAddress
*
)
Xmalloc
((
unsigned
)
(
nbytes
+
(
reply
.
nHosts
*
sizeof
(
XHostAddress
))
+
...
...
@@ -123,4 +147,3 @@ XHostAddress *XListHosts (
nx-X11/lib/X11/LiICmaps.c
View file @
687d44b6
...
...
@@ -29,10 +29,10 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Colormap
*
XListInstalledColormaps
(
dpy
,
win
,
n
)
register
Display
*
dpy
;
Window
win
;
int
*
n
;
/* RETURN */
Colormap
*
XListInstalledColormaps
(
register
Display
*
dpy
,
Window
win
,
int
*
n
)
/* RETURN */
{
long
nbytes
;
Colormap
*
cmaps
;
...
...
nx-X11/lib/X11/LiProps.c
View file @
687d44b6
...
...
@@ -29,10 +29,10 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Atom
*
XListProperties
(
dpy
,
window
,
n_props
)
register
Display
*
dpy
;
Window
window
;
int
*
n_props
;
/* RETURN */
Atom
*
XListProperties
(
register
Display
*
dpy
,
Window
window
,
int
*
n_props
)
/* RETURN */
{
long
nbytes
;
xListPropertiesReply
rep
;
...
...
nx-X11/lib/X11/ListExt.c
View file @
687d44b6
...
...
@@ -29,9 +29,9 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
char
**
XListExtensions
(
dpy
,
nextensions
)
register
Display
*
dpy
;
int
*
nextensions
;
/* RETURN */
char
**
XListExtensions
(
register
Display
*
dpy
,
int
*
nextensions
)
/* RETURN */
{
xListExtensionsReply
rep
;
char
**
list
;
...
...
@@ -87,8 +87,7 @@ int *nextensions; /* RETURN */
}
int
XFreeExtensionList
(
list
)
char
**
list
;
XFreeExtensionList
(
char
**
list
)
{
if
(
list
!=
NULL
)
{
Xfree
(
list
[
0
]
-
1
);
...
...
nx-X11/lib/X11/LockDis.c
View file @
687d44b6
...
...
@@ -24,7 +24,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86$ */
/*
* Author: Stephen Gildea, MIT X Consortium
...
...
nx-X11/lib/X11/LookupCol.c
View file @
687d44b6
...
...
@@ -46,6 +46,7 @@ XLookupColor (
XcmsCCC
ccc
;
XcmsColor
cmsColor_exact
;
#ifdef XCMS
/*
* Let's Attempt to use Xcms and i18n approach to Parse Color
*/
...
...
@@ -70,6 +71,7 @@ XLookupColor (
break
;
}
}
#endif
/*
* Xcms and i18n methods failed, so lets pass it to the server
...
...
nx-X11/lib/X11/LowerWin.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XLowerWindow
(
dpy
,
w
)
Display
*
dpy
;
Window
w
;
XLowerWindow
(
Display
*
dpy
,
Window
w
)
{
register
xConfigureWindowReq
*
req
;
unsigned
long
val
=
Below
;
/* needed for macro */
...
...
nx-X11/lib/X11/Macros.c
View file @
687d44b6
...
...
@@ -37,151 +37,182 @@ in this Software without prior written authorization from The Open Group.
* need them.
*/
int
XConnectionNumber
(
dpy
)
Display
*
dpy
;
{
return
(
ConnectionNumber
(
dpy
));
}
int
XConnectionNumber
(
Display
*
dpy
)
{
return
(
ConnectionNumber
(
dpy
));
}
Window
XRootWindow
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
RootWindow
(
dpy
,
scr
));
}
Window
XRootWindow
(
Display
*
dpy
,
int
scr
)
{
return
(
RootWindow
(
dpy
,
scr
));
}
int
XDefaultScreen
(
dpy
)
Display
*
dpy
;
{
return
(
DefaultScreen
(
dpy
));
}
int
XDefaultScreen
(
Display
*
dpy
)
{
return
(
DefaultScreen
(
dpy
));
}
Window
XDefaultRootWindow
(
dpy
)
Display
*
dpy
;
{
return
(
RootWindow
(
dpy
,
DefaultScreen
(
dpy
)));
}
Window
XDefaultRootWindow
(
Display
*
dpy
)
{
return
(
RootWindow
(
dpy
,
DefaultScreen
(
dpy
)));
}
Visual
*
XDefaultVisual
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DefaultVisual
(
dpy
,
scr
));
}
Visual
*
XDefaultVisual
(
Display
*
dpy
,
int
scr
)
{
return
(
DefaultVisual
(
dpy
,
scr
));
}
GC
XDefaultGC
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DefaultGC
(
dpy
,
scr
));
}
GC
XDefaultGC
(
Display
*
dpy
,
int
scr
)
{
return
(
DefaultGC
(
dpy
,
scr
));
}
unsigned
long
XBlackPixel
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
BlackPixel
(
dpy
,
scr
));
}
unsigned
long
XBlackPixel
(
Display
*
dpy
,
int
scr
)
{
return
(
BlackPixel
(
dpy
,
scr
));
}
unsigned
long
XWhitePixel
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
WhitePixel
(
dpy
,
scr
));
}
unsigned
long
XWhitePixel
(
Display
*
dpy
,
int
scr
)
{
return
(
WhitePixel
(
dpy
,
scr
));
}
unsigned
long
XAllPlanes
()
{
return
AllPlanes
;
}
unsigned
long
XAllPlanes
(
void
)
{
return
AllPlanes
;
}
int
XQLength
(
dpy
)
Display
*
dpy
;
{
return
(
QLength
(
dpy
));
}
int
XQLength
(
Display
*
dpy
)
{
return
(
QLength
(
dpy
));
}
int
XDisplayWidth
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DisplayWidth
(
dpy
,
scr
));
}
int
XDisplayWidth
(
Display
*
dpy
,
int
scr
)
{
return
(
DisplayWidth
(
dpy
,
scr
));
}
int
XDisplayHeight
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DisplayHeight
(
dpy
,
scr
));
}
int
XDisplayHeight
(
Display
*
dpy
,
int
scr
)
{
return
(
DisplayHeight
(
dpy
,
scr
));
}
int
XDisplayWidthMM
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DisplayWidthMM
(
dpy
,
scr
));
}
int
XDisplayWidthMM
(
Display
*
dpy
,
int
scr
)
{
return
(
DisplayWidthMM
(
dpy
,
scr
));
}
int
XDisplayHeightMM
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DisplayHeightMM
(
dpy
,
scr
));
}
int
XDisplayHeightMM
(
Display
*
dpy
,
int
scr
)
{
return
(
DisplayHeightMM
(
dpy
,
scr
));
}
int
XDisplayPlanes
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DisplayPlanes
(
dpy
,
scr
));
}
int
XDisplayPlanes
(
Display
*
dpy
,
int
scr
)
{
return
(
DisplayPlanes
(
dpy
,
scr
));
}
int
XDisplayCells
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DisplayCells
(
dpy
,
scr
));
}
int
XDisplayCells
(
Display
*
dpy
,
int
scr
)
{
return
(
DisplayCells
(
dpy
,
scr
));
}
int
XScreenCount
(
dpy
)
Display
*
dpy
;
{
return
(
ScreenCount
(
dpy
));
}
int
XScreenCount
(
Display
*
dpy
)
{
return
(
ScreenCount
(
dpy
));
}
char
*
XServerVendor
(
dpy
)
Display
*
dpy
;
{
return
(
ServerVendor
(
dpy
));
}
char
*
XServerVendor
(
Display
*
dpy
)
{
return
(
ServerVendor
(
dpy
));
}
int
XProtocolVersion
(
dpy
)
Display
*
dpy
;
{
return
(
ProtocolVersion
(
dpy
));
}
int
XProtocolVersion
(
Display
*
dpy
)
{
return
(
ProtocolVersion
(
dpy
));
}
int
XProtocolRevision
(
dpy
)
Display
*
dpy
;
{
return
(
ProtocolRevision
(
dpy
));}
int
XProtocolRevision
(
Display
*
dpy
)
{
return
(
ProtocolRevision
(
dpy
));}
int
XVendorRelease
(
dpy
)
Display
*
dpy
;
{
return
(
VendorRelease
(
dpy
));
}
int
XVendorRelease
(
Display
*
dpy
)
{
return
(
VendorRelease
(
dpy
));
}
char
*
XDisplayString
(
dpy
)
Display
*
dpy
;
{
return
(
DisplayString
(
dpy
));
}
char
*
XDisplayString
(
Display
*
dpy
)
{
return
(
DisplayString
(
dpy
));
}
int
XDefaultDepth
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DefaultDepth
(
dpy
,
scr
));
}
int
XDefaultDepth
(
Display
*
dpy
,
int
scr
)
{
return
(
DefaultDepth
(
dpy
,
scr
));
}
Colormap
XDefaultColormap
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
DefaultColormap
(
dpy
,
scr
));
}
Colormap
XDefaultColormap
(
Display
*
dpy
,
int
scr
)
{
return
(
DefaultColormap
(
dpy
,
scr
));
}
int
XBitmapUnit
(
dpy
)
Display
*
dpy
;
{
return
(
BitmapUnit
(
dpy
));
}
int
XBitmapUnit
(
Display
*
dpy
)
{
return
(
BitmapUnit
(
dpy
));
}
int
XBitmapBitOrder
(
dpy
)
Display
*
dpy
;
{
return
(
BitmapBitOrder
(
dpy
));
}
int
XBitmapBitOrder
(
Display
*
dpy
)
{
return
(
BitmapBitOrder
(
dpy
));
}
int
XBitmapPad
(
dpy
)
Display
*
dpy
;
{
return
(
BitmapPad
(
dpy
));
}
int
XBitmapPad
(
Display
*
dpy
)
{
return
(
BitmapPad
(
dpy
));
}
int
XImageByteOrder
(
dpy
)
Display
*
dpy
;
{
return
(
ImageByteOrder
(
dpy
));
}
int
XImageByteOrder
(
Display
*
dpy
)
{
return
(
ImageByteOrder
(
dpy
));
}
unsigned
long
XNextRequest
(
dpy
)
Display
*
dpy
;
{
unsigned
long
XNextRequest
(
Display
*
dpy
)
{
return
(
NextRequest
(
dpy
));
}
}
unsigned
long
XLastKnownRequestProcessed
(
dpy
)
Display
*
dpy
;
{
return
(
LastKnownRequestProcessed
(
dpy
));
}
unsigned
long
XLastKnownRequestProcessed
(
Display
*
dpy
)
{
return
(
LastKnownRequestProcessed
(
dpy
));
}
/* screen oriented macros (toolkit) */
Screen
*
XScreenOfDisplay
(
dpy
,
scr
)
Display
*
dpy
;
int
scr
;
{
return
(
ScreenOfDisplay
(
dpy
,
scr
));
}
Screen
*
XScreenOfDisplay
(
Display
*
dpy
,
int
scr
)
{
return
(
ScreenOfDisplay
(
dpy
,
scr
));
}
Screen
*
XDefaultScreenOfDisplay
(
dpy
)
Display
*
dpy
;
{
return
(
DefaultScreenOfDisplay
(
dpy
));
}
Screen
*
XDefaultScreenOfDisplay
(
Display
*
dpy
)
{
return
(
DefaultScreenOfDisplay
(
dpy
));
}
Display
*
XDisplayOfScreen
(
s
)
Screen
*
s
;
{
return
(
DisplayOfScreen
(
s
));
}
Display
*
XDisplayOfScreen
(
Screen
*
s
)
{
return
(
DisplayOfScreen
(
s
));
}
Window
XRootWindowOfScreen
(
s
)
Screen
*
s
;
{
return
(
RootWindowOfScreen
(
s
));
}
Window
XRootWindowOfScreen
(
Screen
*
s
)
{
return
(
RootWindowOfScreen
(
s
));
}
unsigned
long
XBlackPixelOfScreen
(
s
)
Screen
*
s
;
{
return
(
BlackPixelOfScreen
(
s
));
}
unsigned
long
XBlackPixelOfScreen
(
Screen
*
s
)
{
return
(
BlackPixelOfScreen
(
s
));
}
unsigned
long
XWhitePixelOfScreen
(
s
)
Screen
*
s
;
{
return
(
WhitePixelOfScreen
(
s
));
}
unsigned
long
XWhitePixelOfScreen
(
Screen
*
s
)
{
return
(
WhitePixelOfScreen
(
s
));
}
Colormap
XDefaultColormapOfScreen
(
s
)
Screen
*
s
;
{
return
(
DefaultColormapOfScreen
(
s
));
}
Colormap
XDefaultColormapOfScreen
(
Screen
*
s
)
{
return
(
DefaultColormapOfScreen
(
s
));
}
int
XDefaultDepthOfScreen
(
s
)
Screen
*
s
;
{
return
(
DefaultDepthOfScreen
(
s
));
}
int
XDefaultDepthOfScreen
(
Screen
*
s
)
{
return
(
DefaultDepthOfScreen
(
s
));
}
GC
XDefaultGCOfScreen
(
s
)
Screen
*
s
;
{
return
(
DefaultGCOfScreen
(
s
));
}
GC
XDefaultGCOfScreen
(
Screen
*
s
)
{
return
(
DefaultGCOfScreen
(
s
));
}
Visual
*
XDefaultVisualOfScreen
(
s
)
Screen
*
s
;
{
return
(
DefaultVisualOfScreen
(
s
));
}
Visual
*
XDefaultVisualOfScreen
(
Screen
*
s
)
{
return
(
DefaultVisualOfScreen
(
s
));
}
int
XWidthOfScreen
(
s
)
Screen
*
s
;
{
return
(
WidthOfScreen
(
s
));
}
int
XWidthOfScreen
(
Screen
*
s
)
{
return
(
WidthOfScreen
(
s
));
}
int
XHeightOfScreen
(
s
)
Screen
*
s
;
{
return
(
HeightOfScreen
(
s
));
}
int
XHeightOfScreen
(
Screen
*
s
)
{
return
(
HeightOfScreen
(
s
));
}
int
XWidthMMOfScreen
(
s
)
Screen
*
s
;
{
return
(
WidthMMOfScreen
(
s
));
}
int
XWidthMMOfScreen
(
Screen
*
s
)
{
return
(
WidthMMOfScreen
(
s
));
}
int
XHeightMMOfScreen
(
s
)
Screen
*
s
;
{
return
(
HeightMMOfScreen
(
s
));
}
int
XHeightMMOfScreen
(
Screen
*
s
)
{
return
(
HeightMMOfScreen
(
s
));
}
int
XPlanesOfScreen
(
s
)
Screen
*
s
;
{
return
(
PlanesOfScreen
(
s
));
}
int
XPlanesOfScreen
(
Screen
*
s
)
{
return
(
PlanesOfScreen
(
s
));
}
int
XCellsOfScreen
(
s
)
Screen
*
s
;
{
return
(
CellsOfScreen
(
s
));
}
int
XCellsOfScreen
(
Screen
*
s
)
{
return
(
CellsOfScreen
(
s
));
}
int
XMinCmapsOfScreen
(
s
)
Screen
*
s
;
{
return
(
MinCmapsOfScreen
(
s
));
}
int
XMinCmapsOfScreen
(
Screen
*
s
)
{
return
(
MinCmapsOfScreen
(
s
));
}
int
XMaxCmapsOfScreen
(
s
)
Screen
*
s
;
{
return
(
MaxCmapsOfScreen
(
s
));
}
int
XMaxCmapsOfScreen
(
Screen
*
s
)
{
return
(
MaxCmapsOfScreen
(
s
));
}
Bool
XDoesSaveUnders
(
s
)
Screen
*
s
;
{
return
(
DoesSaveUnders
(
s
));
}
Bool
XDoesSaveUnders
(
Screen
*
s
)
{
return
(
DoesSaveUnders
(
s
));
}
int
XDoesBackingStore
(
s
)
Screen
*
s
;
{
return
(
DoesBackingStore
(
s
));
}
int
XDoesBackingStore
(
Screen
*
s
)
{
return
(
DoesBackingStore
(
s
));
}
long
XEventMaskOfScreen
(
s
)
Screen
*
s
;
{
return
(
EventMaskOfScreen
(
s
));
}
long
XEventMaskOfScreen
(
Screen
*
s
)
{
return
(
EventMaskOfScreen
(
s
));
}
int
XScreenNumberOfScreen
(
scr
)
register
Screen
*
scr
;
int
XScreenNumberOfScreen
(
register
Screen
*
scr
)
{
register
Display
*
dpy
=
scr
->
display
;
register
Screen
*
dpyscr
=
dpy
->
screens
;
...
...
@@ -238,8 +269,7 @@ int XAddPixel(
int
XNoOp
(
dpy
)
register
Display
*
dpy
;
XNoOp
(
register
Display
*
dpy
)
{
register
xReq
*
req
;
...
...
nx-X11/lib/X11/MapRaised.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XMapRaised
(
dpy
,
w
)
Window
w
;
register
Display
*
dpy
;
XMapRaised
(
register
Display
*
dpy
,
Window
w
)
{
register
xConfigureWindowReq
*
req
;
register
xResourceReq
*
req2
;
...
...
nx-X11/lib/X11/MapSubs.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XMapSubwindows
(
dpy
,
win
)
register
Display
*
dpy
;
Window
win
;
XMapSubwindows
(
register
Display
*
dpy
,
Window
win
)
{
register
xResourceReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/MapWindow.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XMapWindow
(
dpy
,
w
)
Window
w
;
register
Display
*
dpy
;
XMapWindow
(
register
Display
*
dpy
,
Window
w
)
{
register
xResourceReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/Misc.c
View file @
687d44b6
...
...
@@ -29,42 +29,38 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
long
XMaxRequestSize
(
dpy
)
Display
*
dpy
;
long
XMaxRequestSize
(
Display
*
dpy
)
{
return
dpy
->
max_request_size
;
}
char
*
XResourceManagerString
(
dpy
)
Display
*
dpy
;
char
*
XResourceManagerString
(
Display
*
dpy
)
{
return
dpy
->
xdefaults
;
}
unsigned
long
XDisplayMotionBufferSize
(
dpy
)
Display
*
dpy
;
unsigned
long
XDisplayMotionBufferSize
(
Display
*
dpy
)
{
return
dpy
->
motion_buffer
;
}
int
XDisplayKeycodes
(
dpy
,
min_keycode_return
,
max_keycode_return
)
Display
*
dpy
;
int
*
min_keycode_return
,
*
max_keycode_return
;
XDisplayKeycodes
(
Display
*
dpy
,
int
*
min_keycode_return
,
int
*
max_keycode_return
)
{
*
min_keycode_return
=
dpy
->
min_keycode
;
*
max_keycode_return
=
dpy
->
max_keycode
;
return
1
;
}
VisualID
XVisualIDFromVisual
(
visual
)
Visual
*
visual
;
VisualID
XVisualIDFromVisual
(
Visual
*
visual
)
{
return
visual
->
visualid
;
}
long
XExtendedMaxRequestSize
(
dpy
)
Display
*
dpy
;
long
XExtendedMaxRequestSize
(
Display
*
dpy
)
{
return
dpy
->
bigreq_size
;
}
nx-X11/lib/X11/ModMap.c
View file @
687d44b6
...
...
@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
XModifierKeymap
*
XGetModifierMapping
(
dpy
)
register
Display
*
dpy
;
XGetModifierMapping
(
register
Display
*
dpy
)
{
xGetModifierMappingReply
rep
;
register
xReq
*
req
;
...
...
@@ -66,9 +65,9 @@ XGetModifierMapping(dpy)
* 2 Failed - one or more new modifiers unacceptable
*/
int
XSetModifierMapping
(
dpy
,
modifier_map
)
register
Display
*
dpy
;
register
XModifierKeymap
*
modifier_map
;
XSetModifierMapping
(
register
Display
*
dpy
,
register
XModifierKeymap
*
modifier_map
)
{
register
xSetModifierMappingReq
*
req
;
xSetModifierMappingReply
rep
;
...
...
@@ -91,8 +90,7 @@ XSetModifierMapping(dpy, modifier_map)
}
XModifierKeymap
*
XNewModifiermap
(
keyspermodifier
)
int
keyspermodifier
;
XNewModifiermap
(
int
keyspermodifier
)
{
XModifierKeymap
*
res
=
(
XModifierKeymap
*
)
Xmalloc
((
sizeof
(
XModifierKeymap
)));
if
(
res
)
{
...
...
@@ -110,8 +108,7 @@ XNewModifiermap(keyspermodifier)
int
XFreeModifiermap
(
map
)
XModifierKeymap
*
map
;
XFreeModifiermap
(
XModifierKeymap
*
map
)
{
if
(
map
)
{
if
(
map
->
modifiermap
)
...
...
nx-X11/lib/X11/MoveWin.c
View file @
687d44b6
...
...
@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XMoveWindow
(
dpy
,
w
,
x
,
y
)
register
Display
*
dpy
;
Window
w
;
int
x
,
y
;
XMoveWindow
(
register
Display
*
dpy
,
Window
w
,
int
x
,
int
y
)
{
register
xConfigureWindowReq
*
req
;
...
...
nx-X11/lib/X11/OCWrap.c
View file @
687d44b6
...
...
@@ -61,8 +61,7 @@ XCreateOC(XOM om, ...)
}
void
XDestroyOC
(
oc
)
XOC
oc
;
XDestroyOC
(
XOC
oc
)
{
XOC
prev
,
oc_list
;
...
...
@@ -83,8 +82,7 @@ XDestroyOC(oc)
}
XOM
XOMOfOC
(
oc
)
XOC
oc
;
XOMOfOC
(
XOC
oc
)
{
return
oc
->
core
.
om
;
}
...
...
nx-X11/lib/X11/OMWrap.c
View file @
687d44b6
...
...
@@ -45,8 +45,7 @@ XOpenOM(Display *dpy, XrmDatabase rdb, _Xconst char *res_name,
}
Status
XCloseOM
(
om
)
XOM
om
;
XCloseOM
(
XOM
om
)
{
XOC
oc
,
next
;
XLCd
lcd
=
om
->
core
.
lcd
;
...
...
@@ -118,15 +117,13 @@ XGetOMValues(XOM om, ...)
}
Display
*
XDisplayOfOM
(
om
)
XOM
om
;
XDisplayOfOM
(
XOM
om
)
{
return
om
->
core
.
display
;
}
char
*
XLocaleOfOM
(
om
)
XOM
om
;
XLocaleOfOM
(
XOM
om
)
{
return
om
->
core
.
lcd
->
core
->
name
;
}
nx-X11/lib/X11/ParseCmd.c
View file @
687d44b6
...
...
@@ -63,7 +63,7 @@ SOFTWARE.
#include <stdio.h>
static
void
_XReportParseError
(
XrmOptionDescRec
*
arg
,
char
*
msg
)
static
void
_XReportParseError
(
XrmOptionDescRec
*
arg
,
c
onst
c
har
*
msg
)
{
(
void
)
fprintf
(
stderr
,
"Error parsing argument
\"
%s
\"
(%s); %s
\n
"
,
arg
->
option
,
arg
->
specifier
,
msg
);
...
...
nx-X11/lib/X11/ParseCol.c
View file @
687d44b6
...
...
@@ -83,6 +83,7 @@ XParseColor (
}
#ifdef XCMS
/*
* Let's Attempt to use Xcms and i18n approach to Parse Color
*/
...
...
@@ -106,6 +107,7 @@ XParseColor (
break
;
}
}
#endif
/*
* Xcms and i18n methods failed, so lets pass it to the server
...
...
nx-X11/lib/X11/ParseGeom.c
View file @
687d44b6
...
...
@@ -33,24 +33,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
* "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
...
...
nx-X11/lib/X11/PixFormats.c
View file @
687d44b6
...
...
@@ -34,9 +34,9 @@ in this Software without prior written authorization from The Open Group.
* XListPixmapFormats - return info from connection setup
*/
XPixmapFormatValues
*
XListPixmapFormats
(
dpy
,
count
)
Display
*
dpy
;
int
*
count
;
/* RETURN */
XPixmapFormatValues
*
XListPixmapFormats
(
Display
*
dpy
,
int
*
count
)
/* RETURN */
{
XPixmapFormatValues
*
formats
=
(
XPixmapFormatValues
*
)
Xmalloc
((
unsigned
)
(
dpy
->
nformats
*
sizeof
(
XPixmapFormatValues
)));
...
...
nx-X11/lib/X11/PmapBgnd.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowBackgroundPixmap
(
dpy
,
w
,
pixmap
)
register
Display
*
dpy
;
Window
w
;
Pixmap
pixmap
;
XSetWindowBackgroundPixmap
(
register
Display
*
dpy
,
Window
w
,
Pixmap
pixmap
)
{
register
xChangeWindowAttributesReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/PmapBord.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetWindowBorderPixmap
(
dpy
,
w
,
pixmap
)
register
Display
*
dpy
;
Window
w
;
Pixmap
pixmap
;
XSetWindowBorderPixmap
(
register
Display
*
dpy
,
Window
w
,
Pixmap
pixmap
)
{
register
xChangeWindowAttributesReq
*
req
;
LockDisplay
(
dpy
);
...
...
nx-X11/lib/X11/PolyReg.c
View file @
687d44b6
...
...
@@ -471,10 +471,10 @@ static int PtsToRegion(
* encoding is in the form of an array of rectangles.
*/
Region
XPolygonRegion
(
Pts
,
Count
,
rule
)
int
Count
;
/* number of pts
*/
XPoint
*
Pts
;
/* the pts
*/
int
rule
;
/* winding rule */
XPolygonRegion
(
XPoint
*
Pts
,
/* the pts
*/
int
Count
,
/* number of pts
*/
int
rule
)
/* winding rule */
{
Region
region
;
register
EdgeTableEntry
*
pAET
;
/* Active Edge Table */
...
...
@@ -522,8 +522,10 @@ XPolygonRegion(Pts, Count, rule)
if
(
Count
<
2
)
return
region
;
if
(
!
(
pETEs
=
(
EdgeTableEntry
*
)
Xmalloc
((
unsigned
)
(
sizeof
(
EdgeTableEntry
)
*
Count
))))
Xmalloc
((
unsigned
)
(
sizeof
(
EdgeTableEntry
)
*
Count
))))
{
XDestroyRegion
(
region
);
return
(
Region
)
NULL
;
}
pts
=
FirstPtBlock
.
pts
;
CreateETandAET
(
Count
,
Pts
,
&
ET
,
&
AET
,
pETEs
,
&
SLLBlock
);
...
...
nx-X11/lib/X11/PolyTxt.c
View file @
687d44b6
...
...
@@ -30,13 +30,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDrawText
(
dpy
,
d
,
gc
,
x
,
y
,
items
,
nitems
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x
,
y
;
XTextItem
*
items
;
int
nitems
;
XDrawText
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
,
XTextItem
*
items
,
int
nitems
)
{
register
int
i
;
register
XTextItem
*
item
;
...
...
nx-X11/lib/X11/PolyTxt16.c
View file @
687d44b6
...
...
@@ -30,13 +30,14 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XDrawText16
(
dpy
,
d
,
gc
,
x
,
y
,
items
,
nitems
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
int
x
,
y
;
XTextItem16
*
items
;
int
nitems
;
XDrawText16
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
int
x
,
int
y
,
XTextItem16
*
items
,
int
nitems
)
{
register
int
i
;
register
XTextItem16
*
item
;
...
...
nx-X11/lib/X11/PropAlloc.c
View file @
687d44b6
...
...
@@ -37,26 +37,26 @@ in this Software without prior written authorization from The Open Group.
* longer at some point.
*/
XSizeHints
*
XAllocSizeHints
()
XSizeHints
*
XAllocSizeHints
(
void
)
{
return
((
XSizeHints
*
)
Xcalloc
(
1
,
(
unsigned
)
sizeof
(
XSizeHints
)));
}
XStandardColormap
*
XAllocStandardColormap
()
XStandardColormap
*
XAllocStandardColormap
(
void
)
{
return
((
XStandardColormap
*
)
Xcalloc
(
1
,
(
unsigned
)
sizeof
(
XStandardColormap
)));
}
XWMHints
*
XAllocWMHints
()
XWMHints
*
XAllocWMHints
(
void
)
{
return
((
XWMHints
*
)
Xcalloc
(
1
,
(
unsigned
)
sizeof
(
XWMHints
)));
}
XClassHint
*
XAllocClassHint
()
XClassHint
*
XAllocClassHint
(
void
)
{
register
XClassHint
*
h
;
...
...
@@ -67,7 +67,7 @@ XClassHint *XAllocClassHint ()
}
XIconSize
*
XAllocIconSize
()
XIconSize
*
XAllocIconSize
(
void
)
{
return
((
XIconSize
*
)
Xcalloc
(
1
,
(
unsigned
)
sizeof
(
XIconSize
)));
}
...
...
nx-X11/lib/X11/PutBEvent.c
View file @
687d44b6
...
...
@@ -38,6 +38,7 @@ _XPutBackEvent (
register
XEvent
*
event
)
{
register
_XQEvent
*
qelt
;
XEvent
store
=
*
event
;
if
(
!
dpy
->
qfree
)
{
if
((
dpy
->
qfree
=
(
_XQEvent
*
)
Xmalloc
(
sizeof
(
_XQEvent
)))
==
NULL
)
{
...
...
@@ -45,11 +46,26 @@ _XPutBackEvent (
}
dpy
->
qfree
->
next
=
NULL
;
}
/* unclaimed cookie? */
if
(
_XIsEventCookie
(
dpy
,
event
))
{
XEvent
copy
=
{
0
};
/* if not claimed, then just fetch and store again */
if
(
!
event
->
xcookie
.
data
)
{
_XFetchEventCookie
(
dpy
,
&
event
->
xcookie
);
store
=
*
event
;
}
else
{
/* if claimed, copy, client must free */
_XCopyEventCookie
(
dpy
,
&
event
->
xcookie
,
&
copy
.
xcookie
);
store
=
copy
;
}
}
qelt
=
dpy
->
qfree
;
dpy
->
qfree
=
qelt
->
next
;
qelt
->
qserial_num
=
dpy
->
next_event_serial_num
++
;
qelt
->
next
=
dpy
->
head
;
qelt
->
event
=
*
event
;
qelt
->
event
=
store
;
dpy
->
head
=
qelt
;
if
(
dpy
->
tail
==
NULL
)
dpy
->
tail
=
qelt
;
...
...
nx-X11/lib/X11/PutImage.c
View file @
687d44b6
...
...
@@ -939,15 +939,17 @@ PutSubImage (
int
XPutImage
(
dpy
,
d
,
gc
,
image
,
req_xoffset
,
req_yoffset
,
x
,
y
,
req_width
,
req_height
)
register
Display
*
dpy
;
Drawable
d
;
GC
gc
;
register
XImage
*
image
;
int
x
,
y
;
unsigned
int
req_width
,
req_height
;
int
req_xoffset
,
req_yoffset
;
XPutImage
(
register
Display
*
dpy
,
Drawable
d
,
GC
gc
,
register
XImage
*
image
,
int
req_xoffset
,
int
req_yoffset
,
int
x
,
int
y
,
unsigned
int
req_width
,
unsigned
int
req_height
)
{
long
width
=
req_width
;
...
...
nx-X11/lib/X11/QuBest.c
View file @
687d44b6
...
...
@@ -29,12 +29,14 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XQueryBestSize
(
dpy
,
class
,
drawable
,
width
,
height
,
ret_width
,
ret_height
)
register
Display
*
dpy
;
int
class
;
Drawable
drawable
;
unsigned
int
width
,
height
;
unsigned
int
*
ret_width
,
*
ret_height
;
Status
XQueryBestSize
(
register
Display
*
dpy
,
int
class
,
Drawable
drawable
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
*
ret_width
,
unsigned
int
*
ret_height
)
{
xQueryBestSizeReply
rep
;
register
xQueryBestSizeReq
*
req
;
...
...
nx-X11/lib/X11/QuColor.c
View file @
687d44b6
...
...
@@ -24,16 +24,17 @@ in this Software without prior written authorization from The Open Group.
*/
#define NEED_REPLIES
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "Xlibint.h"
int
XQueryColor
(
dpy
,
cmap
,
def
)
register
Display
*
dpy
;
Colormap
cmap
;
XColor
*
def
;
/* RETURN */
XQueryColor
(
register
Display
*
dpy
,
Colormap
cmap
,
XColor
*
def
)
/* RETURN */
{
xrgb
color
;
xQueryColorsReply
rep
;
...
...
nx-X11/lib/X11/QuColors.c
View file @
687d44b6
...
...
@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XQueryColors
(
dpy
,
cmap
,
defs
,
ncolors
)
register
Display
*
dpy
;
Colormap
cmap
;
XColor
*
defs
;
/* RETURN */
int
ncolors
;
XQueryColors
(
register
Display
*
dpy
,
Colormap
cmap
,
XColor
*
defs
,
/* RETURN */
int
ncolors
)
{
register
int
i
;
xrgb
*
color
;
...
...
nx-X11/lib/X11/QuCurShp.c
View file @
687d44b6
...
...
@@ -29,11 +29,13 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XQueryBestCursor
(
dpy
,
drawable
,
width
,
height
,
ret_width
,
ret_height
)
register
Display
*
dpy
;
Drawable
drawable
;
unsigned
int
width
,
height
;
unsigned
int
*
ret_width
,
*
ret_height
;
Status
XQueryBestCursor
(
register
Display
*
dpy
,
Drawable
drawable
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
*
ret_width
,
unsigned
int
*
ret_height
)
{
xQueryBestSizeReply
rep
;
register
xQueryBestSizeReq
*
req
;
...
...
nx-X11/lib/X11/QuExt.c
View file @
687d44b6
...
...
@@ -23,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86$ */
#ifdef HAVE_CONFIG_H
#include <config.h>
...
...
nx-X11/lib/X11/QuKeybd.c
View file @
687d44b6
...
...
@@ -34,10 +34,9 @@ struct kmap {
};
int
XQueryKeymap
(
dpy
,
keys
)
register
Display
*
dpy
;
char
keys
[
32
];
XQueryKeymap
(
register
Display
*
dpy
,
char
keys
[
32
])
{
xQueryKeymapReply
rep
;
register
xReq
*
req
;
...
...
nx-X11/lib/X11/QuPntr.c
View file @
687d44b6
...
...
@@ -29,12 +29,16 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Bool
XQueryPointer
(
dpy
,
w
,
root
,
child
,
root_x
,
root_y
,
win_x
,
win_y
,
mask
)
register
Display
*
dpy
;
Window
w
,
*
root
,
*
child
;
int
*
root_x
,
*
root_y
,
*
win_x
,
*
win_y
;
unsigned
int
*
mask
;
Bool
XQueryPointer
(
register
Display
*
dpy
,
Window
w
,
Window
*
root
,
Window
*
child
,
int
*
root_x
,
int
*
root_y
,
int
*
win_x
,
int
*
win_y
,
unsigned
int
*
mask
)
{
xQueryPointerReply
rep
;
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/QuStipShp.c
View file @
687d44b6
...
...
@@ -29,11 +29,13 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XQueryBestStipple
(
dpy
,
drawable
,
width
,
height
,
ret_width
,
ret_height
)
register
Display
*
dpy
;
Drawable
drawable
;
unsigned
int
width
,
height
;
unsigned
int
*
ret_width
,
*
ret_height
;
Status
XQueryBestStipple
(
register
Display
*
dpy
,
Drawable
drawable
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
*
ret_width
,
unsigned
int
*
ret_height
)
{
xQueryBestSizeReply
rep
;
register
xQueryBestSizeReq
*
req
;
...
...
nx-X11/lib/X11/QuTileShp.c
View file @
687d44b6
...
...
@@ -29,11 +29,13 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XQueryBestTile
(
dpy
,
drawable
,
width
,
height
,
ret_width
,
ret_height
)
register
Display
*
dpy
;
Drawable
drawable
;
unsigned
int
width
,
height
;
unsigned
int
*
ret_width
,
*
ret_height
;
Status
XQueryBestTile
(
register
Display
*
dpy
,
Drawable
drawable
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
*
ret_width
,
unsigned
int
*
ret_height
)
{
xQueryBestSizeReply
rep
;
register
xQueryBestSizeReq
*
req
;
...
...
nx-X11/lib/X11/QuTree.c
View file @
687d44b6
...
...
@@ -29,13 +29,13 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Status
XQueryTree
(
dpy
,
w
,
root
,
parent
,
children
,
nchildren
)
register
Display
*
dpy
;
Window
w
;
Window
*
root
;
/* RETURN */
Window
*
parent
;
/* RETURN */
Window
**
children
;
/* RETURN */
unsigned
int
*
nchildren
;
/* RETURN */
Status
XQueryTree
(
register
Display
*
dpy
,
Window
w
,
Window
*
root
,
/* RETURN */
Window
*
parent
,
/* RETURN */
Window
**
children
,
/* RETURN */
unsigned
int
*
nchildren
)
/* RETURN */
{
long
nbytes
;
xQueryTreeReply
rep
;
...
...
nx-X11/lib/X11/Quarks.c
View file @
687d44b6
...
...
@@ -376,7 +376,7 @@ XrmPermStringToQuark(
return
_XrmInternalStringToQuark
(
name
,
tname
-
(
char
*
)
name
-
1
,
sig
,
True
);
}
XrmQuark
XrmUniqueQuark
()
XrmQuark
XrmUniqueQuark
(
void
)
{
XrmQuark
q
;
...
...
@@ -389,8 +389,7 @@ XrmQuark XrmUniqueQuark()
return
q
;
}
XrmString
XrmQuarkToString
(
quark
)
register
XrmQuark
quark
;
XrmString
XrmQuarkToString
(
register
XrmQuark
quark
)
{
XrmString
s
;
...
...
nx-X11/lib/X11/RaiseWin.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XRaiseWindow
(
dpy
,
w
)
register
Display
*
dpy
;
Window
w
;
XRaiseWindow
(
register
Display
*
dpy
,
Window
w
)
{
register
xConfigureWindowReq
*
req
;
unsigned
long
val
=
Above
;
/* needed for macro below */
...
...
nx-X11/lib/X11/RdBitF.c
View file @
687d44b6
...
...
@@ -54,43 +54,23 @@ from The Open Group.
#define MAX_SIZE 255
/* shared data for the image read/parse logic */
static
short
hexTable
[
256
];
/* conversion value */
static
Bool
initialized
=
False
;
/* easier to fill in at run time */
/*
* Table index for the hex values. Initialized once, first time.
* Used for translation value or delimiter significance lookup.
*/
static
void
initHexTable
(
void
)
{
/*
* We build the table at run time for several reasons:
*
* 1. portable to non-ASCII machines.
* 2. still reentrant since we set the init flag after setting table.
* 3. easier to extend.
* 4. less prone to bugs.
*/
hexTable
[
'0'
]
=
0
;
hexTable
[
'1'
]
=
1
;
hexTable
[
'2'
]
=
2
;
hexTable
[
'3'
]
=
3
;
hexTable
[
'4'
]
=
4
;
hexTable
[
'5'
]
=
5
;
hexTable
[
'6'
]
=
6
;
hexTable
[
'7'
]
=
7
;
hexTable
[
'8'
]
=
8
;
hexTable
[
'9'
]
=
9
;
hexTable
[
'A'
]
=
10
;
hexTable
[
'B'
]
=
11
;
hexTable
[
'C'
]
=
12
;
hexTable
[
'D'
]
=
13
;
hexTable
[
'E'
]
=
14
;
hexTable
[
'F'
]
=
15
;
hexTable
[
'a'
]
=
10
;
hexTable
[
'b'
]
=
11
;
hexTable
[
'c'
]
=
12
;
hexTable
[
'd'
]
=
13
;
hexTable
[
'e'
]
=
14
;
hexTable
[
'f'
]
=
15
;
/* delimiters of significance are flagged w/ negative value */
hexTable
[
' '
]
=
-
1
;
hexTable
[
','
]
=
-
1
;
hexTable
[
'}'
]
=
-
1
;
hexTable
[
'\n'
]
=
-
1
;
hexTable
[
'\t'
]
=
-
1
;
initialized
=
True
;
}
static
const
short
hexTable
[
256
]
=
{
[
'0'
]
=
0
,
[
'1'
]
=
1
,
[
'2'
]
=
2
,
[
'3'
]
=
3
,
[
'4'
]
=
4
,
[
'5'
]
=
5
,
[
'6'
]
=
6
,
[
'7'
]
=
7
,
[
'8'
]
=
8
,
[
'9'
]
=
9
,
[
'A'
]
=
10
,
[
'B'
]
=
11
,
[
'C'
]
=
12
,
[
'D'
]
=
13
,
[
'E'
]
=
14
,
[
'F'
]
=
15
,
[
'a'
]
=
10
,
[
'b'
]
=
11
,
[
'c'
]
=
12
,
[
'd'
]
=
13
,
[
'e'
]
=
14
,
[
'f'
]
=
15
,
[
' '
]
=
-
1
,
[
','
]
=
-
1
,
[
'}'
]
=
-
1
,
[
'\n'
]
=
-
1
,
[
'\t'
]
=
-
1
};
/*
* read next hex value in the input stream, return -1 if EOF
...
...
@@ -149,9 +129,6 @@ XReadBitmapFileData (
int
hx
=
-
1
;
/* x hotspot */
int
hy
=
-
1
;
/* y hotspot */
/* first time initialization */
if
(
initialized
==
False
)
initHexTable
();
#ifdef __UNIXOS2__
filename
=
__XOS2RedirRoot
(
filename
);
#endif
...
...
nx-X11/lib/X11/RecolorC.c
View file @
687d44b6
...
...
@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XRecolorCursor
(
dpy
,
cursor
,
foreground
,
background
)
register
Display
*
dpy
;
Cursor
cursor
;
XColor
*
foreground
,
*
background
;
XRecolorCursor
(
register
Display
*
dpy
,
Cursor
cursor
,
XColor
*
foreground
,
XColor
*
background
)
{
register
xRecolorCursorReq
*
req
;
...
...
nx-X11/lib/X11/ReconfWM.c
View file @
687d44b6
...
...
@@ -34,12 +34,12 @@ from The Open Group.
#define AllMaskBits (CWX|CWY|CWWidth|CWHeight|\
CWBorderWidth|CWSibling|CWStackMode)
Status
XReconfigureWMWindow
(
dpy
,
w
,
screen
,
mask
,
changes
)
register
Display
*
dpy
;
Window
w
;
int
screen
;
unsigned
int
mask
;
XWindowChanges
*
changes
;
Status
XReconfigureWMWindow
(
register
Display
*
dpy
,
Window
w
,
int
screen
,
unsigned
int
mask
,
XWindowChanges
*
changes
)
{
XConfigureRequestEvent
ev
;
Window
root
=
RootWindow
(
dpy
,
screen
);
...
...
nx-X11/lib/X11/ReconfWin.c
View file @
687d44b6
...
...
@@ -33,12 +33,12 @@ in this Software without prior written authorization from The Open Group.
CWBorderWidth|CWSibling|CWStackMode)
int
XConfigureWindow
(
dpy
,
w
,
mask
,
changes
)
register
Display
*
dpy
;
Window
w
;
unsigned
int
mask
;
XWindowChanges
*
changes
;
{
XConfigureWindow
(
register
Display
*
dpy
,
Window
w
,
unsigned
int
mask
,
XWindowChanges
*
changes
)
{
unsigned
long
values
[
7
];
register
unsigned
long
*
value
=
values
;
long
nvalues
;
...
...
nx-X11/lib/X11/Region.c
View file @
687d44b6
...
...
@@ -395,23 +395,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
...
...
@@ -553,135 +536,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
(
&
reg2
->
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
*====================================================================*/
...
...
nx-X11/lib/X11/RepWindow.c
View file @
687d44b6
...
...
@@ -30,10 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XReparentWindow
(
dpy
,
w
,
p
,
x
,
y
)
register
Display
*
dpy
;
Window
w
,
p
;
int
x
,
y
;
XReparentWindow
(
register
Display
*
dpy
,
Window
w
,
Window
p
,
int
x
,
int
y
)
{
register
xReparentWindowReq
*
req
;
...
...
nx-X11/lib/X11/RestackWs.c
View file @
687d44b6
...
...
@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XRestackWindows
(
dpy
,
windows
,
n
)
register
Display
*
dpy
;
register
Window
*
windows
;
int
n
;
{
XRestackWindows
(
register
Display
*
dpy
,
register
Window
*
windows
,
int
n
)
{
int
i
=
0
;
LockDisplay
(
dpy
);
...
...
@@ -57,5 +57,3 @@ XRestackWindows (dpy, windows, n)
}
nx-X11/lib/X11/RotProp.c
View file @
687d44b6
...
...
@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XRotateWindowProperties
(
dpy
,
w
,
properties
,
nprops
,
npositions
)
register
Display
*
dpy
;
Window
w
;
Atom
*
properties
;
register
int
nprops
;
int
npositions
;
{
XRotateWindowProperties
(
register
Display
*
dpy
,
Window
w
,
Atom
*
properties
,
register
int
nprops
,
int
npositions
)
{
register
long
nbytes
;
register
xRotatePropertiesReq
*
req
;
...
...
nx-X11/lib/X11/ScrResStr.c
View file @
687d44b6
...
...
@@ -30,8 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
#include <nx-X11/Xatom.h>
char
*
XScreenResourceString
(
screen
)
Screen
*
screen
;
char
*
XScreenResourceString
(
Screen
*
screen
)
{
Atom
prop_name
;
Atom
actual_type
;
...
...
nx-X11/lib/X11/SelInput.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSelectInput
(
dpy
,
w
,
mask
)
register
Display
*
dpy
;
Window
w
;
long
mask
;
XSelectInput
(
register
Display
*
dpy
,
Window
w
,
long
mask
)
{
register
xChangeWindowAttributesReq
*
req
;
...
...
nx-X11/lib/X11/SendEvent.c
View file @
687d44b6
...
...
@@ -34,12 +34,12 @@ in this Software without prior written authorization from The Open Group.
* event converter here if it has never been installed.
*/
Status
XSendEvent
(
dpy
,
w
,
propagate
,
event_mask
,
event
)
register
Display
*
dpy
;
Window
w
;
Bool
propagate
;
long
event_mask
;
XEvent
*
event
;
XSendEvent
(
register
Display
*
dpy
,
Window
w
,
Bool
propagate
,
long
event_mask
,
XEvent
*
event
)
{
register
xSendEventReq
*
req
;
xEvent
ev
;
...
...
@@ -49,6 +49,11 @@ XSendEvent(dpy, w, propagate, event_mask, event)
xEvent
*
/* event */
);
Status
status
;
/* initialize all of the event's fields first, before setting
* the meaningful ones later.
*/
memset
(
&
ev
,
0
,
sizeof
(
ev
));
LockDisplay
(
dpy
);
/* call through display to find proper conversion routine */
...
...
nx-X11/lib/X11/SetBack.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetBackground
(
dpy
,
gc
,
background
)
register
Display
*
dpy
;
GC
gc
;
unsigned
long
background
;
/* CARD32 */
XSetBackground
(
register
Display
*
dpy
,
GC
gc
,
unsigned
long
background
)
/* CARD32 */
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
background
!=
background
)
{
...
...
nx-X11/lib/X11/SetCRects.c
View file @
687d44b6
...
...
@@ -62,14 +62,14 @@ void _XSetClipRectangles (
}
int
XSetClipRectangles
(
dpy
,
gc
,
clip_x_origin
,
clip_y_origin
,
rectangles
,
n
,
ordering
)
register
Display
*
dpy
;
GC
gc
;
int
clip_
x_origin
,
clip_y_origin
;
XRectangle
*
rectangles
;
int
n
;
int
ordering
;
XSetClipRectangles
(
register
Display
*
dpy
,
GC
gc
,
int
clip_x_origin
,
int
clip_
y_origin
,
XRectangle
*
rectangles
,
int
n
,
int
ordering
)
{
LockDisplay
(
dpy
);
_XSetClipRectangles
(
dpy
,
gc
,
clip_x_origin
,
clip_y_origin
,
rectangles
,
n
,
...
...
@@ -78,4 +78,3 @@ XSetClipRectangles (dpy, gc, clip_x_origin, clip_y_origin, rectangles, n,
SyncHandle
();
return
1
;
}
nx-X11/lib/X11/SetClMask.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetClipMask
(
dpy
,
gc
,
mask
)
register
Display
*
dpy
;
GC
gc
;
Pixmap
mask
;
XSetClipMask
(
register
Display
*
dpy
,
GC
gc
,
Pixmap
mask
)
{
LockDisplay
(
dpy
);
/* always update, since client may have changed pixmap contents */
...
...
nx-X11/lib/X11/SetClOrig.c
View file @
687d44b6
...
...
@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetClipOrigin
(
dpy
,
gc
,
xorig
,
yorig
)
register
Display
*
dpy
;
GC
gc
;
int
xorig
,
yorig
;
XSetClipOrigin
(
register
Display
*
dpy
,
GC
gc
,
int
xorig
,
int
yorig
)
{
XGCValues
*
gv
=
&
gc
->
values
;
...
...
nx-X11/lib/X11/SetFPath.c
View file @
687d44b6
...
...
@@ -32,10 +32,10 @@ in this Software without prior written authorization from The Open Group.
#define safestrlen(s) ((s) ? strlen(s) : 0)
int
XSetFontPath
(
dpy
,
directories
,
ndirs
)
register
Display
*
dpy
;
char
**
directories
;
int
ndirs
;
XSetFontPath
(
register
Display
*
dpy
,
char
**
directories
,
int
ndirs
)
{
register
int
n
=
0
;
register
int
i
;
...
...
nx-X11/lib/X11/SetFont.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetFont
(
dpy
,
gc
,
font
)
register
Display
*
dpy
;
GC
gc
;
Font
font
;
XSetFont
(
register
Display
*
dpy
,
GC
gc
,
Font
font
)
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
font
!=
font
)
{
...
...
nx-X11/lib/X11/SetFore.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetForeground
(
dpy
,
gc
,
foreground
)
register
Display
*
dpy
;
GC
gc
;
unsigned
long
foreground
;
/* CARD32 */
XSetForeground
(
register
Display
*
dpy
,
GC
gc
,
unsigned
long
foreground
)
/* CARD32 */
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
foreground
!=
foreground
)
{
...
...
nx-X11/lib/X11/SetFunc.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetFunction
(
dpy
,
gc
,
function
)
register
Display
*
dpy
;
GC
gc
;
int
function
;
XSetFunction
(
register
Display
*
dpy
,
GC
gc
,
int
function
)
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
function
!=
function
)
{
...
...
nx-X11/lib/X11/SetHints.c
View file @
687d44b6
...
...
@@ -58,28 +58,41 @@ SOFTWARE.
#define safestrlen(s) ((s) ? strlen(s) : 0)
int
XSetSizeHints
(
dpy
,
w
,
hints
,
property
)
/* old routine */
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
Atom
property
;
XSetSizeHints
(
/* old routine */
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
,
Atom
property
)
{
xPropSizeHints
prop
;
memset
(
&
prop
,
0
,
sizeof
(
prop
));
prop
.
flags
=
(
hints
->
flags
&
(
USPosition
|
USSize
|
PAllHints
));
if
(
hints
->
flags
&
(
USPosition
|
PPosition
))
{
prop
.
x
=
hints
->
x
;
prop
.
y
=
hints
->
y
;
}
if
(
hints
->
flags
&
(
USSize
|
PSize
))
{
prop
.
width
=
hints
->
width
;
prop
.
height
=
hints
->
height
;
}
if
(
hints
->
flags
&
PMinSize
)
{
prop
.
minWidth
=
hints
->
min_width
;
prop
.
minHeight
=
hints
->
min_height
;
}
if
(
hints
->
flags
&
PMaxSize
)
{
prop
.
maxWidth
=
hints
->
max_width
;
prop
.
maxHeight
=
hints
->
max_height
;
}
if
(
hints
->
flags
&
PResizeInc
)
{
prop
.
widthInc
=
hints
->
width_inc
;
prop
.
heightInc
=
hints
->
height_inc
;
}
if
(
hints
->
flags
&
PAspect
)
{
prop
.
minAspectX
=
hints
->
min_aspect
.
x
;
prop
.
minAspectY
=
hints
->
min_aspect
.
y
;
prop
.
maxAspectX
=
hints
->
max_aspect
.
x
;
prop
.
maxAspectY
=
hints
->
max_aspect
.
y
;
}
return
XChangeProperty
(
dpy
,
w
,
property
,
XA_WM_SIZE_HINTS
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
prop
,
OldNumPropSizeElements
);
...
...
@@ -91,20 +104,29 @@ XSetSizeHints(dpy, w, hints, property) /* old routine */
*/
int
XSetWMHints
(
dpy
,
w
,
wmhints
)
Display
*
dpy
;
Window
w
;
XWMHints
*
wmhints
;
XSetWMHints
(
Display
*
dpy
,
Window
w
,
XWMHints
*
wmhints
)
{
xPropWMHints
prop
;
memset
(
&
prop
,
0
,
sizeof
(
prop
));
prop
.
flags
=
wmhints
->
flags
;
if
(
wmhints
->
flags
&
InputHint
)
prop
.
input
=
(
wmhints
->
input
==
True
?
1
:
0
);
if
(
wmhints
->
flags
&
StateHint
)
prop
.
initialState
=
wmhints
->
initial_state
;
if
(
wmhints
->
flags
&
IconPixmapHint
)
prop
.
iconPixmap
=
wmhints
->
icon_pixmap
;
if
(
wmhints
->
flags
&
IconWindowHint
)
prop
.
iconWindow
=
wmhints
->
icon_window
;
if
(
wmhints
->
flags
&
IconPositionHint
)
{
prop
.
iconX
=
wmhints
->
icon_x
;
prop
.
iconY
=
wmhints
->
icon_y
;
}
if
(
wmhints
->
flags
&
IconMaskHint
)
prop
.
iconMask
=
wmhints
->
icon_mask
;
if
(
wmhints
->
flags
&
WindowGroupHint
)
prop
.
windowGroup
=
wmhints
->
window_group
;
return
XChangeProperty
(
dpy
,
w
,
XA_WM_HINTS
,
XA_WM_HINTS
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
prop
,
...
...
@@ -119,10 +141,10 @@ XSetWMHints (dpy, w, wmhints)
*/
int
XSetZoomHints
(
dpy
,
w
,
zhints
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
zhints
;
XSetZoomHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
zhints
)
{
return
XSetSizeHints
(
dpy
,
w
,
zhints
,
XA_WM_ZOOM_HINTS
);
}
...
...
@@ -134,10 +156,10 @@ XSetZoomHints (dpy, w, zhints)
*/
int
XSetNormalHints
(
dpy
,
w
,
hints
)
/* old routine */
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
XSetNormalHints
(
/* old routine */
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
)
{
return
XSetSizeHints
(
dpy
,
w
,
hints
,
XA_WM_NORMAL_HINTS
);
}
...
...
@@ -151,11 +173,11 @@ XSetNormalHints (dpy, w, hints) /* old routine */
*/
int
XSetIconSizes
(
dpy
,
w
,
list
,
count
)
Display
*
dpy
;
Window
w
;
/* typically, root */
XIconSize
*
list
;
int
count
;
/* number of items on the list */
XSetIconSizes
(
Display
*
dpy
,
Window
w
,
/* typically, root */
XIconSize
*
list
,
int
count
)
/* number of items on the list */
{
register
int
i
;
xPropIconSize
*
pp
,
*
prop
;
...
...
@@ -182,11 +204,11 @@ XSetIconSizes (dpy, w, list, count)
}
int
XSetCommand
(
dpy
,
w
,
argv
,
argc
)
Display
*
dpy
;
Window
w
;
char
**
argv
;
int
argc
;
XSetCommand
(
Display
*
dpy
,
Window
w
,
char
**
argv
,
int
argc
)
{
register
int
i
;
register
int
nbytes
;
...
...
@@ -254,20 +276,20 @@ XSetStandardProperties (
}
int
XSetTransientForHint
(
dpy
,
w
,
propWindow
)
Display
*
dpy
;
Window
w
;
Window
propWindow
;
XSetTransientForHint
(
Display
*
dpy
,
Window
w
,
Window
propWindow
)
{
return
XChangeProperty
(
dpy
,
w
,
XA_WM_TRANSIENT_FOR
,
XA_WINDOW
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
propWindow
,
1
);
}
int
XSetClassHint
(
dpy
,
w
,
classhint
)
Display
*
dpy
;
Window
w
;
XClassHint
*
classhint
;
XSetClassHint
(
Display
*
dpy
,
Window
w
,
XClassHint
*
classhint
)
{
char
*
class_string
;
char
*
s
;
...
...
nx-X11/lib/X11/SetIFocus.c
View file @
687d44b6
...
...
@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetInputFocus
(
dpy
,
focus
,
revert_to
,
time
)
register
Display
*
dpy
;
Window
focus
;
int
revert_to
;
Time
time
;
XSetInputFocus
(
register
Display
*
dpy
,
Window
focus
,
int
revert_to
,
Time
time
)
{
register
xSetInputFocusReq
*
req
;
...
...
nx-X11/lib/X11/SetLStyle.c
View file @
687d44b6
...
...
@@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetLineAttributes
(
dpy
,
gc
,
linewidth
,
linestyle
,
capstyle
,
joinstyle
)
register
Display
*
dpy
;
GC
gc
;
unsigned
int
linewidth
;
/* CARD16 */
int
linestyle
;
int
capstyle
;
int
joinstyle
;
XSetLineAttributes
(
register
Display
*
dpy
,
GC
gc
,
unsigned
int
linewidth
,
/* CARD16 */
int
linestyle
,
int
capstyle
,
int
joinstyle
)
{
XGCValues
*
gv
=
&
gc
->
values
;
...
...
nx-X11/lib/X11/SetLocale.c
View file @
687d44b6
...
...
@@ -118,7 +118,7 @@ _Xsetlocale(
#else
/* X_LOCALE */
#if
def __DARWIN__
#if
defined(__APPLE__) || defined(__CYGWIN__)
char
*
_Xsetlocale
(
int
category
,
...
...
@@ -127,7 +127,7 @@ _Xsetlocale(
{
return
setlocale
(
category
,
name
);
}
#endif
/* __
DAR
WIN__ */
#endif
/* __
APPLE__ || __CYG
WIN__ */
/*
* _XlcMapOSLocaleName is an implementation dependent routine that derives
...
...
nx-X11/lib/X11/SetNrmHint.c
View file @
687d44b6
...
...
@@ -59,14 +59,15 @@ from The Open Group.
#include <nx-X11/Xatom.h>
#include <nx-X11/Xos.h>
void
XSetWMSizeHints
(
dpy
,
w
,
hints
,
prop
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
Atom
prop
;
void
XSetWMSizeHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
,
Atom
prop
)
{
xPropSizeHints
data
;
memset
(
&
data
,
0
,
sizeof
(
data
));
data
.
flags
=
(
hints
->
flags
&
(
USPosition
|
USSize
|
PPosition
|
PSize
|
PMinSize
|
PMaxSize
|
PResizeInc
|
PAspect
|
PBaseSize
|
PWinGravity
));
...
...
@@ -75,24 +76,40 @@ void XSetWMSizeHints (dpy, w, hints, prop)
* The x, y, width, and height fields are obsolete; but, applications
* that want to work with old window managers might set them.
*/
if
(
hints
->
flags
&
(
USPosition
|
PPosition
))
{
data
.
x
=
hints
->
x
;
data
.
y
=
hints
->
y
;
}
if
(
hints
->
flags
&
(
USSize
|
PSize
))
{
data
.
width
=
hints
->
width
;
data
.
height
=
hints
->
height
;
}
if
(
hints
->
flags
&
PMinSize
)
{
data
.
minWidth
=
hints
->
min_width
;
data
.
minHeight
=
hints
->
min_height
;
}
if
(
hints
->
flags
&
PMaxSize
)
{
data
.
maxWidth
=
hints
->
max_width
;
data
.
maxHeight
=
hints
->
max_height
;
}
if
(
hints
->
flags
&
PResizeInc
)
{
data
.
widthInc
=
hints
->
width_inc
;
data
.
heightInc
=
hints
->
height_inc
;
}
if
(
hints
->
flags
&
PAspect
)
{
data
.
minAspectX
=
hints
->
min_aspect
.
x
;
data
.
minAspectY
=
hints
->
min_aspect
.
y
;
data
.
maxAspectX
=
hints
->
max_aspect
.
x
;
data
.
maxAspectY
=
hints
->
max_aspect
.
y
;
}
if
(
hints
->
flags
&
PBaseSize
)
{
data
.
baseWidth
=
hints
->
base_width
;
data
.
baseHeight
=
hints
->
base_height
;
}
if
(
hints
->
flags
&
PWinGravity
)
{
data
.
winGravity
=
hints
->
win_gravity
;
}
XChangeProperty
(
dpy
,
w
,
prop
,
XA_WM_SIZE_HINTS
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
data
,
...
...
@@ -100,10 +117,10 @@ void XSetWMSizeHints (dpy, w, hints, prop)
}
void
XSetWMNormalHints
(
dpy
,
w
,
hints
)
Display
*
dpy
;
Window
w
;
XSizeHints
*
hints
;
void
XSetWMNormalHints
(
Display
*
dpy
,
Window
w
,
XSizeHints
*
hints
)
{
XSetWMSizeHints
(
dpy
,
w
,
hints
,
XA_WM_NORMAL_HINTS
);
}
...
...
nx-X11/lib/X11/SetPMask.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetPlaneMask
(
dpy
,
gc
,
planemask
)
register
Display
*
dpy
;
GC
gc
;
unsigned
long
planemask
;
/* CARD32 */
XSetPlaneMask
(
register
Display
*
dpy
,
GC
gc
,
unsigned
long
planemask
)
/* CARD32 */
{
LockDisplay
(
dpy
);
if
(
gc
->
values
.
plane_mask
!=
planemask
)
{
...
...
nx-X11/lib/X11/SetPntMap.c
View file @
687d44b6
...
...
@@ -52,14 +52,13 @@ XSetPointerMapping (
}
int
XChangeKeyboardMapping
(
dpy
,
first_keycode
,
keysyms_per_keycode
,
keysyms
,
nkeycodes
)
register
Display
*
dpy
;
int
first_keycode
;
int
keysyms_per_keycode
;
KeySym
*
keysyms
;
int
nkeycodes
;
{
XChangeKeyboardMapping
(
register
Display
*
dpy
,
int
first_keycode
,
int
keysyms_per_keycode
,
KeySym
*
keysyms
,
int
nkeycodes
)
{
register
long
nbytes
;
register
xChangeKeyboardMappingReq
*
req
;
...
...
@@ -68,7 +67,6 @@ XChangeKeyboardMapping (dpy, first_keycode, keysyms_per_keycode,
req
->
firstKeyCode
=
first_keycode
;
req
->
keyCodes
=
nkeycodes
;
req
->
keySymsPerKeyCode
=
keysyms_per_keycode
;
req
->
firstKeyCode
=
first_keycode
;
req
->
length
+=
nkeycodes
*
keysyms_per_keycode
;
nbytes
=
keysyms_per_keycode
*
nkeycodes
*
4
;
Data32
(
dpy
,
(
long
*
)
keysyms
,
nbytes
);
...
...
@@ -76,4 +74,3 @@ XChangeKeyboardMapping (dpy, first_keycode, keysyms_per_keycode,
SyncHandle
();
return
0
;
}
nx-X11/lib/X11/SetRGBCMap.c
View file @
687d44b6
...
...
@@ -35,12 +35,12 @@ from The Open Group.
#include "Xatomtype.h"
#include <nx-X11/Xatom.h>
void
XSetRGBColormaps
(
dpy
,
w
,
cmaps
,
count
,
property
)
Display
*
dpy
;
Window
w
;
XStandardColormap
*
cmaps
;
int
count
;
Atom
property
;
/* XA_RGB_BEST_MAP, etc. */
void
XSetRGBColormaps
(
Display
*
dpy
,
Window
w
,
XStandardColormap
*
cmaps
,
int
count
,
Atom
property
)
/* XA_RGB_BEST_MAP, etc. */
{
register
int
i
;
/* iterator variable */
register
xPropStandardColormap
*
map
;
/* tmp variable, data in prop */
...
...
nx-X11/lib/X11/SetSOwner.c
View file @
687d44b6
...
...
@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetSelectionOwner
(
dpy
,
selection
,
owner
,
time
)
register
Display
*
dpy
;
Atom
selection
;
Window
owner
;
Time
time
;
XSetSelectionOwner
(
register
Display
*
dpy
,
Atom
selection
,
Window
owner
,
Time
time
)
{
register
xSetSelectionOwnerReq
*
req
;
...
...
nx-X11/lib/X11/SetSSaver.c
View file @
687d44b6
...
...
@@ -30,9 +30,12 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetScreenSaver
(
dpy
,
timeout
,
interval
,
prefer_blank
,
allow_exp
)
register
Display
*
dpy
;
int
timeout
,
interval
,
prefer_blank
,
allow_exp
;
XSetScreenSaver
(
register
Display
*
dpy
,
int
timeout
,
int
interval
,
int
prefer_blank
,
int
allow_exp
)
{
register
xSetScreenSaverReq
*
req
;
...
...
nx-X11/lib/X11/SetStCmap.c
View file @
687d44b6
...
...
@@ -61,11 +61,11 @@ SOFTWARE.
* in the XStandardColormap structure.
*/
void
XSetStandardColormap
(
dpy
,
w
,
cmap
,
property
)
Display
*
dpy
;
Window
w
;
XStandardColormap
*
cmap
;
Atom
property
;
/* XA_RGB_BEST_MAP, etc. */
void
XSetStandardColormap
(
Display
*
dpy
,
Window
w
,
XStandardColormap
*
cmap
,
Atom
property
)
/* XA_RGB_BEST_MAP, etc. */
{
Screen
*
sp
;
XStandardColormap
stdcmap
;
...
...
@@ -87,6 +87,9 @@ void XSetStandardColormap(dpy, w, cmap, property)
stdcmap
.
visualid
=
sp
->
root_visual
->
visualid
;
stdcmap
.
killid
=
None
;
/* don't know how to kill this one */
#ifdef XCMS
XSetRGBColormaps
(
dpy
,
w
,
&
stdcmap
,
1
,
property
);
#endif
return
;
}
nx-X11/lib/X11/SetState.c
View file @
687d44b6
...
...
@@ -30,12 +30,13 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetState
(
dpy
,
gc
,
foreground
,
background
,
function
,
planemask
)
register
Display
*
dpy
;
GC
gc
;
int
function
;
unsigned
long
planemask
;
unsigned
long
foreground
,
background
;
XSetState
(
register
Display
*
dpy
,
GC
gc
,
unsigned
long
foreground
,
unsigned
long
background
,
int
function
,
unsigned
long
planemask
)
{
XGCValues
*
gv
=
&
gc
->
values
;
...
...
nx-X11/lib/X11/SetStip.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetStipple
(
dpy
,
gc
,
stipple
)
register
Display
*
dpy
;
GC
gc
;
Pixmap
stipple
;
XSetStipple
(
register
Display
*
dpy
,
GC
gc
,
Pixmap
stipple
)
{
LockDisplay
(
dpy
);
/* always update, since client may have changed pixmap contents */
...
...
nx-X11/lib/X11/SetTSOrig.c
View file @
687d44b6
...
...
@@ -30,10 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetTSOrigin
(
dpy
,
gc
,
x
,
y
)
register
Display
*
dpy
;
GC
gc
;
int
x
,
y
;
XSetTSOrigin
(
register
Display
*
dpy
,
GC
gc
,
int
x
,
int
y
)
{
XGCValues
*
gv
=
&
gc
->
values
;
...
...
nx-X11/lib/X11/SetTile.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XSetTile
(
dpy
,
gc
,
tile
)
register
Display
*
dpy
;
GC
gc
;
Pixmap
tile
;
XSetTile
(
register
Display
*
dpy
,
GC
gc
,
Pixmap
tile
)
{
LockDisplay
(
dpy
);
/* always update, since client may have changed pixmap contents */
...
...
nx-X11/lib/X11/SetTxtProp.c
View file @
687d44b6
...
...
@@ -57,36 +57,36 @@ from The Open Group.
#include <nx-X11/Xos.h>
#include <stdio.h>
void
XSetTextProperty
(
dpy
,
w
,
tp
,
property
)
Display
*
dpy
;
Window
w
;
Atom
property
;
XTextProperty
*
tp
;
void
XSetTextProperty
(
Display
*
dpy
,
Window
w
,
XTextProperty
*
tp
,
Atom
property
)
{
XChangeProperty
(
dpy
,
w
,
property
,
tp
->
encoding
,
tp
->
format
,
PropModeReplace
,
tp
->
value
,
tp
->
nitems
);
}
void
XSetWMName
(
dpy
,
w
,
tp
)
Display
*
dpy
;
Window
w
;
XTextProperty
*
tp
;
void
XSetWMName
(
Display
*
dpy
,
Window
w
,
XTextProperty
*
tp
)
{
XSetTextProperty
(
dpy
,
w
,
tp
,
XA_WM_NAME
);
}
void
XSetWMIconName
(
dpy
,
w
,
tp
)
Display
*
dpy
;
Window
w
;
XTextProperty
*
tp
;
void
XSetWMIconName
(
Display
*
dpy
,
Window
w
,
XTextProperty
*
tp
)
{
XSetTextProperty
(
dpy
,
w
,
tp
,
XA_WM_ICON_NAME
);
}
void
XSetWMClientMachine
(
dpy
,
w
,
tp
)
Display
*
dpy
;
Window
w
;
XTextProperty
*
tp
;
void
XSetWMClientMachine
(
Display
*
dpy
,
Window
w
,
XTextProperty
*
tp
)
{
XSetTextProperty
(
dpy
,
w
,
tp
,
XA_WM_CLIENT_MACHINE
);
}
...
...
nx-X11/lib/X11/SetWMCMapW.c
View file @
687d44b6
...
...
@@ -57,11 +57,11 @@ SOFTWARE.
* WM_COLORMAP_WINDOWS type: WINDOW format:32
*/
Status
XSetWMColormapWindows
(
dpy
,
w
,
windows
,
count
)
Display
*
dpy
;
Window
w
;
Window
*
windows
;
int
count
;
Status
XSetWMColormapWindows
(
Display
*
dpy
,
Window
w
,
Window
*
windows
,
int
count
)
{
Atom
prop
;
...
...
nx-X11/lib/X11/SetWMProto.c
View file @
687d44b6
...
...
@@ -57,11 +57,11 @@ SOFTWARE.
* WM_PROTOCOLS type: ATOM format: 32
*/
Status
XSetWMProtocols
(
dpy
,
w
,
protocols
,
count
)
Display
*
dpy
;
Window
w
;
Atom
*
protocols
;
int
count
;
Status
XSetWMProtocols
(
Display
*
dpy
,
Window
w
,
Atom
*
protocols
,
int
count
)
{
Atom
prop
;
...
...
nx-X11/lib/X11/StBytes.c
View file @
687d44b6
...
...
@@ -31,7 +31,7 @@ in this Software without prior written authorization from The Open Group.
#include <nx-X11/Xatom.h>
/* insulate predefined atom numbers from cut routines */
static
Atom
n_to_atom
[
8
]
=
{
static
const
Atom
n_to_atom
[
8
]
=
{
XA_CUT_BUFFER0
,
XA_CUT_BUFFER1
,
XA_CUT_BUFFER2
,
...
...
@@ -42,17 +42,20 @@ static Atom n_to_atom[8] = {
XA_CUT_BUFFER7
};
int
XRotateBuffers
(
dpy
,
rotate
)
register
Display
*
dpy
;
int
rotate
;
XRotateBuffers
(
register
Display
*
dpy
,
int
rotate
)
{
return
XRotateWindowProperties
(
dpy
,
RootWindow
(
dpy
,
0
),
n_to_atom
,
8
,
rotate
);
/* XRotateWindowProperties wants a non-const Atom*, but it doesn't
* modify it, so this is safe.
*/
return
XRotateWindowProperties
(
dpy
,
RootWindow
(
dpy
,
0
),
(
Atom
*
)
n_to_atom
,
8
,
rotate
);
}
char
*
XFetchBuffer
(
dpy
,
nbytes
,
buffer
)
register
Display
*
dpy
;
int
*
nbytes
;
register
int
buffer
;
char
*
XFetchBuffer
(
register
Display
*
dpy
,
int
*
nbytes
,
register
int
buffer
)
{
Atom
actual_type
;
int
actual_format
;
...
...
@@ -75,9 +78,9 @@ char *XFetchBuffer (dpy, nbytes, buffer)
return
(
NULL
);
}
char
*
XFetchBytes
(
dpy
,
nbytes
)
register
Display
*
dpy
;
int
*
nbytes
;
char
*
XFetchBytes
(
register
Display
*
dpy
,
int
*
nbytes
)
{
return
(
XFetchBuffer
(
dpy
,
nbytes
,
0
));
}
...
...
nx-X11/lib/X11/StColor.c
View file @
687d44b6
...
...
@@ -30,10 +30,10 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XStoreColor
(
dpy
,
cmap
,
def
)
register
Display
*
dpy
;
Colormap
cmap
;
XColor
*
def
;
XStoreColor
(
register
Display
*
dpy
,
Colormap
cmap
,
XColor
*
def
)
{
xColorItem
*
citem
;
register
xStoreColorsReq
*
req
;
...
...
nx-X11/lib/X11/StColors.c
View file @
687d44b6
...
...
@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XStoreColors
(
dpy
,
cmap
,
defs
,
ncolors
)
register
Display
*
dpy
;
Colormap
cmap
;
XColor
*
defs
;
int
ncolors
;
XStoreColors
(
register
Display
*
dpy
,
Colormap
cmap
,
XColor
*
defs
,
int
ncolors
)
{
register
int
i
;
xColorItem
citem
;
...
...
nx-X11/lib/X11/StNColor.c
View file @
687d44b6
...
...
@@ -46,6 +46,7 @@ int flags) /* DoRed, DoGreen, DoBlue */
XcmsColor
cmsColor_exact
;
XColor
scr_def
;
#ifdef XCMS
/*
* Let's Attempt to use Xcms approach to Parse Color
*/
...
...
@@ -62,6 +63,7 @@ int flags) /* DoRed, DoGreen, DoBlue */
* name. Thus pass name to the X Server.
*/
}
#endif
/*
* The Xcms and i18n methods failed, so lets pass it to the server
...
...
nx-X11/lib/X11/StName.c
View file @
687d44b6
nx-X11/lib/X11/StrKeysym.c
View file @
687d44b6
...
...
@@ -53,7 +53,7 @@ _XInitKeysymDB(void)
{
if
(
!
initialized
)
{
char
*
dbname
;
c
onst
c
har
*
dbname
;
XrmInitialize
();
/* use and name of this env var is not part of the standard */
...
...
nx-X11/lib/X11/StrToText.c
View file @
687d44b6
...
...
@@ -38,10 +38,10 @@ in this Software without prior written authorization from The Open Group.
* count.
*/
Status
XStringListToTextProperty
(
argv
,
argc
,
textprop
)
char
**
argv
;
int
argc
;
XTextProperty
*
textprop
;
Status
XStringListToTextProperty
(
char
**
argv
,
int
argc
,
XTextProperty
*
textprop
)
{
register
int
i
;
register
unsigned
int
nbytes
;
...
...
nx-X11/lib/X11/Sync.c
View file @
687d44b6
...
...
@@ -32,9 +32,9 @@ in this Software without prior written authorization from The Open Group.
/* Synchronize with errors and events, optionally discarding pending events */
int
XSync
(
dpy
,
discard
)
register
Display
*
dpy
;
Bool
discard
;
XSync
(
register
Display
*
dpy
,
Bool
discard
)
{
xGetInputFocusReply
rep
;
register
xReq
*
req
;
...
...
nx-X11/lib/X11/Text16.c
View file @
687d44b6
nx-X11/lib/X11/TextToStr.c
View file @
687d44b6
...
...
@@ -38,10 +38,10 @@ in this Software without prior written authorization from The Open Group.
* null-separated STRING property.
*/
Status
XTextPropertyToStringList
(
tp
,
list_return
,
count_return
)
XTextProperty
*
tp
;
char
***
list_return
;
int
*
count_return
;
Status
XTextPropertyToStringList
(
XTextProperty
*
tp
,
char
***
list_return
,
int
*
count_return
)
{
char
**
list
;
/* return value */
int
nelements
;
/* return value */
...
...
@@ -107,8 +107,7 @@ Status XTextPropertyToStringList (tp, list_return, count_return)
}
void
XFreeStringList
(
list
)
char
**
list
;
void
XFreeStringList
(
char
**
list
)
{
if
(
list
)
{
if
(
list
[
0
])
Xfree
(
list
[
0
]);
...
...
nx-X11/lib/X11/TrCoords.c
View file @
687d44b6
...
...
@@ -29,13 +29,15 @@ in this Software without prior written authorization from The Open Group.
#endif
#include "Xlibint.h"
Bool
XTranslateCoordinates
(
dpy
,
src_win
,
dest_win
,
src_x
,
src_y
,
dst_x
,
dst_y
,
child
)
register
Display
*
dpy
;
Window
src_win
,
dest_win
;
int
src_x
,
src_y
;
int
*
dst_x
,
*
dst_y
;
Window
*
child
;
Bool
XTranslateCoordinates
(
register
Display
*
dpy
,
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
;
...
...
nx-X11/lib/X11/UIThrStubs.c
View file @
687d44b6
/*
* $XFree86: xc/lib/XThrStub/UIThrStubs.c,v 3.3 2001/11/18 21:13:26 herrb Exp $
*
* Copyright (c) 1995 David E. Wexelblat. All rights reserved
*
...
...
nx-X11/lib/X11/UndefCurs.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUndefineCursor
(
dpy
,
w
)
register
Display
*
dpy
;
Window
w
;
XUndefineCursor
(
register
Display
*
dpy
,
Window
w
)
{
register
xChangeWindowAttributesReq
*
req
;
unsigned
long
defcurs
=
None
;
...
...
nx-X11/lib/X11/UngrabBut.c
View file @
687d44b6
...
...
@@ -30,11 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUngrabButton
(
dpy
,
button
,
modifiers
,
grab_window
)
register
Display
*
dpy
;
unsigned
int
button
;
/* CARD8 */
unsigned
int
modifiers
;
/* CARD16 */
Window
grab_window
;
XUngrabButton
(
register
Display
*
dpy
,
unsigned
int
button
,
/* CARD8 */
unsigned
int
modifiers
,
/* CARD16 */
Window
grab_window
)
{
register
xUngrabButtonReq
*
req
;
...
...
nx-X11/lib/X11/UngrabKbd.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUngrabKeyboard
(
dpy
,
time
)
register
Display
*
dpy
;
Time
time
;
XUngrabKeyboard
(
register
Display
*
dpy
,
Time
time
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/UngrabKey.c
View file @
687d44b6
...
...
@@ -30,12 +30,11 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUngrabKey
(
dpy
,
key
,
modifiers
,
grab_window
)
register
Display
*
dpy
;
int
key
;
unsigned
int
modifiers
;
Window
grab_window
;
XUngrabKey
(
register
Display
*
dpy
,
int
key
,
unsigned
int
modifiers
,
Window
grab_window
)
{
register
xUngrabKeyReq
*
req
;
...
...
nx-X11/lib/X11/UngrabPtr.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUngrabPointer
(
dpy
,
time
)
register
Display
*
dpy
;
Time
time
;
XUngrabPointer
(
register
Display
*
dpy
,
Time
time
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/UngrabSvr.c
View file @
687d44b6
...
...
@@ -30,8 +30,8 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUngrabServer
(
dpy
)
register
Display
*
dpy
;
XUngrabServer
(
register
Display
*
dpy
)
{
register
xReq
*
req
;
...
...
nx-X11/lib/X11/UninsCmap.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUninstallColormap
(
dpy
,
cmap
)
register
Display
*
dpy
;
Colormap
cmap
;
XUninstallColormap
(
register
Display
*
dpy
,
Colormap
cmap
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/UnldFont.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUnloadFont
(
dpy
,
font
)
register
Display
*
dpy
;
Font
font
;
XUnloadFont
(
register
Display
*
dpy
,
Font
font
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/UnmapSubs.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUnmapSubwindows
(
dpy
,
win
)
register
Display
*
dpy
;
Window
win
;
XUnmapSubwindows
(
register
Display
*
dpy
,
Window
win
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/UnmapWin.c
View file @
687d44b6
...
...
@@ -30,9 +30,9 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XUnmapWindow
(
dpy
,
w
)
register
Display
*
dpy
;
Window
w
;
XUnmapWindow
(
register
Display
*
dpy
,
Window
w
)
{
register
xResourceReq
*
req
;
...
...
nx-X11/lib/X11/VisUtil.c
View file @
687d44b6
...
...
@@ -53,12 +53,11 @@ in this Software without prior written authorization from The Open Group.
* VisualAllMask
*/
XVisualInfo
*
XGetVisualInfo
(
dpy
,
visual_info_mask
,
visual_info_template
,
nitems
)
Display
*
dpy
;
register
long
visual_info_mask
;
register
XVisualInfo
*
visual_info_template
;
int
*
nitems
;
/* RETURN */
XVisualInfo
*
XGetVisualInfo
(
Display
*
dpy
,
register
long
visual_info_mask
,
register
XVisualInfo
*
visual_info_template
,
int
*
nitems
)
/* RETURN */
{
register
Visual
*
vp
;
...
...
@@ -189,12 +188,12 @@ int *nitems; /* RETURN */
* otherwise False is returned.
*/
Status
XMatchVisualInfo
(
dpy
,
screen
,
depth
,
class
,
visual_info
)
Display
*
dpy
;
int
screen
;
int
depth
;
int
class
;
XVisualInfo
*
visual_info
;
/* RETURNED */
Status
XMatchVisualInfo
(
Display
*
dpy
,
int
screen
,
int
depth
,
int
class
,
XVisualInfo
*
visual_info
)
/* RETURNED */
{
Visual
*
vp
;
...
...
nx-X11/lib/X11/WMProps.c
View file @
687d44b6
...
...
@@ -69,19 +69,19 @@ SOFTWARE.
* WM_CLIENT_MACHINE type: TEXT format: varies?
* WM_NORMAL_HINTS type: WM_SIZE_HINTS format: 32
* WM_CLASS type: STRING/STRING format: 8
* WM_LOCALE_NAME type: STRING format: 8
*/
void
XSetWMProperties
(
dpy
,
w
,
windowName
,
iconName
,
argv
,
argc
,
sizeHints
,
wmHints
,
classHints
)
Display
*
dpy
;
Window
w
;
/* window to decorate */
XTextProperty
*
windowName
;
/* name of application */
XTextProperty
*
iconName
;
/* name string for icon */
char
**
argv
;
/* command line */
int
argc
;
/* size of command line */
XSizeHints
*
sizeHints
;
/* size hints for window in its normal state */
XWMHints
*
wmHints
;
/* miscelaneous window manager hints */
XClassHint
*
classHints
;
/* resource name and class */
void
XSetWMProperties
(
Display
*
dpy
,
Window
w
,
/* window to decorate */
XTextProperty
*
windowName
,
/* name of application */
XTextProperty
*
iconName
,
/* name string for icon */
char
**
argv
,
/* command line */
int
argc
,
/* size of command line */
XSizeHints
*
sizeHints
,
/* size hints for window in its normal state */
XWMHints
*
wmHints
,
/* miscelaneous window manager hints */
XClassHint
*
classHints
)
/* resource name and class */
{
XTextProperty
textprop
;
char
hostName
[
256
];
...
...
nx-X11/lib/X11/WarpPtr.c
View file @
687d44b6
...
...
@@ -30,13 +30,16 @@ in this Software without prior written authorization from The Open Group.
#include "Xlibint.h"
int
XWarpPointer
(
dpy
,
src_win
,
dest_win
,
src_x
,
src_y
,
src_width
,
src_height
,
dest_x
,
dest_y
)
register
Display
*
dpy
;
Window
src_win
,
dest_win
;
int
src_x
,
src_y
;
unsigned
int
src_width
,
src_height
;
int
dest_x
,
dest_y
;
XWarpPointer
(
register
Display
*
dpy
,
Window
src_win
,
Window
dest_win
,
int
src_x
,
int
src_y
,
unsigned
int
src_width
,
unsigned
int
src_height
,
int
dest_x
,
int
dest_y
)
{
register
xWarpPointerReq
*
req
;
...
...
nx-X11/lib/X11/Window.c
View file @
687d44b6
...
...
@@ -97,17 +97,19 @@ void _XProcessWindowAttributes (
CWOverrideRedirect|CWSaveUnder|CWEventMask|\
CWDontPropagate|CWColormap|CWCursor)
Window
XCreateWindow
(
dpy
,
parent
,
x
,
y
,
width
,
height
,
borderWidth
,
depth
,
class
,
visual
,
valuemask
,
attributes
)
register
Display
*
dpy
;
Window
parent
;
int
x
,
y
;
unsigned
int
width
,
height
,
borderWidth
;
int
depth
;
unsigned
int
class
;
Visual
*
visual
;
unsigned
long
valuemask
;
XSetWindowAttributes
*
attributes
;
Window
XCreateWindow
(
register
Display
*
dpy
,
Window
parent
,
int
x
,
int
y
,
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
borderWidth
,
int
depth
,
unsigned
int
class
,
Visual
*
visual
,
unsigned
long
valuemask
,
XSetWindowAttributes
*
attributes
)
{
Window
wid
;
register
xCreateWindowReq
*
req
;
...
...
nx-X11/lib/X11/Withdraw.c
View file @
687d44b6
...
...
@@ -62,10 +62,10 @@ from The Open Group.
* This function instructs the window manager to change this window from
* NormalState or IconicState to Withdrawn.
*/
Status
XWithdrawWindow
(
dpy
,
w
,
screen
)
Display
*
dpy
;
Window
w
;
int
screen
;
Status
XWithdrawWindow
(
Display
*
dpy
,
Window
w
,
int
screen
)
{
XUnmapEvent
ev
;
Window
root
=
RootWindow
(
dpy
,
screen
);
...
...
nx-X11/lib/X11/WrBitF.c
View file @
687d44b6
...
...
@@ -34,7 +34,7 @@ from The Open Group.
#include "Xutil.h"
#include <stdio.h>
#define ERR_RETURN
0
#define ERR_RETURN
NULL
static
char
*
Format_Image
(
XImage
*
image
,
...
...
nx-X11/lib/X11/Xintatom.h
View file @
687d44b6
/* $XFree86$ */
#ifndef _XINTATOM_H_
#define _XINTATOM_H_ 1
...
...
nx-X11/lib/X11/Xintconn.h
View file @
687d44b6
...
...
@@ -6,6 +6,7 @@
_XFUNCPROTOBEGIN
#if !USE_XCB
/* ConnDis.c */
int
_XConnectDisplay
(
...
...
@@ -26,6 +27,7 @@ extern XtransConnInfo _X11TransConnectDisplay(char *display_name,
int
*
screenp
,
char
**
auth_namep
,
int
*
auth_namelenp
,
char
**
auth_datap
,
int
*
auth_datalenp
);
#endif
/* !USE_XCB */
/* OpenDis.c */
extern
void
_XFreeDisplayStructure
(
Display
*
dpy
);
...
...
nx-X11/lib/X11/Xresinternal.h
View file @
687d44b6
/* $XFree86$ */
#ifndef _XRESINTERNAL_H_
#define _XRESINTERNAL_H_
...
...
nx-X11/lib/X11/Xrm.c
View file @
687d44b6
...
...
@@ -333,7 +333,6 @@ void XrmInitialize(void)
XrmQANY
=
XrmPermStringToQuark
(
"?"
);
}
#ifndef _XP_PRINT_SERVER_
XrmDatabase
XrmGetDatabase
(
Display
*
display
)
{
...
...
@@ -357,7 +356,6 @@ void XrmSetDatabase(
display
->
db
=
database
;
UnlockDisplay
(
display
);
}
#endif
/* !_XP_PRINT_SERVER_ */
void
XrmStringToQuarkList
(
...
...
@@ -501,11 +499,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
;
}
...
...
@@ -806,6 +800,7 @@ void XrmCombineDatabase(
}
}
(
from
->
methods
->
destroy
)(
from
->
mbstate
);
_XUnlockMutex
(
&
from
->
linfo
);
_XFreeMutex
(
&
from
->
linfo
);
Xfree
((
char
*
)
from
);
_XUnlockMutex
(
&
(
*
into
)
->
linfo
);
...
...
@@ -2570,12 +2565,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
];
...
...
@@ -2654,6 +2645,7 @@ void XrmDestroyDatabase(
else
DestroyNTable
(
table
);
}
_XUnlockMutex
(
&
db
->
linfo
);
_XFreeMutex
(
&
db
->
linfo
);
(
*
db
->
methods
->
destroy
)(
db
->
mbstate
);
Xfree
((
char
*
)
db
);
...
...
nx-X11/lib/X11/globals.c
View file @
687d44b6
nx-X11/lib/X11/imConv.c
View file @
687d44b6
/* $TOG: imConv.c /main/20 1998/06/17 15:46:41 kaleb $ */
/******************************************************************
Copyright 1991, 1992 by Fuji Xerox Co.,Ltd.
...
...
@@ -65,11 +64,11 @@ typedef int (*ucstocsConvProc)(
);
struct
SubstRec
{
c
har
*
encoding_name
;
c
har
*
charset_name
;
c
onst
char
encoding_name
[
8
]
;
c
onst
char
charset_name
[
12
]
;
};
static
struct
SubstRec
SubstTable
[]
=
{
static
const
struct
SubstRec
SubstTable
[]
=
{
{
"STRING"
,
"ISO8859-1"
},
{
"TIS620"
,
"TIS620-0"
},
{
"UTF-8"
,
"ISO10646-1"
}
...
...
@@ -156,13 +155,13 @@ static int lookup_string(
#define BUF_SIZE (20)
int
_XimLookupMBText
(
ic
,
event
,
buffer
,
nbytes
,
keysym
,
status
)
Xic
ic
;
XKeyEvent
*
event
;
char
*
buffer
;
int
nbytes
;
KeySym
*
keysym
;
XComposeStatus
*
status
;
_XimLookupMBText
(
Xic
ic
,
XKeyEvent
*
event
,
char
*
buffer
,
int
nbytes
,
KeySym
*
keysym
,
XComposeStatus
*
status
)
{
int
count
;
KeySym
symbol
;
...
...
@@ -227,13 +226,13 @@ _XimLookupMBText(ic, event, buffer, nbytes, keysym, status)
}
int
_XimLookupWCText
(
ic
,
event
,
buffer
,
nbytes
,
keysym
,
status
)
Xic
ic
;
XKeyEvent
*
event
;
wchar_t
*
buffer
;
int
nbytes
;
KeySym
*
keysym
;
XComposeStatus
*
status
;
_XimLookupWCText
(
Xic
ic
,
XKeyEvent
*
event
,
wchar_t
*
buffer
,
int
nbytes
,
KeySym
*
keysym
,
XComposeStatus
*
status
)
{
int
count
;
KeySym
symbol
;
...
...
@@ -299,13 +298,13 @@ _XimLookupWCText(ic, event, buffer, nbytes, keysym, status)
}
int
_XimLookupUTF8Text
(
ic
,
event
,
buffer
,
nbytes
,
keysym
,
status
)
Xic
ic
;
XKeyEvent
*
event
;
char
*
buffer
;
int
nbytes
;
KeySym
*
keysym
;
XComposeStatus
*
status
;
_XimLookupUTF8Text
(
Xic
ic
,
XKeyEvent
*
event
,
char
*
buffer
,
int
nbytes
,
KeySym
*
keysym
,
XComposeStatus
*
status
)
{
int
count
;
KeySym
symbol
;
...
...
nx-X11/lib/X11/locking.c
View file @
687d44b6
...
...
@@ -45,11 +45,23 @@ in this Software without prior written authorization from The Open Group.
#include <dlfcn.h>
#endif
#include "Xprivate.h"
#include "locking.h"
#ifdef XTHREADS_WARN
#include <stdio.h>
/* 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 */
...
...
@@ -58,14 +70,14 @@ extern LockInfoPtr _Xi18n_lock;
#ifdef WIN32
static
DWORD
_X_TlsIndex
=
(
DWORD
)
-
1
;
_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
;
...
...
@@ -87,28 +99,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
);
}
...
...
@@ -200,15 +202,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
();
...
...
@@ -328,17 +325,11 @@ 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
();
...
...
@@ -379,15 +370,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,15 +384,10 @@ static void _XConditionSignal(
}
#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
...
...
@@ -467,15 +448,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
);
...
...
@@ -484,23 +460,19 @@ static void _XLockDisplay(
#endif
if
(
dpy
->
lock
->
locking_level
>
0
)
_XDisplayLockWait
(
dpy
);
_XIDHandler
(
dpy
);
_XSeqSyncFunction
(
dpy
);
}
/*
* _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
);
...
...
@@ -595,7 +567,7 @@ xthread_t (*_x11_thr_self)() = __x11_thr_self;
#endif
Status
XInitThreads
()
Status
XInitThreads
(
void
)
{
if
(
_Xglobal_lock
)
return
1
;
...
...
@@ -644,7 +616,7 @@ Status XInitThreads()
}
#else
/* XTHREADS */
Status
XInitThreads
()
Status
XInitThreads
(
void
)
{
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment