chapter_5_section_4.html [plain text]
<html>
<head>
<META NAME="Generator" CONTENT="Gutenberg">
<META NAME="GeneratorVersion" CONTENT="v100.1">
<META http-equiv="content-type" CONTENT="text/html;charset=iso-8859-1">
<META NAME = "Copyright" CONTENT="Copyright 2004 Apple Computer, Inc. All Rights Reserved.">
<TITLE>Tools: HeaderDoc Unfettered: A Simple Command Example</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-CH357-DontLinkElementID_1084" title="A Simple Command Example" 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> > <!--a logicalPath="//apple_ref/doc/uid/TP30000943" -->Reference Library<!--/a--> > <!--a logicalPath="//apple_ref/doc/uid/TP30000440" -->Documentation<!--/a--> > <!--a logicalPath="//apple_ref/doc/uid/TP30000436" -->Tools<!--/a--> > <a logicalPath="//apple_ref/doc/uid/TP40001215-CH345" href="../intro/chapter_1_section_1.html#//apple_ref/doc/uid/TP40001215-CH345">HeaderDoc Unfettered</a> > <a logicalPath="//apple_ref/doc/uid/TP40001215-CH357" href="chapter_5_section_1.html#//apple_ref/doc/uid/TP40001215-CH357">Using the MPGL Suite</a> > </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) {
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 {
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>');
}
<!-- end Show/Hide frames -->
</td><td align=right>
<a href="chapter_5_section_3.html" target="_self">< Previous Page</a><span style="margin-left: 8px"><a href="chapter_5_section_5.html" target="_self">Next Page ></a></span>
</td>
</tr></table>
<hr>
<br><h2>A Simple Command Example</h2>
<p><span class="content_text"><a logicalPath="//apple_ref/doc/uid/TP40001215-CH357-CHDHBDCF" href="chapter_5_section_4.html#//apple_ref/doc/uid/TP40001215-CH357-CHDHBDCF">Listing 1-2</a></span> is an example of how to write an MPGL manual page
for a single command or a series of commands with the same syntax.</p>
<table><a name="//apple_ref/doc/uid/TP40001215-CH357-CHDHBDCF" turn_anchor="no"></a><a name="CHDHBDCF" turn_anchor="no"></a><p><b><font face="lucida grande, geneva, helvetica, arial, sans-serif" size="2">Listing 5-2 A simple MPGL example for a command</font></b></p>
<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><manpage></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><docdate>August 28, 2002</docdate></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><doctitle>Document title</doctitle></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><os>Darwin</os></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><section>1</section></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><names></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <name>foo<desc>this is a description</desc></name></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <name>bar<desc>this is also a description</desc></name></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></names></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><usage></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <flag optional="1">a<arg>attributes</arg><desc>This is the atts flag</desc></flag></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <flag>d<arg>date</arg><desc>This is the date flag</desc></flag></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <flag>x<desc>This is the -x flag</desc></flag></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <arg>filename<desc>This is the filename</desc></arg></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></usage></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><returnvalues></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p>Returns kIONotANumber if you can't count.</p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p>Returns kIOMoron if you REALLY can't count.</p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></returnvalues></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><environment></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> TEXT</code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></environment></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><files></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <file>/path/to/filename<desc>This is a waste of time</desc></file></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <file>/path/to/another/filename<desc>This is also a waste of time</desc></file></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></files></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><examples></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> TEXT</code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></examples></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><diagnostics></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> TEXT</code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></diagnostics></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><errors></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> TEXT</code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></errors></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><seealso></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p>This is a text container, really, but generally contains</code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> lines like this:</p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <manpage>foo<section>1</section>, </manpage></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <manpage>bar<section>3</section></manpage></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></seealso></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><conformingto></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p>Here's a list of conformance:</p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <ul></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <li>Single UNIX Specification</li></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <li>POSIX</li></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> </ul></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p>Here's a definition list:</p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <dl></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <dd>foo_aaa</dd></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <dt>This is foo</dt></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <dd>bar</dd></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <dt>This is bar</dt></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> </dl></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></conformingto></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><history></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> This program should be history....</code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></history></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code><bugs></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p>Here are some bugs:</p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <ol></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <li>Bug one....</li></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <li>Bug two....</li></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <li>Bug three....</li></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> </ol></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> </p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code> <p>I think that pretty much covers it.</p></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></bugs></code></pre></td><td><code><pre></pre></code></td></tr><tr><td scope="row"><pre><code></manpage></code></pre></td><td><code><pre></pre></code></td></tr></table></td></tr></table></table>
<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) {
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 {
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>');
}
<!-- end Show/Hide frames -->
</td><td align=right>
<a href="chapter_5_section_3.html" target="_self">< Previous Page</a><span style="margin-left: 8px"><a href="chapter_5_section_5.html" target="_self">Next Page ></a></span>
</td>
</tr></table>
<br><hr><p class="content_text"> <!--#if expr="0=1" -->© 1999, 2004 Apple Computer, Inc. All Rights Reserved. (<!--#endif -->Last updated: 2004-05-27<!--#if expr="0=1" -->)<!--#endif --></p>
<!-- start of footer -->
<!--#include virtual="/includes/framesetfooter" -->
<!-- end of footer -->
</BODY>
</html>