From 8e9e77665efb1ca232e661b99df2227ac0360e20 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 5 May 2019 15:01:00 +0200 Subject: NXextension.c: use ProcQueryExtension() from dix --- nx-X11/programs/Xserver/dix/extension.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/NXextension.c | 40 ------------------------ 2 files changed, 1 insertion(+), 41 deletions(-) (limited to 'nx-X11/programs') diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c index 763f57337..cd2e51fe4 100644 --- a/nx-X11/programs/Xserver/dix/extension.c +++ b/nx-X11/programs/Xserver/dix/extension.c @@ -332,7 +332,6 @@ CloseDownExtensions() } } -#ifndef NXAGENT_SERVER int ProcQueryExtension(ClientPtr client) { @@ -373,6 +372,7 @@ ProcQueryExtension(ClientPtr client) return(client->noClientException); } +#ifndef NXAGENT_SERVER int ProcListExtensions(ClientPtr client) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c index 0b832cc7d..0c4a4b457 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c @@ -74,46 +74,6 @@ SOFTWARE. #include "../../dix/extension.c" -int -ProcQueryExtension(ClientPtr client) -{ - xQueryExtensionReply reply; - int i; - REQUEST(xQueryExtensionReq); - - REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes); - - memset(&reply, 0, sizeof(xQueryExtensionReply)); - reply.type = X_Reply; - reply.length = 0; - reply.major_opcode = 0; - reply.sequenceNumber = client->sequence; - - if ( ! NumExtensions ) - reply.present = xFalse; - else - { - i = FindExtension((char *)&stuff[1], stuff->nbytes); - if (i < 0 -#ifdef XCSECURITY - /* don't show insecure extensions to untrusted clients */ - || (client->trustLevel == XSecurityClientUntrusted && - !extensions[i]->secure) -#endif - ) - reply.present = xFalse; - else - { - reply.present = xTrue; - reply.major_opcode = extensions[i]->base; - reply.first_event = extensions[i]->eventBase; - reply.first_error = extensions[i]->errorBase; - } - } - WriteReplyToClient(client, sizeof(xQueryExtensionReply), &reply); - return(client->noClientException); -} - int ProcListExtensions(ClientPtr client) { -- cgit v1.2.3 From 9120d1b724d7f94b92eec30a3f5e43d096268001 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sun, 5 May 2019 15:04:55 +0200 Subject: NXextension.c: use ProcListExtensions() from dix --- nx-X11/programs/Xserver/dix/extension.c | 2 - nx-X11/programs/Xserver/hw/nxagent/NXextension.c | 114 ----------------------- 2 files changed, 116 deletions(-) (limited to 'nx-X11/programs') diff --git a/nx-X11/programs/Xserver/dix/extension.c b/nx-X11/programs/Xserver/dix/extension.c index cd2e51fe4..74558dd07 100644 --- a/nx-X11/programs/Xserver/dix/extension.c +++ b/nx-X11/programs/Xserver/dix/extension.c @@ -372,7 +372,6 @@ ProcQueryExtension(ClientPtr client) return(client->noClientException); } -#ifndef NXAGENT_SERVER int ProcListExtensions(ClientPtr client) { @@ -437,7 +436,6 @@ ProcListExtensions(ClientPtr client) } return(client->noClientException); } -#endif ExtensionLookupProc LookupProc(char *name, GCPtr pGC) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c index 0c4a4b457..db5d97cd8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c @@ -23,118 +23,4 @@ /* */ /**************************************************************************/ -/*********************************************************** - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - -#include "Trap.h" - #include "../../dix/extension.c" - -int -ProcListExtensions(ClientPtr client) -{ - xListExtensionsReply reply; - char *bufptr, *buffer; - int total_length = 0; - - REQUEST_SIZE_MATCH(xReq); - - memset(&reply, 0, sizeof(xListExtensionsReply)); - reply.type = X_Reply; - reply.nExtensions = 0; - reply.length = 0; - reply.sequenceNumber = client->sequence; - buffer = NULL; - - if ( NumExtensions ) - { - register int i, j; - - for (i=0; itrustLevel == XSecurityClientUntrusted && - !extensions[i]->secure) - continue; -#endif - total_length += strlen(extensions[i]->name) + 1; - reply.nExtensions += 1 + extensions[i]->num_aliases; - for (j = extensions[i]->num_aliases; --j >= 0;) - total_length += strlen(extensions[i]->aliases[j]) + 1; - } - reply.length = (total_length + 3) >> 2; - buffer = bufptr = (char *)malloc(total_length); - if (!buffer) - return(BadAlloc); - for (i=0; itrustLevel == XSecurityClientUntrusted && - !extensions[i]->secure) - continue; -#endif - *bufptr++ = len = strlen(extensions[i]->name); - memmove(bufptr, extensions[i]->name, len); - bufptr += len; - for (j = extensions[i]->num_aliases; --j >= 0;) - { - *bufptr++ = len = strlen(extensions[i]->aliases[j]); - memmove(bufptr, extensions[i]->aliases[j], len); - bufptr += len; - } - } - } - WriteReplyToClient(client, sizeof(xListExtensionsReply), &reply); - if (reply.length) - { - WriteToClient(client, total_length, buffer); - free(buffer); - } - return(client->noClientException); -} -- cgit v1.2.3 From e54d2a39001bde60b6cca7795f3fa98b3e4111e6 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 28 Oct 2019 20:30:23 +0100 Subject: nxagent: drop NXextension.c instead of including it and creating NXextension.o we can simply use the dix version. There are no NX specials anymore. --- nx-X11/programs/Xserver/Imakefile | 3 --- nx-X11/programs/Xserver/dix/Imakefile | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 2 -- nx-X11/programs/Xserver/hw/nxagent/NXextension.c | 26 ------------------------ 4 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 nx-X11/programs/Xserver/hw/nxagent/NXextension.c (limited to 'nx-X11/programs') diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 8c281c453..bce802ec4 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -242,7 +242,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXrender.o \ hw/nxagent/NXglyph.o \ hw/nxagent/NXpicture.o \ - hw/nxagent/NXextension.o \ hw/nxagent/NXglxext.o \ hw/nxagent/NXresource.o \ $(NULL) @@ -257,7 +256,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXrender.o \ hw/nxagent/NXglyph.o \ hw/nxagent/NXpicture.o \ - hw/nxagent/NXextension.o \ hw/nxagent/NXglxext.o \ hw/nxagent/NXxvdisp.o \ hw/nxagent/NXresource.o \ @@ -273,7 +271,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXrender.o \ hw/nxagent/NXglyph.o \ hw/nxagent/NXpicture.o \ - hw/nxagent/NXextension.o \ hw/nxagent/NXglxext.o \ hw/nxagent/NXxvdisp.o \ hw/nxagent/NXresource.o \ diff --git a/nx-X11/programs/Xserver/dix/Imakefile b/nx-X11/programs/Xserver/dix/Imakefile index ccdae3b82..3cdcdd9bf 100644 --- a/nx-X11/programs/Xserver/dix/Imakefile +++ b/nx-X11/programs/Xserver/dix/Imakefile @@ -15,7 +15,6 @@ NXAGENT_SKIP_SRCS = \ dispatch.c \ dixfonts.c \ events.c \ - extension.c \ glyphcurs.c \ property.c \ resource.c \ @@ -25,7 +24,6 @@ NXAGENT_SKIP_OBJS = \ dispatch.o \ dixfonts.o \ events.o \ - extension.o \ glyphcurs.o \ property.o \ resource.o \ @@ -40,6 +38,7 @@ SRCS = \ cursor.c \ devices.c \ dixutils.c \ + extension.c \ gc.c \ globals.c \ grabs.c \ @@ -61,6 +60,7 @@ OBJS = \ cursor.o \ devices.o \ dixutils.o \ + extension.o \ gc.o \ globals.o \ grabs.o \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 58fb43403..b6a343e68 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -16,7 +16,6 @@ SRCS = \ NXrender.c \ NXglyph.c \ NXpicture.c \ - NXextension.c \ NXshm.c \ NXglxext.c \ NXxvdisp.c \ @@ -74,7 +73,6 @@ OBJS = \ NXrender.o \ NXglyph.o \ NXpicture.o \ - NXextension.o \ NXshm.o \ NXglxext.o \ NXxvdisp.o \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c b/nx-X11/programs/Xserver/hw/nxagent/NXextension.c deleted file mode 100644 index db5d97cd8..000000000 --- a/nx-X11/programs/Xserver/hw/nxagent/NXextension.c +++ /dev/null @@ -1,26 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */ -/* Copyright (c) 2008-2014 Oleksandr Shneyder */ -/* Copyright (c) 2011-2016 Mike Gabriel */ -/* Copyright (c) 2014-2016 Mihai Moldovan */ -/* Copyright (c) 2014-2016 Ulrich Sibiller */ -/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ -/* */ -/* NXAGENT, NX protocol compression and NX extensions to this software */ -/* are copyright of the aforementioned persons and companies. */ -/* */ -/* Redistribution and use of the present software is allowed according */ -/* to terms specified in the file LICENSE which comes in the source */ -/* distribution. */ -/* */ -/* All rights reserved. */ -/* */ -/* NOTE: This software has received contributions from various other */ -/* contributors, only the core maintainers and supporters are listed as */ -/* copyright holders. Please contact us, if you feel you should be listed */ -/* as copyright holder, as well. */ -/* */ -/**************************************************************************/ - -#include "../../dix/extension.c" -- cgit v1.2.3