[PATCH wayland v2 2/3] scanner: add a new --include-core-only option

Bill Spitzak spitzak at gmail.com
Thu Apr 30 10:47:34 PDT 2015



On 04/30/2015 03:33 AM, Pekka Paalanen wrote:
> On Wed, 29 Apr 2015 09:17:33 -0700
> Bill Spitzak <spitzak at gmail.com> wrote:
>
>> On 04/29/2015 03:10 AM, Pekka Paalanen wrote:
>>
>>> Weston had a good reason to not use getopt() I believe: each module
>>> parses its own arguments in turn, so command line options are parsed in
>>> several passes, and an unknown option is an error only when all modules
>>> have had a go.
>>
>> The client programs are also using the wayland option parser, so it
>> would be consistent.
>
> Those are in Weston though. This is Wayland.

Good point, it probably should not call weston's opt parser. I would 
just scan argv for the switches.

>> Depending on getopt is probably not a great idea. It is not a trivial
>> thing and would be like depending on glib.
>
> Depending on the standard C library is not a good idea?! WTH?

Yes when it requires more code to use it than to write a replacement 
directly, and that code is more difficult to understand.


More information about the wayland-devel mailing list