aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-06-22 09:36:08 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-12-28 12:54:40 +0100
commit68dd0b52e13c844d662192654fb10cb993257a59 (patch)
treea97ab98a06147cd5fb194063a9984dc3973fba55 /nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
parente9f44221b2520a1d894b3c125269b5d10438453b (diff)
downloadnx-libs-68dd0b52e13c844d662192654fb10cb993257a59.tar.gz
nx-libs-68dd0b52e13c844d662192654fb10cb993257a59.tar.bz2
nx-libs-68dd0b52e13c844d662192654fb10cb993257a59.zip
Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Rebased against NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
index 828b9bf4c..4f41ee228 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
@@ -177,7 +177,7 @@ _NXGetFontPathError:
#define QUERYCHARINFO(pci, pr) *(pr) = (pci)->metrics
-extern pointer fosNaturalParams;
+extern void * fosNaturalParams;
extern FontPtr defaultFont;
static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0;
@@ -291,7 +291,7 @@ RemoveFontWakeup(FontPathElementPtr fpe)
}
void
-FontWakeup(pointer data, int count, pointer LastSelectMask)
+FontWakeup(void * data, int count, void * LastSelectMask)
{
int i;
FontPathElementPtr fpe;
@@ -381,7 +381,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if (c->current_fpe < c->num_fpes)
{
fpe = c->fpe_list[c->current_fpe];
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
err = Successful;
goto bail;
@@ -389,7 +389,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
while (c->current_fpe < c->num_fpes) {
fpe = c->fpe_list[c->current_fpe];
err = (*fpe_functions[fpe->type].open_font)
- ((pointer) client, fpe, c->flags,
+ ((void *) client, fpe, c->flags,
c->fontname, c->fnamelen, FontFormat,
BitmapFormatMaskByte |
BitmapFormatMaskBit |
@@ -423,7 +423,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
if (err == Suspended) {
if (!c->slept) {
c->slept = TRUE;
- ClientSleep(client, (ClientSleepProcPtr)doOpenFont, (pointer) c);
+ ClientSleep(client, (ClientSleepProcPtr)doOpenFont, (void *) c);
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: doOpenFont: client [%lx] sleeping.\n", client);
#endif
@@ -469,7 +469,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
}
}
}
- if (!AddResource(c->fontid, RT_FONT, (pointer) pfont)) {
+ if (!AddResource(c->fontid, RT_FONT, (void *) pfont)) {
err = AllocError;
goto bail;
}
@@ -478,7 +478,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
extern RESTYPE RT_NX_FONT;
nxagentFontPriv(pfont) -> mirrorID = FakeClientID(0);
- if (!AddResource(nxagentFontPriv(pfont) -> mirrorID, RT_NX_FONT, (pointer) pfont)) {
+ if (!AddResource(nxagentFontPriv(pfont) -> mirrorID, RT_NX_FONT, (void *) pfont)) {
FreeResource(c->fontid, RT_NONE);
err = AllocError;
goto bail;
@@ -548,7 +548,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
cached = FindCachedFontPattern(patternCache, pfontname, lenfname);
if (cached && cached->info.cachable)
{
- if (!AddResource(fid, RT_FONT, (pointer) cached))
+ if (!AddResource(fid, RT_FONT, (void *) cached))
return BadAlloc;
cached->refcnt++;
return Success;
@@ -599,7 +599,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
* \param value must conform to DeleteType
*/
int
-CloseFont(pointer value, XID fid)
+CloseFont(void * value, XID fid)
{
int nscr;
ScreenPtr pscr;
@@ -730,7 +730,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
if (c->current.current_fpe < c->num_fpes)
{
fpe = c->fpe_list[c->current.current_fpe];
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
err = Successful;
goto bail;
@@ -748,7 +748,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
/* This FPE doesn't support/require list_fonts_and_aliases */
err = (*fpe_functions[fpe->type].list_fonts)
- ((pointer) c->client, fpe, c->current.pattern,
+ ((void *) c->client, fpe, c->current.pattern,
c->current.patlen, c->current.max_names - c->names->nnames,
c->names);
@@ -757,7 +757,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
c->slept = TRUE;
ClientSleep(client,
(ClientSleepProcPtr)doListFontsAndAliases,
- (pointer) c);
+ (void *) c);
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: doListFont (1): client [%lx] sleeping.\n", client);
#endif
@@ -780,14 +780,14 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
if (!c->current.list_started) {
err = (*fpe_functions[fpe->type].start_list_fonts_and_aliases)
- ((pointer) c->client, fpe, c->current.pattern,
+ ((void *) c->client, fpe, c->current.pattern,
c->current.patlen, c->current.max_names - c->names->nnames,
&c->current.private);
if (err == Suspended) {
if (!c->slept) {
ClientSleep(client,
(ClientSleepProcPtr)doListFontsAndAliases,
- (pointer) c);
+ (void *) c);
c->slept = TRUE;
}
return TRUE;
@@ -799,13 +799,13 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
char *tmpname;
name = 0;
err = (*fpe_functions[fpe->type].list_next_font_or_alias)
- ((pointer) c->client, fpe, &name, &namelen, &tmpname,
+ ((void *) c->client, fpe, &name, &namelen, &tmpname,
&resolvedlen, c->current.private);
if (err == Suspended) {
if (!c->slept) {
ClientSleep(client,
(ClientSleepProcPtr)doListFontsAndAliases,
- (pointer) c);
+ (void *) c);
c->slept = TRUE;
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: doListFont (2): client [%lx] sleeping.\n", client);
@@ -859,7 +859,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
tmpname = 0;
(void) (*fpe_functions[fpe->type].list_next_font_or_alias)
- ((pointer) c->client, fpe, &tmpname, &tmpnamelen,
+ ((void *) c->client, fpe, &tmpname, &tmpnamelen,
&tmpname, &tmpnamelen, c->current.private);
if (--aliascount <= 0)
{
@@ -1070,7 +1070,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
if (c->current.current_fpe < c->num_fpes)
{
fpe = c->fpe_list[c->current.current_fpe];
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
err = Successful;
goto bail;
@@ -1361,7 +1361,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
if (client->clientGone)
{
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
if (c->slept)
{
@@ -1389,7 +1389,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
the FPE code to clean up after client and avoid further
rendering while we clean up after ourself. */
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
c->pDraw = (DrawablePtr)0;
}
@@ -1558,7 +1558,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
c->slept = TRUE;
ClientSleep(client,
(ClientSleepProcPtr)doPolyText,
- (pointer) c);
+ (void *) c);
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: doPolyText (1): client [%lx] sleeping.\n", client);
#endif
@@ -1670,7 +1670,7 @@ doImageText(ClientPtr client, register ITclosurePtr c)
if (client->clientGone)
{
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
err = Success;
goto bail;
}
@@ -1684,7 +1684,7 @@ doImageText(ClientPtr client, register ITclosurePtr c)
/* Our drawable has disappeared. Treat like client died... ask
the FPE code to clean up after client. */
fpe = c->pGC->font->fpe;
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
err = Success;
goto bail;
}
@@ -1756,7 +1756,7 @@ doImageText(ClientPtr client, register ITclosurePtr c)
ValidateGC(c->pDraw, c->pGC);
c->slept = TRUE;
- ClientSleep(client, (ClientSleepProcPtr)doImageText, (pointer) c);
+ ClientSleep(client, (ClientSleepProcPtr)doImageText, (void *) c);
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: doImageText (1): client [%lx] sleeping.\n", client);
#endif
@@ -2115,7 +2115,7 @@ DeleteClientFontStuff(ClientPtr client)
{
fpe = font_path_elements[i];
if (fpe_functions[fpe->type].client_died)
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
}
@@ -2255,7 +2255,7 @@ GetNewFontClientID()
int
StoreFontClientFont(FontPtr pfont, Font id)
{
- return AddResource(id, RT_NONE, (pointer) pfont);
+ return AddResource(id, RT_NONE, (void *) pfont);
}
void
@@ -2288,7 +2288,7 @@ init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler)
#endif
if (!RegisterBlockAndWakeupHandlers(block_handler,
- FontWakeup, (pointer) 0))
+ FontWakeup, (void *) 0))
return AllocError;
fs_handlers_installed++;
}
@@ -2308,7 +2308,7 @@ remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler, Bo
#endif
RemoveBlockAndWakeupHandlers(block_handler, FontWakeup,
- (pointer) 0);
+ (void *) 0);
}
}
RemoveFontWakeup(fpe);
@@ -2339,7 +2339,7 @@ dump_char_ascii(CharInfoPtr cip)
bpr = GLYPH_SIZE(cip, 4);
for (r = 0; r < (cip->metrics.ascent + cip->metrics.descent); r++) {
- pointer row = (pointer) cip->bits + r * bpr;
+ void * row = (void *) cip->bits + r * bpr;
byte = 0;
for (l = 0; l <= (cip->metrics.rightSideBearing -
@@ -2386,7 +2386,7 @@ nxdoListFontsAndAliases(client, fss)
if (c->current.current_fpe < c->num_fpes)
{
fpe = c->fpe_list[c->current.current_fpe];
- (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe);
+ (*fpe_functions[fpe->type].client_died) ((void *) client, fpe);
}
err = Successful;
goto bail;
@@ -2404,7 +2404,7 @@ nxdoListFontsAndAliases(client, fss)
/* This FPE doesn't support/require list_fonts_and_aliases */
err = (*fpe_functions[fpe->type].list_fonts)
- ((pointer) c->client, fpe, c->current.pattern,
+ ((void *) c->client, fpe, c->current.pattern,
c->current.patlen, c->current.max_names - c->names->nnames,
c->names);
@@ -2413,7 +2413,7 @@ nxdoListFontsAndAliases(client, fss)
c->slept = TRUE;
ClientSleep(client,
(ClientSleepProcPtr)nxdoListFontsAndAliases,
- (pointer) fss);
+ (void *) fss);
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: nxdoListFont (1): client [%lx] sleeping.\n", client);
#endif
@@ -2436,14 +2436,14 @@ nxdoListFontsAndAliases(client, fss)
if (!c->current.list_started) {
err = (*fpe_functions[fpe->type].start_list_fonts_and_aliases)
- ((pointer) c->client, fpe, c->current.pattern,
+ ((void *) c->client, fpe, c->current.pattern,
c->current.patlen, c->current.max_names - c->names->nnames,
&c->current.private);
if (err == Suspended) {
if (!c->slept) {
ClientSleep(client,
(ClientSleepProcPtr)nxdoListFontsAndAliases,
- (pointer) fss);
+ (void *) fss);
c->slept = TRUE;
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: nxdoListFont (2): client [%lx] sleeping.\n", client);
@@ -2458,13 +2458,13 @@ nxdoListFontsAndAliases(client, fss)
char *tmpname;
name = 0;
err = (*fpe_functions[fpe->type].list_next_font_or_alias)
- ((pointer) c->client, fpe, &name, &namelen, &tmpname,
+ ((void *) c->client, fpe, &name, &namelen, &tmpname,
&resolvedlen, c->current.private);
if (err == Suspended) {
if (!c->slept) {
ClientSleep(client,
(ClientSleepProcPtr)nxdoListFontsAndAliases,
- (pointer) fss);
+ (void *) fss);
c->slept = TRUE;
#ifdef NXAGENT_DEBUG
fprintf(stderr, " NXdixfonts: nxdoListFont (3): client [%lx] sleeping.\n", client);
@@ -2529,7 +2529,7 @@ nxdoListFontsAndAliases(client, fss)
tmpname = 0;
(void) (*fpe_functions[fpe->type].list_next_font_or_alias)
- ((pointer) c->client, fpe, &tmpname, &tmpnamelen,
+ ((void *) c->client, fpe, &tmpname, &tmpnamelen,
&tmpname, &tmpnamelen, c->current.private);
if (--aliascount <= 0)
{
@@ -2694,7 +2694,7 @@ nxOpenFont(client, fid, flags, lenfname, pfontname)
cached = FindCachedFontPattern(patternCache, pfontname, lenfname);
if (cached && cached->info.cachable)
{
- if (!AddResource(fid, RT_FONT, (pointer) cached))
+ if (!AddResource(fid, RT_FONT, (void *) cached))
return BadAlloc;
cached->refcnt++;
return Success;