Static cleanup for xf86 ddx.

This commit is contained in:
Adam Jackson 2007-03-25 17:55:15 -04:00
parent e8bc1988d9
commit 62224e3972
12 changed files with 29 additions and 92 deletions

View File

@ -1791,6 +1791,15 @@ convertRange2Host(int entityIndex, resRange *pRange)
}
}
static void
xf86ConvertListToHost(int entityIndex, resPtr list)
{
while (list) {
convertRange2Host(entityIndex, &list->val);
list = list->next;
}
}
/*
* xf86RegisterResources() -- attempts to register listed resources.
* If list is NULL it tries to obtain resources implicitly. Function
@ -2836,17 +2845,6 @@ xf86IsSubsetOf(resRange range, resPtr list)
return ret;
}
Bool
xf86IsListSubsetOf(resPtr list, resPtr BaseList)
{
while (list) {
if (! xf86IsSubsetOf(list->val,BaseList))
return FALSE;
list = list->next;
}
return TRUE;
}
static resPtr
findIntersect(resRange Range, resPtr list)
{
@ -3071,15 +3069,6 @@ xf86NoSharedResources(int screenIndex,resType res)
return TRUE;
}
void
xf86ConvertListToHost(int entityIndex, resPtr list)
{
while (list) {
convertRange2Host(entityIndex, &list->val);
list = list->next;
}
}
_X_EXPORT void
xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg)
{

View File

@ -141,11 +141,9 @@ int xf86AllocateEntity(void);
BusType StringToBusType(const char* busID, const char **retID);
memType ChkConflict(resRange *rgp, resPtr res, xf86State state);
Bool xf86IsSubsetOf(resRange range, resPtr list);
Bool xf86IsListSubsetOf(resPtr list, resPtr BaseList);
resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type);
resPtr xf86FindIntersect(resRange Range, resPtr list);
void RemoveOverlaps(resPtr target, resPtr list, Bool pow2Alignment,
Bool useEstimated);
void xf86ConvertListToHost(int entityIndex, resPtr list);
#endif /* _XF86_BUS_H */

View File

@ -538,25 +538,6 @@ xf86DriverlistFromCompile(void)
return driverlist;
}
char **
xf86InputDriverlistFromCompile(void)
{
static char **driverlist = NULL;
static Bool generated = FALSE;
/* This string is modified in-place */
static char drivernames[] = IDRIVERS;
if (!generated) {
generated = TRUE;
driverlist = GenerateDriverlist("input", drivernames);
}
return driverlist;
}
/*
* xf86ConfigError --
* Print a READABLE ErrorMessage!!! All information that is
@ -2504,17 +2485,8 @@ xf86HandleConfigFile(Bool autoconfig)
return CONFIG_OK;
}
/* These make the equivalent parser functions visible to the common layer. */
Bool
xf86PathIsAbsolute(const char *path)
{
return (xf86pathIsAbsolute(path) != 0);
}
Bool
xf86PathIsSafe(const char *path)
{
return (xf86pathIsSafe(path) != 0);
}

View File

@ -53,7 +53,6 @@ char ** xf86ModulelistFromConfig(pointer **);
char ** xf86DriverlistFromConfig(void);
char ** xf86DriverlistFromCompile(void);
char ** xf86InputDriverlistFromConfig(void);
char ** xf86InputDriverlistFromCompile(void);
Bool xf86BuiltinInputDriver(const char *);
ConfigStatus xf86HandleConfigFile(Bool);

View File

@ -146,7 +146,6 @@ _X_EXPORT confDRIRec xf86ConfigDRI = {0, };
XF86ConfigPtr xf86configptr = NULL;
Bool xf86Resetting = FALSE;
Bool xf86Initialising = FALSE;
Bool xf86ProbeFailed = FALSE;
Bool xf86DoProbe = FALSE;
Bool xf86DoConfigure = FALSE;
DriverPtr *xf86DriverList = NULL;

View File

@ -100,7 +100,6 @@ extern int xf86NumModuleInfos;
extern int xf86NumDrivers;
extern Bool xf86Resetting;
extern Bool xf86Initialising;
extern Bool xf86ProbeFailed;
extern int xf86NumScreens;
extern pciVideoPtr *xf86PciVideoInfo;
extern xf86CurrentAccessRec xf86CurrentAccess;
@ -155,7 +154,6 @@ extern int pciTestMultiDeviceCard(int bus, int dev, int func, PCITAG** pTag);
/* xf86Config.c */
Bool xf86PathIsAbsolute(const char *path);
Bool xf86PathIsSafe(const char *path);
/* xf86DefaultModes */

View File

