<span style=" font-size:10pt;font-family:sans-serif">Hi Mike,</span><br><br><span style=" font-size:10pt;font-family:sans-serif">I think the point
of the example was explicitly to say why we don't have wide strfromd functions,
so it really makes sense to keep strfromd there.</span><br><br><span style=" font-size:10pt;font-family:sans-serif">Regards,<br><br>Rajan Bhakta<br>z/OS XL C/C++ Compiler Technical Architect<br>ISO C Standards Representative for Canada, PL22.11 Chair (USA)<br>C Compiler Development<br>Contact: rbhakta@us.ibm.com, Rajan Bhakta/Houston/IBM</span><br><br><br><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">From:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=" font-size:9pt;font-family:sans-serif">&quot;Mike
Cowlishaw&quot; &lt;mfc@speleotrove.com&gt;</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">To:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=" font-size:9pt;font-family:sans-serif">&quot;'CFP'&quot;
&lt;cfp-interest@ucbtest.org&gt;</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Date:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=" font-size:9pt;font-family:sans-serif">02/19/2020
11:49 AM</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Subject:
&nbsp; &nbsp; &nbsp; &nbsp;</span><span style=" font-size:9pt;font-family:sans-serif">[EXTERNAL]
[Cfp-interest 1496] Re: AI item to submit proposal about why no &nbsp;
&nbsp; &nbsp; &nbsp;wide string strfrom functions</span><br><span style=" font-size:9pt;color:#5f5f5f;font-family:sans-serif">Sent
by: &nbsp; &nbsp; &nbsp; &nbsp;</span><span style=" font-size:9pt;font-family:sans-serif">cfp-interest-bounces@oakapple.net</span><br><hr noshade><br><br><br><span style=" font-size:10pt;color:blue;font-family:Arial">Hmm, given
the uncertainty about </span><br><span style=" font-size:10pt;color:blue;font-family:Courier New"><b>int
nc = strfromd(s, n, “%g”, d);</b></span><br><span style=" font-size:10pt;color:blue;font-family:Arial">... perhaps
just change that line to use </span><span style=" font-size:10pt;color:blue;font-family:Courier New"><b>snprintf</b></span><span style=" font-size:10pt;color:blue;font-family:Arial">,
which has 'well-known' behaviour?</span><br><span style=" font-size:10pt;color:blue;font-family:Arial">Mike</span><br><span style=" font-size:12pt">&nbsp;</span><br><br><hr><span style=" font-size:10pt;font-family:Tahoma"><b>From:</b> cfp-interest-bounces@oakapple.net
[</span><a href="mailto:cfp-interest-bounces@oakapple.net"><span style=" font-size:10pt;font-family:Tahoma">mailto:cfp-interest-bounces@oakapple.net</span></a><span style=" font-size:10pt;font-family:Tahoma">]
<b>On Behalf Of </b>Jim Thomas<b><br>Sent:</b> 05 February 2020 20:11<b><br>To:</b> Damian McGuckin<b><br>Cc:</b> CFP<b><br>Subject:</b> [Cfp-interest 1468] Re: AI item to submit proposal about why
no wide string strfrom functions</span><span style=" font-size:12pt"><br></span><br><span style=" font-size:12pt">Here’s an update for the code segment:
</span><br><br><span style=" font-size:12pt;font-family:Courier New"><b>#include &lt;stdlib.h&gt;</b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>const size_t
n = 20;</b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>double d;</b></span><br><span style=" font-size:12pt">…</span><br><span style=" font-size:12pt;font-family:Courier New"><b>// convert
d to single-byte character string s</b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>char s[n];</b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>int nc = strfromd(s,
n, “%g”, d);</b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>// convert
s (regarded as a multi-byte character </b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>// string)
to wide string ws</b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>wchar_t ws[n];</b></span><br><span style=" font-size:12pt;font-family:Courier New"><b>(void)mbstowcs(ws,
s, n);</b></span><br><br><span style=" font-size:12pt">On Feb 5, 2020, at 9:55 AM, Jim Thomas
&lt;</span><a href="mailto:jaswthomas@sbcglobal.net"><span style=" font-size:12pt;color:blue"><u>jaswthomas@sbcglobal.net</u></span></a><span style=" font-size:12pt">&gt;
wrote:</span><br><br><span style=" font-size:12pt">Probably so. the other code examples
in the C standard include all the declarations. Update to follow.<br><br>- Jim<br></span><br><span style=" font-size:12pt">On Feb 4, 2020, at 4:04 PM, Damian McGuckin
&lt;</span><a href="mailto:damianm@esi.com.au"><span style=" font-size:12pt;color:blue"><u>damianm@esi.com.au</u></span></a><span style=" font-size:12pt">&gt;
wrote:<br><br>On Tue, 4 Feb 2020, Jim Thomas wrote:<br></span><br><span style=" font-size:12pt">Action item:<br> &nbsp; &nbsp; &nbsp; &nbsp;Jim: Get a WG14 document number and submit<br> &nbsp; &nbsp;C2x_proposal_-_why_no_wide_string_strfrom_functions-<br> &nbsp; &nbsp;20191230.pdf.<br>The following was submitted to WG14:</span><span style=" font-size:12pt;color:blue"><u><br></u></span><a href="http://wiki.edg.com/pub/CFP/WebHome/n2475.pdf"><span style=" font-size:12pt;color:blue"><u>http://wiki.edg.com/pub/CFP/WebHome/n2475.pdf</u></span></a><br><span style=" font-size:12pt"><br>Do you need a declaration for the wide string 'ws' in that code at the
end?<br><br>Regards - Damian<br><br>Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW
2037<br>Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted
here<br>Views &amp; opinions here are mine and not those of any past or present
employer</span><br><span style=" font-size:12pt"><br><br>_______________________________________________<br>Cfp-interest mailing list</span><span style=" font-size:12pt;color:blue"><u><br></u></span><a href="mailto:Cfp-interest@oakapple.net"><span style=" font-size:12pt;color:blue"><u>Cfp-interest@oakapple.net</u></span></a><span style=" font-size:12pt"><br></span><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest"><span style=" font-size:12pt">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</span></a><br><tt><span style=" font-size:10pt">_______________________________________________<br>Cfp-interest mailing list<br>Cfp-interest@oakapple.net<br></span></tt><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest"><tt><span style=" font-size:10pt">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</span></tt></a><tt><span style=" font-size:10pt"><br></span></tt><br><br><BR>