MySQL 8.4.2
Source Code Documentation
task_debug.cc File Reference
#include "xcom/task_debug.h"
#include <assert.h>
#include <stdarg.h>
#include <stdio.h>

Functions

static int mystrcat_core_sprintf (char *dest, int size, const char *format, va_list args)
 
char * mystrcat (char *dest, int *size, const char *src)
 Concatenates two strings and returns pointer to last character of final string, allowing further concatenations without having to cycle through the entire string again. More...
 
char * mystrcat_sprintf (char *dest, int *size, const char *format,...)
 This function allocates a new string where the format string and optional arguments are rendered to. More...
 

Function Documentation

◆ mystrcat()

char * mystrcat ( char *  dest,
int *  size,
const char *  src 
)

Concatenates two strings and returns pointer to last character of final string, allowing further concatenations without having to cycle through the entire string again.

Parameters
destpointer to last character of destination string
sizepointer to the number of characters currently added to xcom_log_buffer
srcpointer to the string to append to dest
Returns
pointer to the last character of destination string after appending dest, which corresponds to the position of the '\0' character

◆ mystrcat_core_sprintf()

static int mystrcat_core_sprintf ( char *  dest,
int  size,
const char *  format,
va_list  args 
)
static

◆ mystrcat_sprintf()

char * mystrcat_sprintf ( char *  dest,
int *  size,
const char *  format,
  ... 
)

This function allocates a new string where the format string and optional arguments are rendered to.

Finally, it invokes mystr_cat to concatenate the rendered string to the string received in the first parameter.