From ab6bb890ee8545cf708374a81972eb6cfdff0fd8 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Mon, 11 Apr 2016 16:37:00 +0200 Subject: hw/nxagent/NXresource.c: Shrink file, drop duplicate code that can identically be found in dix/resource.c. --- nx-X11/programs/Xserver/dix/Imakefile | 4 ++-- nx-X11/programs/Xserver/dix/resource.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/dix') diff --git a/nx-X11/programs/Xserver/dix/Imakefile b/nx-X11/programs/Xserver/dix/Imakefile index a383ee064..f8a357e3e 100644 --- a/nx-X11/programs/Xserver/dix/Imakefile +++ b/nx-X11/programs/Xserver/dix/Imakefile @@ -16,10 +16,12 @@ FFS_OBJ = ffs.o #if (!(defined(NXAgentServer) && NXAgentServer)) NXAGENT_SKIP_SRCS = \ extension.c \ + resource.c \ window.c \ $(NULL) NXAGENT_SKIP_OBJS = \ extension.o \ + resource.o \ window.o \ $(NULL) #endif @@ -40,7 +42,6 @@ SRCS = \ main.c \ property.c \ region.c \ - resource.c \ swaprep.c \ swapreq.c \ tables.c \ @@ -67,7 +68,6 @@ OBJS = \ main.o \ property.o \ region.o \ - resource.o \ swaprep.o \ swapreq.o \ tables.o \ diff --git a/nx-X11/programs/Xserver/dix/resource.c b/nx-X11/programs/Xserver/dix/resource.c index dd7e88596..b0edbb2aa 100644 --- a/nx-X11/programs/Xserver/dix/resource.c +++ b/nx-X11/programs/Xserver/dix/resource.c @@ -422,6 +422,7 @@ FakeClientID(register int client) return id; } +#ifndef NXAGENT_SERVER Bool AddResource(XID id, RESTYPE type, void * value) { @@ -457,6 +458,7 @@ AddResource(XID id, RESTYPE type, void * value) rrec->expectID = id + 1; return TRUE; } +#endif /* NXAGENT_SERVER */ static void RebuildTable(int client) @@ -507,6 +509,7 @@ RebuildTable(int client) clientTable[client].resources = resources; } +#ifndef NXAGENT_SERVER void FreeResource(XID id, RESTYPE skipDeleteFuncType) { @@ -573,6 +576,7 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) } } } +#endif /* NXAGENT_SERVER */ /* * Change the value associated with a resource id. Caller @@ -606,6 +610,7 @@ ChangeResourceValue (XID id, RESTYPE rtype, void * value) * add and delete an equal number of resources! */ +#ifndef NXAGENT_SERVER void FindClientResourcesByType( ClientPtr client, @@ -693,6 +698,7 @@ LookupClientResourceComplex( } return NULL; } +#endif /* NXAGENT_SERVER */ void -- cgit v1.2.3