1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cstdlib/LSTDIO/FPRINTF.C Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,48 @@
1.4 +/* FPRINTF.C
1.5 + *
1.6 + * Portions Copyright (c) 1990-1999 Nokia Corporation and/or its subsidiary(-ies).
1.7 + * All rights reserved.
1.8 + */
1.9 +
1.10 +/*
1.11 + * Copyright (c) 1990 The Regents of the University of California.
1.12 + * All rights reserved.
1.13 + *
1.14 + * Redistribution and use in source and binary forms are permitted
1.15 + * provided that the above copyright notice and this paragraph are
1.16 + * duplicated in all such forms and that any documentation,
1.17 + * advertising materials, and other materials related to such
1.18 + * distribution and use acknowledge that the software was developed
1.19 + * by the University of California, Berkeley. The name of the
1.20 + * University may not be used to endorse or promote products derived
1.21 + * from this software without specific prior written permission.
1.22 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
1.23 + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
1.24 + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
1.25 + */
1.26 +
1.27 +#include <_ansi.h>
1.28 +#include <stdio.h>
1.29 +
1.30 +#include <stdarg.h>
1.31 +
1.32 +/**
1.33 +Print formatted data to a stream.
1.34 +Prints to the specified stream a sequence of arguments formatted
1.35 +as the format argument specifies.
1.36 +@return On success, the total number of characters printed is returned.
1.37 +On error, a negative number is returned.
1.38 +@param fp Pointer to an open file.
1.39 +@param fmt String that contains the text to be printed.
1.40 +*/
1.41 +EXPORT_C int
1.42 +fprintf (FILE * fp, const char *fmt,...)
1.43 +{
1.44 + int ret;
1.45 + va_list ap;
1.46 +
1.47 + va_start (ap, fmt);
1.48 + ret = vfprintf (fp, fmt, ap);
1.49 + va_end (ap);
1.50 + return ret;
1.51 +}