mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Updated the function reference document.
* Fixed the description of strncpy(). * Added some [commented out] function names to the lists for some headers.
This commit is contained in:
parent
0c08b62630
commit
b4f4c3bb4d
@ -3,7 +3,7 @@
|
|||||||
<article>
|
<article>
|
||||||
<title>cc65 function reference
|
<title>cc65 function reference
|
||||||
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
<author><url url="mailto:uz@cc65.org" name="Ullrich von Bassewitz">
|
||||||
<date>2014-05-22
|
<date>2014-05-26
|
||||||
|
|
||||||
<abstract>
|
<abstract>
|
||||||
cc65 is a C compiler for 6502 based systems. This function reference describes
|
cc65 is a C compiler for 6502 based systems. This function reference describes
|
||||||
@ -115,8 +115,16 @@ function.
|
|||||||
<itemize>
|
<itemize>
|
||||||
<item><ref id="atmos_load" name="atmos_load">
|
<item><ref id="atmos_load" name="atmos_load">
|
||||||
<item><ref id="atmos_save" name="atmos_save">
|
<item><ref id="atmos_save" name="atmos_save">
|
||||||
|
<!-- <item><ref id="atmos_explode" name="atmos_explode"> -->
|
||||||
|
<!-- <item><ref id="atmos_ping" name="atmos_ping"> -->
|
||||||
|
<!-- <item><ref id="atmos_shoot" name="atmos_shoot"> -->
|
||||||
|
<!-- <item><ref id="atmos_tick" name="atmos_tick"> -->
|
||||||
|
<!-- <item><ref id="atmos_tock" name="atmos_tock"> -->
|
||||||
|
<!-- <item><ref id="atmos_zap" name="atmos_zap"> -->
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
|
(incomplete)
|
||||||
|
|
||||||
|
|
||||||
<sect1><tt/c128.h/<label id="c128.h"><p>
|
<sect1><tt/c128.h/<label id="c128.h"><p>
|
||||||
|
|
||||||
@ -170,6 +178,7 @@ function.
|
|||||||
<!-- <item><ref id="cbm_readdir" name="cbm_readdir"> -->
|
<!-- <item><ref id="cbm_readdir" name="cbm_readdir"> -->
|
||||||
<!-- <item><ref id="cbm_save" name="cbm_save"> -->
|
<!-- <item><ref id="cbm_save" name="cbm_save"> -->
|
||||||
<!-- <item><ref id="cbm_write" name="cbm_write"> -->
|
<!-- <item><ref id="cbm_write" name="cbm_write"> -->
|
||||||
|
<!-- <item><ref id="get_tv" name="get_tv"> -->
|
||||||
</itemize>
|
</itemize>
|
||||||
|
|
||||||
(incomplete)
|
(incomplete)
|
||||||
@ -5936,21 +5945,23 @@ be used in presence of a prototype.
|
|||||||
<descrip>
|
<descrip>
|
||||||
<tag/Function/Copy part of a string.
|
<tag/Function/Copy part of a string.
|
||||||
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
<tag/Header/<tt/<ref id="string.h" name="string.h">/
|
||||||
<tag/Declaration/<tt/char* __fastcall__ strcpy (char* s1, const char* s2, size_t n);/
|
<tag/Declaration/<tt/char* __fastcall__ strncpy (char* s1, const char* s2, size_t n);/
|
||||||
<tag/Description/The <tt/strncpy/ function copies not more than n bytes from
|
<tag/Description/The <tt/strncpy/ function copies not more than <tt/n/ bytes from
|
||||||
the array pointed to by <tt/s2/ to the array pointed to by <tt/s1/. If the array
|
the array pointed to by <tt/s2/ to the array pointed to by <tt/s1/. If the array
|
||||||
pointed to by <tt/s2/ is a string that is shorter than n bytes, null bytes are
|
pointed to by <tt/s2/ is a string that is shorter than <tt/n/ bytes, null bytes are
|
||||||
appended to the copy in the array pointed to by <tt/s1/, until <tt/n/ bytes are
|
appended to the copy in the array pointed to by <tt/s1/, until <tt/n/ bytes are
|
||||||
written. The function will always return <tt/s1/.
|
written. The function always will return <tt/s1/.
|
||||||
<tag/Limits/<itemize>
|
<tag/Limits/<itemize>
|
||||||
<item>The function is only available as fastcall function, so it may only
|
<item>The function is available only as a fastcall function; so, it may be used
|
||||||
be used in presence of a prototype. If there is no null byte in the first <tt/n/
|
only in the presence of a prototype.
|
||||||
bytes of the array pointed to by <tt/s2/, the result is not null-terminated.
|
<item>If there is no null byte in the first <tt/n/ bytes of the array pointed
|
||||||
|
to by <tt/s2/, the result is <em/not/ null-terminated!
|
||||||
<item>If copying takes place between objects that overlap, the behaviour is
|
<item>If copying takes place between objects that overlap, the behaviour is
|
||||||
undefined.
|
undefined.
|
||||||
</itemize>
|
</itemize>
|
||||||
<tag/Availability/ISO 9899
|
<tag/Availability/ISO 9899
|
||||||
<tag/See also/
|
<tag/See also/
|
||||||
|
<ref id="memcpy" name="memcpy">,
|
||||||
<ref id="strcat" name="strcat">,
|
<ref id="strcat" name="strcat">,
|
||||||
<ref id="strcpy" name="strcpy">,
|
<ref id="strcpy" name="strcpy">,
|
||||||
<ref id="strncat" name="strncat">
|
<ref id="strncat" name="strncat">
|
||||||
@ -5960,8 +5971,7 @@ undefined.
|
|||||||
|
|
||||||
static char hello[6];
|
static char hello[6];
|
||||||
|
|
||||||
strcpy (hello, "Hello world!\n", sizeof (hello) - 1);
|
strncpy (hello, "Hello world!\n", sizeof hello - 1)[5] = '\0';
|
||||||
hello[5] = '\0';
|
|
||||||
</verb>
|
</verb>
|
||||||
</descrip>
|
</descrip>
|
||||||
</quote>
|
</quote>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user