1 --- strfmon.3.orig 2010-02-08 16:26:10.000000000 -0800
2 +++ strfmon.3 2010-02-08 17:57:07.000000000 -0800
10 .Nd convert monetary value to string
18 -.Fn strfmon "char * restrict s" "size_t maxsize" "const char * restrict format" "..."
20 +.Fa "char *restrict s"
22 +.Fa "const char *restrict format"
29 +.Fa "char *restrict s"
32 +.Fa "const char *restrict format"
38 function places characters into the array pointed to by
41 as controlled by the string pointed to by
45 bytes are placed into the array.
49 +function uses the current locale, the
51 +function may be passed a locale directly. See
53 +for more information.
55 The format string is composed of zero or more directives:
56 ordinary characters (not
58 @@ -116,9 +140,9 @@ character is written.
62 -If the total number of resulting bytes including the terminating
63 +If the total number of resulting bytes, including the terminating
65 -byte is not more than
66 +byte, is not more than
69 returns the number of bytes placed into the array pointed to by
70 @@ -143,8 +167,23 @@ The format string is invalid.
72 Not enough memory for temporary buffers.
75 +.Bd -literal -offset indent -compact
77 + #include <monetary.h>
82 + setlocale(LC_ALL, "en_US");
83 + (void)strfmon (buf, sizeof(buf)-1, "%n" , 123456.78);
84 + printf("%s\n", buf);