Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/docs/man.dox.in b/docs/man.dox.in
index 9e5f925..d0a7129 100644
--- a/docs/man.dox.in
+++ b/docs/man.dox.in
@@ -1,162 +1,162 @@
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = libqb
PROJECT_NUMBER = 0.10
OUTPUT_DIRECTORY = .
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF = YES
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = YES
SUBGROUPING = NO
TYPEDEF_HIDES_STRUCT = YES
SYMBOL_CACHE_SIZE = 0
EXTRACT_ALL = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = YES
EXTRACT_ANON_NSPACES = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
HIDE_FRIEND_COMPOUNDS = YES
HIDE_IN_BODY_DOCS = YES
INTERNAL_DOCS = NO
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
SORT_MEMBERS_CTORS_1ST = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = NO
GENERATE_TESTLIST = NO
GENERATE_BUGLIST = NO
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = NO
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT =
WARN_LOGFILE =
#---------------------------------------------------------------------------
INPUT = @srcdir@/../include/qb/
INPUT_ENCODING = UTF-8
FILE_PATTERNS = *.h
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
USE_HTAGS = NO
VERBATIM_HEADERS = NO
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
GENERATE_MAN = YES
MAN_OUTPUT = .
MAN_EXTENSION = .3
MAN_LINKS = YES
GENERATE_HTML = NO
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
GENERATE_RTF = NO
GENERATE_XML = NO
GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = NO
+ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
+EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH = ../include
INCLUDE_FILE_PATTERNS = *.h
PREDEFINED =
EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
+SKIP_FUNCTION_MACROS = NO
#---------------------------------------------------------------------------
#
#
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = NO
PERL_PATH =
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = NO
DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = NO
COLLABORATION_GRAPH = NO
GROUP_GRAPHS = NO
UML_LOOK = NO
TEMPLATE_RELATIONS = NO
INCLUDE_GRAPH = NO
INCLUDED_BY_GRAPH = NO
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = NO
DIRECTORY_GRAPH = NO
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
diff --git a/include/qb/qblist.h b/include/qb/qblist.h
index b35f347..878cf85 100644
--- a/include/qb/qblist.h
+++ b/include/qb/qblist.h
@@ -1,95 +1,168 @@
/*
* Copyright (C) 2006-2010, 2009 Red Hat, Inc.
*
* Author: Steven Dake <sdake@redhat.com>
*
* This file is part of libqb.
*
* libqb is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* libqb is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with libqb. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef QB_LIST_H_DEFINED
#define QB_LIST_H_DEFINED
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @file qblist.h
+ * @author Steven Dake <sdake@redhat.com>
+ *
+ * This is a kernel style list implementation.
+ */
+
+
struct qb_list_head {
struct qb_list_head *next;
struct qb_list_head *prev;
};
+/**
+ * @def QB_DECLARE_LIST_INIT()
+ * Declare and initialize a list head.
+ */
#define QB_DECLARE_LIST_INIT(name) \
struct qb_list_head name = { &(name), &(name) }
+/**
+ * Initialize the list entry.
+ * Points next and prev pointers to head.
+ */
static void inline qb_list_init (struct qb_list_head *head)
{
head->next = head;
head->prev = head;
}
+/**
+ * Add this element to the list.
+ *
+ * @param element the new element to insert.
+ * @param head the list head to add to.
+ */
static void inline qb_list_add (struct qb_list_head *element, struct qb_list_head *head)
{
head->next->prev = element;
element->next = head->next;
element->prev = head;
head->next = element;
}
+
+/**
+ * Add to the list (but at the end of the list).
+ * @see qb_list_add()
+ */
static void inline qb_list_add_tail (struct qb_list_head *element, struct qb_list_head *head)
{
head->prev->next = element;
element->next = head;
element->prev = head->prev;
head->prev = element;
}
+
+/**
+ * Delete an entry from the list.
+ *
+ * The code below shows howto delete an entry safely from within a list.
+ * @code
+ * struct my_struct *mine;
+ * struct list_head *iter, *iter_next;
+ *
+ * for (iter = my_list_head.next;
+ * iter != &my_list_head;
+ * iter = iter_next) {
+ *
+ * iter_next = iter->next;
+ *
+ * mine = qb_list_entry(iter, struct my_struct, list);
+ * qb_list_del (&mine->list);
+ * free (mine);
+ * }
+ *
+ * @endcode
+ */
static void inline qb_list_del (struct qb_list_head *_remove)
{
_remove->next->prev = _remove->prev;
_remove->prev->next = _remove->next;
#ifdef DEBUG
_remove->next = (struct qb_list_head *)0xdeadb33f;
_remove->prev = (struct qb_list_head *)0xdeadb33f;
#endif
}
+/**
+ * @def qb_list_entry(ptr,type,member)
+ * Get the user data from the list entry.
+ *
+ * The code below shows how to use qb_list_entry() from within a loop.
+ * @code
+ * struct my_struct *mine = NULL;
+ * struct qb_list_head *iter;
+ *
+ * for (iter = my_list_head.next;
+ * iter != &my_list_head;
+ * iter = iter->next) {
+ * mine = qb_list_entry(iter, struct my_struct, list);
+ * if (mine == NULL) {
+ * continue;
+ * }
+ * do_some_thing (mine);
+ * }
+ *
+ * @endcode
+ */
#define qb_list_entry(ptr,type,member)\
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+/**
+ * A quick test to see if the list is empty (pointing to it's self).
+ */
static inline int qb_list_empty(const struct qb_list_head *l)
{
return l->next == l;
}
static inline void qb_list_splice (struct qb_list_head *list, struct qb_list_head *head)
{
struct qb_list_head *first;
struct qb_list_head *last;
struct qb_list_head *current;
first = list->next;
last = list->prev;
current = head->next;
first->prev = head;
head->next = first;
last->next = current;
current->prev = last;
}
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* QB_LIST_H_DEFINED */

File Metadata

Mime Type
text/x-diff
Expires
Tue, Feb 25, 11:01 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1465014
Default Alt Text
(9 KB)

Event Timeline