diff options
author | Niels Möller <nisse@lysator.liu.se> | 2002-12-04 10:42:31 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2002-12-04 10:42:31 +0100 |
commit | 1c323788782c3a5d59153972e532cb079f14b120 (patch) | |
tree | a82637ba0a430b4d7b571d526f7eaa8bf5ab162f /sexp.h | |
parent | a38808d68d3c61de44508f913a3d0daf366eb52c (diff) | |
download | nettle-1c323788782c3a5d59153972e532cb079f14b120.tar.gz |
(format_length_string): Deleted function.
(format_string): Deleted function.
(sexp_vformat): New %t specifier, formatting an optional display
type. Deleted %z specifier. Instead, introduced a new modifier "0"
that can be used with %s, %l and %t, which says that the data is
NUL-terminated.
Rev: src/nettle/sexp-format.c:1.5
Rev: src/nettle/sexp.h:1.11
Diffstat (limited to 'sexp.h')
-rw-r--r-- | sexp.h | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -137,10 +137,12 @@ struct nettle_buffer; * Format strings can contained matched parentheses, and the following * formatting specifiers: * - * %z NUL-terminated string, const uint8_t *. - * * %s String represented as unsigned length, const uint8_t *data. * + * %t Optional display type, represented as + * unsigned display_length, const uint8_t *display, + * display == NULL means no display type. + * * %i Non-negative small integer, uint32_t. * * %b Non-negative bignum, mpz_t. @@ -148,7 +150,15 @@ struct nettle_buffer; * %l Literal string (no length added), typically a balanced * subexpression. Represented as unsigned length, const uint8_t * *data. - */ + * + * Modifiers: + * + * %0 For %s, %t and %l, says that there's no length argument, + * instead the string is NUL-terminated, and there's only one + * const uint8_t * argument. + * + * FIXME: Allow literals, like "(x%b)". Allow "%(" for unbalanced + * parenthesis. */ unsigned sexp_format(struct nettle_buffer *buffer, |