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
e755e660
You need to sign in or sign up before continuing.
Commit
e755e660
authored
May 01, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Nov 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXshm.c: rework code to be identical for ProcShmDispatch and SProcShmDispatch
parent
7afe9553
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
60 deletions
+60
-60
NXshm.c
nx-X11/programs/Xserver/hw/nxagent/NXshm.c
+60
-60
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXshm.c
View file @
e755e660
...
...
@@ -492,20 +492,6 @@ nxagent_ProcShmDispatch (client)
register
ClientPtr
client
;
{
REQUEST
(
xReq
);
#ifdef NXAGENT_SERVER
#ifdef TEST
fprintf
(
stderr
,
"ProcShmDispatch: Going to execute operation [%d] for client [%d].
\n
"
,
stuff
->
data
,
client
->
index
);
if
(
stuff
->
data
<=
X_ShmCreatePixmap
)
{
fprintf
(
stderr
,
"ProcShmDispatch: Request [%s] OPCODE#%d.
\n
"
,
nxagentShmRequestLiteral
[
stuff
->
data
],
stuff
->
data
);
}
#endif
#endif
switch
(
stuff
->
data
)
{
case
X_ShmQueryVersion
:
...
...
@@ -516,13 +502,6 @@ nxagent_ProcShmDispatch (client)
return
ProcShmDetach
(
client
);
case
X_ShmPutImage
:
{
#ifdef NXAGENT_SERVER
#ifdef TEST
fprintf
(
stderr
,
"ProcShmDispatch: Going to execute ProcShmPutImage() for client [%d].
\n
"
,
client
->
index
);
#endif
#endif
#ifdef PANORAMIX
if
(
!
noPanoramiXExtension
)
return
ProcPanoramiXShmPutImage
(
client
);
...
...
@@ -546,6 +525,31 @@ nxagent_ProcShmDispatch (client)
}
}
static
int
nxagent_SProcShmDispatch
(
client
)
register
ClientPtr
client
;
{
REQUEST
(
xReq
);
switch
(
stuff
->
data
)
{
case
X_ShmQueryVersion
:
return
SProcShmQueryVersion
(
client
);
case
X_ShmAttach
:
return
SProcShmAttach
(
client
);
case
X_ShmDetach
:
return
SProcShmDetach
(
client
);
case
X_ShmPutImage
:
return
SProcShmPutImage
(
client
);
case
X_ShmGetImage
:
return
SProcShmGetImage
(
client
);
case
X_ShmCreatePixmap
:
return
SProcShmCreatePixmap
(
client
);
default
:
return
BadRequest
;
}
}
/* A wrapper that handles the trap. This construct is used
to keep the derived code closer to the original
*/
...
...
@@ -554,6 +558,24 @@ ProcShmDispatch (register ClientPtr client)
{
int
result
;
#ifdef TEST
REQUEST
(
xReq
);
fprintf
(
stderr
,
"ProcShmDispatch: Going to execute operation [%d] for client [%d].
\n
"
,
stuff
->
data
,
client
->
index
);
if
(
stuff
->
data
<=
X_ShmCreatePixmap
)
{
fprintf
(
stderr
,
"ProcShmDispatch: Request [%s] OPCODE#%d.
\n
"
,
nxagentShmRequestLiteral
[
stuff
->
data
],
stuff
->
data
);
}
if
(
stuff
->
data
==
X_ShmPutImage
)
{
fprintf
(
stderr
,
"ProcShmDispatch: Going to execute ProcShmPutImage() for client [%d].
\n
"
,
client
->
index
);
}
#endif
nxagentShmTrap
=
1
;
result
=
nxagent_ProcShmDispatch
(
client
);
...
...
@@ -564,55 +586,33 @@ ProcShmDispatch (register ClientPtr client)
}
static
int
SProcShmDispatch
(
client
)
register
ClientPtr
client
;
SProcShmDispatch
(
register
ClientPtr
client
)
{
REQUEST
(
xReq
)
;
int
result
;
#ifdef TEST
REQUEST
(
xReq
);
fprintf
(
stderr
,
"SProcShmDispatch: Going to execute operation [%d] for client [%d].
\n
"
,
stuff
->
data
,
client
->
index
);
#endif
switch
(
stuff
->
data
)
if
(
stuff
->
data
<=
X_ShmCreatePixmap
)
{
case
X_ShmQueryVersion
:
return
SProcShmQueryVersion
(
client
);
case
X_ShmAttach
:
return
SProcShmAttach
(
client
);
case
X_ShmDetach
:
return
SProcShmDetach
(
client
);
case
X_ShmPutImage
:
{
int
result
;
#ifdef TEST
fprintf
(
stderr
,
"SProcShmDispatch: Going to execute SProcShmPutImage() for client [%d].
\n
"
,
client
->
index
);
#endif
fprintf
(
stderr
,
"ProcShmDispatch: Request [%s] OPCODE#%d.
\n
"
,
nxagentShmRequestLiteral
[
stuff
->
data
],
stuff
->
data
);
}
#ifdef NXAGENT_SERVER
nxagentShmTrap
=
1
;
#endif
if
(
stuff
->
data
==
X_ProxShmPutImage
)
{
fprintf
(
stderr
,
"SProcShmDispatch: Going to execute SProcShmPutImage() for client [%d].
\n
"
,
client
->
index
);
}
#endif
result
=
SProcShmPutImage
(
client
)
;
nxagentShmTrap
=
1
;
#ifdef NXAGENT_SERVER
nxagentShmTrap
=
0
;
#endif
result
=
nxagent_SProcShmDispatch
(
client
);
#ifdef TEST
fprintf
(
stderr
,
"SProcShmDispatch: Returning from SProcShmPutImage() for client [%d].
\n
"
,
client
->
index
);
#endif
nxagentShmTrap
=
0
;
return
result
;
}
case
X_ShmGetImage
:
return
SProcShmGetImage
(
client
);
case
X_ShmCreatePixmap
:
return
SProcShmCreatePixmap
(
client
);
default
:
return
BadRequest
;
}
return
result
;
}
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