bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnulib and *printf


From: Joel E. Denny
Subject: Re: gnulib and *printf
Date: Sun, 11 Oct 2009 18:52:42 -0400 (EDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Sun, 11 Oct 2009, Bruno Haible wrote:

> > I use snprintf like this:
> > 
> >   field_width = snprintf (NULL, 0, " %d", max_value);
> > 
> > Later I use field_width for a "%*d" conversion on all rows of the table.  
> > I don't have much experience with mbswidth, but I don't think it can be 
> > useful here.
> 
> Indeed, in your case it is de facto guaranteed that all table cells will be
> ASCII strings, so that strlen and mbswidth return the same value.

Thanks for confirming.

> A certain number of gnulib users want to get the functionality they need,
> and not more. If gnulib copies into their module code that they deem not
> necessary - and for which we cannot explain the necessity - they start
> using words like "bloat" or "creeping dependencies".

"all-" as a module name prefix should be a red flag for them.  They should 
use the individual printf modules instead.

> The harm that a module with too many dependencies does is that it does not
> increase gnulib's reputation with people who think this.

Ok.  Thanks for explaining.

> But if the project does not use the function? For example, the latest addition
> to the list of *printf functions was 'dprintf'. gnulib added support for this.
> But if your project does not use dprintf(), then you don't have to add it.
> Therefore tracking the list of all *printf functions is normally not useful.

I was hoping to automatically track them all (well, gnulib maintainers 
would really do it) instead of manually tracking just the ones I need.  
But if bloat is a big problem and if -DGNULIB_POSIXCHECK automates 
tracking enough so that the only manual effort remaining is reading the 
diagnostics and copy and paste, then maybe all-printf* is not so 
worthwhile.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]