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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [stdio/] [fileno.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/*
2
FUNCTION
3
<<fileno>>---return file descriptor associated with stream
4
 
5
INDEX
6
        fileno
7
 
8
ANSI_SYNOPSIS
9
        #include <stdio.h>
10
        int fileno(FILE *<[fp]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <stdio.h>
14
        int fileno(<[fp]>)
15
        FILE *<[fp]>;
16
 
17
DESCRIPTION
18
You can use <<fileno>> to return the file descriptor identified by <[fp]>.
19
 
20
RETURNS
21
<<fileno>> returns a non-negative integer when successful.
22
If <[fp]> is not an open stream, <<fileno>> returns -1.
23
 
24
PORTABILITY
25
<<fileno>> is not part of ANSI C.
26
POSIX requires <<fileno>>.
27
 
28
Supporting OS subroutines required: none.
29
*/
30
 
31
#include <stdio.h>
32
#include "local.h"
33
 
34
int
35
_DEFUN (fileno, (f),
36
        FILE * f)
37
{
38
  CHECK_INIT (f);
39
  return __sfileno (f);
40
}

powered by: WebSVN 2.1.0

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