summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-06-20 10:43:53 -0700
committerCarl Worth <cworth@cworth.org>2006-06-20 10:43:53 -0700
commit3465ae1c58a87382c33117f6c5dec52403c9694e (patch)
tree8200153f2de4184317c5de61162c340984f02b37
parentbb11980f14560ea16174c6531678b9b7a623f813 (diff)
output-stream: Support %X in addition to %x
-rw-r--r--src/cairo-output-stream.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-output-stream.c b/src/cairo-output-stream.c
index 784d159a..96ff8ce0 100644
--- a/src/cairo-output-stream.c
+++ b/src/cairo-output-stream.c
@@ -314,7 +314,7 @@ _cairo_output_stream_vprintf (cairo_output_stream_t *stream,
_cairo_output_stream_write (stream, buffer, p - buffer);
p = buffer;
- /* We group signed and usigned together in this swith, the
+ /* We group signed and unsigned together in this switch, the
* only thing that matters here is the size of the arguments,
* since we're just passing the data through to sprintf(). */
switch (*f | length_modifier) {
@@ -326,12 +326,14 @@ _cairo_output_stream_vprintf (cairo_output_stream_t *stream,
case 'u':
case 'o':
case 'x':
+ case 'X':
snprintf (buffer, sizeof buffer, single_fmt, va_arg (ap, int));
break;
case 'd' | LENGTH_MODIFIER_LONG:
case 'u' | LENGTH_MODIFIER_LONG:
case 'o' | LENGTH_MODIFIER_LONG:
case 'x' | LENGTH_MODIFIER_LONG:
+ case 'X' | LENGTH_MODIFIER_LONG:
snprintf (buffer, sizeof buffer,
single_fmt, va_arg (ap, long int));
break;