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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [stdio/] [fputc.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
<<fputc>>---write a character on a stream or file
4
 
5
INDEX
6
        fputc
7
 
8
ANSI_SYNOPSIS
9
        #include <stdio.h>
10
        int fputc(int <[ch]>, FILE *<[fp]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <stdio.h>
14
        int fputc(<[ch]>, <[fp]>)
15
        int <[ch]>;
16
        FILE *<[fp]>;
17
 
18
DESCRIPTION
19
<<fputc>> converts the argument <[ch]> from an <<int>> to an
20
<<unsigned char>>, then writes it to the file or stream identified by
21
<[fp]>.
22
 
23
If the file was opened with append mode (or if the stream cannot
24
support positioning), then the new character goes at the end of the
25
file or stream.  Otherwise, the new character is written at the
26
current value of the position indicator, and the position indicator
27
oadvances by one.
28
 
29
For a macro version of this function, see <<putc>>.
30
 
31
RETURNS
32
If successful, <<fputc>> returns its argument <[ch]>.  If an error
33
intervenes, the result is <<EOF>>.  You can use `<<ferror(<[fp]>)>>' to
34
query for errors.
35
 
36
PORTABILITY
37
<<fputc>> is required by ANSI C.
38
 
39
Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
40
<<lseek>>, <<read>>, <<sbrk>>, <<write>>.
41
*/
42
 
43
#include <stdio.h>
44
 
45
int
46
_DEFUN (fputc, (ch, file),
47
        int ch _AND
48
        FILE * file)
49
{
50
  return putc (ch, file);
51
}

powered by: WebSVN 2.1.0

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