14 printf(
"str:%s\n",
_nstr(nstr));
16 nstrprintf(nstr,
"Hello, file is %s line %d date %s", __FILE__, __LINE__, __TIME__);
18 printf(
"str:%s\n",
_nstr(nstr));
20 nstrprintf_cat(nstr,
" - This will be added at file %s line %d date %s", __FILE__, __LINE__, __TIME__);
22 printf(
"str:%s\n",
_nstr(nstr));
28 printf(
"str:%s\n",
_nstr(nstr));
30 nstrprintf(nstr,
"Hello, file is %s line %d date %s", __FILE__, __LINE__, __TIME__);
32 printf(
"str:%s\n",
_nstr(nstr));
34 nstrprintf_cat(nstr,
" - This will be added at file %s line %d date %s", __FILE__, __LINE__, __TIME__);
36 printf(
"str:%s\n",
_nstr(nstr));
42 printf(
"str: %s\n str2: %s\n",
_nstr(nstr),
_nstr(nstr2));
49 printf(
"str:%s\n",
_nstr(nstr3));
56 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.