diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-02 15:02:49 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-02-02 15:02:49 +0100 |
commit | b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73 (patch) | |
tree | 4361edef0d42d5bf5ac984ef72b4fac35426eae7 /nx-X11/lib/ICE/watch.c | |
parent | 0d5a83e986f39982c0924652a3662e60b1f23162 (diff) | |
download | nx-libs-b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73.tar.gz nx-libs-b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73.tar.bz2 nx-libs-b16b9e4656e7199c2aec74a4c8ebc7a875d3ba73.zip |
massive reduction of unneeded files
Diffstat (limited to 'nx-X11/lib/ICE/watch.c')
-rw-r--r-- | nx-X11/lib/ICE/watch.c | 206 |
1 files changed, 0 insertions, 206 deletions
diff --git a/nx-X11/lib/ICE/watch.c b/nx-X11/lib/ICE/watch.c deleted file mode 100644 index ec90d78e4..000000000 --- a/nx-X11/lib/ICE/watch.c +++ /dev/null @@ -1,206 +0,0 @@ -/* $Xorg: watch.c,v 1.4 2001/02/09 02:03:26 xorgcvs Exp $ */ -/****************************************************************************** - - -Copyright 1993, 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. - -Author: Ralph Mor, X Consortium -******************************************************************************/ - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif -#include <X11/ICE/ICElib.h> -#include "ICElibint.h" - - -Status -IceAddConnectionWatch (watchProc, clientData) - -IceWatchProc watchProc; -IcePointer clientData; - -{ - /* - * watchProc will be called each time an ICE connection is - * created/destroyed by ICElib. - */ - - _IceWatchProc *ptr = _IceWatchProcs; - _IceWatchProc *newWatchProc; - int i; - - if ((newWatchProc = (_IceWatchProc *) malloc ( - sizeof (_IceWatchProc))) == NULL) - { - return (0); - } - - newWatchProc->watch_proc = watchProc; - newWatchProc->client_data = clientData; - newWatchProc->watched_connections = NULL; - newWatchProc->next = NULL; - - while (ptr && ptr->next) - ptr = ptr->next; - - if (ptr == NULL) - _IceWatchProcs = newWatchProc; - else - ptr->next = newWatchProc; - - - /* - * Invoke the watch proc with any previously opened ICE connections. - */ - - for (i = 0; i < _IceConnectionCount; i++) - { - _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *) - malloc (sizeof (_IceWatchedConnection)); - - newWatchedConn->iceConn = _IceConnectionObjs[i]; - newWatchedConn->next = NULL; - - newWatchProc->watched_connections = newWatchedConn; - - (*newWatchProc->watch_proc) (_IceConnectionObjs[i], - newWatchProc->client_data, True, &newWatchedConn->watch_data); - } - - return (1); -} - - - -void -IceRemoveConnectionWatch (watchProc, clientData) - -IceWatchProc watchProc; -IcePointer clientData; - -{ - _IceWatchProc *currWatchProc = _IceWatchProcs; - _IceWatchProc *prevWatchProc = NULL; - - while (currWatchProc && (currWatchProc->watch_proc != watchProc || - currWatchProc->client_data != clientData)) - { - prevWatchProc = currWatchProc; - currWatchProc = currWatchProc->next; - } - - if (currWatchProc) - { - _IceWatchProc *nextWatchProc = currWatchProc->next; - _IceWatchedConnection *watchedConn; - - watchedConn = currWatchProc->watched_connections; - while (watchedConn) - { - _IceWatchedConnection *nextWatchedConn = watchedConn->next; - free ((char *) watchedConn); - watchedConn = nextWatchedConn; - } - - if (prevWatchProc == NULL) - _IceWatchProcs = nextWatchProc; - else - prevWatchProc->next = nextWatchProc; - - free ((char *) currWatchProc); - } -} - - - -void -_IceConnectionOpened (iceConn) - -IceConn iceConn; - -{ - _IceWatchProc *watchProc = _IceWatchProcs; - - while (watchProc) - { - _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *) - malloc (sizeof (_IceWatchedConnection)); - _IceWatchedConnection *watchedConn; - - watchedConn = watchProc->watched_connections; - while (watchedConn && watchedConn->next) - watchedConn = watchedConn->next; - - newWatchedConn->iceConn = iceConn; - newWatchedConn->next = NULL; - - if (watchedConn == NULL) - watchProc->watched_connections = newWatchedConn; - else - watchedConn->next = newWatchedConn; - - (*watchProc->watch_proc) (iceConn, - watchProc->client_data, True, &newWatchedConn->watch_data); - - watchProc = watchProc->next; - } -} - - - -void -_IceConnectionClosed (iceConn) - -IceConn iceConn; - -{ - _IceWatchProc *watchProc = _IceWatchProcs; - - while (watchProc) - { - _IceWatchedConnection *watchedConn = watchProc->watched_connections; - _IceWatchedConnection *prev = NULL; - - while (watchedConn && watchedConn->iceConn != iceConn) - { - prev = watchedConn; - watchedConn = watchedConn->next; - } - - if (watchedConn) - { - (*watchProc->watch_proc) (iceConn, - watchProc->client_data, False, &watchedConn->watch_data); - - if (prev == NULL) - watchProc->watched_connections = watchedConn->next; - else - prev->next = watchedConn->next; - - free ((char *) watchedConn); - } - - watchProc = watchProc->next; - } -} |