[nas] [patch] more include file cleanup

Stefan Huehner stefan at huehner.org
Sat Aug 19 05:51:58 MDT 2006


Hi,

attached patch removes some more unsused part of various header files:

- server/include/os.h
	leftovers from the x-headers
- server/dia/globals.[ch]
  server/include/dicstruct.h
  server/include/misc.h
	The two variables 'globalSerialNumber' and 'lastDeviceEventTime'
	are only once assigned in globals.c but are never read or
	modified afterwards.
	The patch removes the initialization and the declaration in the
	various headers.
	As globals.h is linked to the include/ directory this also
	removes these two declarations from the externally visible
	portion of the api. But as these aren't used inside nas i would
	wonder if any code linking to nas would use them. A mentioning
	in some document should imho be sufficient.

Regards,
Stefan

-------------- next part --------------
Index: server/include/dixstruct.h
===================================================================
--- server/include/dixstruct.h	(revision 179)
+++ server/include/dixstruct.h	(working copy)
@@ -77,7 +77,6 @@
 } WorkQueueRec;
 
 extern TimeStamp currentTime;
-extern TimeStamp lastDeviceEventTime;
 extern void CloseDownClient();
 
 extern TimeStamp ClientTimeToServerTime();
Index: server/include/misc.h
===================================================================
--- server/include/misc.h	(revision 179)
+++ server/include/misc.h	(working copy)
@@ -30,7 +30,6 @@
  */
 
 
-extern unsigned long globalSerialNumber;
 extern unsigned long serverGeneration;
 
 #include <X11/Xosdefs.h>
Index: server/include/os.h
===================================================================
--- server/include/os.h	(revision 179)
+++ server/include/os.h	(working copy)
@@ -133,9 +133,6 @@
 int ReadRequestFromClient();
 void CloseDownConnection();
 void CreateWellKnownSockets();
-int SetDefaultFontPath();
-void FreeFontRecord();
-int SetFontPath();
 void ErrorF();
 void Error();
 void FatalError();
Index: server/dia/globals.c
===================================================================
--- server/dia/globals.c	(revision 179)
+++ server/dia/globals.c	(working copy)
@@ -82,13 +82,10 @@
     serverClient = (ClientPtr) NULL;
     currentMaxClients = 0;
 
-    globalSerialNumber = 0;
     serverGeneration = 0;
 
     currentTime.months = 0;
     currentTime.milliseconds = 0;
-    lastDeviceEventTime.months = 0;
-    lastDeviceEventTime.milliseconds = 0;
 
 
     display = NULL;
Index: server/dia/globals.h
===================================================================
--- server/dia/globals.h	(revision 179)
+++ server/dia/globals.h	(working copy)
@@ -21,11 +21,9 @@
 GEXTERN ClientPtr serverClient;
 GEXTERN int currentMaxClients;  /* current size of clients array */
 
-GEXTERN unsigned long globalSerialNumber;
 GEXTERN unsigned long serverGeneration;
 
 GEXTERN TimeStamp currentTime;
-GEXTERN TimeStamp lastDeviceEventTime;
 
 GEXTERN char *display;
 


More information about the Nas mailing list