@ -628,7 +628,7 @@ typedef struct _xf86_file_ {
char* fname;
} XF86FILE_priv;
XF86FILE_priv stdhnd[3] = {
static XF86FILE_priv stdhnd[3] = {
{ 0, XF86FILE_magic, NULL, "$stdinp$" },
{ 0, XF86FILE_magic, NULL, "$stdout$" },
{ 0, XF86FILE_magic, NULL, "$stderr$" }

View File

@ -83,7 +83,7 @@ static xf86ConfigSymTabRec DisplayTab[] =
#define CLEANUP xf86freeDisplayList
XF86ConfDisplayPtr
static XF86ConfDisplayPtr
xf86parseDisplaySubSection (void)
{
int token;

View File

@ -75,7 +75,7 @@ static xf86ConfigSymTabRec VendorSubTab[] =
#define CLEANUP xf86freeVendorSubList
XF86ConfVendSubPtr
static XF86ConfVendSubPtr
xf86parseVendorSubSection (void)
{
int has_ident = FALSE;
@ -242,16 +242,3 @@ xf86freeVendorSubList (XF86ConfVendSubPtr ptr)
xf86conffree (prev);
}
}
XF86ConfVendorPtr
xf86findVendor (const char *name, XF86ConfVendorPtr list)
{
while (list)
{
if (xf86nameCompare (list->vnd_identifier, name) == 0)
return (list);
list = list->list.next;
}
return (NULL);
}

View File

@ -74,7 +74,23 @@ static xf86ConfigSymTabRec VideoPortTab[] =
#define CLEANUP xf86freeVideoPortList
XF86ConfVideoPortPtr
static void
xf86freeVideoPortList (XF86ConfVideoPortPtr ptr)
{
XF86ConfVideoPortPtr prev;
while (ptr)
{
TestFree (ptr->vp_identifier);
TestFree (ptr->vp_comment);
xf86optionListFree (ptr->vp_option_lst);
prev = ptr;
ptr = ptr->list.next;
xf86conffree (prev);
}
}
static XF86ConfVideoPortPtr
xf86parseVideoPortSubSection (void)
{
int has_ident = FALSE;
@ -266,22 +282,6 @@ xf86freeVideoAdaptorList (XF86ConfVideoAdaptorPtr ptr)
}
}
void
xf86freeVideoPortList (XF86ConfVideoPortPtr ptr)
{
XF86ConfVideoPortPtr prev;
while (ptr)
{
TestFree (ptr->vp_identifier);
TestFree (ptr->vp_comment);
xf86optionListFree (ptr->vp_option_lst);
prev = ptr;
ptr = ptr->list.next;
xf86conffree (prev);
}
}
XF86ConfVideoAdaptorPtr
xf86findVideoAdaptor (const char *ident, XF86ConfVideoAdaptorPtr p)
{

View File

@ -66,7 +66,6 @@ int xf86validateMonitor(XF86ConfigPtr p, XF86ConfScreenPtr screen);
/* Pointer.c */
XF86ConfInputPtr xf86parsePointerSection(void);
/* Screen.c */
XF86ConfDisplayPtr xf86parseDisplaySubSection(void);
XF86ConfScreenPtr xf86parseScreenSection(void);
void xf86printScreenSection(FILE *cf, XF86ConfScreenPtr ptr);
void xf86freeScreenList(XF86ConfScreenPtr ptr);
@ -76,16 +75,13 @@ void xf86freeModeList(XF86ModePtr ptr);
int xf86validateScreen(XF86ConfigPtr p);
/* Vendor.c */
XF86ConfVendorPtr xf86parseVendorSection(void);
XF86ConfVendSubPtr xf86parseVendorSubSection (void);
void xf86freeVendorList(XF86ConfVendorPtr p);
void xf86printVendorSection(FILE * cf, XF86ConfVendorPtr ptr);
void xf86freeVendorSubList (XF86ConfVendSubPtr ptr);
/* Video.c */
XF86ConfVideoPortPtr xf86parseVideoPortSubSection(void);
XF86ConfVideoAdaptorPtr xf86parseVideoAdaptorSection(void);
void xf86printVideoAdaptorSection(FILE *cf, XF86ConfVideoAdaptorPtr ptr);
void xf86freeVideoAdaptorList(XF86ConfVideoAdaptorPtr ptr);
void xf86freeVideoPortList(XF86ConfVideoPortPtr ptr);
/* scan.c */
int xf86getToken(xf86ConfigSymTabRec *tab);
int xf86getSubToken(char **comment);

View File

@ -469,7 +469,6 @@ XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p);
XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p);
XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p);
XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p);
XF86ConfVendorPtr xf86findVendor(const char *name, XF86ConfVendorPtr list);
XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident,
XF86ConfVideoAdaptorPtr p);