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
8c5a3b82
Commit
8c5a3b82
authored
Jan 12, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXdispatch.c: some cleanup
parent
07b9e937
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
25 deletions
+23
-25
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+23
-25
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
8c5a3b82
...
...
@@ -800,12 +800,12 @@ ProcOpenFont(register ClientPtr client)
#ifdef NXAGENT_SERVER
char
fontReq
[
256
];
memcpy
(
fontReq
,(
char
*
)
&
stuff
[
1
],
(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
fontReq
[
stuff
->
nbytes
]
=
0
;
if
(
strchr
(
fontReq
,
'*'
)
||
strchr
(
fontReq
,
'?'
))
memcpy
(
fontReq
,(
char
*
)
&
stuff
[
1
],
(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
fontReq
[
stuff
->
nbytes
]
=
'\0'
;
if
(
strchr
(
fontReq
,
'*'
)
||
strchr
(
fontReq
,
'?'
))
{
#ifdef NXAGENT_FONTMATCH_DEBUG
fprintf
(
stderr
,
"
Dispatch: ProcOpenFont try to find a common font with font pattern=%s
\n
"
,
fontReq
);
fprintf
(
stderr
,
"
%s: try to find a common font with font pattern [%s]
\n
"
,
__func__
,
fontReq
);
#endif
nxagentListRemoteFonts
(
fontReq
,
nxagentMaxFontNames
);
err
=
nxOpenFont
(
client
,
stuff
->
fid
,
(
Mask
)
0
,
...
...
@@ -837,10 +837,9 @@ ProcCloseFont(register ClientPtr client)
#ifdef NXAGENT_SERVER
/*
* When a client closes a font the resource
* should not be lost if the reference counter
* is not 0, otherwise the server will not be
* able to find this font looping through the
* When a client closes a font the resource should not be lost
* if the reference counter is not 0, otherwise the server
* will not be able to find this font looping through the
* resources.
*/
...
...
@@ -849,7 +848,7 @@ ProcCloseFont(register ClientPtr client)
if
(
nxagentFindClientResource
(
serverClient
->
index
,
RT_NX_FONT
,
pFont
)
==
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"
ProcCloseFont: Switching resource for font at [%p].
\n
"
,
fprintf
(
stderr
,
"
%s: Switching resource for font at [%p].
\n
"
,
__func__
,
(
void
*
)
pFont
);
#endif
...
...
@@ -861,8 +860,8 @@ ProcCloseFont(register ClientPtr client)
#ifdef TEST
else
{
fprintf
(
stderr
,
"
ProcCloseFont
: Found duplicated font at [%p], "
"resource switching skipped.
\n
"
,
(
void
*
)
pFont
);
fprintf
(
stderr
,
"
%s
: Found duplicated font at [%p], "
"resource switching skipped.
\n
"
,
__func__
,
(
void
*
)
pFont
);
}
#endif
}
...
...
@@ -889,11 +888,11 @@ ProcListFonts(register ClientPtr client)
#ifdef NXAGENT_SERVER
char
tmp
[
256
];
memcpy
(
tmp
,
(
unsigned
char
*
)
&
stuff
[
1
],(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
tmp
[
stuff
->
nbytes
]
=
0
;
memcpy
(
tmp
,
(
unsigned
char
*
)
&
stuff
[
1
],
(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
tmp
[
stuff
->
nbytes
]
=
'\0'
;
#ifdef NXAGENT_FONTMATCH_DEBUG
fprintf
(
stderr
,
"
Dispatch: ListFont request with pattern %s max_names=%d
\n
"
,
tmp
,
stuff
->
maxNames
);
fprintf
(
stderr
,
"
%s: ListFont request with pattern [%s] max_names [%d]
\n
"
,
__func__
,
tmp
,
stuff
->
maxNames
);
#endif
nxagentListRemoteFonts
(
tmp
,
stuff
->
maxNames
<
nxagentMaxFontNames
?
nxagentMaxFontNames
:
stuff
->
maxNames
);
#endif
...
...
@@ -911,12 +910,12 @@ ProcListFontsWithInfo(register ClientPtr client)
#ifdef NXAGENT_SERVER
char
tmp
[
256
];
memcpy
(
tmp
,
(
unsigned
char
*
)
&
stuff
[
1
],(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
tmp
[
stuff
->
nbytes
]
=
0
;
memcpy
(
tmp
,
(
unsigned
char
*
)
&
stuff
[
1
],
(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
tmp
[
stuff
->
nbytes
]
=
'\0'
;
#ifdef NXAGENT_FONTMATCH_DEBUG
fprintf
(
stderr
,
"
Dispatch: ListFont with info request with pattern %s max_names=%d
\n
"
,
tmp
,
stuff
->
maxNames
);
fprintf
(
stderr
,
"
%s: ListFont with info request with pattern [%s] max_names [%d]
\n
"
,
__func__
,
tmp
,
stuff
->
maxNames
);
#endif
nxagentListRemoteFonts
(
tmp
,
stuff
->
maxNames
<
nxagentMaxFontNames
?
nxagentMaxFontNames
:
stuff
->
maxNames
);
nxagentListRemoteFonts
(
tmp
,
stuff
->
maxNames
<
nxagentMaxFontNames
?
nxagentMaxFontNames
:
stuff
->
maxNames
);
#endif
return
StartListFontsWithInfo
(
client
,
stuff
->
nbytes
,
...
...
@@ -938,11 +937,10 @@ ProcFreePixmap(register ClientPtr client)
#ifdef NXAGENT_SERVER
/*
* When a client releases a pixmap the resource
* should not be lost if the reference counter
* is not 0, otherwise the server will not be
* able to find this pixmap looping through the
* resources.
* When a client releases a pixmap the resource should not be
* lost if the reference counter is not 0, otherwise the
* server will not be able to find this pixmap looping through
* the resources.
*/
if
(
pMap
->
refcnt
>
0
)
...
...
@@ -961,8 +959,8 @@ ProcFreePixmap(register ClientPtr client)
#ifdef TEST
else
{
fprintf
(
stderr
,
"
ProcFreePixmap
: Found duplicated pixmap at [%p], "
"resource switching skipped.
\n
"
,
(
void
*
)
pMap
);
fprintf
(
stderr
,
"
%s
: Found duplicated pixmap at [%p], "
"resource switching skipped.
\n
"
,
__func__
,
(
void
*
)
pMap
);
}
#endif
}
...
...
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