This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/2] New strfrom functions



On 08/23/2016 12:58 PM, Joseph Myers wrote:
> The argument for not having those extra functions, just the three standard 
> ones, is that the strfrom API is deliberately designed to be minimal.  It 
> doesn't include any of the flags that are available with snprintf, or the 
> option to specify field width, or the option to use '*' for precision.  
> That is, the idea of the API is: the floating-point aspects of the 
> conversions are tricky and specialized, especially when you want correctly 
> rounded results, but once you've got a result rounded to the correct 
> number of digits, everything else is just routine string manipulation from 
> there.  Converting a narrow string to a wide one is certainly easy, so in 
> line with that principle you don't need the wcs* functions (and avoiding 
> them avoids questions about whether the API follows snprintf or swprintf).  
> And we've said before for some suggestions of *_l functions that we don't 
> need *_l versions of all functions because for ones where it's likely to 
> be less useful it's OK to expect users to use uselocale to set the 
> thread-locale locale before calling a function.

Should we also avoid adding wcsfromfN* functions for the same reasons too?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]