~ubuntu-branches/ubuntu/oneiric/mplayer2/oneiric-proposed

« back to all changes in this revision

Viewing changes to mplayer/osdep/vsscanf.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2011-03-20 22:48:03 UTC
  • Revision ID: james.westby@ubuntu.com-20110320224803-kc2nlrxz6pcphmf1
Tags: upstream-2.0~rc2
ImportĀ upstreamĀ versionĀ 2.0~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * vsscanf implementation for systems that do not have it in libc
 
3
 *
 
4
 * This file is part of MPlayer.
 
5
 *
 
6
 * MPlayer is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * MPlayer is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License along
 
17
 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
 
18
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
19
 */
 
20
 
 
21
#include "config.h"
 
22
 
 
23
#include <stdio.h>
 
24
#include <stdarg.h>
 
25
 
 
26
int
 
27
vsscanf(const char *str, const char *format, va_list ap)
 
28
{
 
29
    /* XXX: can this be implemented in a more portable way? */
 
30
    long p1 = va_arg(ap, long);
 
31
    long p2 = va_arg(ap, long);
 
32
    long p3 = va_arg(ap, long);
 
33
    long p4 = va_arg(ap, long);
 
34
    long p5 = va_arg(ap, long);
 
35
    return sscanf(str, format, p1, p2, p3, p4, p5);
 
36
}