Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #171333

Re: Commandline parsing

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: Commandline parsing
Date 2023-07-27 02:47 -0700
Organization None to speak of
Message-ID <874jlpptx8.fsf@nosuchdomain.example.com> (permalink)
References <a631f98c-5482-4e90-9a0d-8ce49e447153n@googlegroups.com> <u9t864$1r0ra$1@bluemanedhawk.eternal-september.org>

Show all headers | View raw


Blue-Maned_Hawk <bluemanedhawk@gmail.com> writes:
> On 7/26/23 11:34, Malcolm McLean wrote:
>> Just realised that my options parser isn't publically available,
>> which I have just remedied.  What approaches do people use towards
>> parsing commandline options ?  Do you use getopt() ? Or do you find
>> that real world programs have a simple enough set of options that
>> it's easier to write bespoke code?
>
> ​I've only written one program where i had to deal with command-line
> options, and when that happened i just used getopt().  That being
> said, were i to write any more programs like that i don't think i'd
> use it, in part because i think that the paradigm of the option is
> wantonly applied to every program without consideration for whether
> it's most optimal because it's just what everyone is used to.

What is your alternative to "the paradigm of the option"?

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Commandline parsing Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-26 08:34 -0700
  Re: Commandline parsing Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2023-07-26 15:38 +0000
  Re: Commandline parsing scott@slp53.sl.home (Scott Lurndal) - 2023-07-26 16:00 +0000
  Re: Commandline parsing Spiros Bousbouras <spibou@gmail.com> - 2023-07-26 16:17 +0000
  Re: Commandline parsing gazelle@shell.xmission.com (Kenny McCormack) - 2023-07-26 16:22 +0000
    Re: Commandline parsing Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-26 09:26 -0700
  Re: Commandline parsing Lynn McGuire <lynnmcguire5@gmail.com> - 2023-07-26 17:28 -0500
    Re: Commandline parsing Lynn McGuire <lynnmcguire5@gmail.com> - 2023-07-26 17:44 -0500
      Re: Commandline parsing Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-27 01:46 -0700
        Re: Commandline parsing Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-07-27 02:47 -0700
          Re: Commandline parsing Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-27 03:12 -0700
    Re: Commandline parsing Kaz Kylheku <864-117-4973@kylheku.com> - 2023-07-27 00:32 +0000
    Re: Commandline parsing Spiros Bousbouras <spibou@gmail.com> - 2023-07-27 16:17 +0000
  Re: Commandline parsing Blue-Maned_Hawk <bluemanedhawk@gmail.com> - 2023-07-27 04:00 -0400
    Re: Commandline parsing Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-27 01:39 -0700
    Re: Commandline parsing Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-07-27 02:47 -0700
      Re: Commandline parsing Kaz Kylheku <864-117-4973@kylheku.com> - 2023-07-27 17:29 +0000
  Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 08:28 -0700
    Re: Commandline parsing scott@slp53.sl.home (Scott Lurndal) - 2023-07-31 16:32 +0000
      Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 09:43 -0700
    Re: Commandline parsing Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2023-07-31 09:46 -0700
      Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 10:12 -0700
        Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 11:21 -0700
          Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 12:37 -0700
            Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 12:57 -0700
              Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 13:17 -0700
            Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-08-01 08:39 -0700
            Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-08-01 09:00 -0700
              Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-08-01 10:49 -0700
      Re: Commandline parsing fir <profesor.fir@gmail.com> - 2023-07-31 11:53 -0700
  Re: Commandline parsing Michael S <already5chosen@yahoo.com> - 2023-07-31 12:47 -0700
  Re: Commandline parsing Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2023-08-02 16:30 -0600

csiph-web