source: trunk/minix/commands/aal/sprint.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 736 bytes
Line 
1/*
2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
4 */
5/* $Header: /cvsup/minix/src/commands/aal/sprint.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
6
7#if __STDC__
8#include <stdarg.h>
9#else
10#include <varargs.h>
11#endif
12#include <system.h>
13#include "param.h"
14
15/*VARARGS*/
16/*FORMAT1v $
17 %s = char *
18 %l = long
19 %c = int
20 %[uxbo] = unsigned int
21 %d = int
22$ */
23char *
24#if __STDC__
25sprint(char *buf, char *fmt, ...)
26#else
27sprint(buf, fmt, va_alist)
28 char *buf, *fmt;
29 va_dcl
30#endif
31{
32 va_list args;
33
34#if __STDC__
35 va_start(args, fmt);
36#else
37 va_start(args);
38#endif
39 buf[_format(buf, fmt, args)] = '\0';
40 va_end(args);
41 return buf;
42}
Note: See TracBrowser for help on using the repository browser.