genericopenlibs/cstdlib/LSTDIO/FPRINTF.C
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /* FPRINTF.C
       
     2  * 
       
     3  * Portions Copyright (c) 1990-1999 Nokia Corporation and/or its subsidiary(-ies).
       
     4  * All rights reserved.
       
     5  */
       
     6 
       
     7 /*
       
     8  * Copyright (c) 1990 The Regents of the University of California.
       
     9  * All rights reserved.
       
    10  *
       
    11  * Redistribution and use in source and binary forms are permitted
       
    12  * provided that the above copyright notice and this paragraph are
       
    13  * duplicated in all such forms and that any documentation,
       
    14  * advertising materials, and other materials related to such
       
    15  * distribution and use acknowledge that the software was developed
       
    16  * by the University of California, Berkeley.  The name of the
       
    17  * University may not be used to endorse or promote products derived
       
    18  * from this software without specific prior written permission.
       
    19  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
       
    20  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
       
    21  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
       
    22  */
       
    23 
       
    24 #include <_ansi.h>
       
    25 #include <stdio.h>
       
    26 
       
    27 #include <stdarg.h>
       
    28 
       
    29 /**
       
    30 Print formatted data to a stream.
       
    31 Prints to the specified stream a sequence of arguments formatted 
       
    32 as the format argument specifies.
       
    33 @return On success, the total number of characters printed is returned.
       
    34 On error, a negative number is returned.
       
    35 @param fp Pointer to an open file. 
       
    36 @param fmt String that contains the text to be printed.
       
    37 */
       
    38 EXPORT_C int
       
    39 fprintf (FILE * fp, const char *fmt,...)
       
    40 {
       
    41   int ret;
       
    42   va_list ap;
       
    43 
       
    44   va_start (ap, fmt);
       
    45   ret = vfprintf (fp, fmt, ap);
       
    46   va_end (ap);
       
    47   return ret;
       
    48 }