From owner-freebsd-hackers@FreeBSD.ORG Mon Sep 27 04:33:20 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B33106564A; Mon, 27 Sep 2010 04:33:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2E38FC18; Mon, 27 Sep 2010 04:33:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o8R4SrRw067878; Sun, 26 Sep 2010 22:28:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 26 Sep 2010 22:29:03 -0600 (MDT) Message-Id: <20100926.222903.886429907165706116.imp@bsdimp.com> To: arundel@freebsd.org From: "M. Warner Losh" In-Reply-To: <20100927012936.GA32352@freebsd.org> References: <20100927012936.GA32352@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: adding a new lib for more advanced argument parsing X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 04:33:20 -0000 In message: <20100927012936.GA32352@freebsd.org> Alexander Best writes: : hi there, : : looking at applications such as geom (g_*), camcontrol, etc. makes one realise : that getopt(3) is clearly not suitable for handling such complex options. : camcontrol.c even contains a whole paragraph about why getopt(3) is considered : not appropriate to handle camcontrol's argument parsing requirements (that was : 1998!). : : why not do a vendor import of popt 1.16 e.g.? are there license restrictions? : or maybe some other lib... popt has an X11 license, which isn't a big deal. However, it depends on gettext, which is pure GPL. Also, POSIX has a lot to say about command line parsing, and popt doesn't quite match what POSIX has to say... Warner