diff options
author | Niels Möller <nisse@lysator.liu.se> | 2003-02-10 18:35:07 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2003-02-10 18:35:07 +0100 |
commit | 2039f20afdd24a72e8b2b58e66196150855a8b4b (patch) | |
tree | 4a348ea086b473fa1391013dc505eb488e4a10c0 /sexp-format.c | |
parent | df200717941a79ff5a9bd566a19848dd73ee9022 (diff) | |
download | nettle-2039f20afdd24a72e8b2b58e66196150855a8b4b.tar.gz |
* sexp-format.c (sexp_vformat): Allow whitespace in format string.
Rev: src/nettle/sexp-format.c:1.7
Rev: src/nettle/sexp.h:1.13
Diffstat (limited to 'sexp-format.c')
-rw-r--r-- | sexp-format.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sexp-format.c b/sexp-format.c index 6fdc8910..1db2563a 100644 --- a/sexp-format.c +++ b/sexp-format.c @@ -97,7 +97,7 @@ sexp_vformat(struct nettle_buffer *buffer, const char *format, va_list args) default: { const char *start = format - 1; - unsigned length = 1 + strcspn(format, "()%"); + unsigned length = 1 + strcspn(format, "()% \t"); unsigned output_length = format_string(buffer, length, start); if (!output_length) return 0; @@ -107,6 +107,9 @@ sexp_vformat(struct nettle_buffer *buffer, const char *format, va_list args) break; } + case ' ': case '\t': + break; + case '\0': assert(!nesting); |