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
7f636648
Commit
7f636648
authored
Sep 06, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Font.c: reformat comments
parent
6d783bac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
28 deletions
+20
-28
Font.c
nx-X11/programs/Xserver/hw/nxagent/Font.c
+20
-28
No files found.
nx-X11/programs/Xserver/hw/nxagent/Font.c
View file @
7f636648
...
@@ -159,8 +159,7 @@ static struct _nxagentFailedToReconnectFonts
...
@@ -159,8 +159,7 @@ static struct _nxagentFailedToReconnectFonts
}
nxagentFailedToReconnectFonts
=
{
NULL
,
NULL
,
0
,
0
};
}
nxagentFailedToReconnectFonts
=
{
NULL
,
NULL
,
0
,
0
};
/*
/*
* This is used if nxagentFullGeneration is true
* This is used if nxagentFullGeneration is true in CloseDisplay().
* in CloseDisplay().
*/
*/
void
nxagentFreeFontCache
(
void
)
void
nxagentFreeFontCache
(
void
)
...
@@ -218,8 +217,7 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames)
...
@@ -218,8 +217,7 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames)
}
}
/*
/*
* Avoid querying again the remote
* Avoid querying again the remote fonts.
* fonts.
*/
*/
if
(
nxagentRemoteFontList
.
length
>
0
)
if
(
nxagentRemoteFontList
.
length
>
0
)
...
@@ -228,13 +226,11 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames)
...
@@ -228,13 +226,11 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames)
}
}
/*
/*
* We can't retrieve the full remote font
* We can't retrieve the full remote font list with a single query,
* list with a single query, because the
* because the number of dashes in the pattern acts as a rule to
* number of dashes in the pattern acts as
* select how to search for the font names, so the pattern '*' is
* a rule to select how to search for the
* useful to retrieve the font aliases, while the other one will
* font names, so the pattern '*' is useful
* select the 'real' fonts.
* to retrieve the font aliases, while the
* other one will select the 'real' fonts.
*/
*/
for
(
int
p
=
0
;
p
<
patternsQt
;
p
++
)
for
(
int
p
=
0
;
p
<
patternsQt
;
p
++
)
...
@@ -246,8 +242,8 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames)
...
@@ -246,8 +242,8 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames)
#endif
#endif
/*
/*
* Add the ListFont request pattern to the list with
* Add the ListFont request pattern to the list with
the last
*
the last
requested maxnames.
* requested maxnames.
*/
*/
nxagentListRemoteAddName
(
searchPattern
,
maxNames
);
nxagentListRemoteAddName
(
searchPattern
,
maxNames
);
...
@@ -686,11 +682,10 @@ int nxagentDestroyNewFontResourceType(void * p, XID id)
...
@@ -686,11 +682,10 @@ int nxagentDestroyNewFontResourceType(void * p, XID id)
#endif
#endif
/*
/*
FIXME: It happens that this resource had been already
FIXME: It happens that this resource had been already destroyed. We
destroyed. We should verify if the same font is
should verify if the same font is assigned both to the server
assigned both to the server client and another
client and another client. We had a crash when freeing server
client. We had a crash when freeing server client
client resources.
resources.
*/
*/
if
(
nxagentFontPriv
((
FontPtr
)
p
)
!=
NULL
)
if
(
nxagentFontPriv
((
FontPtr
)
p
)
!=
NULL
)
{
{
...
@@ -706,8 +701,8 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
...
@@ -706,8 +701,8 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
char
substFontBuf
[
512
];;
char
substFontBuf
[
512
];;
/* X Logical Font Description Conventions
/* X Logical Font Description Conventions
require 14 fields in the
*
require 14 fields in the
font names.
* font names.
*
*
*/
*/
char
*
searchFields
[
FIELDS
+
1
];
char
*
searchFields
[
FIELDS
+
1
];
...
@@ -1067,8 +1062,7 @@ static void nxagentCleanCacheAfterReconnect(void)
...
@@ -1067,8 +1062,7 @@ static void nxagentCleanCacheAfterReconnect(void)
for
(
j
=
CACHE_INDEX
-
1
;
CACHE_FSTRUCT
(
j
)
==
NULL
;
j
--
);
for
(
j
=
CACHE_INDEX
-
1
;
CACHE_FSTRUCT
(
j
)
==
NULL
;
j
--
);
/*
/*
* Now we can swap the two entry
* Now we can swap the two entry and reduce the Cache index
* and reduce the Cache index
*/
*/
swapEntryPtr
=
CACHE_ENTRY
(
i
);
swapEntryPtr
=
CACHE_ENTRY
(
i
);
CACHE_ENTRY
(
i
)
=
CACHE_ENTRY
(
j
);
CACHE_ENTRY
(
i
)
=
CACHE_ENTRY
(
j
);
...
@@ -1109,9 +1103,8 @@ Bool nxagentReconnectAllFonts(void *p0)
...
@@ -1109,9 +1103,8 @@ Bool nxagentReconnectAllFonts(void *p0)
#endif
#endif
/*
/*
* The resource type RT_NX_FONT is created on the
* The resource type RT_NX_FONT is created on the server client
* server client only, so we can avoid to loop
* only, so we can avoid to loop through all the clients.
* through all the clients.
*/
*/
FindClientResourcesByType
(
clients
[
serverClient
->
index
],
RT_NX_FONT
,
FindClientResourcesByType
(
clients
[
serverClient
->
index
],
RT_NX_FONT
,
...
@@ -1341,9 +1334,8 @@ Bool nxagentDisconnectAllFonts(void)
...
@@ -1341,9 +1334,8 @@ Bool nxagentDisconnectAllFonts(void)
nxagentFreeCacheBeforeReconnect
();
nxagentFreeCacheBeforeReconnect
();
/*
/*
* The resource type RT_NX_FONT is created on the
* The resource type RT_NX_FONT is created on the server client
* server client only, so we can avoid to loop
* only, so we can avoid to loop through all the clients.
* through all the clients.
*/
*/
FindClientResourcesByType
(
clients
[
serverClient
->
index
],
RT_NX_FONT
,
FindClientResourcesByType
(
clients
[
serverClient
->
index
],
RT_NX_FONT
,
...
...
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