annotate osdep/vsscanf.c @ 10411:80dbdfe86c5b

I attach a fix to the problem described in: http://mplayerhq.hu/pipermail/mplayer-dev-eng/2003-July/019494.html The bug came out to be that sws_rgb2rgb_init was called, but only after the critical step in which ws.c copied the relevant function pointer to wsConvFunc. Someone deserves 1000l for this. Maybe we want to preinit the function pointers so that they will print something like "Call to an rgb2rgb function without calling to sws_rgb2rgb_init first. Please report." - this bug wasn't discovered since the function pointers were NULL, and the rest of the cde uses "wsConvFunc" only if it is not NULL. Raindel Shachar <raindel@techunix.technion.ac.il>
author arpi
date Sat, 12 Jul 2003 17:19:18 +0000
parents edfe34c5405d
children 08cac43f1e38
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8290
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
1 #include "../config.h"
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 #ifndef HAVE_VSSCANF
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
4 /* 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
5
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
6 #include <stdio.h>
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
7 #include <stdarg.h>
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
8
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
9 int
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
10 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
11 {
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
12 /* 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
13 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
14 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
15 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
16 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
17 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
18 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
19 }
1dd8fe0776d3 Add our own vsscanf implementation, in case the system's libc does not have
jkeil
parents:
diff changeset
20 #endif