From 9a9b449c5f1e872b85b2888754fa41b5b4b271a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 7 Apr 2013 17:02:55 +0100 Subject: [PATCH] printf: handle old GST_PTR_FORMAT %P and GST_SEGMENT_FORMAT %Q defines too For binary backwards compatibility. --- gst/printf/printf-parse.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gst/printf/printf-parse.c b/gst/printf/printf-parse.c index 1502053..fc7b4d5 100644 --- a/gst/printf/printf-parse.c +++ b/gst/printf/printf-parse.c @@ -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)) -- 2.7.4