output-stream: Support %X in addition to %x

This commit is contained in:
Carl Worth 2006-06-20 10:43:53 -07:00
parent bb11980f14
commit 3465ae1c58

View file

@ -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;