diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-03 05:43:34 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2008-12-03 05:43:34 -0200 |
commit | 49f77fff1495c0a2050fb18f9b1fc627839bbfc2 (patch) | |
tree | eebaec908150abfc0159d9ee941404918f553113 /dix/resource.c | |
parent | 0b8f8b24f718820a72ebdc52423c2e6a44e848c5 (diff) |
Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.
This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)
LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.
xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
Diffstat (limited to 'dix/resource.c')
-rw-r--r-- | dix/resource.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/dix/resource.c b/dix/resource.c index 5435afea1..c05d68187 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -186,13 +186,13 @@ typedef struct _ClientResource { XID expectID; } ClientResourceRec; -_X_EXPORT RESTYPE lastResourceType; +RESTYPE lastResourceType; static RESTYPE lastResourceClass; -_X_EXPORT RESTYPE TypeMask; +RESTYPE TypeMask; static DeleteType *DeleteFuncs = (DeleteType *)NULL; -_X_EXPORT CallbackListPtr ResourceStateCallback; +CallbackListPtr ResourceStateCallback; static _X_INLINE void CallResourceStateCallback(ResourceState state, ResourceRec *res) @@ -203,7 +203,7 @@ CallResourceStateCallback(ResourceState state, ResourceRec *res) } } -_X_EXPORT RESTYPE +RESTYPE CreateNewResourceType(DeleteType deleteFunc) { RESTYPE next = lastResourceType + 1; @@ -224,7 +224,7 @@ CreateNewResourceType(DeleteType deleteFunc) return next; } -_X_EXPORT RESTYPE +RESTYPE CreateNewResourceClass(void) { RESTYPE next = lastResourceClass >> 1; @@ -244,7 +244,7 @@ static ClientResourceRec clientTable[MAXCLIENTS]; * in resource table *****************/ -_X_EXPORT Bool +Bool InitClientResources(ClientPtr client) { int i, j; @@ -339,7 +339,7 @@ AvailableID( return 0; } -_X_EXPORT void +void GetXIDRange(int client, Bool server, XID *minp, XID *maxp) { XID id, maxid; @@ -390,7 +390,7 @@ GetXIDRange(int client, Bool server, XID *minp, XID *maxp) * invented, but this will be used so rarely that this should suffice. */ -_X_EXPORT unsigned int +unsigned int GetXIDList(ClientPtr pClient, unsigned count, XID *pids) { unsigned int found = 0; @@ -417,7 +417,7 @@ GetXIDList(ClientPtr pClient, unsigned count, XID *pids) * over-running another client. */ -_X_EXPORT XID +XID FakeClientID(int client) { XID id, maxid; @@ -438,7 +438,7 @@ FakeClientID(int client) return id; } -_X_EXPORT Bool +Bool AddResource(XID id, RESTYPE type, pointer value) { int client; @@ -527,7 +527,7 @@ RebuildTable(int client) clientTable[client].resources = resources; } -_X_EXPORT void +void FreeResource(XID id, RESTYPE skipDeleteFuncType) { int cid; @@ -570,7 +570,7 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) } -_X_EXPORT void +void FreeResourceByType(XID id, RESTYPE type, Bool skipFree) { int cid; @@ -610,7 +610,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) * data */ -_X_EXPORT Bool +Bool ChangeResourceValue (XID id, RESTYPE rtype, pointer value) { int cid; @@ -636,7 +636,7 @@ ChangeResourceValue (XID id, RESTYPE rtype, pointer value) * add and delete an equal number of resources! */ -_X_EXPORT void +void FindClientResourcesByType( ClientPtr client, RESTYPE type, @@ -668,7 +668,7 @@ FindClientResourcesByType( } } -_X_EXPORT void +void FindAllClientResources( ClientPtr client, FindAllRes func, @@ -698,7 +698,7 @@ FindAllClientResources( } -_X_EXPORT pointer +pointer LookupClientResourceComplex( ClientPtr client, RESTYPE type, @@ -725,7 +725,7 @@ LookupClientResourceComplex( } -_X_EXPORT void +void FreeClientNeverRetainResources(ClientPtr client) { ResourcePtr *resources; @@ -762,7 +762,7 @@ FreeClientNeverRetainResources(ClientPtr client) } } -_X_EXPORT void +void FreeClientResources(ClientPtr client) { ResourcePtr *resources; @@ -813,7 +813,7 @@ FreeClientResources(ClientPtr client) clientTable[client->index].buckets = 0; } -_X_EXPORT void +void FreeAllResources(void) { int i; @@ -825,7 +825,7 @@ FreeAllResources(void) } } -_X_EXPORT Bool +Bool LegalNewID(XID id, ClientPtr client) { @@ -845,7 +845,7 @@ LegalNewID(XID id, ClientPtr client) !LookupIDByClass(id, RC_ANY))); } -_X_EXPORT int +int dixLookupResource(pointer *result, XID id, RESTYPE rtype, ClientPtr client, Mask mode) { |