cpython/BeOS/ar-1.1/docs/ar.html

235 lines
7.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML3.2//EN">
<!-- $Id$ -->
<html> <head>
<title>ar - create and maintain library archives</title>
</head>
<body bgcolor="#ffffcb">
<h1>ar</h1>
<h4 align="right">create and maintain library archives</h4>
<h2>Synopsis</h2>
<pre>
ar [-][dprtx][cuv] <i>archive</i> [<i>file</i> ...]
</pre>
<h2>Options</h2>
<table>
<tr>
<td valign="top"><b>-</b></td>
<td valign="top">
The <b>-</b> is optional for introducing <tt>ar</tt> command-line
arguments; this is a POSIX requirement, and I've never seen anyone
use it.</td>
</tr>
<tr>
<td valign="top"><b>c</b></td>
<td valign="top">
Don't print a diagnostic message to <i>stderr</i> when
<i>archive</i> is created.</td>
</tr>
<tr>
<td valign="top"><b>d</b></td>
<td valign="top">
Delete <i>file(s)</i> from <i>archive</i>.</td>
</tr>
<tr>
<td valign="top"><b>p</b></td>
<td valign="top">
Write the contents of the named <i>file(s)</i> to <i>stdout</i>.
If no <i>file(s)</i> are specified, all of the files in
<i>archive</i> are written in the order of the archive.</td>
</tr>
<tr>
<td valign="top"><b>r</b></td>
<td valign="top">
Replace or add <i>file(s)</i> to the <i>archive</i>. This will
create <i>archive</i> if it doesn't already exist.</td>
</tr>
<tr>
<td valign="top"><b>t</b></td>
<td valign="top">
Write the table of contents of <i>archive</i> to <i>stdout</i>.
If not <i>file(s)</i> are specified, list all of the files,
otherwise only list the specified files.</td>
</tr>
<tr>
<td valign="top"><b>u</b></td>
<td valign="top">
Update older files. When used with the <b>r</b> option, files
within the archive are only replaced if <i>file</i> has a
modification date at least as new as the <i>file</i> already in
the archive.</td>
</tr>
<tr>
<td valign="top"><b>v</b></td>
<td valign="top">Give verbose output.</td>
</tr>
<tr>
<td valign="top"><b>x</b></td>
<td valign="top">
Extract <i>file(s)</i> from the <i>archive</i>. If no
<i>file(s)</i> are specified, all of the files in <i>archive</i>
are extracted.</td>
</tr>
<tr>
<td valign="top"><i>archive</i></td>
<td valign="top">
The pathname of an archive file.</td>
</tr>
<tr>
<td valign="top"><i>file</i></td>
<td valign="top">
One more more pathnames of object files; only the file name is
used when comparing against the names of files in the
archive.</td>
</tr>
</table>
<h2>Description</h2>
<p>The <tt>ar</tt> utility creates and maintains groups of files
combined into a library. Once a library has been created, you can
add new files, and extract, delete, or replace existing files.</p>
<h2>Exit status</h2>
<p><tt>ar</tt> exits with one of the following values:</p>
<table>
<tr><td valign="top">0</td>
<td valign="top">Successful completion.</td></tr>
<tr><td valign="top">&gt; 0</td>
<td>An error occurred.</td></tr>
</table>
<h2>Bugs</h2>
<p>No known bugs, but <em>please</em> read the comments in the code if
you want to use it in another application.</p>
<h2>Comments</h2>
<p>This is a POSIX 1003.2-1992 based <tt>ar</tt> command; it's not
100% POSIX 1003.2 because POSIX specifies a file format for
<tt>ar</tt> archives. The BeOS <tt>ar</tt> produces library files
compatible (at least in theory <tt>:-)</tt>) with Metrowerks
CodeWarrior for PowerPC.</p>
<p>This <tt>ar</tt> and its source code were written as a service to
the Be developer community, to make it easier for us to port UNIX
applications and libraries. The code was written from scratch, after
reverse-engineering the Metrowerks library and object file format
(mostly because the library/object file format documentation was
incorrect).</p>
<p>If you find this useful, please
<a href="mailto:chrish@kagi.com">let me know</a>, and tell me what
you're working on. Be sure to include a URL for your homepage or your
product homepages for my
<a href="http://www.qnx.com/~chrish/Be/community/">Be Community</a>
pages.</p>
<p>If you find any bugs, please try to fix them, and send me a context
diff (use <tt>diff -c original_file fixed_file</tt>) so I can include
your fixes in the next update. I <i>have</i> tested this, but these
things have a way of slipping though.</p>
<p>If you'd like to know what other things I'm working on, take a look
at my <a href="http://www.qnx.com/~chrish/Be/software/">Be
Software</a> pages, and my
<a href="http://www.qnx.com/~chrish/Be/">Be Happy!</a> pages.</p>
<h2>License</h2>
<p>This program binary and its source code have been donated to the
BeOS Developer Community by Arcane Dragon Software free of charge.
You can do whatever you want with it.</p>
<p>If you <em>really</em> want to show your appreciation, you could
always send me a gift of some sort; cool software you wrote, nice
pictures for my desktop, ZIP drive disks, RAM, hard drives, post
cards, a pointer to a really cool/useful/interesting web site,
an MPEG audio file of an interesting band (make sure you can give me
enough information to track down their CDs if I like it!), <i>etc.</i>
Send me some <a href="mailto:chrish@kagi.com">email</a> and I'll let you
know where to send it.</p>
<p>But you don't have to do anything. Just write good BeOS software.
But you're already doing that, right?</p>
<h2>Disclaimer</h2>
<p>You use this at your own risk. I've tried to ensure that the code
is correct, but software usually has bugs. If <tt>ar</tt> destroys
your valuable data, formats your hard drive, kicks your cat, and lets
the air out of your tires, I'm not responsible for it. The code is
here, so you should feel fairly safe that there's nothing evil going
on.</p>
<p>And, as I learned once again in December 1997, you really should
keep backups of everything. I only lost a day's work, but it was
still annoying, and it could've been much, much worse.</p>
<h3>A word about the code</h3>
<p>This code isn't meant to be the ultimate in efficiency or speed,
it's intended to be fairly easy to understand and maintain
(hopefully). I was also quite keen on having something that was
correct, without jumping through a lot of unnecessary hoops.</p>
<p>If you think this code sucks, don't use it. You're already applying
this to your choice of operating system! <tt>:-)</tt></p>
<h2>Versions</h2>
<dl compact>
<dt><strong>1.1 (April 18, 1998)</strong></dt>
<dd>Changes include:
<ul>
<li>Extract option (<b>x</b>) will preserve a file's mode bits
when overwriting an existing file (this may go away if it's
not POSIX behaviour).</li>
<li>Extracted files will now have the proper file type.</li>
<li>Removed attempt to use <i>umask()</i> to set newly created
archive's mode bits; apparently, I'm not sure how it
works and my POSIX manual isn't helping.</li>
<li>Should be 100% endian-neutral now; using this on BeOS for
x86 is only useful if you're manipulating <em>PowerPC</em>
objects though. The <tt>ar</tt> in
<a href="http://www.ninemoons.com/GG/index.html">GeekGadgets</a>
should work fine for x86 objects/libraries.</li>
<li>Updated the <tt>README.txt</tt> file; now it's got useful
information about building/using the POSIX ar.</li>
</ul></dd>
<dt><strong>1.0 (January 13, 1998)</strong></dt>
<dd>Initial release.</dd>
</dl>
<hr>
<p>Chris Herborth (<a href="mailto:chrish@qnx.com">chrish@qnx.com</a>)</p>
<!-- hhmts start -->
Last modified: $Date$
<!-- hhmts end -->
</body> </html>