xkb: rename XkbAddGeomColor() to SrvXkbAddGeomColor()

Instead of doing dirty preprocessor trick, directly rename the function itself.
(the renaming itself is necessary since libX11 has the same symbol)

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-02-28 16:58:50 +01:00 committed by Enrico Weigelt, metux IT consult .
parent 12f4832d82
commit 2a4410a655
4 changed files with 6 additions and 8 deletions

View File

@ -603,7 +603,7 @@ SrvXkbAddGeomKeyAlias(XkbGeometryPtr geom, char *aliasStr, char *realStr)
} }
XkbColorPtr XkbColorPtr
XkbAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel) SrvXkbAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel)
{ {
register int i; register int i;
register XkbColorPtr color; register XkbColorPtr color;

View File

@ -5570,7 +5570,7 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client)
status = _GetCountedString(&wire, client, &name); status = _GetCountedString(&wire, client, &name);
if (status != Success) if (status != Success)
return status; return status;
if (!XkbAddGeomColor(geom, name, geom->num_colors)) { if (!SrvXkbAddGeomColor(geom, name, geom->num_colors)) {
free(name); free(name);
return BadAlloc; return BadAlloc;
} }

View File

@ -29,7 +29,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "xkbstr.h" #include "xkbstr.h"
#define XkbAddGeomColor SrvXkbAddGeomColor
#define XkbAddGeomDoodad SrvXkbAddGeomDoodad #define XkbAddGeomDoodad SrvXkbAddGeomDoodad
#define XkbAddGeomKey SrvXkbAddGeomKey #define XkbAddGeomKey SrvXkbAddGeomKey
#define XkbAddGeomOutline SrvXkbAddGeomOutline #define XkbAddGeomOutline SrvXkbAddGeomOutline
@ -320,10 +319,9 @@ XkbKeyAliasPtr SrvXkbAddGeomKeyAlias(XkbGeometryPtr geom,
char *alias, char *alias,
char *real); char *real);
extern XkbColorPtr XkbAddGeomColor(XkbGeometryPtr /* geom */ , XkbColorPtr SrvXkbAddGeomColor(XkbGeometryPtr geom,
char * /* spec */ , char *spec,
unsigned int /* pixel */ unsigned int pixel);
);
extern XkbOutlinePtr XkbAddGeomOutline(XkbShapePtr /* shape */ , extern XkbOutlinePtr XkbAddGeomOutline(XkbShapePtr /* shape */ ,
int /* sz_points */ int /* sz_points */

View File

@ -1077,7 +1077,7 @@ ReadXkmGeometry(FILE * file, XkbDescPtr xkb)
if (wireGeom.num_colors > 0) { if (wireGeom.num_colors > 0) {
for (i = 0; i < wireGeom.num_colors; i++) { for (i = 0; i < wireGeom.num_colors; i++) {
nRead += XkmGetCountedString(file, buf, 100); nRead += XkmGetCountedString(file, buf, 100);
if (XkbAddGeomColor(geom, buf, i) == NULL) { if (SrvXkbAddGeomColor(geom, buf, i) == NULL) {
_XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0); _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0);
return nRead; return nRead;
} }