[Cfp-interest 1497] Re: AI item to submit proposal about why no wide string strfrom functions
Rajan Bhakta
rbhakta at us.ibm.com
Wed Feb 19 10:15:49 PST 2020
Hi Mike,
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.
Regards,
Rajan Bhakta
z/OS XL C/C++ Compiler Technical Architect
ISO C Standards Representative for Canada, PL22.11 Chair (USA)
C Compiler Development
Contact: rbhakta at us.ibm.com, Rajan Bhakta/Houston/IBM
From: "Mike Cowlishaw" <mfc at speleotrove.com>
To: "'CFP'" <cfp-interest at ucbtest.org>
Date: 02/19/2020 11:49 AM
Subject: [EXTERNAL] [Cfp-interest 1496] Re: AI item to submit
proposal about why no wide string strfrom functions
Sent by: cfp-interest-bounces at oakapple.net
Hmm, given the uncertainty about
int nc = strfromd(s, n, “%g”, d);
... perhaps just change that line to use snprintf, which has 'well-known'
behaviour?
Mike
From: cfp-interest-bounces at oakapple.net [
mailto:cfp-interest-bounces at oakapple.net] On Behalf Of Jim Thomas
Sent: 05 February 2020 20:11
To: Damian McGuckin
Cc: CFP
Subject: [Cfp-interest 1468] Re: AI item to submit proposal about why no
wide string strfrom functions
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
_______________________________________________
Cfp-interest mailing list
Cfp-interest at oakapple.net
https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.oakapple.net_mailman_listinfo_cfp-2Dinterest&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=MPb4GyWs7nd-w3OlFPs29W1dB3gHMdsdghhjcQMf428&m=5-fTCLfU4uRT8NDletLWloDSBk-_toC4vpRUjnfvUOU&s=Z3nw987Bs6xgN7eVP2VGpPeGjVVZYmw8jOXHh7GdNFg&e=
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20200219/cf550441/attachment.html
More information about the Cfp-interest
mailing list