16 printf(
"str:%s\n",
_nstr(nstr));
18 nstrprintf(nstr,
"Hello, file is %s line %d date %s", __FILE__, __LINE__, __TIME__);
20 printf(
"str:%s\n",
_nstr(nstr));
22 nstrprintf_cat(nstr,
" - This will be added at file %s line %d date %s", __FILE__, __LINE__, __TIME__);
24 printf(
"str:%s\n",
_nstr(nstr));
30 printf(
"str:%s\n",
_nstr(nstr));
32 nstrprintf(nstr,
"Hello, file is %s line %d date %s", __FILE__, __LINE__, __TIME__);
34 printf(
"str:%s\n",
_nstr(nstr));
36 nstrprintf_cat(nstr,
" - This will be added at file %s line %d date %s", __FILE__, __LINE__, __TIME__);
38 printf(
"str:%s\n",
_nstr(nstr));
44 printf(
"str: %s\n str2: %s\n",
_nstr(nstr),
_nstr(nstr2));
51 printf(
"str:%s\n",
_nstr(nstr3));
58 printf(
"str:%s\n",
_nstr(nstr3));
#define _nstr(__PTR)
N_STR or "NULL" string for logging purposes.
#define LOG_DEBUG
debug-level messages
void set_log_level(const int log_level)
Set the global log level value ( static int LOG_LEVEL )
#define free_nstr(__ptr)
free a N_STR structure and set the pointer to NULL
#define nstrcat(__nstr_dst, __nstr_src)
Macro to quickly concatenate two N_STR.
N_STR * nstrdup(N_STR *str)
Duplicate a N_STR.
#define nstrprintf_cat(__nstr_var, __format,...)
Macro to quickly allocate and sprintf and cat to a N_STR.
N_STR * new_nstr(NSTRBYTE size)
create a new N_STR string
#define nstrprintf(__nstr_var, __format,...)
Macro to quickly allocate and sprintf to N_STR.
A box including a string and his lenght.
Header for a monolith use.