On Sat, Dec 17, 2016 at 3:27 PM, Bruno Haible <br...@clisp.org> wrote: > Followup to this discussion from October 2016: > > Jim: >> > I did not mean to imply by that message that we should eliminate every >> > use of the program_name module. My desire is more to avoid accidental >> > use of it when the getprogname module would be more appropriate. > > Bruno: >> Fully agree on this. >> >> The way I currently see it, the two modules serve different purposes >> and it's easy to decide which one to use in which case: >> >> * In a program's main() function, and associated usage() and help() >> functions, use set_program_name and program_name. >> >> Rationale: This provides the full name of the executable, and discards >> the "lt-" prefix. >> >> * In library code, or more generally any code that is not near the >> main() function, use getprogname(). >> >> Rationale: This makes it possible to put this library code under LGPL >> and avoid the many linker errors to 'program_name' that people have >> been seeing. > > In consequence, I'm editing NEWS accordingly. > > > 2016-12-17 Bruno Haible <br...@clisp.org> > > Un-deprecate the 'getprogname' module. > * NEWS: Describe the appropriate use-cases of 'progname' versus > 'getprogname'. Based on discussion summary at > http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00105.html > > diff --git a/NEWS b/NEWS > index 07ca87e..fbbf6f2 100644 > --- a/NEWS > +++ b/NEWS > @@ -3,6 +3,16 @@ Important general notes > > Date Modules Changes > > +2016-09-05 progname There is now an alternate module 'getprogname'. > It > + defines a getprogname() function; use it to > obtain > + the name of the current program. > + Recommended use: > + - In a program's main() function, and associated > + usage() and help() functions, use 'progname'. > + - In library code, or more generally any code > that > + is not near the main() function, use > + 'getprogname'. > +
Looks good. Thank you, Bruno.