From 022ad3d01558dbc1a59aefd36cd80afbf034d415 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 26 Nov 2006 14:43:48 +0000 Subject: Importing from X.Org indiviual releases --- app/xfs/include/access.h | 72 +++++++++++++++++ app/xfs/include/accstr.h | 76 ++++++++++++++++++ app/xfs/include/assert.h | 59 ++++++++++++++ app/xfs/include/auth.h | 57 ++++++++++++++ app/xfs/include/authstr.h | 61 +++++++++++++++ app/xfs/include/cache.h | 75 ++++++++++++++++++ app/xfs/include/cachestr.h | 77 ++++++++++++++++++ app/xfs/include/client.h | 115 +++++++++++++++++++++++++++ app/xfs/include/clientstr.h | 98 +++++++++++++++++++++++ app/xfs/include/closestr.h | 143 ++++++++++++++++++++++++++++++++++ app/xfs/include/closure.h | 59 ++++++++++++++ app/xfs/include/difs.h | 86 ++++++++++++++++++++ app/xfs/include/difsfn.h | 57 ++++++++++++++ app/xfs/include/difsfnst.h | 76 ++++++++++++++++++ app/xfs/include/difsutils.h | 78 +++++++++++++++++++ app/xfs/include/dispatch.h | 73 +++++++++++++++++ app/xfs/include/extentst.h | 95 ++++++++++++++++++++++ app/xfs/include/fsevents.h | 65 ++++++++++++++++ app/xfs/include/fsresource.h | 98 +++++++++++++++++++++++ app/xfs/include/globals.h | 78 +++++++++++++++++++ app/xfs/include/misc.h | 182 +++++++++++++++++++++++++++++++++++++++++++ app/xfs/include/os.h | 162 ++++++++++++++++++++++++++++++++++++++ app/xfs/include/osstruct.h | 69 ++++++++++++++++ app/xfs/include/servermd.h | 68 ++++++++++++++++ app/xfs/include/site.h | 67 ++++++++++++++++ app/xfs/include/swaprep.h | 63 +++++++++++++++ app/xfs/include/swapreq.h | 55 +++++++++++++ 27 files changed, 2264 insertions(+) create mode 100644 app/xfs/include/access.h create mode 100644 app/xfs/include/accstr.h create mode 100644 app/xfs/include/assert.h create mode 100644 app/xfs/include/auth.h create mode 100644 app/xfs/include/authstr.h create mode 100644 app/xfs/include/cache.h create mode 100644 app/xfs/include/cachestr.h create mode 100644 app/xfs/include/client.h create mode 100644 app/xfs/include/clientstr.h create mode 100644 app/xfs/include/closestr.h create mode 100644 app/xfs/include/closure.h create mode 100644 app/xfs/include/difs.h create mode 100644 app/xfs/include/difsfn.h create mode 100644 app/xfs/include/difsfnst.h create mode 100644 app/xfs/include/difsutils.h create mode 100644 app/xfs/include/dispatch.h create mode 100644 app/xfs/include/extentst.h create mode 100644 app/xfs/include/fsevents.h create mode 100644 app/xfs/include/fsresource.h create mode 100644 app/xfs/include/globals.h create mode 100644 app/xfs/include/misc.h create mode 100644 app/xfs/include/os.h create mode 100644 app/xfs/include/osstruct.h create mode 100644 app/xfs/include/servermd.h create mode 100644 app/xfs/include/site.h create mode 100644 app/xfs/include/swaprep.h create mode 100644 app/xfs/include/swapreq.h (limited to 'app/xfs/include') diff --git a/app/xfs/include/access.h b/app/xfs/include/access.h new file mode 100644 index 000000000..19c774c90 --- /dev/null +++ b/app/xfs/include/access.h @@ -0,0 +1,72 @@ +/* $Xorg: access.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. + * + * @(#)access.h 4.1 91/05/02 + * + */ +/* $XFree86: xc/programs/xfs/include/access.h,v 1.4 2001/01/17 23:45:30 dawes Exp $ */ + +#ifndef _ACCESS_H_ +#define _ACCESS_H_ + +typedef struct _hostaddress *HostList; + +#include +#include + +#define HOST_AF_INET 1 +#define HOST_AF_DECnet 2 + +extern int CheckClientAuthorization( + ClientPtr client, + AuthPtr client_auth, + int *accept, + int *index, + int *size, + char **auth_data); +extern void AccessSetConnectionLimit(int num); + +#endif /* _ACCESS_H_ */ diff --git a/app/xfs/include/accstr.h b/app/xfs/include/accstr.h new file mode 100644 index 000000000..50a134dd8 --- /dev/null +++ b/app/xfs/include/accstr.h @@ -0,0 +1,76 @@ +/* $Xorg: accstr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. + * + * @(#)accstr.h 4.1 91/05/02 + * + */ +/* $XFree86: xc/programs/xfs/include/accstr.h,v 1.6 2001/06/25 20:40:18 paulo Exp $ */ + +#ifndef _ACCSTR_H_ +#define _ACCSTR_H_ + +typedef struct _hostaddress { + int type; + pointer address; + int addr_len; + struct _hostaddress *next; +} HostAddress; + +#include +#include + +#if 0 +/* difs/difsutils.c */ +extern int AddHost(HostList *list, HostAddress *addr); +extern int RemoveHost(HostList *list, HostAddress *addr); +extern int ValidHost(HostList list, HostAddress *addr); +#endif + +/* os/access.c */ +extern int GetHostAddress(HostAddress *addr); + +#endif /* _ACCSTR_H_ */ diff --git a/app/xfs/include/assert.h b/app/xfs/include/assert.h new file mode 100644 index 000000000..aa95a6957 --- /dev/null +++ b/app/xfs/include/assert.h @@ -0,0 +1,59 @@ +/* $Xorg: assert.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. + * + * @(#)assert.h 4.1 91/05/02 + * + */ +#ifdef DEBUG +#include +#ifdef SABER +#define assert(ex) {if (!(ex)){(void)fprintf(stderr,"Assertion \"ex\" failed: file \"%s\", line %d\n", __FILE__, __LINE__);saber_stop();}} +#else +#define assert(ex) {if (!(ex)){(void)fprintf(stderr,"Assertion \"ex\" failed: file \"%s\", line %d\n", __FILE__, __LINE__);abort();}} +#endif +#else +#define assert(ex) +#endif diff --git a/app/xfs/include/auth.h b/app/xfs/include/auth.h new file mode 100644 index 000000000..0ea06f0cc --- /dev/null +++ b/app/xfs/include/auth.h @@ -0,0 +1,57 @@ +/* $Xorg: auth.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)auth.h 4.1 91/05/02 + * + */ +/* $XFree86: xc/programs/xfs/include/auth.h,v 1.5 2001/01/17 23:45:31 dawes Exp $ */ + +#ifndef _AUTH_H_ +#define _AUTH_H_ + +typedef struct _authcontext *AuthContextPtr; + +#endif /* _AUTH_H_ */ diff --git a/app/xfs/include/authstr.h b/app/xfs/include/authstr.h new file mode 100644 index 000000000..de01f4240 --- /dev/null +++ b/app/xfs/include/authstr.h @@ -0,0 +1,61 @@ +/* $Xorg: authstr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)authstr.h 4.1 91/05/02 + * + */ + +#ifndef _AUTHSTR_H_ +#define _AUTHSTR_H_ +#include "auth.h" + +typedef struct _authcontext { + char *authname; + char *authdata; + FSID acid; +} AuthContextRec; + +#endif /* _AUTHSTR_H_ */ diff --git a/app/xfs/include/cache.h b/app/xfs/include/cache.h new file mode 100644 index 000000000..7e5a2b245 --- /dev/null +++ b/app/xfs/include/cache.h @@ -0,0 +1,75 @@ +/* $Xorg: cache.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. + * + * @(#)cache.h 4.1 91/05/02 + * + */ +/* $XFree86: xc/programs/xfs/include/cache.h,v 1.4 2001/01/17 23:45:31 dawes Exp $ */ + +#ifndef _CACHE_H_ +#define _CACHE_H_ + +#include "misc.h" + +#define CacheWasReset 1 +#define CacheEntryFreed 2 +#define CacheEntryOld 3 + +typedef unsigned long CacheID; +typedef unsigned long Cache; +typedef void (*CacheFree) (CacheID cid, pointer, int flag); + +typedef struct _cache *CachePtr; + +extern Cache CacheInit(unsigned long maxsize); +extern CacheID CacheStoreMemory(Cache cid, pointer data, unsigned long size, CacheFree free_func); +extern void CacheFreeMemory(CacheID cid, Bool notify); +extern pointer CacheFetchMemory(CacheID cid, Bool update); +extern void CacheReset(void); +extern void CacheResize(Cache cid, unsigned newsize); +extern void CacheSimpleFree(CacheID cid, pointer data, int reason); + +#endif /* _CACHE_H_ */ diff --git a/app/xfs/include/cachestr.h b/app/xfs/include/cachestr.h new file mode 100644 index 000000000..19bdd5aff --- /dev/null +++ b/app/xfs/include/cachestr.h @@ -0,0 +1,77 @@ +/* $Xorg: cachestr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)cachestr.h 4.1 91/05/02 + * + */ + +#ifndef _CACHSTR_H_ +#define _CACHSTR_H_ +#include "cache.h" + +typedef struct _cache_entry { + pointer data; + unsigned long timestamp; + CacheID id; + unsigned long size; + CacheFree free_func; + struct _cache_entry *next; +} CacheEntryRec, *CacheEntryPtr; + +typedef struct _cache { + Cache id; + CacheEntryPtr *entries; + int elements; + int buckets; + int hashsize; + CacheID nextid; + unsigned long maxsize; + unsigned long cursize; +} CacheRec; + +#define NullCacheEntryPtr ((CacheEntryPtr) 0) + +#endif /* _CACHSTR_H_ */ diff --git a/app/xfs/include/client.h b/app/xfs/include/client.h new file mode 100644 index 000000000..722959dbb --- /dev/null +++ b/app/xfs/include/client.h @@ -0,0 +1,115 @@ +/* $Xorg: client.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* + +Copyright 1990, 1991, 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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, or Digital + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, + * OR 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. + */ +/* $XFree86: xc/programs/xfs/include/client.h,v 1.6 2001/01/17 23:45:31 dawes Exp $ */ + +#ifndef _CLIENT_H_ +#define _CLIENT_H_ + +#ifndef _XTYPEDEF_CLIENTPTR +typedef struct _Client *ClientPtr; +#define _XTYPEDEF_CLIENTPTR +#endif + +#include + +extern ClientPtr *clients; +extern ClientPtr serverClient; + +#define NullClient ((ClientPtr) NULL) + +#define SERVER_CLIENT 0 +#define MINCLIENT 1 + +#define CLIENT_ALIVE 0 +#define CLIENT_GONE 1 +#define CLIENT_AGED 2 +#define CLIENT_TIMED_OUT 4 + +#define REQUEST(type) \ + type *stuff = (type *)client->requestBuffer + +#define REQUEST_FIXED_SIZE(fs_req, n) \ + if (((SIZEOF(fs_req) >> 2) > stuff->length) || \ + (((SIZEOF(fs_req) + (n) + 3) >> 2) != stuff->length)) { \ + int lengthword = stuff->length; \ + SendErrToClient(client, FSBadLength, (pointer)&lengthword); \ + return (FSBadLength); \ + } + +#define REQUEST_SIZE_MATCH(fs_req) \ + if ((SIZEOF(fs_req) >> 2) != stuff->length) { \ + int lengthword = stuff->length; \ + SendErrToClient(client, FSBadLength, (pointer)&lengthword); \ + return (FSBadLength); \ + } + +#define REQUEST_AT_LEAST_SIZE(fs_req) \ + if ((SIZEOF(fs_req) >> 2) > stuff->length) { \ + int lengthword = stuff->length; \ + SendErrToClient(client, FSBadLength, (pointer)&lengthword); \ + return (FSBadLength); \ + } + +#define WriteReplyToClient(client, size, reply) \ + if ((client)->swapped) \ + (*ReplySwapVector[((fsReq *)(client)->requestBuffer)->reqType]) \ + (client, (int)(size), reply); \ + else (void)WriteToClient(client, (int)(size), (char *)(reply)); + +#define WriteSwappedDataToClient(client, size, pbuf) \ + if ((client)->swapped) \ + (*(client)->pSwapReplyFunc)(client, (int)(size), pbuf); \ + else (void) WriteToClient(client, (int)(size), (char *)(pbuf)); + + +typedef struct _WorkQueue *WorkQueuePtr; + +#include /* for ProcessWorkQueue(void) */ + +extern int (*ProcVector[]) (ClientPtr); +extern int (*SwappedProcVector[]) (ClientPtr); + +#endif /* _CLIENT_H_ */ diff --git a/app/xfs/include/clientstr.h b/app/xfs/include/clientstr.h new file mode 100644 index 000000000..ceaba9114 --- /dev/null +++ b/app/xfs/include/clientstr.h @@ -0,0 +1,98 @@ +/* $Xorg: clientstr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + */ +/* $XFree86: xc/programs/xfs/include/clientstr.h,v 1.6 2001/08/28 23:44:53 paulo Exp $ */ + +#ifndef _CLIENTSTR_H_ +#define _CLIENTSTR_H_ + +#include +#include "client.h" +#include "auth.h" +#include "misc.h" + +typedef struct _Client { + int index; + pointer osPrivate; + int noClientException; + int (**requestVector) (ClientPtr); + pointer requestBuffer; + int clientGone; + int sequence; + Bool swapped; + long last_request_time; + void (*pSwapReplyFunc) (ClientPtr, int, short *); + AuthContextPtr auth; + int auth_generation; + AuthContextPtr default_auth; + char *catalogues; + int num_catalogues; + Mask eventmask; + fsResolution *resolutions; + int num_resolutions; + int major_version; /* client-major-protocol-version */ + int minor_version; +} ClientRec; + +typedef struct _WorkQueue { + struct _WorkQueue *next; + Bool (*function) (ClientPtr, pointer); + ClientPtr client; + pointer closure; +} WorkQueueRec; + +#ifndef CloseDownClient +#ifdef DEBUG +#define CloseDownClient(client) \ + fprintf(stderr, "CloseDownClient %s %d\n", __FILE__, __LINE__),\ + DoCloseDownClient(client) +#else +#define CloseDownClient DoCloseDownClient +#endif +extern void DoCloseDownClient(ClientPtr client); +#endif + +#endif /* _CLIENTSTR_H_ */ diff --git a/app/xfs/include/closestr.h b/app/xfs/include/closestr.h new file mode 100644 index 000000000..1e3e41203 --- /dev/null +++ b/app/xfs/include/closestr.h @@ -0,0 +1,143 @@ +/* $Xorg: closestr.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * $NCDXorg: @(#)closestr.h,v 4.1 1991/05/02 04:15:46 lemke Exp $ + * + */ + +#ifndef CLOSESTR_H +#define CLOSESTR_H + +#include +#include "closure.h" +#include "misc.h" +#include + +/* closure structures */ + +/* OpenFont */ + +typedef struct _OFclosure { + ClientPtr client; + short current_fpe; + short num_fpes; + FontPathElementPtr *fpe_list; + Mask flags; + fsBitmapFormat format; + fsBitmapFormatMask format_mask; + Bool slept; + FSID fontid; + char *fontname; + int fnamelen; + char *orig_name; + int orig_len; + FontPtr non_cachable_font; +} OFclosureRec; + +/* QueryExtents */ + +typedef struct _QEclosure { + ClientPtr client; + int nranges; + fsRange *range; + FontPtr pfont; + Mask flags; + Bool slept; +} QEclosureRec; + +/* QueryBitmaps */ + +typedef struct _QBclosure { + ClientPtr client; + int nranges; + fsRange *range; + FontPtr pfont; + fsBitmapFormat format; + Mask flags; + Bool slept; +} QBclosureRec; + +/* ListFontsWithInfo */ + +#define XLFDMAXFONTNAMELEN 256 +typedef struct _LFWIstate { + char pattern[XLFDMAXFONTNAMELEN]; /* max len of font name */ + int patlen; + int current_fpe; + int max_names; + Bool list_started; + pointer private; +} LFWIstateRec, *LFWIstatePtr; + + +typedef struct _LFWXIclosure { + ClientPtr client; + int num_fpes; + FontPathElementPtr *fpe_list; + fsListFontsWithXInfoReply *reply; + int length; + LFWIstateRec current; + LFWIstateRec saved; + int savedNumFonts; + Bool haveSaved; + Bool slept; + char *savedName; +} LFWXIclosureRec; + +typedef struct _LFclosure { + ClientPtr client; + int num_fpes; + FontPathElementPtr *fpe_list; + FontNamesPtr names; + LFWIstateRec current; + LFWIstateRec saved; + Bool haveSaved; + Bool slept; + char *savedName; + int savedNameLen; +} LFclosureRec; + +#endif /* CLOSESTR_H */ diff --git a/app/xfs/include/closure.h b/app/xfs/include/closure.h new file mode 100644 index 000000000..ea8e260bc --- /dev/null +++ b/app/xfs/include/closure.h @@ -0,0 +1,59 @@ +/* $Xorg: closure.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. + * + * @(#)closure.h 4.1 91/05/02 + * + */ +#ifndef CLOSURE_H +#define CLOSURE_H 1 + +typedef struct _LFclosure *LFclosurePtr; +typedef struct _LFWXIclosure *LFWXIclosurePtr; +typedef struct _OFclosure *OFclosurePtr; +typedef struct _QEclosure *QEclosurePtr; +typedef struct _QBclosure *QBclosurePtr; + +#endif /* CLOSURE_H */ diff --git a/app/xfs/include/difs.h b/app/xfs/include/difs.h new file mode 100644 index 000000000..2299f25d9 --- /dev/null +++ b/app/xfs/include/difs.h @@ -0,0 +1,86 @@ +/* $XFree86: xc/programs/xfs/include/difs.h,v 1.4 2001/08/01 00:45:04 tsi Exp $ */ +/* + * Copyright (C) 1999 The XFree86 Project, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * 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 + * XFREE86 PROJECT 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 XFree86 Project 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 + * XFree86 Project. + */ +#ifndef _DIFS_H +#define _DIFS_H + +#include "difsfn.h" +#include "globals.h" +#include + +typedef int (*InitialFunc)(ClientPtr); +typedef int (*ProcFunc)(ClientPtr); +typedef int (*SwappedProcFunc)(ClientPtr); +typedef void (*EventSwapFunc)(fsError *, fsError *); +typedef void (*ReplySwapFunc)(ClientPtr, int, void *); + +extern InitialFunc InitialVector[3]; +extern ReplySwapFunc ReplySwapVector[NUM_PROC_VECTORS]; + +/* FIXME: this is derived from fontstruct.h; should integrate it */ + +/* difs/atom.c */ +extern Atom MakeAtom ( char *string, unsigned len, Bool makeit ); +extern int ValidAtom ( Atom atom ); +extern char * NameForAtom ( Atom atom ); +extern void InitAtoms ( void ); + +/* difs/charinfo.c */ +extern int GetExtents ( ClientPtr client, FontPtr pfont, Mask flags, unsigned long num_ranges, fsRange *range, unsigned long *num_extents, fsXCharInfo **data ); +extern int GetBitmaps ( ClientPtr client, FontPtr pfont, fsBitmapFormat format, Mask flags, unsigned long num_ranges, fsRange *range, int *size, unsigned long *num_glyphs, fsOffset32 **offsets, pointer *data, int *freeData ); + +/* difs/initfonts.c */ +extern void InitFonts ( void ); + +/* difs/fonts.c */ +extern int FontToFSError ( int err ); +extern void UseFPE ( FontPathElementPtr fpe ); +extern void FreeFPE ( FontPathElementPtr fpe ); +extern void QueueFontWakeup ( FontPathElementPtr fpe ); +extern void RemoveFontWakeup ( FontPathElementPtr fpe ); +extern void FontWakeup ( pointer data, int count, unsigned long *LastSelectMask ); +extern int OpenFont ( ClientPtr client, Font fid, fsBitmapFormat format, fsBitmapFormatMask format_mask, int namelen, char *name ); +extern int CloseClientFont ( ClientFontPtr cfp, FSID fid ); +extern int SetFontCatalogue ( char *str, int *badpath ); +extern int ListFonts ( ClientPtr client, int length, unsigned char *pattern, int maxNames ); +#if 0 +extern int StartListFontsWithInfo ( ClientPtr client, int length, unsigned char *pattern, int maxNames ); +#endif +extern int LoadGlyphRanges ( ClientPtr client, FontPtr pfont, Bool range_flag, int num_ranges, int item_size, fsChar2b *data ); +extern void FreeFonts ( void ); +extern FontPtr find_old_font ( FSID id ); +extern void DeleteClientFontStuff ( ClientPtr client ); + +/* difs/fontinfo.c */ +extern void CopyCharInfo ( CharInfoPtr ci, fsXCharInfo *dst ); +extern int convert_props ( FontInfoPtr pinfo, fsPropInfo **props ); +extern int QueryExtents ( ClientPtr client, ClientFontPtr cfp, int item_size, int nranges, Bool range_flag, pointer range_data ); +extern int QueryBitmaps ( ClientPtr client, ClientFontPtr cfp, int item_size, fsBitmapFormat format, int nranges, Bool range_flag, pointer range_data ); + +/* difs/main.c */ +extern int NotImplemented(void); + +#endif diff --git a/app/xfs/include/difsfn.h b/app/xfs/include/difsfn.h new file mode 100644 index 000000000..0922810d1 --- /dev/null +++ b/app/xfs/include/difsfn.h @@ -0,0 +1,57 @@ +/* $Xorg: difsfn.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + */ +/* $XFree86: xc/programs/xfs/include/difsfn.h,v 1.4 2001/01/17 23:45:31 dawes Exp $ */ + +#ifndef _DIFSFONT_H_ +#define _DIFSFONT_H_ +#include "misc.h" +#include + +typedef struct _ClientFont *ClientFontPtr; +typedef struct _FontIDList *FontIDListPtr; + +#endif /* _DIFSFONT_H_ */ diff --git a/app/xfs/include/difsfnst.h b/app/xfs/include/difsfnst.h new file mode 100644 index 000000000..3d7080e4f --- /dev/null +++ b/app/xfs/include/difsfnst.h @@ -0,0 +1,76 @@ +/* $Xorg: difsfnst.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + */ +/* $XFree86: xc/programs/xfs/include/difsfnst.h,v 1.4 2001/01/17 23:45:31 dawes Exp $ */ + +#ifndef _DIFSFONTST_H_ +#define _DIFSFONTST_H_ + +#include "difsfn.h" +#include +#include "misc.h" + +/* has per-client info about the font */ +typedef struct _ClientFont { + FontPtr font; + int clientindex; +} ClientFontRec; + +typedef struct _font_name_cache { + char *name; + int namelen; + FontPtr font; +} FontNameCacheRec; + +/* one of these per client, with as many IDs as are needed */ +typedef struct _FontIDList { + Font *client_list; + int num; + int size; +} FontIDListRec; + + +#endif /* _DIFSFONTST_H_ */ diff --git a/app/xfs/include/difsutils.h b/app/xfs/include/difsutils.h new file mode 100644 index 000000000..d25a270b1 --- /dev/null +++ b/app/xfs/include/difsutils.h @@ -0,0 +1,78 @@ +/* + * $XFree86: xc/programs/xfs/include/difsutils.h,v 1.4 2001/06/25 20:40:18 paulo Exp $ + */ + +/************************************************************ + +Copyright 1998 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + +********************************************************/ + +#ifndef _DIFSUTILS_H +#define _DIFSUTILS_H 1 + +#include +#include +#include +#include +#include + +typedef void (*DifsWakeupFunc)(pointer data, int result, unsigned long * pReadmask); +typedef Bool (*DifsWorkFunc) (ClientPtr, pointer); + +extern AuthContextPtr GetClientAuthorization (void); +extern Bool ClientIsAsleep (ClientPtr client); +extern Bool ClientSleep (ClientPtr client, Bool (*function) (ClientPtr, pointer), pointer data); +extern Bool QueueWorkProc (DifsWorkFunc function, ClientPtr client, pointer data); +extern Bool RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData); +extern Bool ValidHost (HostList list, HostAddress *addr); +#if 0 +extern Bool XpClientIsBitmapClient (ClientPtr client); +extern Bool XpClientIsPrintClient (ClientPtr client, FontPathElementPtr fpe); +extern FontResolutionPtr GetClientResolutions (int *num); +#endif +extern int AddHost (HostList *list, HostAddress *addr); +#if 0 +extern int GetDefaultPointSize (void); +#endif +extern int RemoveHost (HostList *list, HostAddress *addr); +extern int SetDefaultResolutions (char *str); +#if 0 +extern int client_auth_generation (ClientPtr client); +#endif +extern int set_font_authorizations (char **authorizations, int *authlen, ClientPtr client); +extern int strncmpnocase (char *first, char *second, int n); +extern pointer Xalloc (unsigned long m); +extern pointer Xrealloc (pointer n, unsigned long m); +extern void BlockHandler (OSTimePtr pTimeout, pointer pReadmask); +extern void ClientWakeup (ClientPtr client); +extern void CopyISOLatin1Lowered (unsigned char *dest, unsigned char *source, int length); +extern void InitBlockAndWakeupHandlers (void); +extern void NoopDDA (void); +extern void ProcessWorkQueue (void); +extern void RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData); +extern void SetDefaultPointSize (int ps); +extern void WakeupHandler (int result, unsigned long * pReadmask); +extern void Xfree (unsigned long *n); +extern pointer Xcalloc (unsigned long n); + +#endif /* _DIFSUTILS_H */ diff --git a/app/xfs/include/dispatch.h b/app/xfs/include/dispatch.h new file mode 100644 index 000000000..c476d1771 --- /dev/null +++ b/app/xfs/include/dispatch.h @@ -0,0 +1,73 @@ +/* + * $XFree86: xc/programs/xfs/include/dispatch.h,v 1.2 1999/03/07 11:41:00 dawes Exp $ + */ + +/************************************************************ + +Copyright 1998 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + +********************************************************/ + +#ifndef _DISPATCH_H_ +#define _DISPATCH_H_ 1 + +#include +extern ClientPtr currentClient; + +extern void Dispatch (void); +extern int ProcInitialConnection (ClientPtr client); +extern int ProcEstablishConnection (ClientPtr client); +#ifdef DEBUG +#define SendErrToClient(client, error, data) \ + fprintf(stderr, "SendErrToClient %s %d\n", __FILE__, __LINE__),\ + DoSendErrToClient(client, error, data) +#else +#define SendErrToClient DoSendErrToClient +#endif +extern void DoSendErrToClient (ClientPtr client, int error, pointer data); +extern int ProcBadRequest (ClientPtr client); +extern int ProcNoop (ClientPtr client); +extern int ProcListCatalogues (ClientPtr client); +extern int ProcSetCatalogues (ClientPtr client); +extern int ProcGetCatalogues (ClientPtr client); +extern int ProcCreateAC (ClientPtr client); +extern int DeleteAuthCont (pointer value, FSID id); +extern int ProcFreeAC (ClientPtr client); +extern int ProcSetAuthorization (ClientPtr client); +extern int ProcSetResolution (ClientPtr client); +extern int ProcGetResolution (ClientPtr client); +extern int ProcListFonts (ClientPtr client); +extern int ProcListFontsWithXInfo (ClientPtr client); +extern int ProcOpenBitmapFont (ClientPtr client); +extern int ProcQueryXInfo (ClientPtr client); +extern int ProcQueryXExtents (ClientPtr client); +extern int ProcQueryXBitmaps (ClientPtr client); +extern int ProcCloseFont (ClientPtr client); +#if 0 +extern void CloseDownClient (ClientPtr client); +#endif +extern void InitProcVectors (void); +extern void InitClient (ClientPtr client, int i, pointer ospriv); +extern ClientPtr NextAvailableClient (pointer ospriv); +extern void MarkClientException (ClientPtr client); + +#endif /* _DISPATCH_H_ */ diff --git a/app/xfs/include/extentst.h b/app/xfs/include/extentst.h new file mode 100644 index 000000000..48a5dca92 --- /dev/null +++ b/app/xfs/include/extentst.h @@ -0,0 +1,95 @@ +/* $Xorg: extentst.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)extentst.h 4.1 91/05/02 + * + */ +/* $XFree86: xc/programs/xfs/include/extentst.h,v 1.6 2001/12/14 20:01:38 dawes Exp $ */ + +#ifndef _EXTENTST_H_ +#define _EXTENTST_H_ + +typedef struct _ExtensionEntry { + int index; + void (*CloseDown) (struct _ExtensionEntry*); + char *name; + int base; + int eventBase; + int eventLast; + int errorBase; + int errorLast; + int num_aliases; + char **aliases; + pointer extPrivate; + unsigned short (*MinorOpcode) (ClientPtr); +} ExtensionEntry; + +extern void (*EventSwapVector[]) (fsError *, fsError *); + +#if 0 +typedef void (*ExtensionLookupProc) (char *name, GCPtr pGC); + +typedef struct _ProcEntry { + char *name; + ExtensionLookupProc proc; +} ProcEntryRec, *ProcEntryPtr; + +extern ExtensionEntry *AddExtension(); +extern ExtensionLookupProc LookupProc(char *name, GCPtr pGC); +extern Bool RegisterProc(); +#endif + +extern ExtensionEntry * AddExtension ( char *name, int num_events, int num_errors, int (*main_proc) (ClientPtr), int (*smain_proc) (ClientPtr), void (*closedown_proc) (struct _ExtensionEntry *), unsigned short (*minorop_proc) (ClientPtr) ); + +extern Bool AddExtensionAlias(char *alias, ExtensionEntry *ext); +extern int ProcListExtensions(ClientPtr client); +extern int ProcQueryExtension(ClientPtr client); +extern unsigned short MinorOpcodeOfRequest(ClientPtr client); +extern unsigned short StandardMinorOpcode(ClientPtr client); +extern void CloseDownExtensions(void); +extern void InitExtensions(void); + +#endif /* _EXTENTST_H_ */ diff --git a/app/xfs/include/fsevents.h b/app/xfs/include/fsevents.h new file mode 100644 index 000000000..9ff03a565 --- /dev/null +++ b/app/xfs/include/fsevents.h @@ -0,0 +1,65 @@ +/* $XConsortium: events.h,v 1.5 94/04/17 19:55:57 dpw Exp $ */ +/* +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +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 +X CONSORTIUM 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 X Consortium 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 X Consortium. + * Copyright 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)events.h 4.2 91/05/03 + * + */ +/* $XFree86$ */ + +#ifndef _EVENTS_H_ +#define _EVENTS_H_ + +#include +#include + +extern int ProcGetEventMask(ClientPtr client); +extern int ProcSetEventMask(ClientPtr client); +extern void SendKeepAlive(ClientPtr client); +extern void SendKeepAliveEvent(ClientPtr client); +extern void WriteErrorToClient(ClientPtr client, fsError *error); + +#endif /* _EVENTS_H_ */ diff --git a/app/xfs/include/fsresource.h b/app/xfs/include/fsresource.h new file mode 100644 index 000000000..d68343eac --- /dev/null +++ b/app/xfs/include/fsresource.h @@ -0,0 +1,98 @@ +/* $XConsortium: resource.h,v 1.4 94/04/17 19:56:00 dpw Exp $ */ +/* +Copyright (c) 1987 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +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 +X CONSORTIUM 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 X Consortium 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 X Consortium. + * Copyright 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. + * + * @(#)resource.h 4.1 91/05/02 + * + */ +/* $XFree86: xc/programs/xfs/include/fsresource.h,v 1.3 1998/10/25 12:48:04 dawes Exp $ */ + +#ifndef _RESOURCE_H_ +#define _RESOURCE_H_ + +#include "misc.h" + +typedef unsigned long RESTYPE; + +#define RC_VANILLA ((RESTYPE)0) +#define RC_CACHED ((RESTYPE)1<<31) +#define RC_LASTPREDEF RC_CACHED +#define RC_ANY (~(RESTYPE)0) + +#define RT_FONT ((RESTYPE)1) +#define RT_AUTHCONT ((RESTYPE)2) +#define RT_LASTPREDEF RT_AUTHCONT +#define RT_NONE ((RESTYPE)0) + +#define CLIENTOFFSET 22 +#define RESOURCE_ID_MASK 0x3FFFFF +#define CLIENT_BITS(id) ((id) & 0x1fc00000) +#define CLIENT_ID(id) ((int)(CLIENT_BITS(id) >> CLIENTOFFSET)) +#define SERVER_BIT 0x20000000 + +#define INVALID (0) + +#define BAD_RESOURCE 0xe0000000 + +#ifdef NOTYET +extern Bool ChangeResourceValue(int cid, FSID id, RESTYPE rtype, pointer value); +extern FSID FakeClientID(int client); +extern RESTYPE CreateNewResourceClass(void); +extern RESTYPE CreateNewResourceType(DeleteType deleteFunc); +extern pointer LookupIDByClass(FSID id, RESTYPE classes); +extern void FreeResourceByType(int cid, FSID id, RESTYPE type, Bool skipFree); +#endif /* NOTYET */ + +extern Bool AddResource(int cid, FSID id, RESTYPE type, pointer value); +extern Bool InitClientResources(ClientPtr client); +extern FSID FakeClientID(int client); +extern pointer LookupIDByType(int cid, FSID id, RESTYPE rtype); +extern void FreeAllResources(void); +extern void FreeClientResources(ClientPtr client); +extern void FreeResource(int cid, FSID id, RESTYPE skipDeleteFuncType); +int NoneDeleteFunc (void *ptr, FSID id); + +#endif /* _RESOURCE_H_ */ diff --git a/app/xfs/include/globals.h b/app/xfs/include/globals.h new file mode 100644 index 000000000..678a7d97b --- /dev/null +++ b/app/xfs/include/globals.h @@ -0,0 +1,78 @@ +/* $Xorg: globals.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)globals.h 4.2 91/05/03 + * + */ + +#ifndef _GLOBALS_H_ +#define _GLOBALS_H_ + +#include /* for fsResolution */ + +extern long TimeOutValue; +extern long ReapClientTime; + +extern int currentMaxClients; +extern long MaxClients; +extern int serverGeneration; + +extern volatile char isItTimeToYield; +extern volatile char dispatchException; + +extern int argcGlobal; +extern char **argvGlobal; + +/* bit values for dispatchException */ +#define DE_RESET 0x1 +#define DE_TERMINATE 0x2 +#define DE_RECONFIG 0x4 +#define DE_FLUSH 0x8 + +/* size of vector tables */ +#define NUM_PROC_VECTORS 25 +#define NUM_EVENT_VECTORS 8 +#endif /* _GLOBALS_H_ */ diff --git a/app/xfs/include/misc.h b/app/xfs/include/misc.h new file mode 100644 index 000000000..43d87338b --- /dev/null +++ b/app/xfs/include/misc.h @@ -0,0 +1,182 @@ +/* $Xorg: misc.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* + +Copyright 1990, 1991, 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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, or Digital + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, + * OR 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. + */ +/* $XFree86: xc/programs/xfs/include/misc.h,v 3.8 2001/07/25 15:05:21 dawes Exp $ */ + +#ifndef _MISC_H_ +#define _MISC_H_ + +#include +#include +#include + +#include "assert.h" /* so its everywhere */ + +#ifndef NULL +#include +#endif + +#define MAXCLIENTS 128 + +#define MILLI_PER_SECOND (1000) +#define MILLI_PER_MINUTE (1000 * 60) + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +#define min(a, b) (((a) < (b)) ? (a) : (b)) +#define max(a, b) (((a) > (b)) ? (a) : (b)) + +#include "os.h" + +#define lowbit(x) ((x) & (~(x) + 1)) + +/* byte swapping helpers */ + +/* byte swap a long literal */ +#define lswapl(x) ((((x) & 0xff) << 24) |\ + (((x) & 0xff00) << 8) |\ + (((x) & 0xff0000) >> 8) |\ + (((x) >> 24) & 0xff)) + +/* byte swap a short literal */ +#define lswaps(x) ((((x) & 0xff) << 8) | (((x) >> 8) & 0xff)) + + +/* byte swap a long */ +#define swapl(x, n) n = ((char *) (x))[0];\ + ((char *) (x))[0] = ((char *) (x))[3];\ + ((char *) (x))[3] = n;\ + n = ((char *) (x))[1];\ + ((char *) (x))[1] = ((char *) (x))[2];\ + ((char *) (x))[2] = n; + +/* byte swap a short */ +#define swaps(x, n) n = ((char *) (x))[0];\ + ((char *) (x))[0] = ((char *) (x))[1];\ + ((char *) (x))[1] = n + +/* copy long from src to dst byteswapping on the way */ +#define cpswapl(src, dst) \ + ((char *)&(dst))[0] = ((char *) &(src))[3];\ + ((char *)&(dst))[1] = ((char *) &(src))[2];\ + ((char *)&(dst))[2] = ((char *) &(src))[1];\ + ((char *)&(dst))[3] = ((char *) &(src))[0]; + +/* copy short from src to dst byteswapping on the way */ +#define cpswaps(src, dst)\ + ((char *) &(dst))[0] = ((char *) &(src))[1];\ + ((char *) &(dst))[1] = ((char *) &(src))[0]; + + +#if 0 +extern void NoopDDA(void); +extern char *NameForAtom(Atom atom); +#endif +extern void BitOrderInvert(unsigned char *buf, int nbytes); + + +#if !defined(UNIXCPP) || defined(ANSICPP) +#define fsCat(x,y) x##_##y +#else +#define fsCat(x,y) x/**/_/**/y +#endif + +/* copy a xCharInfo into a XCharInfo */ + +#define fsPack_XCharInfo(structure, packet) \ + fsCat(packet,left) = (structure)->leftSideBearing; \ + fsCat(packet,right) = (structure)->rightSideBearing; \ + fsCat(packet,width) = (structure)->characterWidth; \ + fsCat(packet,ascent) = (structure)->ascent; \ + fsCat(packet,descent) = (structure)->descent; \ + fsCat(packet,attributes) = (structure)->attributes + + +/* copy a FontInfoRec into a XFontInfoHeader */ + +#define fsPack_XFontInfoHeader(structure, packet, clientversion) \ + (packet)->font_header_flags = ((structure)->allExist) ? FontInfoAllCharsExist : 0; \ + (packet)->font_header_draw_direction = ((structure)->drawDirection == LeftToRight) \ + ? LeftToRightDrawDirection : RightToLeftDrawDirection; \ + \ + if ((structure)->inkInside) \ + (packet)->font_header_flags |= FontInfoInkInside; \ + \ + if (clientversion > 1) { \ + (packet)->font_hdr_char_range_min_char_high = (structure)->firstRow; \ + (packet)->font_hdr_char_range_min_char_low = (structure)->firstCol; \ + (packet)->font_hdr_char_range_max_char_high = (structure)->lastRow; \ + (packet)->font_hdr_char_range_max_char_low = (structure)->lastCol; \ + (packet)->font_header_default_char_high = (structure)->defaultCh >> 8; \ + (packet)->font_header_default_char_low = (structure)->defaultCh & 0xff; \ + } else { \ + (packet)->font_hdr_char_range_min_char_high = (structure)->firstCol; \ + (packet)->font_hdr_char_range_min_char_low = (structure)->firstRow; \ + (packet)->font_hdr_char_range_max_char_high = (structure)->lastCol; \ + (packet)->font_hdr_char_range_max_char_low = (structure)->lastRow; \ + (packet)->font_header_default_char_high = (structure)->defaultCh & 0xff; \ + (packet)->font_header_default_char_low = (structure)->defaultCh >> 8; \ + } \ + \ + fsPack_XCharInfo(&(structure)->ink_minbounds, (packet)->font_header_min_bounds); \ + fsPack_XCharInfo(&(structure)->ink_maxbounds, (packet)->font_header_max_bounds); \ + \ + (packet)->font_header_font_ascent = (structure)->fontAscent; \ + (packet)->font_header_font_descent = (structure)->fontDescent + + +typedef struct { /* when cloning, need old transport info */ + int trans_id; + int fd; + int portnum; +} OldListenRec; + +/* os/connection.c */ +extern void CreateSockets(int old_listen_count, OldListenRec *old_listen); + +#endif /* _MISC_H_ */ diff --git a/app/xfs/include/os.h b/app/xfs/include/os.h new file mode 100644 index 000000000..24485522d --- /dev/null +++ b/app/xfs/include/os.h @@ -0,0 +1,162 @@ +/* $Xorg: os.h,v 1.5 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * $NCDXorg: @(#)os.h,v 4.2 1991/05/10 07:59:16 lemke Exp $ + * + */ +/* $XFree86: xc/programs/xfs/include/os.h,v 3.14 2002/10/15 01:45:03 dawes Exp $ */ + +#ifndef _OS_H_ +#define _OS_H_ + +typedef struct _FontPathRec *FontPathPtr; +typedef struct _alt_server *AlternateServerPtr; +typedef struct _auth *AuthPtr; + +#include +#include "client.h" +#include "misc.h" + +typedef pointer FID; + +#define ALLOCATE_LOCAL_FALLBACK(_size) FSalloc((unsigned long)_size) +#define DEALLOCATE_LOCAL_FALLBACK(_ptr) FSfree((pointer)_ptr) + +#include "X11/Xalloca.h" + +#define MAX_REQUEST_SIZE 8192 + +#ifdef SIGNALRETURNSINT +#define SIGVAL int +#else +#define SIGVAL void +#endif + +#define fsalloc(size) FSalloc((unsigned long)size) +#define fsrealloc(ptr, size) FSrealloc((pointer)ptr, (unsigned long)size) +#define fsfree(ptr) FSfree((pointer)ptr) + +extern int ListenPort; +extern Bool UseSyslog; +extern Bool CloneSelf; +extern char ErrorFile[]; +#ifdef FONTCACHE +#include +extern FontCacheSettings cacheSettings; +#endif + +struct _osComm; /* FIXME: osCommPtr */ + +/* os/config.c */ +extern int ReadConfigFile(char *filename); + +/* os/connection.c */ +extern void AttendClient(ClientPtr client); +extern void CheckConnections(void); +extern void CloseDownConnection(ClientPtr client); +extern void IgnoreClient(ClientPtr client); +extern void MakeNewConnections(void); +extern void ReapAnyOldClients(void); +extern void ResetSockets(void); +extern void CloseSockets(void); +extern void StopListening(void); + +/* os/daemon.c */ +extern void BecomeDaemon(void); + +/* os/error.c */ +extern void Error(char *str); +extern void InitErrors(void); +extern void CloseErrors(void); +extern void NoticeF(char *f, ...); +extern void ErrorF(char * f, ...); +extern void FatalError(char* f, ...); + +/* os/io.c */ +extern Bool InsertFakeRequest(ClientPtr client, char *data, int count); +extern int FlushClient(ClientPtr client, struct _osComm *oc, char *extraBuf, int extraCount, int padsize); +extern int ReadRequest(ClientPtr client); +extern void FlushAllOutput(void); +extern void FreeOsBuffers(struct _osComm *oc); +extern void ResetCurrentRequest(ClientPtr client); +extern void ResetOsBuffers(void); +extern void WriteToClient(ClientPtr client, int count, char *buf); +extern void WriteToClientUnpadded(ClientPtr client, int count, char *buf); + +/* os/osglue.c */ +extern int ListCatalogues(char *pattern, int patlen, int maxnames, char **catalogues, int *len); +extern int ValidateCatalogues(int *num, char *cats); +extern int SetAlternateServers(char *list); +extern int ListAlternateServers(AlternateServerPtr *svrs); +extern int CloneMyself(void); + +/* os/osinit.c */ +extern void OsInit(void); + +/* os/utils.c */ +extern SIGVAL AutoResetServer (int n); +extern SIGVAL CleanupChild (int n); +extern SIGVAL GiveUp (int n); +extern SIGVAL ServerCacheFlush (int n); +extern SIGVAL ServerReconfig (int n); +extern long GetTimeInMillis (void); +extern pointer FSalloc(unsigned long); +extern pointer FScalloc (unsigned long amount); +extern pointer FSrealloc(pointer, unsigned long); +extern void FSfree(pointer); +extern void OsInitAllocator (void); +extern void ProcessCmdLine (int argc, char **argv); +extern void ProcessLSoption (char *str); +extern void SetUserId(void); +extern void SetDaemonState(void); + +/* os/waitfor.c */ +extern int WaitForSomething(int *pClientsReady); + +extern void SetConfigValues(void); + + +#endif /* _OS_H_ */ diff --git a/app/xfs/include/osstruct.h b/app/xfs/include/osstruct.h new file mode 100644 index 000000000..686f4daa7 --- /dev/null +++ b/app/xfs/include/osstruct.h @@ -0,0 +1,69 @@ +/* $Xorg: osstruct.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)osstruct.h 4.1 91/05/02 + * + */ +/* $XFree86: xc/programs/xfs/include/osstruct.h,v 1.3 2001/07/29 22:08:16 tsi Exp $ */ + +#ifndef _OSSTRUCT_H_ +#define _OSSTRUCT_H_ +#include "os.h" + +typedef struct _alt_server { + char subset; + unsigned short namelen; + char *name; +} AlternateServerRec; + +typedef struct _auth { + unsigned short namelen; + unsigned short datalen; + char *name; + char *data; +} AuthRec; + +#endif /* _OSSTRUCT_H_ */ diff --git a/app/xfs/include/servermd.h b/app/xfs/include/servermd.h new file mode 100644 index 000000000..6e5cc8abc --- /dev/null +++ b/app/xfs/include/servermd.h @@ -0,0 +1,68 @@ +/* $Xorg: servermd.h,v 1.6 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT 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. + */ +/* $XFree86: xc/programs/xfs/include/servermd.h,v 1.4 2001/12/14 20:01:38 dawes Exp $ */ + +#ifndef _SERVERMD_H_ +#define _SERVERMD_H_ + +#ifndef VENDOR_RELEASE +#define VENDOR_RELEASE 6700 +#endif + +#ifndef VENDOR_STRING +# if defined VENDORNAME +# define VENDOR_STRING VENDORNAME +# else +# define VENDOR_STRING "X.Org Foundation" +# endif +#endif + +#ifndef DEFAULT_FS_PORT +#define DEFAULT_FS_PORT 7100 +#endif + +#endif /* _SERVERMD_H_ */ diff --git a/app/xfs/include/site.h b/app/xfs/include/site.h new file mode 100644 index 000000000..41ebc15db --- /dev/null +++ b/app/xfs/include/site.h @@ -0,0 +1,67 @@ +/* $Xorg: site.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ +/* +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 1990, 1991 Network Computing Devices; + * Portions Copyright 1987 by Digital Equipment Corporation + * + * 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, and that the names of Network Computing Devices, + * or Digital not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Network Computing Devices, or Digital + * make no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR 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. + * + * @(#)site.h 4.3 91/05/06 + * + */ + +#ifndef _SITE_H_ +#define _SITE_H_ +/* + * site dependent definitions + */ + +/* after twice this amount of time (in seconds) with no input from the + * client, it'll be toasted + */ +#define CLIENT_TIMEOUT 600 + + +#define DEFAULT_TIMEOUT 60 + +#define DEFAULT_CLIENT_LIMIT 20 + +#endif /* _SITE_H_ */ diff --git a/app/xfs/include/swaprep.h b/app/xfs/include/swaprep.h new file mode 100644 index 000000000..ca911412d --- /dev/null +++ b/app/xfs/include/swaprep.h @@ -0,0 +1,63 @@ +/* + * $XFree86$ + */ + +/************************************************************ + +Copyright 1998 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + +********************************************************/ + +/* + * difs/swaprep.c -- font server reply swapping + */ + + +#ifndef _SWAPREP_H_ +#define _SWAPREP_H_ 1 + +#include + +extern void CopySwap16Write (ClientPtr client, int size, short *pbuf); +extern void CopySwap32Write (ClientPtr client, int size, long *pbuf); +extern void SCreateACReply (ClientPtr client, int size, void * data); +extern void SErrorEvent (fsError *error, fsError *perror); +extern void SGenericReply (ClientPtr client, int size, void * data); +extern void SGetEventMaskReply (ClientPtr client, int size, void * data); +extern void SGetResolutionReply (ClientPtr client, int size, void * data); +extern void SListCataloguesReply (ClientPtr client, int size, void * data); +extern void SListExtensionsReply (ClientPtr client, int size, void * data); +extern void SListFontsReply (ClientPtr client, int size, void * data); +extern void SListFontsWithXInfoReply (ClientPtr client, int size, void * data); +extern void SOpenBitmapFontReply (ClientPtr client, int size, void * data); +extern void SQueryExtensionReply (ClientPtr client, int size, void * data); +extern void SQueryXBitmapsReply (ClientPtr client, int size, void * data); +extern void SQueryXExtentsReply (ClientPtr client, int size, void * data); +extern void SQueryXInfoReply (ClientPtr client, int size, void * data); +extern void Swap16Write (ClientPtr client, int size, short *pbuf); +extern void Swap32Write (ClientPtr client, int size, long *pbuf); +extern void SwapExtents (fsXCharInfo *extents, int num); +extern void SwapPropInfo (fsPropInfo *pi); +extern void WriteSConnSetup (ClientPtr client, fsConnSetup *pcsp); +extern void WriteSConnectionInfo (ClientPtr client, unsigned long size, char *pInfo); + +#endif /* _SWAPREP_H_ */ diff --git a/app/xfs/include/swapreq.h b/app/xfs/include/swapreq.h new file mode 100644 index 000000000..b3d4e3d0c --- /dev/null +++ b/app/xfs/include/swapreq.h @@ -0,0 +1,55 @@ +/* + * $XFree86: xc/programs/xfs/include/swapreq.h,v 1.1 1998/10/25 07:12:32 dawes Exp $ + */ + +/************************************************************ + +Copyright 1998 by Thomas E. Dickey + + 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 the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. + +********************************************************/ + +/* + * difs/swapreq.h -- swapped requests + */ + + +#ifndef _SWAPREQ_H_ +#define _SWAPREQ_H_ 1 + +#include + +extern int SProcCreateAC(ClientPtr client); +extern int SProcListCatalogues(ClientPtr client); +extern int SProcListFonts(ClientPtr client); +extern int SProcListFontsWithXInfo(ClientPtr client); +extern int SProcOpenBitmapFont(ClientPtr client); +extern int SProcQueryExtension(ClientPtr client); +extern int SProcQueryXBitmaps(ClientPtr client); +extern int SProcQueryXExtents(ClientPtr client); +extern int SProcResourceRequest(ClientPtr client); +extern int SProcSetResolution(ClientPtr client); +extern int SProcSimpleRequest(ClientPtr client); +extern int SwapConnClientPrefix(ClientPtr client, fsConnClientPrefix *pCCP); +extern void SwapLongs(long *list, unsigned long count); +extern void SwapShorts(short *list, unsigned long count); + +#endif /* _SWAPREQ_H_ */ -- cgit v1.2.3