sl@0: /* sl@0: * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * FUNCTION sl@0: * <>---return file descriptor associated with stream sl@0: * INDEX sl@0: * fileno sl@0: * ANSI_SYNOPSIS sl@0: * #include sl@0: * int fileno(FILE *<[fp]>); sl@0: * TRAD_SYNOPSIS sl@0: * #include sl@0: * int fileno(<[fp]>) sl@0: * FILE *<[fp]>; sl@0: * You can use <> to return the file descriptor identified by <[fp]>. sl@0: * RETURNS sl@0: * <> returns a non-negative integer when successful. sl@0: * If <[fp]> is not an open stream, <> returns -1. sl@0: * PORTABILITY sl@0: * <> is not part of ANSI C. sl@0: * POSIX requires <>. sl@0: * Supporting OS subroutines required: none. sl@0: * sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #include sl@0: #include "LOCAL.H" sl@0: sl@0: EXPORT_C int sl@0: fileno (FILE * f) sl@0: { sl@0: CHECK_INIT (f); sl@0: return __sfileno (f); sl@0: }