<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 11.00.9600.19431"></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=940382713-20022020>Good to know!&nbsp;&nbsp;&nbsp; I think I'll just stick 
to snprintf,all the same.&nbsp; :-)</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=940382713-20022020></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT color=#0000ff size=2 face=Arial><SPAN 
class=940382713-20022020>Mike</SPAN></FONT></DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV lang=en-us class=OutlookMessageHeader dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> cfp-interest-bounces@oakapple.net 
  [mailto:cfp-interest-bounces@oakapple.net] <B>On Behalf Of </B>Rajan 
  Bhakta<BR><B>Sent:</B> 20 February 2020 02:05<BR><B>To:</B> 
  CFP<BR><B>Subject:</B> [Cfp-interest 1507] Fw: Re: Question about strfromd in 
  glibc<BR></FONT><BR></DIV>
  <DIV></DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: sans-serif">So it seems 
  glibc does do the right thing (null terminate) and the web page was 
  wrong.</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><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #800080">----- 
  Forwarded by Rajan Bhakta/Houston/IBM on 02/19/2020 08:04 PM 
  -----</SPAN><BR><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">From: &nbsp; 
  &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">Joseph Myers 
  &lt;joseph@codesourcery.com&gt;</SPAN><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">To: &nbsp; 
  &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">Rajan Bhakta 
  &lt;rbhakta@us.ibm.com&gt;</SPAN><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">Date: &nbsp; 
  &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">02/19/2020 04:20 
  PM</SPAN><BR><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif; COLOR: #5f5f5f">Subject: 
  &nbsp; &nbsp; &nbsp; &nbsp;</SPAN><SPAN 
  style="FONT-SIZE: 9pt; FONT-FAMILY: sans-serif">[EXTERNAL] Re: Question about 
  strfromd in glibc</SPAN><BR>
  <HR noShade>
  <BR><BR><BR><TT><SPAN style="FONT-SIZE: 10pt">On Wed, 19 Feb 2020, Rajan 
  Bhakta wrote:<BR><BR>&gt; Hi Joseph,<BR>&gt; <BR>&gt; Looking at 
  </SPAN></TT><A 
  href="http://man7.org/linux/man-pages/man3/strfromd.3.html"><TT><SPAN 
  style="FONT-SIZE: 10pt">http://man7.org/linux/man-pages/man3/strfromd.3.html</SPAN></TT></A><TT><SPAN 
  style="FONT-SIZE: 10pt">, it seems <BR>&gt; to say you could end up with 
  strings that are not null terminated. But <BR>&gt; from the C standard draft 
  (N2454 for example) it says that the strings are <BR>&gt; always null 
  terminated and only that you may get incomplete (truncation <BR>&gt; from the 
  right) if 'n' is too small (yet still null terminated). Was this <BR>&gt; an 
  intentional decision or am I understanding the documentation wrong?<BR><BR>The 
  strfrom functions are equivalent to particular calls to snprintf, so <BR>they 
  should always null-terminate their output (when a nonzero size is 
  <BR>specified). &nbsp;The manpages are not official glibc 
  documentation.<BR><BR>-- <BR>Joseph S. 
  Myers<BR>joseph@codesourcery.com<BR><BR></SPAN></TT><BR><BR></BLOCKQUOTE></BODY></HTML>