summaryrefslogtreecommitdiffstats
path: root/contrib/csup
diff options
context:
space:
mode:
authorlulf <lulf@FreeBSD.org>2008-10-25 10:23:24 +0000
committerlulf <lulf@FreeBSD.org>2008-10-25 10:23:24 +0000
commit0f6475d2a0903e6307caf16cfc3361448a4a4f95 (patch)
tree9fff4c09f204f2e88837db201af4c7eb8c3c2017 /contrib/csup
parent811088f01868b1d89dec7a8a92b7d27d1395f55c (diff)
downloadFreeBSD-src-0f6475d2a0903e6307caf16cfc3361448a4a4f95.zip
FreeBSD-src-0f6475d2a0903e6307caf16cfc3361448a4a4f95.tar.gz
- Add size_t format specifier to proto_printf.
Diffstat (limited to 'contrib/csup')
-rw-r--r--contrib/csup/proto.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/csup/proto.c b/contrib/csup/proto.c
index b8fb2bf..6c387fb 100644
--- a/contrib/csup/proto.c
+++ b/contrib/csup/proto.c
@@ -768,6 +768,7 @@ proto_printf(struct stream *wr, const char *format, ...)
va_list ap;
char *cp, *s, *attr;
ssize_t n;
+ size_t size;
off_t off;
int rv, val, ignore;
char c;
@@ -834,6 +835,11 @@ proto_printf(struct stream *wr, const char *format, ...)
rv = proto_escape(wr, attr);
free(attr);
break;
+ case 'z':
+ size = va_arg(ap, size_t);
+ rv = stream_printf(wr, "%zu", size);
+ break;
+
case '%':
n = stream_write(wr, "%", 1);
if (n == -1)
OpenPOWER on IntegriCloud