Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!mordor!sri-spam!sri-unix!garth!walter From: walter@garth.UUCP (Walter Bays) Newsgroups: comp.lang.c Subject: Re: command line options Message-ID: <579@garth.UUCP> Date: 28 Mar 88 21:48:49 GMT References: <2414@zyx.UUCP> Reply-To: walter@garth.UUCP (Walter Bays) Organization: INTERGRAPH (APD) -- Palo Alto, CA Lines: 28 In article <2414@zyx.UUCP> aj@zyx.SE (Arndt Jonasson) writes: >This is a suggestion for a command line parsing routine for C programs >in Unix. [...] >Recently, I invented a parsing routine of my own that doesn't require >the program logic to be supplied by the application programmer. [...] >If it seems to be generally useful, I will post the code to comp.unix.sources. >An example program that exhibits nearly all the features [followed] Sounds great to me. Thanks, I'd love to have a copy. A higher level routine than getopt() would induce lazy programmers like me to do it right. (It's only for my own use, getopt is too much trouble, and I'll never forget the argument order, right? :-) Some will say it should work like getopt(): "-AB" equals "-A -B". Others will argue for multiple character options: "-132 -postscript". SysV doesn't follow the SysV standard yet. I would like some standard, so I'm for following the Posix standard (whatever that is)? Please resist suggestions to add semantic checking routines (i.e. range of numbers, existence of files) which belong in the application program. I'd rather code such things directly rather than pass pointers to functions. -- ------------------------------------------------------------------------------ Any similarities between my opinions and those of the person who signs my paychecks is purely coincidental. E-Mail route: ...!pyramid!garth!walter USPS: Intergraph APD, 2400 Geng Road, Palo Alto, California 94303 Phone: (415) 852-2384 ------------------------------------------------------------------------------