[Cfp-interest 1469] Re: AI item to submit proposal about why no wide string strfrom functions

Jim Thomas jaswthomas at sbcglobal.net
Wed Feb 5 12:10:54 PST 2020


Here’s an update for the code segment:

#include <stdlib.h>

const size_t n = 20;

double d;

…

// convert d to single-byte character string s

char s[n];

int nc = strfromd(s, n, “%g”, d);

// convert s (regarded as a multi-byte character

// string) to wide string ws

wchar_t ws[n];

(void)mbstowcs(ws, s, n);


> On Feb 5, 2020, at 9:55 AM, Jim Thomas <jaswthomas at sbcglobal.net> wrote:
> 
> Probably so. the other code examples in the C standard include all the declarations. Update to follow.
> 
> - Jim
> 
>> On Feb 4, 2020, at 4:04 PM, Damian McGuckin <damianm at esi.com.au> wrote:
>> 
>> On Tue, 4 Feb 2020, Jim Thomas wrote:
>> 
>>> Action item:
>>>         Jim: Get a WG14 document number and submit
>>>     C2x_proposal_-_why_no_wide_string_strfrom_functions-
>>>     20191230.pdf.
>>> The following was submitted to WG14:
>>> http://wiki.edg.com/pub/CFP/WebHome/n2475.pdf
>> 
>> Do you need a declaration for the wide string 'ws' in that code at the end?
>> 
>> Regards - Damian
>> 
>> Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
>> Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
>> Views & opinions here are mine and not those of any past or present employer
> 
> 
> _______________________________________________
> Cfp-interest mailing list
> Cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20200205/797f58c2/attachment-0003.html 


More information about the Cfp-interest mailing list