OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [stdio/] [fiprintf.c] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1010 ivang
/*
2
FUNCTION
3
        <<fiprintf>>---format output to file (integer only)
4
INDEX
5
        fiprintf
6
 
7
ANSI_SYNOPSIS
8
        #include <stdio.h>
9
 
10
        int fiprintf(FILE *<[fd]>, const char *<[format]>, ...);
11
 
12
TRAD_SYNOPSIS
13
        #include <stdio.h>
14
 
15
        int fiprintf(<[fd]>, <[format]> [, <[arg]>, ...]);
16
        FILE *<[fd]>;
17
        char *<[format]>;
18
 
19
DESCRIPTION
20
<<fiprintf>> is a restricted version of <<fprintf>>: it has the same
21
arguments and behavior, save that it cannot perform any floating-point
22
formatting---the <<f>>, <<g>>, <<G>>, <<e>>, and <<F>> type specifiers
23
are not recognized.
24
 
25
RETURNS
26
        <<fiprintf>> returns the number of bytes in the output string,
27
        save that the concluding <<NULL>> is not counted.
28
        <<fiprintf>> returns when the end of the format string is
29
        encountered.  If an error occurs, <<fiprintf>>
30
        returns <<EOF>>.
31
 
32
PORTABILITY
33
<<fiprintf>> is not required by ANSI C.
34
 
35
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
36
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
37
*/
38
 
39
#include <_ansi.h>
40
#include <stdio.h>
41
 
42
#ifdef _HAVE_STDC
43
 
44
#include <stdarg.h>
45
 
46
int
47
fiprintf (FILE * fp, const char *fmt,...)
48
{
49
  int ret;
50
  va_list ap;
51
 
52
  va_start (ap, fmt);
53
  ret = vfiprintf (fp, fmt, ap);
54
  va_end (ap);
55
  return ret;
56
}
57
 
58
#else
59
 
60
#include <varargs.h>
61
 
62
int
63
fiprintf (fp, fmt, va_alist)
64
     FILE *fp;
65
     char *fmt;
66
     va_dcl
67
{
68
  int ret;
69
  va_list ap;
70
 
71
  va_start (ap);
72
  ret = vfiprintf (fp, fmt, ap);
73
  va_end (ap);
74
  return ret;
75
}
76
 
77
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.