mirror of
https://github.com/samba-team/samba.git
synced 2025-12-02 00:23:50 +03:00
It occurred to me that the samba includes.h file should be included in the
header files used by the ubiqx modules, instead of being hidden in the .c files. This would ensure that anything in includes.h would be "seen" by the ubiqx headers. I also had to put an #ifdef around the includes for ubi_SplayTree.h and ubi_Cache.h in includes.h to prevent the header of the descendant type from being included before its parent type. Chris -)-----
This commit is contained in:
@@ -1386,11 +1386,14 @@ extern int errno;
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------------- **
|
||||
* Lists, trees, and caches...
|
||||
* Lists, trees, and caching...
|
||||
*/
|
||||
#include "ubiqx/ubi_sLinkList.h"
|
||||
#include "ubiqx/ubi_dLinkList.h"
|
||||
|
||||
#ifndef UBI_BINTREE_H
|
||||
#include "ubiqx/ubi_SplayTree.h"
|
||||
#include "ubiqx/ubi_Cache.h"
|
||||
#endif /* UBI_BINTREE_H */
|
||||
|
||||
#endif /* _INCLUDES_H */
|
||||
|
||||
@@ -27,6 +27,18 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_BinTree.c,v
|
||||
* Revision 4.4 1998/06/03 17:42:46 crh
|
||||
* Further fiddling with sys_include.h. It's now in ubi_BinTree.h which is
|
||||
* included by all of the binary tree files.
|
||||
*
|
||||
* Reminder: Some of the ubi_tr* macros in ubi_BinTree.h are redefined in
|
||||
* ubi_AVLtree.h and ubi_SplayTree.h. This allows easy swapping
|
||||
* of tree types by simply changing a header. Unfortunately, the
|
||||
* macro redefinitions in ubi_AVLtree.h and ubi_SplayTree.h will
|
||||
* conflict if used together. You must either choose a single tree
|
||||
* type, or use the underlying function calls directly. Compare
|
||||
* the two header files for more information.
|
||||
*
|
||||
* Revision 4.3 1998/06/02 01:28:43 crh
|
||||
* Changed ubi_null.h to sys_include.h to make it more generic.
|
||||
*
|
||||
@@ -132,7 +144,6 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* System-specific includes. */
|
||||
#include "ubi_BinTree.h" /* Header for this module. */
|
||||
|
||||
/* ========================================================================== **
|
||||
@@ -140,8 +151,8 @@
|
||||
*/
|
||||
|
||||
static char ModuleID[] = "ubi_BinTree\n\
|
||||
\tRevision: 4.3 \n\
|
||||
\tDate: 1998/06/02 01:28:43 \n\
|
||||
\tRevision: 4.4 \n\
|
||||
\tDate: 1998/06/03 17:42:46 \n\
|
||||
\tAuthor: crh \n";
|
||||
|
||||
/* ========================================================================== **
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef ubi_BinTree_H
|
||||
#define ubi_BinTree_H
|
||||
#ifndef UBI_BINTREE_H
|
||||
#define UBI_BINTREE_H
|
||||
/* ========================================================================== **
|
||||
* ubi_BinTree.h
|
||||
*
|
||||
@@ -29,6 +29,18 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_BinTree.h,v
|
||||
* Revision 4.4 1998/06/03 17:42:46 crh
|
||||
* Further fiddling with sys_include.h. It's now in ubi_BinTree.h which is
|
||||
* included by all of the binary tree files.
|
||||
*
|
||||
* Reminder: Some of the ubi_tr* macros in ubi_BinTree.h are redefined in
|
||||
* ubi_AVLtree.h and ubi_SplayTree.h. This allows easy swapping
|
||||
* of tree types by simply changing a header. Unfortunately, the
|
||||
* macro redefinitions in ubi_AVLtree.h and ubi_SplayTree.h will
|
||||
* conflict if used together. You must either choose a single tree
|
||||
* type, or use the underlying function calls directly. Compare
|
||||
* the two header files for more information.
|
||||
*
|
||||
* Revision 4.3 1998/06/02 01:28:43 crh
|
||||
* Changed ubi_null.h to sys_include.h to make it more generic.
|
||||
*
|
||||
@@ -134,6 +146,12 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* Global include file, used to adapt the ubiqx
|
||||
* modules to the host environment and the project
|
||||
* with which the modules will be used. See
|
||||
* sys_include.h for more info.
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------------- **
|
||||
* Macros and constants.
|
||||
*
|
||||
@@ -775,4 +793,4 @@ int ubi_btModuleID( int size, char *list[] );
|
||||
#define ubi_trModuleID( s, l ) ubi_btModuleID( s, l )
|
||||
|
||||
/* ========================================================================== */
|
||||
#endif /* ubi_BinTree_H */
|
||||
#endif /* UBI_BINTREE_H */
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_Cache.c,v
|
||||
* Revision 0.3 1998/06/03 18:00:15 crh
|
||||
* Further fiddling with sys_include.h, which is no longer explicitly
|
||||
* included by this module since it is inherited from ubi_BinTree.h.
|
||||
*
|
||||
* Revision 0.2 1998/06/02 01:36:18 crh
|
||||
* Changed include name from ubi_null.h to sys_include.h to make it
|
||||
* more generic.
|
||||
@@ -104,7 +108,6 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* System-specific includes. */
|
||||
#include "ubi_Cache.h" /* Header for *this* module. */
|
||||
|
||||
/* -------------------------------------------------------------------------- **
|
||||
@@ -114,8 +117,8 @@
|
||||
/* commented out until I make use of it...
|
||||
static char ModuleID[] =
|
||||
"ubi_Cache\n\
|
||||
\tRevision: 0.2 \n\
|
||||
\tDate: 1998/06/02 01:36:18 \n\
|
||||
\tRevision: 0.3 \n\
|
||||
\tDate: 1998/06/03 18:00:15 \n\
|
||||
\tAuthor: crh \n";
|
||||
*/
|
||||
|
||||
|
||||
@@ -93,6 +93,10 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_Cache.h,v
|
||||
* Revision 0.3 1998/06/03 18:00:15 crh
|
||||
* Further fiddling with sys_include.h, which is no longer explicitly
|
||||
* included by this module since it is inherited from ubi_BinTree.h.
|
||||
*
|
||||
* Revision 0.2 1998/06/02 01:36:18 crh
|
||||
* Changed include name from ubi_null.h to sys_include.h to make it
|
||||
* more generic.
|
||||
|
||||
@@ -37,6 +37,29 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_SplayTree.c,v
|
||||
* Revision 4.3 1998/06/03 17:45:05 crh
|
||||
* Further fiddling with sys_include.h. It's now in ubi_BinTree.h which is
|
||||
* included by all of the binary tree files.
|
||||
*
|
||||
* Also fixed some warnings produced by lint on Irix 6.2, which doesn't seem
|
||||
* to like syntax like this:
|
||||
*
|
||||
* if( (a = b) )
|
||||
*
|
||||
* The fix was to change lines like the above to:
|
||||
*
|
||||
* if( 0 != (a=b) )
|
||||
*
|
||||
* Which means the same thing.
|
||||
*
|
||||
* Reminder: Some of the ubi_tr* macros in ubi_BinTree.h are redefined in
|
||||
* ubi_AVLtree.h and ubi_SplayTree.h. This allows easy swapping
|
||||
* of tree types by simply changing a header. Unfortunately, the
|
||||
* macro redefinitions in ubi_AVLtree.h and ubi_SplayTree.h will
|
||||
* conflict if used together. You must either choose a single tree
|
||||
* type, or use the underlying function calls directly. Compare
|
||||
* the two header files for more information.
|
||||
*
|
||||
* Revision 4.2 1998/06/02 01:29:14 crh
|
||||
* Changed ubi_null.h to sys_include.h to make it more generic.
|
||||
*
|
||||
@@ -129,7 +152,6 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* System-specific includes. */
|
||||
#include "ubi_SplayTree.h" /* Header for THIS module. */
|
||||
|
||||
/* ========================================================================== **
|
||||
@@ -137,8 +159,8 @@
|
||||
*/
|
||||
|
||||
static char ModuleID[] = "ubi_SplayTree\n\
|
||||
\tRevision: 4.2 \n\
|
||||
\tDate: 1998/06/02 01:29:14 \n\
|
||||
\tRevision: 4.3 \n\
|
||||
\tDate: 1998/06/03 17:45:05 \n\
|
||||
\tAuthor: crh \n";
|
||||
|
||||
|
||||
@@ -207,7 +229,7 @@ static ubi_btNodePtr Splay( ubi_btNodePtr SplayWithMe )
|
||||
{
|
||||
ubi_btNodePtr parent;
|
||||
|
||||
while( (parent = SplayWithMe->Link[ubi_trPARENT]) )
|
||||
while( NULL != (parent = SplayWithMe->Link[ubi_trPARENT]) )
|
||||
{
|
||||
if( parent->gender == SplayWithMe->gender ) /* Zig-Zig */
|
||||
Rotate( parent );
|
||||
@@ -309,8 +331,8 @@ ubi_btNodePtr ubi_sptRemove( ubi_btRootPtr RootPtr, ubi_btNodePtr DeadNode )
|
||||
ubi_btNodePtr p;
|
||||
|
||||
(void)Splay( DeadNode ); /* Move dead node to root. */
|
||||
if( (p = DeadNode->Link[ubi_trLEFT]) ) /* If left subtree exists... */
|
||||
{
|
||||
if( NULL != (p = DeadNode->Link[ubi_trLEFT]) )
|
||||
{ /* If left subtree exists... */
|
||||
ubi_btNodePtr q = DeadNode->Link[ubi_trRIGHT];
|
||||
|
||||
p->Link[ubi_trPARENT] = NULL; /* Left subtree node becomes root.*/
|
||||
@@ -323,8 +345,8 @@ ubi_btNodePtr ubi_sptRemove( ubi_btRootPtr RootPtr, ubi_btNodePtr DeadNode )
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (p = DeadNode->Link[ubi_trRIGHT]) ) /* No left, but right subtree... */
|
||||
{ /* ...exists... */
|
||||
if( NULL != (p = DeadNode->Link[ubi_trRIGHT]) )
|
||||
{ /* No left, but right subtree exists... */
|
||||
p->Link[ubi_trPARENT] = NULL; /* Right subtree root becomes... */
|
||||
p->gender = ubi_trPARENT; /* ...overall tree root. */
|
||||
RootPtr->root = p;
|
||||
|
||||
@@ -39,6 +39,29 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_SplayTree.h,v
|
||||
* Revision 4.3 1998/06/03 17:45:05 crh
|
||||
* Further fiddling with sys_include.h. It's now in ubi_BinTree.h which is
|
||||
* included by all of the binary tree files.
|
||||
*
|
||||
* Also fixed some warnings produced by lint on Irix 6.2, which doesn't seem
|
||||
* to like syntax like this:
|
||||
*
|
||||
* if( (a = b) )
|
||||
*
|
||||
* The fix was to change lines like the above to:
|
||||
*
|
||||
* if( 0 != (a=b) )
|
||||
*
|
||||
* Which means the same thing.
|
||||
*
|
||||
* Reminder: Some of the ubi_tr* macros in ubi_BinTree.h are redefined in
|
||||
* ubi_AVLtree.h and ubi_SplayTree.h. This allows easy swapping
|
||||
* of tree types by simply changing a header. Unfortunately, the
|
||||
* macro redefinitions in ubi_AVLtree.h and ubi_SplayTree.h will
|
||||
* conflict if used together. You must either choose a single tree
|
||||
* type, or use the underlying function calls directly. Compare
|
||||
* the two header files for more information.
|
||||
*
|
||||
* Revision 4.2 1998/06/02 01:29:14 crh
|
||||
* Changed ubi_null.h to sys_include.h to make it more generic.
|
||||
*
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_dLinkList.c,v
|
||||
* Revision 0.8 1998/06/03 18:06:03 crh
|
||||
* Further fiddling with sys_include.h, which has been moved from the .c file
|
||||
* to the .h file.
|
||||
*
|
||||
* Revision 0.7 1998/06/02 01:38:47 crh
|
||||
* Changed include file name from ubi_null.h to sys_include.h to make it
|
||||
* more generic.
|
||||
@@ -59,7 +63,6 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* System-specific includes. */
|
||||
#include "ubi_dLinkList.h" /* Header for *this* module. */
|
||||
|
||||
/* ========================================================================== **
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_dLinkList.h,v
|
||||
* Revision 0.8 1998/06/03 18:06:03 crh
|
||||
* Further fiddling with sys_include.h, which has been moved from the .c file
|
||||
* to the .h file.
|
||||
*
|
||||
* Revision 0.7 1998/06/02 01:38:47 crh
|
||||
* Changed include file name from ubi_null.h to sys_include.h to make it
|
||||
* more generic.
|
||||
@@ -61,6 +65,7 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* System-specific includes. */
|
||||
|
||||
/* ========================================================================== **
|
||||
* Typedefs...
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_sLinkList.c,v
|
||||
* Revision 0.7 1998/06/03 18:06:03 crh
|
||||
* Further fiddling with sys_include.h, which has been moved from the .c file
|
||||
* to the .h file.
|
||||
*
|
||||
* Revision 0.6 1998/06/02 01:38:47 crh
|
||||
* Changed include file name from ubi_null.h to sys_include.h to make it
|
||||
* more generic.
|
||||
@@ -79,7 +83,6 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* System-specific includes. */
|
||||
#include "ubi_sLinkList.h" /* Header for *this* module. */
|
||||
|
||||
/* ========================================================================== **
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
* -------------------------------------------------------------------------- **
|
||||
*
|
||||
* Log: ubi_sLinkList.h,v
|
||||
* Revision 0.7 1998/06/03 18:06:03 crh
|
||||
* Further fiddling with sys_include.h, which has been moved from the .c file
|
||||
* to the .h file.
|
||||
*
|
||||
* Revision 0.6 1998/06/02 01:38:47 crh
|
||||
* Changed include file name from ubi_null.h to sys_include.h to make it
|
||||
* more generic.
|
||||
@@ -81,6 +85,7 @@
|
||||
* ========================================================================== **
|
||||
*/
|
||||
|
||||
#include "sys_include.h" /* System-specific includes. */
|
||||
|
||||
/* ========================================================================== **
|
||||
* Typedefs...
|
||||
|
||||
Reference in New Issue
Block a user