genericopenlibs/cstdlib/LSTDIO/FILENO.C
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /*
       
     2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * FUNCTION
       
    16 * <<fileno>>---return file descriptor associated with stream
       
    17 * INDEX
       
    18 * fileno
       
    19 * ANSI_SYNOPSIS
       
    20 * #include <stdio.h>
       
    21 * int fileno(FILE *<[fp]>);
       
    22 * TRAD_SYNOPSIS
       
    23 * #include <stdio.h>
       
    24 * int fileno(<[fp]>)
       
    25 * FILE *<[fp]>;
       
    26 * You can use <<fileno>> to return the file descriptor identified by <[fp]>.
       
    27 * RETURNS
       
    28 * <<fileno>> returns a non-negative integer when successful.
       
    29 * If <[fp]> is not an open stream, <<fileno>> returns -1.
       
    30 * PORTABILITY
       
    31 * <<fileno>> is not part of ANSI C.
       
    32 * POSIX requires <<fileno>>.
       
    33 * Supporting OS subroutines required: none.
       
    34 * 
       
    35 *
       
    36 */
       
    37 
       
    38 
       
    39 
       
    40 #include <stdio.h>
       
    41 #include "LOCAL.H"
       
    42 
       
    43 EXPORT_C int
       
    44 fileno (FILE * f)
       
    45 {
       
    46   CHECK_INIT (f);
       
    47   return __sfileno (f);
       
    48 }