xkb: drop unused XkbRF_LoadRulesByName()

Not used anywhere, so no need to keep it around any longer.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1840>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-02-26 10:28:29 +01:00 committed by Marge Bot
parent 00843efafb
commit e38eeb4718
2 changed files with 0 additions and 38 deletions

View File

@ -98,13 +98,6 @@ extern _X_EXPORT Bool XkbRF_LoadRules(FILE * /* file */ ,
XkbRF_RulesPtr /* rules */ XkbRF_RulesPtr /* rules */
); );
extern _X_EXPORT Bool XkbRF_LoadRulesByName(char * /* base */ ,
char * /* locale */ ,
XkbRF_RulesPtr /* rules */
);
/***====================================================================***/
extern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void); extern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void);
extern _X_EXPORT void XkbRF_Free(XkbRF_RulesPtr /* rules */ , extern _X_EXPORT void XkbRF_Free(XkbRF_RulesPtr /* rules */ ,

View File

@ -963,37 +963,6 @@ XkbRF_LoadRules(FILE * file, XkbRF_RulesPtr rules)
return TRUE; return TRUE;
} }
Bool
XkbRF_LoadRulesByName(char *base, char *locale, XkbRF_RulesPtr rules)
{
FILE *file;
char buf[PATH_MAX];
Bool ok;
if ((!base) || (!rules))
return FALSE;
if (locale) {
if (snprintf(buf, PATH_MAX, "%s-%s", base, locale) >= PATH_MAX)
return FALSE;
}
else {
if (strlen(base) + 1 > PATH_MAX)
return FALSE;
strcpy(buf, base);
}
file = fopen(buf, "r");
if ((!file) && (locale)) { /* fallback if locale was specified */
strcpy(buf, base);
file = fopen(buf, "r");
}
if (!file)
return FALSE;
ok = XkbRF_LoadRules(file, rules);
fclose(file);
return ok;
}
/***====================================================================***/ /***====================================================================***/
XkbRF_RulesPtr XkbRF_RulesPtr