Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / tests / fcdemo / foo.h
1 /* foo.h -- interface to fortran and C libraries
2
3    Copyright (C) 1998-1999, 2005 Free Software Foundation, Inc.
4    Written by Eric Lindahl, 2002
5
6    This file is part of GNU Libtool.
7
8 GNU Libtool is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of
11 the License, or (at your option) any later version.
12
13 GNU Libtool is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GNU Libtool; see the file COPYING.  If not, a copy
20 can be downloaded from  http://www.gnu.org/licenses/gpl.html,
21 or obtained by writing to the Free Software Foundation, Inc.,
22 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 */
24
25 #ifndef _FOO_H_
26 #define _FOO_H_ 1
27
28 /* config.h is necessary for the fortran name mangling */
29 #ifdef HAVE_CONFIG_H
30 #include <config.h>
31 #endif
32
33 /* csub is an extremely useful subroutine that
34  * returns the argument multiplied by two :-)
35  */
36 extern int csub(int);
37
38 /* This routine performs the same action, but
39  * calls the fortran subroutine fsub to do the
40  * real work.
41  */
42 extern int fwrapper(int);
43
44 /* fsub does the same thing as csub, i.e. res=arg*2.
45  * Use autoconf macro for fortran function names.
46  * Note that fortran passes args by reference, so
47  * you need to provide pointers to your ints.
48  */
49 extern
50 #ifdef __cplusplus
51 "C"
52 #endif
53 void FC_FUNC(fsub,FSUB)(int *arg, int *res);
54
55
56 #endif