<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>serial library function issues</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/20656/serial-library-function-issues</link><description> 
1. The manual pages for strcpy() and strcat() state they append a
\0 to the desitnation string, but they do not appear to do this. 

 
(several serial functions do not - most of those manual pages do
not warn you of this so you need to pay attention</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: serial library function issues</title><link>https://community.arm.com/thread/87924?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2006 18:14:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:73f8c9cc-7dc4-49f1-bd7a-53902e834153</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
The manual does, in fact, say:&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;The &amp;#39;strcpy&amp;#39; function copies &amp;#39;src&amp;#39; to &amp;#39;dst&amp;#39; and appends a null
character to the end of &amp;#39;dst&amp;#39;.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
ISO/IEC 9899:1990 specifies strcpy thus:&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;&amp;quot;The &amp;#39;strcpy&amp;#39; function copies the string pointed to by &amp;#39;src&amp;#39;
(including the terminating null character) into the array pointed to
by &amp;#39;dst&amp;#39;&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Which is not quite the same thing!&lt;/p&gt;

&lt;p&gt;
Of course, if the &amp;#39;src&amp;#39; string is missing its NUL terminator,
anything could happen...!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: serial library function issues</title><link>https://community.arm.com/thread/46813?ContentTypeID=1</link><pubDate>Thu, 14 Sep 2006 16:54:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:6047c391-51cf-421c-b0d4-874b36e88c56</guid><dc:creator>HansBernhard Broeker</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;The manual pages for strcpy() and strcat() state they append a
\0 to the desitnation string, but they do not appear to do
this.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
... and you made this (almost certainly incorrect) discovery:
how?&lt;/p&gt;

&lt;p&gt;
&lt;i&gt;When I customize _getkey() and putchar() the library functions
that call these work but I get strange results&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Then, much more probably than any other reason, your customization
contains a bug. And since you decided to just accuse, without showing
any useful details, nobody can help you fix that.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>