Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Aug 1995 19:45:52 -0500
From:      Peter da Silva <peter@bonkers.taronga.com>
To:        thomas@ghpc8.ihf.rwth-aachen.de
Cc:        hackers@freebsd.org
Subject:   Re: parsing the command line (was: Kernel configuration/compilation tool)
Message-ID:  <199508130045.TAA10525@bonkers.taronga.com>
In-Reply-To: <199508020905.LAA17379@ghpc6.ihf.rwth-aachen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
>Just a quick note:  Brad Appleton's `libcommand' is really called
>`libcmdline' (sorry, memory error), and I'll look into this
>parseargs lib (from comp.sources.misc, by Eric Allman, mods by Peter
>da Silva and Brad Appleton).  On a first glance this looks very
>similar to libcmdline, just in C and a bit older (latest file date
>on the server where I found it is June '92).

The history is basically this.

	Eric Allman published Parseargs, and I looked at it and
said "wow, this is totally cool". It had some gross code (like using
foo(fmt, a, b, c, d, e, f, g)... sprintf(s, foo, a, b, c, d, e, f, g)
for varargs :-P ) but was really nice... for UNIX.

	I needed to support the same code on Amiga, MS-DOS, and UNIX.

	I added some stuff to Parseargs to handle multiple O/S command line
arguments, and used it pretty heavily. I then posted it back as an update
to Allman's work. Brad Appleton grabbed it and had the same reaction and
did the VMS updates, then kinda went crazy with extensions until it was
too complex for Allman's original structure. He then wrote his new interface.
I kept on using parseargs.

	It's pretty cool. Makes a command line that conforms to POSIX
pretty mindless. As it stands it's almost compatible with GNU interface,
but uses "+" instead of "--" for keyword-args.

	I hadn't thought of it for a while, but I think it covers most of
what you need...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199508130045.TAA10525>