Morse Micro IoT SDK  2.9.7

Detailed Description

Functions

int mmosal_printf (const char *format,...)
 OS abstracted version of printf used by morselib. More...
 
static bool mmosal_safer_strcpy (char *dst, const char *src, size_t size)
 A safer version of strncpy. More...
 

Function Documentation

◆ mmosal_printf()

int mmosal_printf ( const char *  format,
  ... 
)

OS abstracted version of printf used by morselib.

Parameters
formatFormat string
Returns
On success, the total number of characters written. On failure, a negative number.

◆ mmosal_safer_strcpy()

static bool mmosal_safer_strcpy ( char *  dst,
const char *  src,
size_t  size 
)
inlinestatic

A safer version of strncpy.

Up to size - 1 bytes will be copied from src to dst and the result will be null-terminated.

Parameters
dstThe buffer to copy the string into.
srcThe source string. This must be null-terminated.
sizeThe size of the dst buffer.
Returns
true if the string was truncated else false (note that a size of 0 will always result this function returning true).

Definition at line 1030 of file mmosal.h.