OSDN Git Service

* acinclude.m4 (LIBGFOR_CHECK_ATTRIBUTE_VISIBILITY): New.
[pf3gnuchains/gcc-fork.git] / libgfortran / intrinsics / fnum.c
1 /* Implementation of the FNUM intrinsics.
2    Copyright (C) 2004 Free Software Foundation, Inc.
3    Contributed by Steven G. Kargl <kargls@comcast.net>.
4
5 This file is part of the GNU Fortran 95 runtime library (libgfortran).
6
7 Libgfortran is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 Libgfortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with libgfor; see the file COPYING.LIB.  If not,
19 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.  */
21
22 #include "config.h"
23 #include "libgfortran.h"
24
25 #include "../io/io.h"
26
27 /* FUNCTION FNUM(UNIT)
28    INTEGER FNUM
29    INTEGER, INTENT(IN), :: UNIT  */
30
31 extern GFC_INTEGER_4 fnum_i4 (GFC_INTEGER_4 *);
32 export_proto(fnum_i4);
33
34 GFC_INTEGER_4
35 fnum_i4 (GFC_INTEGER_4 *unit)
36 {
37   return unit_to_fd (*unit);
38 }
39
40 extern GFC_INTEGER_8 fnum_i8 (GFC_INTEGER_8 *);
41 export_proto(fnum_i8);
42
43 GFC_INTEGER_8
44 fnum_i8 (GFC_INTEGER_8 * unit)
45 {
46   return unit_to_fd (*unit);
47 }