Skip to content

Commit

Permalink
document %M format
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Dec 19, 2015
1 parent 8d34a29 commit 7e8e830
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/mysql/service_my_snprintf.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
Supported formats are 's' (null pointer is accepted, printed as
"(null)"), 'b' (extension, see below), 'c', 'd', 'i', 'u', 'x', 'o',
'X', 'p' (works as 0x%x), 'f', 'g'.
'X', 'p' (works as 0x%x), 'f', 'g', 'M' (extension, see below).
Standard syntax for positional arguments $n is supported.
Expand All @@ -65,6 +65,10 @@
Format 'b': binary buffer, prints exactly <precision> bytes from the
argument, without stopping at '\0'.
Format 'M': takes one integer, prints this integer, space, double quote
error message, double quote. In other words
printf("%M", n) === printf("%d \"%s\"", n, strerror(n))
*/

#ifdef __cplusplus
Expand Down

0 comments on commit 7e8e830

Please sign in to comment.