[nas] [patch] server/include cleanup - part1
Stefan Huehner
stefan at huehner.org
Sat Jul 15 17:00:40 MDT 2006
Hi,
attached patch removes some apparently unused stuff from the
server/include directory:
- files remove:
- closure.h
- closestr.h
- extension.h
- extnsionst.h
These files were completely remove, as i cannot find a single
reference to them in the rest of the nas-tree.
The files have also been removed from config/filelist
- files thinned:
- opaque.h
- misc.h
- miscstruct.h
- os.h
- osstruct.h
In these files a lot of definitions were removed: Same cause, i could
not find any reference to them in the rest of the source tree.
Please review and consider applying.
Regards,
Stefan
-------------- next part --------------
Index: config/filelist
===================================================================
--- config/filelist (revision 153)
+++ config/filelist (working copy)
@@ -612,13 +612,9 @@
./server/dia/swapreq.c
./server/dia/tables.c
./server/dia
-./server/include/closestr.h
./server/include/site.h
-./server/include/closure.h
./server/include/dix.h
./server/include/dixstruct.h
-./server/include/extension.h
-./server/include/extnsionst.h
./server/include/misc.h
./server/include/miscstruct.h
./server/include/opaque.h
Index: server/include/opaque.h
===================================================================
--- server/include/opaque.h (revision 153)
+++ server/include/opaque.h (working copy)
@@ -3,10 +3,6 @@
#ifndef OPAQUE_H
#define OPAQUE_H
-extern char *defaultFontPath;
-extern char *defaultTextFont;
-extern char *defaultCursorFont;
-extern char *rgbPath;
extern long MaxClients;
extern char isItTimeToYield;
extern char dispatchException;
@@ -15,13 +11,8 @@
#define DE_RESET 1
#define DE_TERMINATE 2
-extern int CloseFont();
extern void FreeResource();
extern long TimeOutValue;
-extern long ScreenSaverTime;
-extern long ScreenSaverInterval;
-extern int ScreenSaverBlanking;
-extern int ScreenSaverAllowExposures;
extern int argcGlobal;
extern char **argvGlobal;
Index: server/include/misc.h
===================================================================
--- server/include/misc.h (revision 153)
+++ server/include/misc.h (working copy)
@@ -151,7 +151,4 @@
extern void SwapLongs();
extern void SwapShorts();
-typedef struct _DDXPoint *DDXPointPtr;
-typedef struct _Box *BoxPtr;
-
#endif /* MISC_H */
Index: server/include/closure.h
===================================================================
--- server/include/closure.h (revision 153)
+++ server/include/closure.h (working copy)
@@ -1,32 +0,0 @@
-/* $XConsortium: closure.h,v 1.1 91/07/31 21:15:51 keith Exp $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifndef CLOSURE_H
-#define CLOSURE_H 1
-
-typedef struct _LFclosure *LFclosurePtr;
-typedef struct _LFWIclosure *LFWIclosurePtr;
-typedef struct _OFclosure *OFclosurePtr;
-
-#endif /* CLOSURE_H */
Index: server/include/extension.h
===================================================================
--- server/include/extension.h (revision 153)
+++ server/include/extension.h (working copy)
@@ -1,68 +0,0 @@
-/* $XConsortium: extension.h,v 1.6 89/07/16 14:37:47 rws Exp $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifndef EXTENSION_H
-#define EXTENSION_H
-
-#define GetGCAndDrawableAndValidate(gcID, pGC, drawID, pDraw, client)\
- if ((client->lastDrawableID != drawID) || (client->lastGCID != gcID))\
- {\
- if (client->lastDrawableID != drawID)\
- pDraw = (DrawablePtr)LookupIDByClass(drawID, RC_DRAWABLE);\
- else\
- pDraw = client->lastDrawable;\
- if (client->lastGCID != gcID)\
- pGC = (GC *)LookupIDByType(gcID, RT_GC);\
- else\
- pGC = client->lastGC;\
- if (pDraw && pGC)\
- {\
- if ((pDraw->type == UNDRAWABLE_WINDOW) ||\
- (pGC->depth != pDraw->depth) ||\
- (pGC->pScreen != pDraw->pScreen))\
- return (BadMatch);\
- client->lastDrawable = pDraw;\
- client->lastDrawableID = drawID;\
- client->lastGC = pGC;\
- client->lastGCID = gcID;\
- }\
- }\
- else\
- {\
- pGC = client->lastGC;\
- pDraw = client->lastDrawable;\
- }\
- if (!pDraw)\
- {\
- client->errorValue = drawID; \
- return (BadDrawable);\
- }\
- if (!pGC)\
- {\
- client->errorValue = gcID;\
- return (BadGC);\
- }\
- if (pGC->serialNumber != pDraw->serialNumber)\
- ValidateGC(pDraw, pGC);
-#endif /* EXTENSION_H */
Index: server/include/closestr.h
===================================================================
--- server/include/closestr.h (revision 153)
+++ server/include/closestr.h (working copy)
@@ -1,61 +0,0 @@
-#ifndef CLOSESTR_H
-#define CLOSESTR_H
-
-#define NEED_REPLIES
-#include "Xproto.h"
-#include "closure.h"
-#include "dix.h"
-#include "misc.h"
-
-/* closure structures */
-typedef struct _OFclosure {
- ClientPtr client;
- short current_fpe;
- short num_fpes;
- FontPathElementPtr *fpe_list;
- Mask flags;
- Bool slept;
-
-/* XXX -- get these from request buffer instead? */
- char *origFontName;
- int origFontNameLen;
- XID fontid;
- char *fontname;
- int fnamelen;
-} OFclosureRec;
-
-typedef struct _LFclosure {
- ClientPtr client;
- short current_fpe;
- short num_fpes;
- FontPathElementPtr *fpe_list;
- FontNamesPtr names;
- char *pattern;
- int max_names;
- int patlen;
- Bool slept;
-} LFclosureRec;
-
-typedef struct _LFWIstate {
- char *pattern;
- int patlen;
- int current_fpe;
- int max_names;
- Bool list_started;
- pointer private;
-} LFWIstateRec, *LFWIstatePtr;
-
-typedef struct _LFWIclosure {
- ClientPtr client;
- int num_fpes;
- FontPathElementPtr *fpe_list;
- xListFontsWithInfoReply *reply;
- int length;
- LFWIstateRec current;
- LFWIstateRec saved;
- int savedNumFonts;
- Bool haveSaved;
- Bool slept;
- char *savedName;
-} LFWIclosureRec;
-#endif /* CLOSESTR_H */
Index: server/include/extnsionst.h
===================================================================
--- server/include/extnsionst.h (revision 153)
+++ server/include/extnsionst.h (working copy)
@@ -1,73 +0,0 @@
-/* $XConsortium: extnsionst.h,v 1.9 89/08/31 18:41:12 rws Exp $ */
-/***********************************************************
-Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
-and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose and without fee is hereby granted,
-provided that the above copyright notice appear in all copies and that
-both that copyright notice and this permission notice appear in
-supporting documentation, and that the names of Digital or MIT not be
-used in advertising or publicity pertaining to distribution of the
-software without specific, written prior permission.
-
-DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
-ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
-DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
-ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
-ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
-SOFTWARE.
-
-******************************************************************/
-#ifndef EXTENSIONSTRUCT_H
-#define EXTENSIONSTRUCT_H
-#include "extension.h"
-typedef struct _ExtensionEntry {
- int index;
- void (* CloseDown)(); /* called at server shutdown */
- char *name; /* extension name */
- int base; /* base request number */
- int eventBase;
- int eventLast;
- int errorBase;
- int errorLast;
- int num_aliases;
- char **aliases;
- pointer extPrivate;
- unsigned short (* MinorOpcode)(); /* called for errors */
-} ExtensionEntry;
-
-extern void (* EventSwapVector[128]) ();
-
-typedef void (* ExtensionLookupProc)();
-
-typedef struct _ProcEntry {
- char *name;
- ExtensionLookupProc proc;
-} ProcEntryRec, *ProcEntryPtr;
-
-typedef struct _ScreenProcEntry {
- int num;
- ProcEntryPtr procList;
-} ScreenProcEntry;
-
-#define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \
- pGC->VectorElement = NewRoutineAddress;
-
-#define GetGCValue(pGC, GCElement) (pGC->GCElement)
-
-extern void InitExtensions();
-extern int ProcQueryExtension();
-extern int ProcListExtensions();
-extern ExtensionEntry *AddExtension();
-extern Bool AddExtensionAlias();
-extern ExtensionLookupProc LookupProc();
-extern Bool RegisterProc();
-extern Bool RegisterScreenProc();
-extern unsigned short MinorOpcodeOfRequest();
-extern unsigned short StandardMinorOpcode();
-
-#endif /* EXTENSIONSTRUCT_H */
Index: server/include/miscstruct.h
===================================================================
--- server/include/miscstruct.h (revision 153)
+++ server/include/miscstruct.h (working copy)
@@ -28,18 +28,5 @@
#include "misc.h"
extern unsigned long globalSerialNumber;
-typedef struct _DDXPoint {
- short x, y;
-} DDXPointRec;
-typedef struct _Box {
- short x1, y1, x2, y2;
-} BoxRec;
-
-typedef union _DevUnion {
- pointer ptr;
- long val;
- unsigned long uval;
-} DevUnion;
-
#endif /* MISCSTRUCT_H */
Index: server/include/os.h
===================================================================
--- server/include/os.h (revision 153)
+++ server/include/os.h (working copy)
@@ -47,7 +47,6 @@
#endif
typedef pointer FID;
-typedef struct _FontPathRec *FontPathPtr;
typedef struct _NewClientRec *NewClientPtr;
#ifndef NO_ALLOCA
@@ -143,7 +142,6 @@
int ReadRequestFromClient();
void CloseDownConnection();
-FontPathPtr ExpandFontNamePattern();
FID FiOpenForRead();
void CreateWellKnownSockets();
int SetDefaultFontPath();
Index: server/include/osstruct.h
===================================================================
--- server/include/osstruct.h (revision 153)
+++ server/include/osstruct.h (working copy)
@@ -31,12 +31,4 @@
#include "os.h"
#include "misc.h"
-typedef struct _FontPathRec {
- int npaths; /* number of valid paths */
- int size; /* how big length and paths arrays are */
- int *length;
- char **paths;
- pointer *osPrivate;
-} FontPathRec;
-
#endif /* OSSTRUCT_H */
More information about the Nas
mailing list