The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
17764 ripley 1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2002  The R Development Core Team.
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 */
19
 
20
#ifdef HAVE_CONFIG_H
21
# include <config.h>
22
#endif
23
 
24
#include <stdlib.h>
25
#include <stdarg.h>
26
 
27
int vsnprintf(char *s, size_t n, const char *format, va_list ap);
28
 
29
int snprintf (char *s, size_t n, const char *format, ...)
30
{
31
    int total;
32
    va_list ap;
33
 
34
    va_start(ap, format);
35
    total = vsnprintf(s, n, format, ap);
36
    va_end(ap);
37
    return total;
38
}