Rev 3348 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3348 | Rev 3351 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | static int asprintf_prewrite(const char *str, size_t count, void *unused) |
41 | static int asprintf_prewrite(const char *str, size_t count, void *unused) |
42 | { |
42 | { |
43 | return count; |
43 | return count; |
44 | } |
44 | } |
45 | 45 | ||
- | 46 | /** Allocate and print to string. |
|
- | 47 | * |
|
- | 48 | * @param strp Address of the pointer where to store the address of |
|
- | 49 | * the newly allocated string. |
|
- | 50 | * @fmt Format strin. |
|
- | 51 | * |
|
- | 52 | * @return Number of characters printed or a negative error code. |
|
- | 53 | */ |
|
46 | int asprintf(char **strp, const char *fmt, ...) |
54 | int asprintf(char **strp, const char *fmt, ...) |
47 | { |
55 | { |
48 | struct printf_spec ps = { |
56 | struct printf_spec ps = { |
49 | asprintf_prewrite, |
57 | asprintf_prewrite, |
50 | NULL |
58 | NULL |