From 58f469947be082f3802f65902def460b865058b7 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 17 Jun 2025 14:36:09 -0700 Subject: [PATCH] Revert "xfree86: parser: move private defs from xf86Parser.h to xf86Parser_priv.h" This reverts commit d4724009ceca465f4895e3838e083a913c8e3ee4. Part-of: --- hw/xfree86/common/xf86AutoConfig.c | 2 +- hw/xfree86/common/xf86Config.c | 2 +- hw/xfree86/common/xf86Configure.c | 1 - hw/xfree86/parser/Layout.c | 2 +- hw/xfree86/parser/read.c | 2 +- hw/xfree86/parser/scan.c | 1 - hw/xfree86/parser/write.c | 2 +- hw/xfree86/parser/xf86Parser.h | 15 +++++++++++++++ hw/xfree86/parser/xf86Parser_priv.h | 26 -------------------------- 9 files changed, 20 insertions(+), 33 deletions(-) delete mode 100644 hw/xfree86/parser/xf86Parser_priv.h diff --git a/hw/xfree86/common/xf86AutoConfig.c b/hw/xfree86/common/xf86AutoConfig.c index fc549f34a..d49f59085 100644 --- a/hw/xfree86/common/xf86AutoConfig.c +++ b/hw/xfree86/common/xf86AutoConfig.c @@ -34,7 +34,7 @@ #endif #include "xf86.h" -#include "xf86Parser_priv.h" +#include "xf86Parser.h" #include "xf86tokens.h" #include "xf86Config.h" #include "xf86MatchDrivers.h" diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index b042d2a60..e26399cc7 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -54,7 +54,7 @@ #include "xf86.h" #include "xf86Modes.h" -#include "xf86Parser_priv.h" +#include "xf86Parser.h" #include "xf86tokens.h" #include "xf86Config.h" #include "xf86Priv.h" diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 3d1701707..377766740 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -46,7 +46,6 @@ #endif #include "misc.h" #include "loaderProcs.h" -#include "xf86Parser_priv.h" typedef struct _DevToConfig { GDevRec GDev; diff --git a/hw/xfree86/parser/Layout.c b/hw/xfree86/parser/Layout.c index 1c2e8f6e0..532f318f3 100644 --- a/hw/xfree86/parser/Layout.c +++ b/hw/xfree86/parser/Layout.c @@ -56,7 +56,7 @@ #include #endif -#include "xf86Parser_priv.h" +#include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" #include diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c index 1ee49ac90..a4600bc06 100644 --- a/hw/xfree86/parser/read.c +++ b/hw/xfree86/parser/read.c @@ -57,7 +57,7 @@ #endif #include "xf86Config.h" -#include "xf86Parser_priv.h" +#include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" diff --git a/hw/xfree86/parser/scan.c b/hw/xfree86/parser/scan.c index 471e3adb3..3655eb777 100644 --- a/hw/xfree86/parser/scan.c +++ b/hw/xfree86/parser/scan.c @@ -66,7 +66,6 @@ #include #include #include -#include "xf86Parser_priv.h" #if !defined(MAXHOSTNAMELEN) #define MAXHOSTNAMELEN 32 diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c index 98f0d42b3..1c8e33dd0 100644 --- a/hw/xfree86/parser/write.c +++ b/hw/xfree86/parser/write.c @@ -56,7 +56,7 @@ #endif #include "os.h" -#include "xf86Parser_priv.h" +#include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h index b9240af12..6762edbe1 100644 --- a/hw/xfree86/parser/xf86Parser.h +++ b/hw/xfree86/parser/xf86Parser.h @@ -442,6 +442,17 @@ typedef struct { /* * prototypes for public functions */ +extern void xf86initConfigFiles(void); +extern char *xf86openConfigFile(const char *path, const char *cmdline, + const char *projroot); +extern char *xf86openConfigDirFiles(const char *path, const char *cmdline, + const char *projroot); +extern void xf86setBuiltinConfig(const char *config[]); +extern XF86ConfigPtr xf86readConfigFile(void); +extern void xf86closeConfigFile(void); +extern XF86ConfigPtr xf86allocateConfig(void); +extern void xf86freeConfig(XF86ConfigPtr p); +extern int xf86writeConfigFile(const char *, XF86ConfigPtr); extern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p); extern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name, @@ -461,10 +472,14 @@ extern _X_EXPORT XF86ConfInputPtr xf86findInputByDriver(const char *driver, extern _X_EXPORT XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, XF86ConfVideoAdaptorPtr p); +extern int xf86layoutAddInputDevices(XF86ConfigPtr config, + XF86ConfLayoutPtr layout); + extern _X_EXPORT GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new); extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2); + extern _X_EXPORT int xf86pathIsAbsolute(const char *path); extern _X_EXPORT int xf86pathIsSafe(const char *path); extern _X_EXPORT char *xf86addComment(char *cur, const char *add); diff --git a/hw/xfree86/parser/xf86Parser_priv.h b/hw/xfree86/parser/xf86Parser_priv.h deleted file mode 100644 index 455c00c6a..000000000 --- a/hw/xfree86/parser/xf86Parser_priv.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: MIT OR X11 - * - * Copyright © 2024 Enrico Weigelt, metux IT consult - * Copyright © 1997 Metro Link Incorporated - */ -#ifndef _XSERVER_XF86_PARSER_PRIV -#define _XSERVER_XF86_PARSER_PRIV - -#include "xf86Parser.h" - -void xf86initConfigFiles(void); -char *xf86openConfigFile(const char *path, - const char *cmdline, - const char *projroot); -char *xf86openConfigDirFiles(const char *path, - const char *cmdline, - const char *projroot); -void xf86setBuiltinConfig(const char *config[]); -XF86ConfigPtr xf86readConfigFile(void); -void xf86closeConfigFile(void); -XF86ConfigPtr xf86allocateConfig(void); -void xf86freeConfig(XF86ConfigPtr p); -int xf86writeConfigFile(const char *filename, XF86ConfigPtr cptr); -int xf86layoutAddInputDevices(XF86ConfigPtr config, XF86ConfLayoutPtr layout); - -#endif /* _XSERVER_XF86_PARSER_PRIV */