mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
Add MG_ESC helper macro
This commit is contained in:
1 parent
7e7d0bb354
commit
514de84b97
2 files changed
+6
No files matched your search
@@ -883,6 +883,9 @@ size_t mg_print_mac(void (*out)(char, void *), void *arg, va_list *ap);
|
|||||||
void mg_pfn_iobuf(char ch, void *param); // param: struct mg_iobuf *
|
void mg_pfn_iobuf(char ch, void *param); // param: struct mg_iobuf *
|
||||||
void mg_pfn_stdout(char c, void *param); // param: ignored
|
void mg_pfn_stdout(char c, void *param); // param: ignored
|
||||||
|
|
||||||
|
// A helper macro for printing JSON: mg_snprintf(buf, len, "%m", MG_ESC("hi"))
|
||||||
|
#define MG_ESC(str) mg_print_esc, 0, (str)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -25,3 +25,6 @@ size_t mg_print_mac(void (*out)(char, void *), void *arg, va_list *ap);
|
|||||||
// Various output functions
|
// Various output functions
|
||||||
void mg_pfn_iobuf(char ch, void *param); // param: struct mg_iobuf *
|
void mg_pfn_iobuf(char ch, void *param); // param: struct mg_iobuf *
|
||||||
void mg_pfn_stdout(char c, void *param); // param: ignored
|
void mg_pfn_stdout(char c, void *param); // param: ignored
|
||||||
|
|
||||||
|
// A helper macro for printing JSON: mg_snprintf(buf, len, "%m", MG_ESC("hi"))
|
||||||
|
#define MG_ESC(str) mg_print_esc, 0, (str)
|
||||||
Reference in new issue
Block a user