[nas] [patch] more server/include cleanup

Stefan Huehner stefan at huehner.org
Wed Aug 23 09:04:06 MDT 2006


Hi,

attached patches continue to cleanup the server/include directory.

_cleanup8a.diff removed the declaration of FreeResource from the
opaque.h header file. All files which include opaque.h don't use this
function and this declaration is copied from resource.h

_cleanup8b.diff corrects several prototypes in resource.[ch] to match
the actual function definitions inside resource.c

Regards,
Stefan

-------------- next part --------------
Index: server/include/opaque.h
===================================================================
--- server/include/opaque.h	(revision 183)
+++ server/include/opaque.h	(working copy)
@@ -11,7 +11,6 @@
 #define DE_RESET     1
 #define DE_TERMINATE 2
 
-extern void FreeResource();
 extern long TimeOutValue;
 extern int argcGlobal;
 extern char **argvGlobal;
-------------- next part --------------
Index: server/include/resource.h
===================================================================
--- server/include/resource.h	(revision 183)
+++ server/include/resource.h	(working copy)
@@ -62,13 +62,13 @@
 #define BAD_RESOURCE 0xe0000000
 
 RESTYPE CreateNewResourceType();
-RESTYPE CreateNewResourceClass();
-AuID FakeClientID();
+RESTYPE CreateNewResourceClass(void);
+AuID FakeClientID(register int client);
 Bool AddResource();
-void FreeResource();
+void FreeResource(AuID id, RESTYPE skipDeleteFuncType);
 void FreeClientResources();
 Bool LegalNewID();
-pointer LookupIDByType();
-pointer LookupIDByClass();
+pointer LookupIDByType(AuID id, RESTYPE rtype);
+pointer LookupIDByClass(AuID id, RESTYPE classes);
 
 #endif /* RESOURCE_H */
Index: server/dia/resource.c
===================================================================
--- server/dia/resource.c	(revision 183)
+++ server/dia/resource.c	(working copy)
@@ -77,7 +77,7 @@
 #include "dixstruct.h"
 #include "opaque.h"
 
-extern void MarkClientException();
+extern void MarkClientException(ClientPtr client);
 
 #define SERVER_MINID 32
 
@@ -107,7 +107,7 @@
 static RESTYPE lastResourceClass;
 static RESTYPE TypeAuMask;
 
-static void RebuildTable();
+static void RebuildTable(int client);
 
 typedef int (*DeleteType) ();
 
@@ -132,7 +132,7 @@
 }
 
 RESTYPE
-CreateNewResourceClass()
+CreateNewResourceClass(void)
 {
     RESTYPE next = lastResourceClass >> 1;
 
@@ -481,7 +481,7 @@
 }
 
 void
-FreeAllResources()
+FreeAllResources(void)
 {
     int i;
 


More information about the Nas mailing list