The standard library functions

The MSP430 version of libc contains a subset of the standard C library functions. These are:

abs()           bsearch()           exit()          malloc()
rand()          strtoul()           abort()         atoi()
labs()          setjmp()            abort()         atol()
errno()         ldiv()              qsort()         strtol()
ffs()           memcpy()            strcat()        strdup()
strncmp()       strspn()            atol()          memmove()
strchr()        strlcat()           strncpy()       strstr()
bcmp()          memccpy()           memset()        strcmp()
strlcpy()       strpbrk()           strtok()        bcopy()
memchr()        rindex()            strcpy()        strlen()
strrchr()       swab()              bzero()         memcmp()
strcasecmp()    strcspn()           strncat()       strsep()
snprintf()      sprintf()

The full definition of these functions can be found in any C manual, including the on line documentation for the GNU tools. They will not be detailed here.

Take care with format conversions in sprintf():

The function

uprintf(void (*func)(char c), const char *fmt,...);

is similar to "sprintf()", except that caller provides an output function for printing, rather than an output buffer. This function must accept a single "char" parameter, and return "void" (for example to send a character to a UART). The user function is responsible for mutexes, slow interfaces, etc. "uprintf()" will not return until all characters have been printed.