![Texas Instruments TMS320C2x User Manual Download Page 177](http://html1.mh-extra.com/html/texas-instruments/tms320c2x/tms320c2x_user-manual_1097073177.webp)
Summary of Run-Time-Support Functions and Macros
7-18
(g) General functions (stdlib.h)(Continued)
Function
Page
Description
long
labs
(long i);
Returns the absolute value of i; expands inline
unless
−
x0 is used
ldiv_t
ldiv
(register long numer,
register long denom);
Divides numer by denom
int
ltoa
(long val, char *buffer);
Converts val to the equivalent string
void
*malloc
(size_t size);
Allocates memory for an object of size bytes
void
minit
(void);
Resets all the memory previously allocated by
malloc, calloc, or realloc
void
qsort
(void *base, size_t nmemb,
size_t size, int (*compar) ());
Sorts an array of nmemb members; base points to
the first member of the unsorted array, and size
specifies the size of each member
int
rand
(void);
Returns a sequence of pseudorandom integers in
the range 0 to RAND_MAX
void
*realloc
(void *packet, size_t size);
Changes the size of an allocated memory space
void
srand
(unsigned int seed);
Resets the random number generator
double
strtod
(const char *st, char **endptr);
Converts a string to a floating-point value
long
strtol
(const char *st, char **endptr, int base);
Converts a string to a long integer
unsigned long
strtoul
(const char *st,
char **endptr
,
int base)
;
Converts a string to an unsigned long integer
(h) String functions
(
string.h
)
Function
Description
Page
void *
memchr
(const void *cs, int c, size_t n);
Finds the first occurrence of c in the first n charac-
ters of cs; expands inline if
−
x is used
int
memcmp
(const void *cs, const void *ct,
size_t n);
Compares the first n characters of cs to ct;
expands inline if
−
x is used
void
*memcpy
(void *s1, const void *s2,
register size_t n);
Copies n characters from s1 to s2
void *
memmove
(void *s1, const void *s2,
size_t n);
Moves n characters from s1 to s2
void *
memset
(void *mem, register int ch,
register size_t length);
Copies the value of ch into the first length charac-
ters of mem; expands inline if
−
x is used
char *
strcat
(char *string1, const char *string2);
Appends string2 to the end of string1
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...