snprint.c (305B) download
1/* Copyright (c) 2002-2006 Lucent Technologies; see LICENSE */
2#include "fmt.h"
3#include "fmtdef.h"
4#include "plan9.h"
5
6#include <stdarg.h>
7
8int snprint(char* buf, int len, char* fmt, ...) {
9 int n;
10 va_list args;
11
12 va_start(args, fmt);
13 n = vsnprint(buf, len, fmt, args);
14 va_end(args);
15 return n;
16}