chapter_9_section_3.html   [plain text]


<html>
    <head>
        <META NAME="Generator" CONTENT="Gutenberg">
		<META NAME="GeneratorVersion" CONTENT="v103.5
">
        <META http-equiv="content-type" CONTENT="text/html;charset=iso-8859-1">
        <META NAME = "Copyright" CONTENT="Copyright 2004 Apple Computer, Inc. All Rights Reserved.">
        <META NAME="IndexTitle" CONTENT="Unexpected Behavior">
        <TITLE>Tools: HeaderDoc User's Guide: Unexpected Behavior</TITLE>
        <base target="content">

        <LINK REL="stylesheet" TYPE="text/css" HREF="../Resources/CSS/frameset_styles.css">
        <style type="text/css"></style>
        <script language="JavaScript" src="../Resources/JavaScript/page.js"></script>
    </head>
    
    <BODY bgcolor="#ffffff" onload="initialize_page();"><a name="//apple_ref/doc/uid/TP40001215-CH366-DontLinkElementID_45" title="Unexpected Behavior" turn_anchor="no"></a>
        <a name="top"></a>
        <!-- start of header -->
        <!--#include virtual="/includes/framesetheader" -->
        <!-- end of header -->
        
        <!-- start of path -->
<div class="breadcrumb"><a href="http://developer.apple.com/" target="_top">ADC Home</a> &gt; <!--a logicalPath="//apple_ref/doc/uid/TP30000943"  -->Reference Library<!--/a--> &gt; <!--a logicalPath="//apple_ref/doc/uid/TP30000440"  -->Documentation<!--/a--> &gt; <!--a logicalPath="//apple_ref/doc/uid/TP30000436"  -->Tools<!--/a--> &gt; <!--a logicalPath="//apple_ref/doc/uid/TP30000436-TP30000502"  -->Darwin<!--/a--> &gt; <a logicalPath="//apple_ref/doc/uid/TP40001215-CH345" href="../intro/chapter_1_section_1.html#//apple_ref/doc/uid/TP40001215-CH345">HeaderDoc User's Guide</a> &gt; <a logicalPath="//apple_ref/doc/uid/TP40001215-CH366" href="chapter_9_section_1.html#//apple_ref/doc/uid/TP40001215-CH366">Troubleshooting</a> &gt; </div><br>
<!-- end of path -->
        
        <table width="100%" cellpadding=0 cellspacing=0 border=0 class="mini_nav_text"><tr>
        <td align=left scope="row">

        <!-- insert Show/Hide frames -->
        <script type="text/javascript" language="JavaScript"><!--
  
        if (self != top) {
            // loaded in frames
            document.write('<a href="'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="'+self.location+'" target="_top">Hide TOC</a>');
        }
        else {
            // not loaded frames
            document.write('<a href="../index.html?'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="../index.html?'+self.location+'" target="_top">Show TOC</a>');
        }
        //--></script>
        <!-- end Show/Hide frames -->

        </td><td align=right>
        
        <a href="chapter_9_section_2.html" target="_self">&lt; Previous Page</a><span style="margin-left: 8px"><a href="chapter_9_section_4.html" target="_self">Next Page &gt;</a></span>
        
        </td>
        </tr></table>
        
        <hr>
        
        <a name="DontLinkElementID_45" title="Unexpected Behavior" turn_anchor="no"></a><h2>Unexpected Behavior</h2>
<ul class="simple"><li><b>Q:</b>	I&#8217;m seeing
multiple copies of my functions/typedefs/defines/*. Why?</li>
<li><b>A:</b>	You probably specified
a name in the <tt>@function</tt> tag
(or <tt>@typedef</tt> or...) that
was different from the actual name.</li></ul>
<ul class="simple"><li><b>Q:</b>	I&#8217;m still
seeing multiple copies of a typedef, but with different names.</li>
<li><b>A:</b>	HeaderDoc, by default,
also generates an entry for &#8220;tag names&#8221; and for every type name.
You can remove the tag names by specifying the -O (outer names only)
flag. In the following example, the tag name is <code>mystruct</code>,
and the type name (a.k.a. the &#8220;outer name&#8221;) is <code>mystruct_t</code>:</li></ul>
<table><table cellpadding="8" width="100%" bgcolor="#F1F5F9" style="border: 1px solid #C9D1D7;"><tr><td scope="row"><table bgcolor="#F1F5F9" width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><pre><code>        typedef struct mystruct {int a;} mystruct_t;</code></pre></td><td><code><pre></pre></code></td></tr></table></td></tr></table><br></table>
<ul class="simple"><li><b>Q:</b>	Why does
my function/method/type/variable/class/* have a name that appears
to include an entire paragraph of the discussion?</li>
<li><b>A:</b>	One of two things is
wrong. Either you included multiple words after the 
<tt>@function/@typedef/@whatever</tt> and
also included an <tt>@discussion</tt> tag
or you began a multi-line declaration at the end of the 
<tt>@function/@typedef/@whatever</tt> line.
Don&#8217;t do this. See <span class="content_text"><a logicalPath="//apple_ref/doc/uid/TP40001215-CH346-CIHDBHDC" href="../tags/chapter_2_section_3.html#//apple_ref/doc/uid/TP40001215-CH346-CIHDBHDC">&#8220;Multiword Names&#8221;</a></span> for more information.</li></ul>
<ul class="simple"><li><b>Q:</b>	A bunch
of my <tt>functions/typedefs/*</tt> are
being linked together with &#8220;See Also&#8221; attributes. What&#8217;s up?</li>
<li><b>A:</b>	You probably marked a 
<tt>typedef</tt> with an 
<tt>@function</tt> comment (or
some other incorrect pairing). HeaderDoc will assume that you knew
what you were doing and will keep looking through the code until
it finds whatever was requested (a function in this case). Everything
in-between will get linked together. The purpose for this is primarily
to allow you to mark <tt>@typedef</tt> for
a <tt>struct</tt> followed by
a <tt>typedef</tt>, but it is
useful in other situations as well. Fix the incorrectly matched
comment, and the problem should go away.</li></ul>
<ul class="simple"><li><b>Q:</b>	Why am I
not getting links when I add <tt>@link</tt> tags?</li>
<li><b>A:</b>	There are several possible
reasons:
<ul class="simple"><li>1.	If you used <tt>apple_ref</tt> markup,
you may have made a typo.</li>
<li>2.	If you used a symbol name that did not exist,
you would get a warning when running <code>headerdoc2html</code> and
no link will be generated. </li>
<li>3.	The <tt>@link</tt> tag
only inserts a link request into the HTML. To turn this into an
actual link, you must run <code>gatherheaderdoc</code> (which
in turn runs <code>resolveLinks</code> to create the links).
Until you run gatherHeaderDoc, all you will see in the HTML are
a bunch of specially-formatted comments.</li></ul></li></ul>
<ul class="simple"><li><b>Q:</b>	Every time
I run <tt>gatherheaderdoc</tt>,
all of the spaces in my declarations go away. What&#8217;s going on?</li>
<li><b>A:</b>	This is a bug in 
<tt>libxml2</tt> that is fixed
in more recent versions. Please visit <span class="content_text"><a href="http://www.xmlsoft.org" target="_top">http://www.xmlsoft.org</a></span> to
obtain a more recent version.</li></ul>

        <br><br> 
        
        <table width="100%" cellpadding=0 cellspacing=0 border=0 class="mini_nav_text"><tr>
        <td align=left scope="row">

        <!-- insert Show/Hide frames -->
        <script type="text/javascript" language="JavaScript"><!--
           
        if (self != top) {
            // loaded in frames
            document.write('<a href="'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="'+self.location+'" target="_top">Hide TOC</a>');
        }
        else {
            // not loaded frames
            document.write('<a href="../index.html?'+self.location+'" target="_top"><img src="../Resources/Images/show_toc_icon.gif" width="15" height="14" border="0" style="margin-bottom: -2px;" alt=""></a> <a href="../index.html?'+self.location+'" target="_top">Show TOC</a>');
        }
        //--></script>
        <!-- end Show/Hide frames -->

        </td><td align=right>
        
        <a href="chapter_9_section_2.html" target="_self">&lt; Previous Page</a><span style="margin-left: 8px"><a href="chapter_9_section_4.html" target="_self">Next Page &gt;</a></span>
        
        </td>
        </tr></table>

        <br><hr><div align="center"><p class="content_text"> <!--#if expr="0=1" -->&#169; 1999, 2004 Apple Computer, Inc. All Rights Reserved. &#40;<!--#endif -->Last updated: 2004-10-27<!--#if expr="0=1" -->&#041;<!--#endif --></p></div>

        
        <!-- start of footer -->
        <!--#include virtual="/includes/framesetfooter" -->
        <!-- end of footer -->
    </BODY>
</html>