
memmove
7-39
Run-Time-Support Functions
Memory Compare
memcmp
Syntax
#include <string.h>
int
memcmp
(const void *cs, const void *ct, size_t n);
Defined in
memcmp.c in rts.src
Description
The memcmp function compares the first n characters of the object that ct
points to with the object that cs points to. The function returns one of the follow-
ing values:
< 0
if *cs is less than *ct
0
if *cs is equal to *ct
> 0
if *cs is greater than *ct
The memcmp function is similar to strncmp, except that the objects that
memcmp compares can contain values of 0. The memcmp function is
expanded inline when the
−
x option is used.
Memory Block Copy — Nonoverlapping
memcpy
Syntax
#include <string.h>
void *
memcpy
(void *s1, const void *s2, size_t n);
Defined in
memcpy.c in rts.src
Description
The memcpy function copies
n characters from the object that s2 points to into
the object that s1 points to. If you attempt to copy characters of overlapping
objects, the function’s behavior is undefined. The function returns the value
of s1.
The memcpy function is similar to strncpy, except that the objects that memcpy
copies can contain values of 0. The memcpy function is expanded inline when
the
−
x option is used.
Memory Block Copy — Overlapping
memmove
Syntax
#include <string.h>
void *
memmove
(void *s1, const void *s2, size_t n);
Defined in
memmove.c in rts.src
Description
The memmove function moves n characters from the object that s2 points to
into the object that s1 points to; the function returns the value of s1. The
memmove function correctly copies characters between overlapping objects.
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...