printf: handle old GST_PTR_FORMAT %P and GST_SEGMENT_FORMAT %Q defines too

For binary backwards compatibility.
This commit is contained in:
Tim-Philipp Müller 2013-04-07 17:02:55 +01:00 committed by Tim-Philipp Müller
parent 5803da553c
commit 9a9b449c5f

View file

@ -387,6 +387,13 @@ printf_parse (const char *format, char_directives * d, arguments * a)
c = 's';
break;
#endif
/* Old GST_PTR_FORMAT, handle for binary backwards compatibility */
case 'P':
type = TYPE_POINTER_EXT;
dp->flags |= FLAG_PTR_EXT;
dp->ptr_ext_char = 'A';
dp->conversion = 'p';
break;
case 'p':
/* Note: cp points already to the char after the 'p' now */
if (cp[0] == POINTER_EXT_SIGNIFIER_CHAR && cp[1] != '\0') {
@ -400,6 +407,13 @@ printf_parse (const char *format, char_directives * d, arguments * a)
type = TYPE_POINTER;
}
break;
/* Old GST_SEGMENT_FORMAT, handle for backwards compatibility */
case 'Q':
type = TYPE_POINTER_EXT;
dp->flags |= FLAG_PTR_EXT;
dp->ptr_ext_char = 'B';
dp->conversion = 'p';
break;
case 'n':
#ifdef HAVE_LONG_LONG
if (flags >= 16 || (flags & 4))