File: common.m4

package info (click to toggle)
libhdf4 4.1r4-18.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 24,348 kB
  • ctags: 26,692
  • sloc: ansic: 207,307; fortran: 30,195; sh: 7,789; makefile: 7,470; cpp: 2,186; pascal: 1,407; asm: 1,027; yacc: 680; lex: 202; sed: 153
file content (54 lines) | stat: -rw-r--r-- 2,456 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
divert(-1)dnl
#
# diversion 1 is for collecting formal arguments
# diversion 2 is for extra formal arguments for string lengths
# diversion 3 is for formal argument declarations
# diversion 4 is for extra local variables derived from formal arguments
#
define(`STRING',`divert(1)ifdef(`INIT',,`, ')STRINGF(`$1')`'undefine(`INIT')divert(2)`'STRINGX(`$1')`'divert(3)`'STRINGD(`$1',`$2')`'divert(4)`'STRINGL(`$1')`'divert(0)')dnl
define(`INTEGERSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
    F_INTEGER		*$1;	`$2'divert(0)')dnl
define(`INTSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
    int		*$1;	`$2'divert(0)')dnl
define(`LONGSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
    long		*$1;	`$2'divert(0)')dnl
define(`FLOATSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
    float	*$1;	`$2'divert(0)')dnl
define(`DOUBLESTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
    double	*$1;	`$2'divert(0)')dnl
#
# The following is for a pointer to a single character, not a Fortran 
# character variable
#
define(`CHARSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
    char	*$1;	`$2'divert(0)')dnl
define(`VOIDSTAR',`divert(1)ifdef(`INIT',,`, ')$1`'undefine(`INIT')divert(3)
    void	*$1;	`$2'divert(0)')dnl
define(`M4__PROTO',`define(`INIT',1)$2`'NAMEF($1)(undivert(1)undivert(2))undivert(3)')
define(`M4__LOCALS',`undivert(4)')
# To make a C external struct name visible as a Fortran named common, e.g.
# if
#    extern struct foo {int n; float y} bar_;
# is available to fortran as 
#    common/bar/n, y
# then we want this macro to append a `_' to its argument.  NAMEF works
# for this in every case we know about.
define(`M4__STRUCT_FOR_COMMON',`NAMEF($1)')dnl

# Note: override the following default definitions in OS.m4, where necessary

# Includes needed at the top of a file of C to be called from FORTRAN,
# e.g. "#include descrip" for VMS
define(`M4__STRING_DESCRIPTOR_INCLUDES',`')

# Special #defines needed for this FORTRAN, e.g. FORTRAN_HAS_NO_SHORT 
define(`M4__FORTRAN_DEFINES',`')

# FORTRAN syntax for including a file, e.g. `$include: "filename"' for msoft
define(`M4__RIGHT_QUOTE',')
define(`F_INCLUDE',`      `include' M4__RIGHT_QUOTE`'$1`'M4__RIGHT_QUOTE')

# include declaring C interfaces, needed in FORTRAN when calling C, e.g.
# Microsoft FORTRAN needs to include msoft.int
define(`M4__C_INTERFACE_DECLARATIONS',`')
divert(0)dnl