krb5 commit: Exclude lists for doxygen API docs

Benjamin Kaduk kaduk at MIT.EDU
Tue Nov 27 18:02:30 EST 2012


https://github.com/krb5/krb5/commit/f17cc2c9edc4f36c96391d438ddeaf5bab5b2b65
commit f17cc2c9edc4f36c96391d438ddeaf5bab5b2b65
Author: Ben Kaduk <kaduk at mit.edu>
Date:   Wed Nov 21 11:31:06 2012 -0500

    Exclude lists for doxygen API docs
    
    Doxygen will pick up every function, macro, and typedef defined
    in krb5.h; some of these may not actually be part of the public
    API for one reason or another.  Provide hardcoded exclude lists
    for macro/function/type names for which we do not want to emit
    reStructuredText documentation, and check these lists when processing
    the Doxygen XML output.
    
    Seed these lists with the macros TRUE, FALSE, KRB5_OLD_CRYPTO,
    KRB5_GENERAL__, KRB5_CALLCONV, KRB5_CALLCONV_C, KRB5_CALLCONV_WRONG,
    KRB5INT_BEGIN_DECLS, KRB5INT_END_DECLS, and KRB5_ATTR_DEPRECATED,
    and typedefs krb5_cc_ops and krb5_responder_context. The booleans
    are compatibility cruft that we do not want to advertise, and the other
    macros are for internal use for signalling and platform compatibility.
    The typedefs are functioning just as forward declarations.
    
    For consistency, remove KRB5_OLD_CRYPTO.rst from the macros index; it
    had no content even when we did generate it.
    
    ticket: 7447
    tags: pullup
    target_version: 1.11

 doc/appdev/refs/macros/index.rst |    1 -
 doc/tools/doxybuilder_funcs.py   |    4 ++++
 doc/tools/doxybuilder_types.py   |    7 +++++++
 3 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/doc/appdev/refs/macros/index.rst b/doc/appdev/refs/macros/index.rst
index 94b8244..33dca06 100644
--- a/doc/appdev/refs/macros/index.rst
+++ b/doc/appdev/refs/macros/index.rst
@@ -224,7 +224,6 @@ Public
    KRB5_NT_UNKNOWN.rst
    KRB5_NT_WELLKNOWN.rst
    KRB5_NT_X500_PRINCIPAL.rst
-   KRB5_OLD_CRYPTO.rst
    KRB5_PAC_CLIENT_INFO.rst
    KRB5_PAC_CREDENTIALS_INFO.rst
    KRB5_PAC_DELEGATION_INFO.rst
diff --git a/doc/tools/doxybuilder_funcs.py b/doc/tools/doxybuilder_funcs.py
index 7e54750..b1ef8ac 100644
--- a/doc/tools/doxybuilder_funcs.py
+++ b/doc/tools/doxybuilder_funcs.py
@@ -29,6 +29,8 @@ from xml.sax import make_parser
 from xml.sax.handler import ContentHandler
 from docmodel import *
 
+exclude_funcs = []
+
 class DocNode(object):
     """
     Represents the structure of xml node.
@@ -177,6 +179,8 @@ class DoxyFuncs(XML2AST):
             print 'not processing node: %s' % node_type
             return
 
+        if 'name' in data and data['name'] in exclude_funcs:
+            return
         self.objects.append(DocModel(**data))
 
     def save(self, templates, target_dir):
diff --git a/doc/tools/doxybuilder_types.py b/doc/tools/doxybuilder_types.py
index c7a38f9..551f7d5 100644
--- a/doc/tools/doxybuilder_types.py
+++ b/doc/tools/doxybuilder_types.py
@@ -30,6 +30,11 @@ from lxml import etree
 
 from docmodel import *
 
+exclude_types = [ 'TRUE', 'FALSE', 'KRB5_ATTR_DEPRECATED',
+                  'KRB5_CALLCONV', 'KRB5_CALLCONV_C', 'KRB5_CALLCONV_WRONG',
+                  'KRB5_GENERAL__', 'KRB5_OLD_CRYPTO',
+                  'KRB5INT_BEGIN_DECLS', 'KRB5INT_END_DECLS',
+                  'krb5_cc_ops', 'krb5_responder_context' ]
 
 class DoxyTypes(object):
     def __init__(self, xmlpath):
@@ -85,6 +90,8 @@ class DoxyTypes(object):
                     data = self._process_variable_node(node)
                 elif kind == 'define':
                     data = self._process_define_node(node)
+                if 'name' in data and data['name'] in exclude_types:
+                    continue
                 result.append(data)
         print "\nnumber of types processed ==> " , len(result)
         return result


More information about the cvs-krb5 mailing list