Commit 1f73754c authored by Niels Möller's avatar Niels Möller
Browse files

New macro lsh_string_dup().

Rev: src/format.h:1.10
parent 1c4aaed9
...@@ -64,11 +64,14 @@ ...@@ -64,11 +64,14 @@
* "l" (as in literal). It is applicable to the s, a, A, n and r * "l" (as in literal). It is applicable to the s, a, A, n and r
* specifiers, and outputs strings *without* a length field. * specifiers, and outputs strings *without* a length field.
* *
* "f" (as in free). Frees the input sting after it has been copied. * "f" (as in free). Frees the input string after it has been copied.
* Applicable to %S only. */ * Applicable to %S only. */
UINT32 ssh_vformat_length(char *format, va_list args); UINT32 ssh_vformat_length(char *format, va_list args);
void ssh_vformat(char *format, UINT8 *buffer, va_list args); void ssh_vformat(char *format, UINT8 *buffer, va_list args);
struct lsh_string *ssh_format(char *format, ...); struct lsh_string *ssh_format(char *format, ...);
/* Short cut */
#define lsh_string_dup(s) (ssh_format("%lS", (s)))
#endif /* LSH_FORMAT_H_INCLUDED */ #endif /* LSH_FORMAT_H_INCLUDED */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment