annotate osdep/vsscanf.c @ 24787:02535b3216c5

Avoid text deformation and subtitles moving outside the screen in pan-and-scan mode. For this, crop amounts are passed from vo_gl as negative margins sizes. They are used to calculate aspect ratio. They are ignored when calculating subtitle positions, so subtitles will stay on screen most of the time. Based on a patch by Jindrich Makovicka [makovick gmail com].
author eugeni
date Fri, 19 Oct 2007 18:16:23 +0000
parents 936209c39ed1
children 5cfef41a1771
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16985
08cac43f1e38 Unify include paths, -I.. is in CFLAGS.
diego
parents: 9380
diff changeset
1 #include "config.h"
8290
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
2
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
3 /* system has no vsscanf. try to provide one */
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
4
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
5 #include <stdio.h>
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
6 #include <stdarg.h>
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
7
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
8 int
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
9 vsscanf(const char *str, const char *format, va_list ap)
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
10 {
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
11 /* XXX: can this be implemented in a more portable way? */
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
12 long p1 = va_arg(ap, long);
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
13 long p2 = va_arg(ap, long);
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
14 long p3 = va_arg(ap, long);
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
15 long p4 = va_arg(ap, long);
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
16 long p5 = va_arg(ap, long);
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
17 return sscanf(str, format, p1, p2, p3, p4, p5);
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
18 }