Functions for manipulating message text content. More...
Functions | |
void | EZTR_MsgSContent_SetEmpty (char *cont) |
Sets the message message content as empty. | |
u32 | EZTR_MsgSContent_Len (char *cont) |
Gets the length of the a message content string in bytes, not counting the '\xBF' termination character. | |
u32 | EZTR_MsgSContent_NCopy (char *dst, char *src, size_t len) |
Copies message content from src into the dst , up to len bytes. | |
u32 | EZTR_MsgSContent_Copy (char *dst, char *src) |
Copies message content from src into the dst . | |
char * | EZTR_MsgSContent_NCat (char *dst, char *src, size_t len) |
Copies the message content of src onto the end of dst , up to len bytes from src . | |
char * | EZTR_MsgSContent_Cat (char *dst, char *src) |
Copies the message content of src onto the end of dst . | |
s32 | EZTR_MsgSContent_NCmp (char *str1, char *str2, size_t len) |
Compares up to len bytes of two message content strings. | |
s32 | EZTR_MsgSContent_Cmp (char *str1, char *str2) |
Compares two message content strings. | |
int | EZTR_MsgSContent_Printf (const char *format,...) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument. | |
int | EZTR_MsgSContent_PrintfLine (const char *format,...) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument. | |
int | EZTR_MsgSContent_Sprintf (char *buffer, const char *format,...) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument. | |
int | EZTR_MsgSContent_Snprintf (char *buffer, size_t count, const char *format,...) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument. | |
int | EZTR_MsgSContent_Vsnprintf (char *buffer, size_t count, const char *format, va_list va) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument. | |
int | EZTR_MsgSContent_Vprintf (const char *format, va_list va) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument. | |
int | EZTR_MsgSContent_Fctprintf (void(*out)(char character, void *arg), void *arg, const char *format,...) |
A modified version of printf, specially designed to handle message content. | |
int | EZTR_MsgSContent_NoPipe_Printf (const char *format,...) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m type specifier. | |
int | EZTR_MsgSContent_NoPipe_PrintfLine (const char *format,...) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m type specifier. | |
int | EZTR_MsgSContent_NoPipe_Sprintf (char *buffer, const char *format,...) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m type specifier. | |
int | EZTR_MsgSContent_NoPipe_Snprintf (char *buffer, size_t count, const char *format,...) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m type specifier. | |
int | EZTR_MsgSContent_NoPipe_Vsnprintf (char *buffer, size_t count, const char *format, va_list va) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m type specifier. | |
int | EZTR_MsgSContent_NoPipe_Vprintf (const char *format, va_list va) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m type specifier. | |
int | EZTR_MsgSContent_NoPipe_Fctprintf (void(*out)(char character, void *arg), void *arg, const char *format,...) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m type specifier. | |
Functions for manipulating message text content.
char * EZTR_MsgSContent_Cat | ( | char * | dst, |
char * | src ) |
Copies the message content of src
onto the end of dst
.
Similar to strcat()
for null-terminated strings.
This function is safe as long as dst
points to the beginning of a message buffer's content region, as it will not produce message content larger than a message buffer's content region. Copying will stop once the maximum size is reached.
dst | The location to append message content into. |
src | The message content to copy. Should be '\xBF' terminated. |
dst
). s32 EZTR_MsgSContent_Cmp | ( | char * | str1, |
char * | str2 ) |
Compares two message content strings.
This function is safe as long as both str1
and str2
point to the content region of message buffers, as the comparison will not continue beyond that size.
Similar to strcmp()
for null-terminated strings, but with one notable difference: With strncmp()
, if two strings are equal for the first n
characters, but one string continues after n
while
the other doesn't, the shorter string is considered 'lesser' because the null terminator ‘’\x00'is naturally the lowest possible ASCII value. Because strings in MM are
'\xBF'` terminated, that behavior won't apply here.
In EZTR_MsgSContent_Cmp()
, a special case is applied: If two strings are equal for n
characters, but the next character after n
is ‘’\xBF'` in one of the strings, it is considered the lesser string regardless of what the other character is.
str1 | The first message content string to compare. |
str2 | The second message content string to compare. |
u32 EZTR_MsgSContent_Copy | ( | char * | dst, |
char * | src ) |
Copies message content from src
into the dst
.
Similar to strcpy()
for null-terminated strings.
This function is safe as long as dst
points to the beginning of a message buffer's content region, since it will not copy bytes beyond that size.
dst | The location to copy message content into. |
src | The message content to copy. Should be '\xBF' terminated. |
int EZTR_MsgSContent_Fctprintf | ( | void(* | out )(char character, void *arg), |
void * | arg, | ||
const char * | format, | ||
... ) |
A modified version of printf, specially designed to handle message content.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
out | |
arg | |
format | |
... |
u32 EZTR_MsgSContent_Len | ( | char * | cont | ) |
Gets the length of the a message content string in bytes, not counting the '\xBF' termination character.
Similar to strlen()
for null-terminated strings.
This function is safe as long as cont
points to the beginning of a message buffer's content region, since it will not count bytes beyond that size.
cont | The message content you want to get the length of. |
char * EZTR_MsgSContent_NCat | ( | char * | dst, |
char * | src, | ||
size_t | len ) |
Copies the message content of src
onto the end of dst
, up to len
bytes from src
.
Similar to strncat()
for null-terminated strings.
This function will not produce message content larger than a message buffer's content region. Copying will stop once the maximum size is reached.
dst | The location to append message content into. |
src | The message content to copy. |
len | The maximum number of bytes to copy. If a '\xBF' is encountered in src , the function will stop copying before len is reached. |
dst
). s32 EZTR_MsgSContent_NCmp | ( | char * | str1, |
char * | str2, | ||
size_t | len ) |
Compares up to len
bytes of two message content strings.
Similar to strncmp()
for null-terminated strings, but with one notable difference: With strncmp()
, if two strings are equal for the first n
characters, but one string continues after n
while
the other doesn't, the shorter string is considered 'lesser' because the null terminator ‘’\x00'is naturally the lowest possible ASCII value. Because strings in MM are
'\xBF'` terminated, that behavior won't apply here.
In EZTR_MsgSContent_NCmp()
, a special case is applied: If two strings are equal for n
characters, but the next character after n
is ‘’\xBF'` in one of the strings, it is considered the lesser string regardless of what the other character is.
str1 | The first message content string to compare. |
str2 | The second message content string to compare. |
len | The maximum number of bytes to compare. |
u32 EZTR_MsgSContent_NCopy | ( | char * | dst, |
char * | src, | ||
size_t | len ) |
Copies message content from src
into the dst
, up to len
bytes.
Similar to strncpy()
for null-terminated strings.
dst | The location to copy message content into. |
src | The message content to copy. |
len | The maximum number of bytes to copy. If a '\xBF' is encountered in src , the function will stop copying before len is reached. |
int EZTR_MsgSContent_NoPipe_Fctprintf | ( | void(* | out )(char character, void *arg), |
void * | arg, | ||
const char * | format, | ||
... ) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m
type specifier.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
out | |
arg | |
format | |
... |
int EZTR_MsgSContent_NoPipe_Printf | ( | const char * | format, |
... ) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m
type specifier.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
format | |
... |
int EZTR_MsgSContent_NoPipe_PrintfLine | ( | const char * | format, |
... ) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m
type specifier.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
format | |
... |
int EZTR_MsgSContent_NoPipe_Snprintf | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
... ) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m
type specifier.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
buffer | |
count | |
format | |
... |
int EZTR_MsgSContent_NoPipe_Sprintf | ( | char * | buffer, |
const char * | format, | ||
... ) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m
type specifier.
Unlike EZTR_MsgSContent_Printf()
, this function will append a newline to the end of console output.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
buffer | |
format | |
... |
int EZTR_MsgSContent_NoPipe_Vprintf | ( | const char * | format, |
va_list | va ) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m
type specifier.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
format | |
va |
int EZTR_MsgSContent_NoPipe_Vsnprintf | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
va_list | va ) |
A modified version of printf, specially designed to handle message content. This version does not use pipe-escaped byte handling in the main formatting argument, but are still used with the m
type specifier.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
buffer | |
count | |
format | |
va |
int EZTR_MsgSContent_Printf | ( | const char * | format, |
... ) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
format | |
... |
int EZTR_MsgSContent_PrintfLine | ( | const char * | format, |
... ) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
format | |
... |
void EZTR_MsgSContent_SetEmpty | ( | char * | cont | ) |
Sets the message message content as empty.
This is accomplished by setting the first character in the message content to the '\xBF' termination character. No other bytes are effected.
cont | A pointer to message content string. |
int EZTR_MsgSContent_Snprintf | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
... ) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
buffer | |
count | |
format | |
... |
int EZTR_MsgSContent_Sprintf | ( | char * | buffer, |
const char * | format, | ||
... ) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument.
Unlike EZTR_MsgSContent_Printf()
, this function will append a newline to the end of console output.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
buffer | |
format | |
... |
int EZTR_MsgSContent_Vprintf | ( | const char * | format, |
va_list | va ) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
format | |
va |
int EZTR_MsgSContent_Vsnprintf | ( | char * | buffer, |
size_t | count, | ||
const char * | format, | ||
va_list | va ) |
A modified version of printf, specially designed to handle message content. This version uses pipe-escaped byte handling in the main formatting argument.
See EZTR Printf Functions for more information on EZTR's custom printf behavior.
buffer | |
count | |
format | |
va |