This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: is it kosher to use strcasecmp()
- To: "Chris G. Demetriou" <cgd at sibyte dot com>
- Subject: Re: is it kosher to use strcasecmp()
- From: Michael Meissner <meissner at cygnus dot com>
- Date: Wed, 11 Oct 2000 21:13:39 -0400
- Cc: binutils at sourceware dot cygnus dot com
- References: <5t66mzj6fc.fsf@highland.sibyte.com>
On Wed, Oct 11, 2000 at 04:37:27PM -0700, Chris G. Demetriou wrote:
> Is it kosher to use strcasecmp() to compare command line arguments
> with a table of strings?
>
> I ask because i'm gutting the MIPS cpu/ISA command line selection crud
> -- and wow is it crud -- in gas, and being able to use strcasecmp()
> would cut down my table by more than half.
>
> (It's in libiberty and OK for at least internal use -- just wanted to
> be sure it was OK for case-insensitive command line handling.)
Yes, you can use it in bfd/binutils/gas/ld. Gas/{expr,read}.c already use it.
--
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work: meissner@redhat.com phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org fax: +1 978-692-4482