04.06.2013 Views

iRMX C Library Reference - tenAsys

iRMX C Library Reference - tenAsys

iRMX C Library Reference - tenAsys

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Storage Allocation Functions<br />

These functions provide storage allocation management.<br />

calloc Allocates and clears an array in memory; initializes each element<br />

to 0.<br />

free Deallocates a memory block previously allocated by malloc.<br />

malloc Allocates a memory block of the specified size.<br />

realloc Changes the size of a previously allocated memory block or<br />

allocates a new one.<br />

sbrk Creates <strong>iRMX</strong> segments of the specified number of bytes.<br />

String Processing Functions<br />

The following functions provide string conversion, parsing, movement and<br />

manipulation capabilities.<br />

atof Converts a character string to a double value.<br />

atoi Converts to an integer value.<br />

atol Converts to a long integer value.<br />

cstr Converts a count-prefixed <strong>iRMX</strong>-style string to a null-terminated<br />

C-style string and stores it.<br />

strcmp, Compare two null-terminated strings lexicographically.<br />

strcmpi,<br />

stricmp<br />

strcat Appends a null-terminated string to another string.<br />

strchr Searches for a character in a null-terminated string.<br />

strcoll Compares null-terminated strings using locale-specific collating<br />

sequences.<br />

strcpy Copies a null-terminated string.<br />

strcspn Finds a null-terminated substring in a string.<br />

strdup Duplicates null-terminated strings.<br />

strerror Gets a system error message.<br />

strlen Gets the length of a null-terminated string.<br />

strlwr Converts uppercase letters in a null-terminated string to<br />

lowercase. Other characters are not affected.<br />

strncat Appends characters to a string.<br />

strncmp Compares substrings.<br />

C <strong>Library</strong> <strong>Reference</strong> Chapter 2 19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!