MGE General C Library - Full Internal Documentation  v1.7.4
Library of general C functions.
internal.h File Reference

Non-public header file for binary search trees in the libmgec shared library. More...

#include <libmgec/mge-bstree.h>
#include <libmgec/mge-portability.h>
#include <stddef.h>
Include dependency graph for internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bstobjcoord
 Node coordinates for test tracing. More...
 

Functions

struct bstobjcoordfind_next_bst_node_trace (const struct bstree *tree, struct bstobjcoord *searchobj)
 Find and return the next object and it's coordinates in the bst 'tree'. More...
 

Detailed Description

Non-public header file for binary search trees in the libmgec shared library.

No distribution required.

Author
Copyright (C) 2015-2019, 2021, 2022 Mark Grant

Released under the GPLv3 only.
SPDX-License-Identifier: GPL-3.0-only

Version
v1.0.11 ==== 16/09/2022

Function Documentation

◆ find_next_bst_node_trace()

struct bstobjcoord* find_next_bst_node_trace ( const struct bstree tree,
struct bstobjcoord searchobj 
)

Find and return the next object and it's coordinates in the bst 'tree'.

This is only really useful for testing purposes where this function can be used to verify the tree coordinates of nodes. On error mge_errno will be set.

Parameters
treeThe bst to search.
searchobjThe object to find. It does not need to be a fully populated object. It only needs enough information to support the comparison function. E.g. a key.
Returns
A pointer to the next coordinate object found in the tree, (i.e. a fully populated object), or, the actual node object will be NULL if not found. Returns NULL on error.