Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
bfort(1)							      bfort(1)

       bfort -	program	to extract short definitions for a Fortran to C	inter-

	      -	Names the files	from which lint	 definitions  are  to  be  ex-
	      -	 Do  not  generate  messages for routines that can not be con-
	      verted to	Fortran.
	      -	Generate messages for all routines/macros  without  a  Fortran
       -dir name
	      -	Directory for output file
       -I name
	      -	file that contains common includes
	      -	translate pointers to integer indices
	      -	prefix for names of functions to convert to/from pointers (de-
	      fault is __).  The macro that selects  the  form	based  on  the
	      pointer size can be changed with -ptr64.
	      -	 Generate  a  single Fortran wrapper that works	for almost all
	      systems, by adding C  preprocessor  names	 (see  below).	 These
	      names can	be changed with	-fcaps,	-fuscore, and -fduscore.
       -ferr  -	 Fortran  versions return the value of the routine as the last
	      argument (an integer).  This is used in MPI and is a not	uncom-
	      mon approach for handling	error returns.
       -mpi   -	Handle MPI datatypes (some things are pointers by definition)
       -mpi2  -	 Handle	 MPI  datatypes	using MPI2 converstion functions (some
	      things are pointers by definition)
	      -	Do not generate	PMPI names
       -pmpi name
	      -	Change macro used to select MPI	profiling version
	      -	Turn off the generation	of the profiling version
	      -	Multiple indirects are native datatypes	(no coercion)
	      -	Consider "void *" as a pointer to a structure.
       -ansi  -	C routines use ANSI prototype form rather than K&R C form
	      -	Generate ANSI-C	style headers instead  of  Fortran  interfaces
	      This will	be useful for creating ANSI prototypes	 without ANSI-
	      fying the	code.  These use a trick to provide both ANSI and non-
	      ANSI  prototypes.	  The declarations are wrapped in "ANSI_ARGS",
	      the definition of	which should be
	      #ifdef ANSI_ARG
	      #undef ANSI_ARG
	      #ifdef __STDC__
	      #define ANSI_ARGS(a) a
	      #define ANSI_ARGS(a) ()

	      -	Do not add
	      #ifndef DEBUG_ALL
	      #define DEBUG_ALL

	      to the wrapper file.
	      -	Generate a single wrapper that can handle the three most  com-
	      mon  cases:  trailing  underscore,  no underscore, and all caps.
	      The choice is based on whether
	      FORTRANCAPS:	 Names are uppercase, no trailing underscore
	      FORTRANUNDERSCORE: Names are lowercase, trailing underscore
	      are defined.
	      FORTRANDOUBLEUNDERSCORE: Names are lowercase, with TWO trailing

	      underscores.  This is needed when	some  versions	of  "f2c"  are
	      used to generate C for Fortran routines.	Note that f2c uses two
	      underscores ONLY when the	name already  contains	an  underscore
	      (at  least  on the FreeBSD system	that I use that	uses f2c).  To
	      handle this case,	the generated code contains the	second	under-
	      score only when the name already contains	one.

	      If -mapptr is also chosen, then

	      will also	be used	to determine if	pointers are to	long to	fit in
	      a	32-bit Fortran integer.	 Routines that destroy a pointer  will
	      need to manually insert a	call to	__RmPointer.  The routines for
	      managing the pointers are	in ptrcvt.c

	      In addition, if -mpi is used and -no_pmpi	is not,	the  MPI  pro-
	      filing names are also generated, surrounded by MPI_BUILD_PROFIL-

       We really need a	way to specify a general type as a pointer, so that it
       will be handled as a pointer.  The -mpi option is a kludge for a	press-
       ing need.  Eventually should provide a "-ptr name" option and keep in a
       search space when looking for known types.

       Bill Gropp


				   1/5/2000			      bfort(1)


Want to link to this manual page? Use this URL:

home | help