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