Mozilla/5.0 (X11; Linux x86_64; rv:10.0.4) Gecko/20120510 Icedove/10.0.4
> Jim Meyering wrote, On 02/13/2013 12:05 PM:
>> [...] but please change the name of that
>> new header file. First, we use hyphens (not underscores) in file names.
>> Did you consider any names that evoke "key spec parsing"?
>> Then, the name would still be apropos if someday it's used by a program
>> other than sort and uniq.
>
> What would be the recommended way to compartmentalize this functionality?
> 1. put it in "src/key-spec-parsing.h", and have each program (e.g. uniq.c) do
> "#include" ?
> or
> 2. split it into "src/key-spec-parsing.h" and "src/key-spec-parsing.c" (with
> all the "src/local.mk" associated changes) - but removing the "static" from
> all the variables/functions?
>
> or something else?
I'm leaning towards option #1 (just a header file) - this will allow to
include/remove functionality using "#ifdefs" (e.g. uniq doesn't need to support
random/reverse/human/version key comparisons, and in the far future - perhaps
'join' will use it and wouldn't need them).
"src/system.h" is already used in the same fashion (and has 'static'
functions), although it's much smaller in scope.
Thoughts?
-gordon