aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am41
-rw-r--r--Makefile.in89
-rw-r--r--bin/.trailer12
-rwxr-xr-xbin/calfuse.csh165
-rwxr-xr-xbin/calfuse.sh142
-rwxr-xr-xbin/calfuse.wavecal130
-rwxr-xr-xbin/cf_make_900_obs.csh193
-rwxr-xr-xbin/cf_make_all.csh487
-rwxr-xr-xbin/cf_make_all_obs.csh555
-rw-r--r--bin/cfsetup.csh31
-rw-r--r--bin/cfsetup.sh20
-rwxr-xr-xbin/idl_obsplot.pl48
-rwxr-xr-xbin/idlplot_rate.pl48
-rwxr-xr-xbin/idlplot_spex.pl48
-rwxr-xr-xbin/listheadbin573860 -> 0 bytes
-rwxr-xr-xbin/listtrabin598468 -> 0 bytes
-rwxr-xr-xconfigure11
-rw-r--r--configure.ac8
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/Makefile.in1
-rw-r--r--docs/FIXING_SELINUX_ISSUES84
-rw-r--r--docs/INSTALLING_A_FORTRAN_COMPILER259
-rw-r--r--docs/INSTALLING_CalFUSEv3.2.3215
-rw-r--r--docs/INTRO_TO_CalFUSEv3.2.3385
-rw-r--r--docs/pipeline_status.html3515
-rw-r--r--include/calfitsio.h157
-rw-r--r--include/calfuse.h536
-rw-r--r--include/cfitsio/cfortran.h2149
-rw-r--r--include/cfitsio/compress.h212
-rw-r--r--include/cfitsio/drvrsmem.h178
-rw-r--r--include/cfitsio/eval_defs.h147
-rw-r--r--include/cfitsio/eval_tab.h37
-rw-r--r--include/cfitsio/f77_wrap.h277
-rw-r--r--include/cfitsio/fitsio.h1355
-rw-r--r--include/cfitsio/fitsio2.h870
-rw-r--r--include/cfitsio/group.h65
-rw-r--r--include/cfitsio/grparser.h181
-rw-r--r--include/cfitsio/imcompress.h56
-rw-r--r--include/cfitsio/longnam.h476
-rw-r--r--include/cfitsio/pctype.h155
-rw-r--r--include/cfitsio/region.h80
-rw-r--r--include/cfitsio/ricecomp.h107
-rw-r--r--include/cfortran.doc2051
-rw-r--r--include/cfortran.h2363
-rw-r--r--include/cfortran.h.3.92149
-rw-r--r--include/compress.h212
-rw-r--r--include/drvrsmem.h178
-rw-r--r--include/eval_defs.h147
-rw-r--r--include/eval_tab.h37
-rw-r--r--include/f77_wrap.h277
-rw-r--r--include/fitsio.h1355
-rw-r--r--include/fitsio2.h870
-rw-r--r--include/fusebuf.h34
-rw-r--r--include/group.h65
-rw-r--r--include/grparser.h181
-rw-r--r--include/imcompress.h56
-rw-r--r--include/longnam.h476
-rw-r--r--include/pctype.h155
-rw-r--r--include/region.h80
-rw-r--r--include/ricecomp.h107
-rw-r--r--include/sgp4.h62
-rw-r--r--include/slalib.h418
-rw-r--r--include/slamac.h100
-rw-r--r--[l---------]m4/libtool.m48365
-rw-r--r--[l---------]m4/ltoptions.m4438
-rw-r--r--[l---------]m4/ltsugar.m4125
-rw-r--r--[l---------]m4/ltversion.m424
-rw-r--r--[l---------]m4/lt~obsolete.m4100
-rw-r--r--scripts/Makefile.am21
-rw-r--r--scripts/Makefile.in267
-rwxr-xr-xscripts/calfuse.csh2
-rwxr-xr-xscripts/calfuse.sh20
-rwxr-xr-xscripts/calfuse.wavecal2
-rwxr-xr-xscripts/cf_make_900_obs.csh4
-rwxr-xr-xscripts/cf_make_all.csh4
-rwxr-xr-xscripts/cf_make_all_obs.csh4
-rw-r--r--scripts/cfsetup.csh.in2
-rw-r--r--scripts/cfsetup.sh.in6
-rw-r--r--src/Makefile.in2
-rw-r--r--src/analysis/Makefile.am2
-rw-r--r--src/analysis/Makefile.in6
-rwxr-xr-xsrc/analysis/cf_make_900_obs.csh193
-rwxr-xr-xsrc/analysis/cf_make_all_obs.csh555
-rw-r--r--src/analysis/gethmjd.h0
-rw-r--r--src/cal/Makefile.in2
-rw-r--r--src/cal/jitter/Makefile.am2
-rw-r--r--src/cal/jitter/Makefile.in6
-rw-r--r--src/fes/Makefile.am2
-rw-r--r--src/fes/Makefile.in6
-rw-r--r--src/fuv/Makefile.am27
-rw-r--r--src/fuv/Makefile.in306
-rw-r--r--src/libcf/Makefile.am3
-rw-r--r--src/libcf/Makefile.in7
-rw-r--r--src/slalib/Makefile.am2
-rw-r--r--src/slalib/Makefile.in6
95 files changed, 9512 insertions, 25899 deletions
diff --git a/Makefile.am b/Makefile.am
index 0f7cbee..b234b31 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,41 @@
+SUBDIRS = . src scripts doc
+pkgdatadir = $(datadir)/@PACKAGE@-@VERSION@
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = . src
+DATADIRS = calfiles parmfiles idl
+EXTRA_DIST = $(DATADIRS) \
+ src/fes/cf_calfes.h \
+ src/include/calfitsio.h \
+ src/include/calfuse.h \
+ src/include/cfortran.h \
+ src/include/compress.h \
+ src/include/config.h \
+ src/include/drvrsmem.h \
+ src/include/eval_defs.h \
+ src/include/eval_tab.h \
+ src/include/f77_wrap.h \
+ src/include/fusebuf.h \
+ src/include/group.h \
+ src/include/grparser.h \
+ src/include/imcompress.h \
+ src/include/longnam.h \
+ src/include/pctype.h \
+ src/include/region.h \
+ src/include/ricecomp.h \
+ src/include/sgp4.h \
+ src/include/slalib.h \
+ src/include/slamac.h
+
+# scripts/calfuse.wavecal \
+# scripts/cf_make_900_obs.csh \
+# scripts/cf_make_all.csh \
+# scripts/cf_make_all_obs.csh \
+# scripts/idl_obsplot.pl \
+# scripts/idlplot_rate.pl \
+# scripts/idlplot_spex.pl \
+# scripts/listhead \
+# scripts/listtra
+
+install-data-local: $(DATADIRS)
+ mkdir -p $(DESTDIR)$(pkgdatadir)
+ cp -a $(DATADIRS) $(DESTDIR)$(pkgdatadir)
+
diff --git a/Makefile.in b/Makefile.in
index aa90495..fddace7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -69,7 +69,6 @@ am__make_running_with_option = \
test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
-pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
@@ -100,7 +99,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
@@ -138,8 +137,7 @@ am__recursive_targets = \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope distdir dist dist-all distcheck
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
- $(LISP)config.h.in
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@@ -160,8 +158,9 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in compile \
- config.guess config.sub depcomp install-sh ltmain.sh missing
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/src/include/config.h.in compile config.guess \
+ config.sub depcomp install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -204,6 +203,7 @@ distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
+pkgdatadir = $(datadir)/@PACKAGE@-@VERSION@
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
@@ -328,10 +328,33 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+SUBDIRS = . src scripts doc
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = . src
-all: config.h
- $(MAKE) $(AM_MAKEFLAGS) all-recursive
+DATADIRS = calfiles parmfiles idl
+EXTRA_DIST = $(DATADIRS) \
+ src/fes/cf_calfes.h \
+ src/include/calfitsio.h \
+ src/include/calfuse.h \
+ src/include/cfortran.h \
+ src/include/compress.h \
+ src/include/config.h \
+ src/include/drvrsmem.h \
+ src/include/eval_defs.h \
+ src/include/eval_tab.h \
+ src/include/f77_wrap.h \
+ src/include/fusebuf.h \
+ src/include/group.h \
+ src/include/grparser.h \
+ src/include/imcompress.h \
+ src/include/longnam.h \
+ src/include/pctype.h \
+ src/include/region.h \
+ src/include/ricecomp.h \
+ src/include/sgp4.h \
+ src/include/slalib.h \
+ src/include/slamac.h
+
+all: all-recursive
.SUFFIXES:
am--refresh: Makefile
@@ -368,20 +391,20 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
-config.h: stamp-h1
- @test -f $@ || rm -f stamp-h1
- @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+src/include/config.h: src/include/stamp-h1
+ @test -f $@ || rm -f src/include/stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) src/include/stamp-h1
-stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
- @rm -f stamp-h1
- cd $(top_builddir) && $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: $(am__configure_deps)
+src/include/stamp-h1: $(top_srcdir)/src/include/config.h.in $(top_builddir)/config.status
+ @rm -f src/include/stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status src/include/config.h
+$(top_srcdir)/src/include/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
- rm -f stamp-h1
+ rm -f src/include/stamp-h1
touch $@
distclean-hdr:
- -rm -f config.h stamp-h1
+ -rm -f src/include/config.h src/include/stamp-h1
mostlyclean-libtool:
-rm -f *.lo
@@ -688,7 +711,7 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-recursive
-all-am: Makefile config.h
+all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
@@ -743,7 +766,7 @@ info: info-recursive
info-am:
-install-data-am:
+install-data-am: install-data-local
install-dvi: install-dvi-recursive
@@ -791,7 +814,7 @@ ps-am:
uninstall-am:
-.MAKE: $(am__recursive_targets) all install-am install-strip
+.MAKE: $(am__recursive_targets) install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
@@ -801,11 +824,11 @@ uninstall-am:
distclean-hdr distclean-libtool distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs installdirs-am maintainer-clean \
+ install-data-local install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am
@@ -813,6 +836,20 @@ uninstall-am:
.PRECIOUS: Makefile
+# scripts/calfuse.wavecal \
+# scripts/cf_make_900_obs.csh \
+# scripts/cf_make_all.csh \
+# scripts/cf_make_all_obs.csh \
+# scripts/idl_obsplot.pl \
+# scripts/idlplot_rate.pl \
+# scripts/idlplot_spex.pl \
+# scripts/listhead \
+# scripts/listtra
+
+install-data-local: $(DATADIRS)
+ mkdir -p $(DESTDIR)$(pkgdatadir)
+ cp -a $(DATADIRS) $(DESTDIR)$(pkgdatadir)
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/bin/.trailer b/bin/.trailer
deleted file mode 100644
index deaf46a..0000000
--- a/bin/.trailer
+++ /dev/null
@@ -1,12 +0,0 @@
-************************************************************
-##### CALFUSE PIPELINE-1.8.7: Begin Processing Wed Aug 29 09:38:49 2001
-
-##### cf_ttag_init-1.15: Started execution. Wed Aug 29 09:38:49 2001
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-CalFUSE ERROR in cf_ttag_init-1.15: Wed Aug 29 09:38:49 2001
- Incorrect number of program arguments
- Exiting ...
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
-##### CALFUSE PIPELINE-1.8.7: Abnormal termination Wed Aug 29 09:38:49 2001
-************************************************************
diff --git a/bin/calfuse.csh b/bin/calfuse.csh
deleted file mode 100755
index 4a828d1..0000000
--- a/bin/calfuse.csh
+++ /dev/null
@@ -1,165 +0,0 @@
-#!/usr/local/bin/tcsh -f
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: calfuse.csh file_name
-#*
-#* Description: Shell script for processing FUSE Ver 3.0 time-tagged exposures.
-#* All messages are written to stdout or stderr.
-#*
-#* Arguments: char file_name File name to process is 1st command-
-#* line argument
-#*
-#* Returns: Exit codes:
-#* 0 Successful execution
-#*
-#*
-#* Environment variables: CF_CALDIR Path to directory which contains the
-#* calibration files.
-#* CF_IDLDIR Path to CalFUSE IDL directory
-#* CF_PIPELINE Flag to determine if CALFUSE
-#* is running as part of the JHU
-#* pipeline.
-#*
-#* History: 02/26/03 1.1 peb Begin work on V3.0
-#* 03/19/03 1.2 wvd Add IDL plots
-#* 03/31/03 1.3 peb Add cf_ttag_countmap/gainmap programs
-#* and changed the timestamp format to be
-#* similar to cf_timestamp
-#* 05/16/03 1.4 wvd Distinguish between TTAG and HIST files.
-#* Changed name to calfuse.csh
-#* 05/22/03 1.5 wvd Direct STDERR to trailer file.
-#* 06/03/03 1.6 rdr Incorporated bad pixel map
-#* 06/09/03 1.7 rdr Do not screen on timing flags for HIST
-#* data processed behind the firewall
-#* 07/31/03 1.8 wvd Check error status before exiting.
-#* 09/15/03 1.9 wvd Write BEGIN and END stmts to logfile.
-#* 12/08/03 1.10 wvd For HIST data, always call
-#* cf_extract_spectra and cf_bad_pixels
-#* with -s option.
-#* 12/21/03 1.13 wvd Remove underscore from idf and bpm
-#* filenames.
-#* 04/22/04 1.12 wvd Change name of trailer file to
-#* {$froot}.trl
-#* 05/12/04 1.13 wvd Remove cf_ttag_countmap and
-#* cf_ttag_gainmap from pipeline.
-#* 06/01/04 1.14 wvd For HIST data, no longer need to call
-#* cf_extract_spectra with -s option.
-#* 06/03/04 1.15 wvd Screening step now follows "Convert
-#* to FARF."
-#*
-#*****************************************************************************/
-
-# Delete files after processing? (Default is no.)
-#set DELETE_IDF # Delete intermediate data file
-#set DELETE_BPM # Delete bad-pixel map
-
-set idf = ${1:s/raw/idf/}
-set froot = ${1:s/raw.fit//}
-set logfile = {$froot}.trl
-set ttag = `echo $froot | grep -c ttag`
-
-# Put a timestamp in the log file (the OPUS trailer file).
-if $ttag then
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1" >>& $logfile
-else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1" >>& $logfile
-endif
-
-set cfstat=0
-
-# Step 1 -- Generate Intermediate Data File
-if $ttag then
- cf_ttag_init $1 $idf >>& $logfile
- set cfstat=$status
-else
- cf_hist_init $1 $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 2 -- Convert to FARF
-if ! $cfstat then
- cf_convert_to_farf $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 3 -- Screen photons
-if ! $cfstat then
- cf_screen_photons $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 4 -- Remove motions
-if ! $cfstat then
- cf_remove_motions $idf >>& $logfile
- set cfstat=$status
-endif
-
-if ! $cfstat then
- if ($?CF_IDLDIR) then
- idlplot_rate.pl {$froot} >>& $logfile
- idlplot_spex.pl {$froot} >>& $logfile
- endif
-endif
-
-# Step 5 -- Assign wavelength
-if ! $cfstat then
- cf_assign_wavelength $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 6 -- Flux calibrate
-if ! $cfstat then
- cf_flux_calibrate $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 7 -- Create a bad-pixel file
-if ! $cfstat then
- cf_bad_pixels $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 8 -- Extract spectra
-if ! $cfstat then
- cf_extract_spectra $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 8a -- Delete _bursts.dat file
-if ! $?CF_PIPELINE then
- rm -f ${1:r:s/ttagfraw/_bursts/}.dat
-endif
-
-# Step 8b -- Delete IDF file
-if $?DELETE_IDF then
- echo "NOTE: Deleting intermediate data file."
- rm $idf
-endif
-
-# Step 8c -- Delete bad pixel map (bpm) file
-if $?DELETE_BPM then
- echo "NOTE: Deleting bad pixel map (bpm) file."
- rm -f ${1:s/raw/bpm/}
-endif
-
-if ! $cfstat then
- if $ttag then
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1" >>& $logfile
- else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1" >>& $logfile
- endif
-else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1" >>& $logfile
-endif
-exit($cfstat)
-
-#******************************************************************************
diff --git a/bin/calfuse.sh b/bin/calfuse.sh
deleted file mode 100755
index 0cd23a9..0000000
--- a/bin/calfuse.sh
+++ /dev/null
@@ -1,142 +0,0 @@
-#!/bin/sh
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: calfuse.sh file_name
-#*
-#* Description: Shell script for processing FUSE Ver 3.2 time-tagged exposures.
-#* All messages are written to stdout or stderr.
-#*
-#* Arguments: char file_name File name to process is 1st command-
-#* line argument
-#*
-#* Returns: Exit codes:
-#* 0 Successful execution
-#*
-#*
-#* Environment variables: CF_CALDIR Path to directory which contains the
-#* calibration files.
-#* CF_IDLDIR Path to CalFUSE IDL directory
-#* CF_PIPELINE Flag to determine if CALFUSE
-#* is running as part of the JHU
-#* pipeline.
-#*
-#* History: 09/05/07 1.1 bot Adapted from tcsh script
-#*
-#*****************************************************************************/
-
-# Delete files after processing? (Default is no.)
-#DELETE_IDF=1 # Delete intermediate data file
-#DELETE_BPM=1 # Delete bad-pixel map
-
-idf=`echo $1 | sed -e "s/raw/idf/g"`
-froot=`echo $1 | sed -e "s/raw.fit//g"`
-logfile=${froot}.trl
-ttag=`echo $froot | grep -c ttag`
-
-
-# Put a timestamp in the log file (the OPUS trailer file).
-if [ $ttag = 1 ]; then
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1" >> $logfile 2>&1
-else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1" >> $logfile 2>&1
-fi
-
-cfstat=1
-
-# Step 1 -- Generate Intermediate Data File
-if [ $ttag = 1 ]; then
- cf_ttag_init $1 $idf >> $logfile 2>&1
- cfstat=$?
-else
- cf_hist_init $1 $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-# Step 2 -- Convert to FARF
-if [ $cfstat = 0 ]; then
- cf_convert_to_farf $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-# Step 3 -- Screen photons
-if [ $cfstat = 0 ]; then
- cf_screen_photons $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-# Step 4 -- Remove motions
-if [ $cfstat = 0 ]; then
- cf_remove_motions $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-if [ $cfstat = 0 ]; then
- if [ ${CF_IDLDIR:-""} != "" ]; then
- idlplot_rate.pl $froot >> $logfile 2>&1
- idlplot_spex.pl $froot >> $logfile 2>&1
- fi
-fi
-
-# Step 5 -- Assign wavelength
-if [ $cfstat = 0 ]; then
- cf_assign_wavelength $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-# Step 6 -- Flux calibrate
-if [ $cfstat = 0 ]; then
- cf_flux_calibrate $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-# Step 7 -- Create a bad-pixel file
-if [ $cfstat = 0 ]; then
- cf_bad_pixels $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-# Step 8 -- Extract spectra
-if [ $cfstat = 0 ]; then
- cf_extract_spectra $idf >> $logfile 2>&1
- cfstat=$?
-fi
-
-# Step 8a -- Delete _bursts.dat file
-if [ ${CF_PIPELINE:-""} = "" ]; then
- rm -f `echo $1 | sed -e "s/ttagfraw.fit/_bursts.dat/g"`
-fi
-
-# Step 8b -- Delete IDF file
-if [ ${DELETE_IDF:-""} != "" ]; then
- echo "NOTE: Deleting intermediate data file."
- rm -f $idf
-fi
-
-# Step 8c -- Delete bad pixel map (bpm) file
-if [ ${DELETE_BPM:-""} != "" ]; then
- echo "NOTE: Deleting bad pixel map (bpm) file."
- rm -f `echo $1 | sed -e "s/raw/bpm/g"`
-fi
-
-if [ $cfstat = 0 ]; then
- if [ $ttag = 1 ]; then
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1" >> $logfile 2>&1
- else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1" >> $logfile 2>&1
- fi
-else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1" >> $logfile 2>&1
-fi
-
-exit $cfstat
-
-#******************************************************************************
diff --git a/bin/calfuse.wavecal b/bin/calfuse.wavecal
deleted file mode 100755
index eae4653..0000000
--- a/bin/calfuse.wavecal
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/usr/local/bin/tcsh -f
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: calfuse.wavecal file_name
-#*
-#* Description: Shell script for processing FUSE Ver 3.0 time-tagged exposures.
-#* All messages are written to stdout or stderr.
-#*
-#* WARNING: THIS VERSION IS OPTIMIZED FOR PROCESSING WAVELENGTH
-#* CALIBRATION DATA!!!
-#*
-#* Arguments: char file_name File name to process is 1st command-
-#* line argument
-#*
-#* Returns: Exit codes:
-#* 0 Successful execution
-#*
-#*
-#* Environment variables: CF_CALDIR Path to directory which contains the
-#* calibration files.
-#* CF_IDLDIR Path to CalFUSE IDL directory
-#* CF_PIPELINE Flag to determine if CALFUSE
-#* is running as part of the JHU
-#* pipeline.
-#*
-#* History: 02/26/03 1.1 peb Begin work on V3.0
-#* 03/19/03 1.2 wvd Add IDL plots
-#* 03/31/03 1.3 peb Add cf_ttag_countmap/gainmap programs
-#* and changed the timestamp format to be
-#* similar to cf_timestamp
-#* 05/16/03 1.4 wvd Distinguish between TTAG and HIST files.
-#* Changed name to calfuse.csh
-#* 05/22/03 1.5 wvd Direct STDERR to trailer file.
-#* 06/03/03 1.6 rdr Incorporated bad pixel map
-#* 06/09/03 1.7 rdr Do not screen on timing flags for HIST
-#* data processed behind the firewall
-#* 07/31/03 1.8 wvd Check error status before exiting.
-#* 09/15/03 1.9 wvd Write BEGIN and END stmts to logfile.
-#* 12/08/03 1.10 wvd For HIST data, always call
-#* cf_extract_spectra and cf_bad_pixels
-#* with -s option.
-#* 12/21/03 1.13 wvd Remove underscore from idf and bpm
-#* filenames.
-#* 04/22/04 1.12 wvd Change name of trailer file to
-#* {$froot}.trl
-#* 05/12/04 1.13 wvd Remove cf_ttag_countmap and
-#* cf_ttag_gainmap from pipeline.
-#* 06/01/04 1.14 wvd For HIST data, no longer need to call
-#* cf_extract_spectra with -s option.
-#* 06/03/04 1.15 wvd Screening step now follows "Convert
-#* to FARF."
-#*
-#*****************************************************************************/
-
-set idf = ${1:s/raw/idf/}
-set froot = ${1:s/raw.fit//}
-set logfile = {$froot}.trl
-set ttag = `echo $froot | grep -c ttag`
-
-# Put a time stamp in the log file (the OPUS trailer file).
-if $ttag then
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin TTAG file $1"
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin TTAG file $1" >>& $logfile
-else
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin HIST file $1"
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Begin HIST file $1" >>& $logfile
-endif
-
-set cfstat=0
-
-# Step 1 -- Generate Intermediate Data File
-if $ttag then
- cf_ttag_init $1 $idf >>& $logfile
- set cfstat=$status
-else
- cf_hist_init $1 $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 2 -- Convert to FARF
-if ! $cfstat then
- cf_convert_to_farf $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 3 -- Screen photons
-if ! $cfstat then
- cf_screen_photons $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 4 -- Remove motions
-if ! $cfstat then
- cf_remove_motions $idf >>& $logfile
- set cfstat=$status
-endif
-
-# Step 5 -- Assign wavelength - SAVE ASTIG-CORRECTED X ARRAY
-if ! $cfstat then
- cf_assign_wavelength -w $idf >>& $logfile
- set cfstat=$status
-endif
-
-if ! $cfstat then
- if ($?CF_IDLDIR) then
- idlplot_rate.pl {$froot} >>& $logfile
- idlplot_spex.pl {$froot} >>& $logfile
- endif
-endif
-
-# Step 6 -- Flux calibrate
-if ! $cfstat then
- cf_flux_calibrate $idf >>& $logfile
- set cfstat=$status
-endif
-
-if ! $cfstat then
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Finish data file $1"
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Finish data file $1" >>& $logfile
-else
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Error processing $1"
- echo `date '+%Y %b %e %T'` "calfuse.wavecal-1.15: Error processing $1" >>& $logfile
-endif
-exit($cfstat)
-
-#******************************************************************************
diff --git a/bin/cf_make_900_obs.csh b/bin/cf_make_900_obs.csh
deleted file mode 100755
index 9edbc70..0000000
--- a/bin/cf_make_900_obs.csh
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/usr/local/bin/tcsh -f
-
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: cf_make_900_obs.csh association_file
-#*
-#* Description: This routine is derived from cf_make_all_obs.csh, but modified
-#* to consider only 900+ (airglow) files. Output is a single
-#* quick-look image of the airglow spactrum.
-#*
-#* Extracted spectra are combined, not IDF files.
-#*
-#* When an expected data set is missing, the script stops, cleans
-#* the directory, and returns 1.
-#*
-#* History: 08/08/08 1.00 wvd Create separate quick-look image
-#* for 900+ (airglow) exposures.
-#* Always combine extracted spectra. If
-#* cf_xcorr fails, combine with no shift.
-#* 08/08/08 1.01 wvd Rename airglow quick-look file to
-#* M112580100000airgttagf.gif
-#*
-#*****************************************************************************/
-
-# Delete files after processing? (Default is no.)
-#set DELETE_IDF # Delete intermediate data files
-set DELETE_BPM # Delete bad-pixel map files
-
-# Set program path
-set rm = "/bin/rm -f"
-
-set cf_xcorr = cf_xcorr
-set cf_combine = cf_combine
-set cf_pack = cf_pack
-set cf_nvo = cf_nvo
-set idl_obsplot = idl_obsplot.pl
-set modhead = modhead
-
-# Init var list
-set detector = (1a 2b)
-set channel = (lif sic)
-set resolution = (2 3 4)
-set obsmod = (hist ttag)
-
-# Determine the root name and the program ID
-set asnf = $1
-set rn = ${asnf:s/000asnf.fit//}
-set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
-
-# Determine the object class
-set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
-set tmp_buf = `$modhead $tmp_file OBJCLASS`
-set objclass = $tmp_buf[2]
-
-# Clean tmp files that the script will create (safe)
-$rm tmp_xcorr.res tmp_combine.lis
-$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
-$rm DN_${rn}*.fit
-
-foreach om ($obsmod)
- foreach res ($resolution)
- foreach chan ($channel)
- foreach det ($detector)
-
- set ignore_exp_stat = ''
- if ($om == hist) set ignore_exp_stat = -a
- if ($pid == S100) set ignore_exp_stat = -a
- if ($pid == M106) set ignore_exp_stat = -a
-
- # Find exposures that match the current segment
- set seg = $det$chan$res$om
- set readfiles = 0
- ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
- if ($? == 0) then
- set readfiles = 2
- set ignore_exp_stat = -a
- endif
-
- if ($readfiles >= 1) then # There are one or more exposures
-
- echo " "
- echo "*** Processing: $seg ***"
- # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
- if ($det == 1a) set det2 = 1b
- if ($det == 2b) set det2 = 2a
- set seg2 = $det2$chan$res$om
-
- echo "----- cf_xcorr input -----"
- cat tmp_exp.lis
- echo "----------------------------"
- $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
- echo "----- cf_xcorr results -----"
- cat tmp_xcorr.res
- echo "----------------------------"
-
- awk '{if ($3 >= 0) {print $6, $2} else {print $6}}' tmp_xcorr.res > tmp_good_exp.lis
-
- #
- # --- Path 1: Optimize resolution ---
- #
-
- echo "Optimize resolution..."
- set n_good = `cat tmp_good_exp.lis | wc -l`
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}900${seg}fcal.fit
- awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}900${seg2}fcal.fit
- awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- endif
- end
-
- $rm tmp_xcorr.res tmp_combine.lis
- $rm tmp_good_exp.lis tmp_exp.lis
-
- end
-
- # Pack the 8 [detector][channel] pairs together
- if (-e tmp_seg_dn.lis) then
-
- set fcal_all = ${rn}00900all$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_dn.lis | wc -l`
-
- if (!($n_segs == 8)) then
-
- @ mseg = 8 - $n_segs
- echo "ERROR: $mseg (day + night) segments are missing"
- $rm tmp_seg_dn.lis
- goto crash
-
- else
-
- $cf_pack tmp_seg_dn.lis $fcal_all
- $rm tmp_seg_dn.lis
-
- # Plot figures, delete unwanted files
- $idl_obsplot {$rn} airglow
- mv ${rn}00900spec${om}f.gif ${rn}00000airg${om}f.gif
- $rm ${rn}00900lif*.gif ${rn}00900sic*.gif
- $rm $fcal_all
-
- endif
- endif
- end
-end
-
-# Clean [dn] files.
-$rm DN_${rn}*.fit
-
-# Delete IDF files
-if $?DELETE_IDF then
- echo "NOTE: Deleting intermediate data files."
- $rm ${rn}*idf.fit
-endif
-
-# Delete bad-pixel-map (bpm) files
-if $?DELETE_BPM then
- echo "NOTE: Deleting bad pixel map (bpm) files."
- $rm ${rn}*bpm.fit
-endif
-
-exit(0)
-
-crash: # Procedure when script crashes
-
-# Clean directory
-$rm tmp_xcorr.res tmp_combine.lis
-$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
-$rm DN_*.fit
-
-# Return 1
-exit(1)
diff --git a/bin/cf_make_all.csh b/bin/cf_make_all.csh
deleted file mode 100755
index 2cfbc46..0000000
--- a/bin/cf_make_all.csh
+++ /dev/null
@@ -1,487 +0,0 @@
-#!/usr/local/bin/tcsh -f
-
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: cf_make_all.csh
-#*
-#* Description: Creates 3 files from a Calfuse output (properly run):
-#*
-#* 1) An "all" file containing 1 extension per detector (= 8).
-#* Each extension contains a combined spectrum from the set
-#* of exposures, using "Xcorr" or "Background" method.
-#* 2) In the case of TTAG data, creates an "ano" file. Same as
-#* the "all" file but considering "night only" exposure time.
-#* 3) A National Virtual Observatory "nvo" file. One extension
-#* containing wavelengths that span the whole FUSE range.
-#*
-#* The Xcorr method consists in co-adding spectra, the latter
-#* being corrected for a possible shift. The Background method
-#* consists in combining all the IDF files.
-#*
-#* The Xcorr test is performed on 4 (detector, channel) pairs, the
-#* method of other pairs are given by them:
-#* LiF 1a -> Lif 1b
-#* LiF 2b -> LiF 2a
-#* SiC 1a -> Sic 1b
-#* Sic 2b -> Sic 2a
-#* In the script, the left segments are referred as to $seg (or
-#* $det) and the right segments are referred as to $seg2 (or
-#* $det2).
-#*
-#* When an expected data set is missing, the script stops, cleans
-#* directory, and returns 1.
-#*
-#* History: 04/15/05 1.0 tc First release
-#*
-#*****************************************************************************/
-
-# Set program path
-set rm = "/bin/rm -f"
-
-set cf_xcorr = cf_xcorr
-set cf_combine = cf_combine
-set cf_pack = cf_pack
-set cf_nvo = cf_nvo
-set modhead = modhead
-
-#set cf_xcorr = /home/vela/civeit/Work/CalFuse/Xcorr/New/cf_xcorr
-#set cf_combine = /home/vela/civeit/Work/CalFuse/Shiftexp/cf_combine
-#set cf_pack = /home/vela/civeit/Work/CalFuse/Pack/cf_pack
-#set cf_nvo = /home/vela/civeit/Work/CalFuse/Nvo/cf_nvo
-#set modhead = /home/vela/civeit/local/bin/modhead
-
-set cf_obsplot = /data1/fuse/calfuse/v3.1/idl/cf_obsplot.pro
-
-
-# Init var list
-set detector = (1a 2b)
-set channel = (lif sic)
-set resolution = (2 3 4)
-set obsmod = (hist ttag)
-
-# Determine the root name
-ls [A-Z][0-9][0-9][0-9][0-9][0-9][0-9][0-9]000asnf.fit >& tmp_asnf
-if ($? == 0) then
- set asnf = `cat tmp_asnf`
- set rn = ${asnf:s/000asnf.fit//}
- $rm tmp_asnf
-else
- echo "ERROR: asnf file is missing"
- $rm tmp_asnf
- goto crash
-endif
-
-# Clean tmp files that the script will create (safe)
-$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
-$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
-$rm DN_${rn}*.fit NO_${rn}*.fit
-
-foreach om ($obsmod)
- foreach res ($resolution)
- foreach chan ($channel)
- foreach det ($detector)
-
- # Find exposures that match the current segment
- set seg = $det$chan$res$om
- ls ${rn}[0-8][0-9][0-9]${seg}fcal.fit |& grep -v 000 > tmp_exp.lis # Reject EXP "9xx" and "000"
-
- if ($? == 0) then # There are one or more exposures
-
- echo " "
- echo "*** Processing: $seg ***"
- # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
- if ($det == 1a) set det2 = 1b
- if ($det == 2b) set det2 = 2a
- set seg2 = $det2$chan$res$om
-
- echo "----- cf_xcorr input -----"
- cat tmp_exp.lis
- echo "----------------------------"
- $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
- echo "----- cf_xcorr results -----"
- cat tmp_xcorr.res
- echo "----------------------------"
-
- awk '{if ($5 > 0) print $6, $4, $5}' tmp_xcorr.res > tmp_all_night_exp.lis
- awk '{if ($3 >= 0) print $6,$2}' tmp_xcorr.res > tmp_good_exp.lis
- awk '{if (($3 >= 0) && ($5 > 0)) print $6,$2, $4, $5}' tmp_xcorr.res > tmp_night_exp.lis
- set time_good = `awk 'BEGIN{$t = 0} {if ($3 >= 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
- set time_bad = `awk 'BEGIN{$t = 0} {if ($3 < 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
- echo "Xcorr time: $time_good - Background time: $time_bad"
-
- if ($time_good > 2 * $time_bad) then
-
- #
- # --- Path 1: Optimize resolution ---
- #
-
- echo "Optimize resolution..."
- set n_good = `cat tmp_good_exp.lis | wc -l`
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}000${seg}fcal.fit
- awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
- $cf_combine tmp_combine.lis $s -k
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}000${seg2}fcal.fit
- awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
- $cf_combine tmp_combine.lis $s -k
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set n_night = `cat tmp_night_exp.lis | wc -l`
- if ($om == ttag && $n_night > 0) then # Create and combine night only files
-
- echo "*** Creating night only files ***"
- set exp_nums = `awk '{print $1}' tmp_night_exp.lis`
-
- foreach exp ($exp_nums)
-
- # Create night-only BPM and FCAL files if they do not already exist.
- set bno1 = NO_$rn$exp$det${om}fbpm.fit # Bad-pixel maps
- set bno2 = NO_$rn$exp$det2${om}fbpm.fit
- set cno1 = NO_$rn$exp${seg}fcal.fit # Extracted spectra
- set cno2 = NO_$rn$exp${seg2}fcal.fit
-
- set etime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $3}'`
- set ntime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $4}'`
- set ratio = `egrep "^$exp" tmp_night_exp.lis | awk '{printf "%.0f", 0.5+$4/$3*10.}'`
-
- if (!(-e $cno1)) then
- if ($etime == $ntime) then
- echo "$cno1 is a symbolic link to $rn$exp${seg}fcal.fit"
- ln -s $rn$exp${seg}fcal.fit $cno1
- else
-
- set idf_file = $rn$exp$det${om}fidf.fit
- if (!(-e $bno1)) then
- if ($ratio > 9) then
- echo "$bno1 is a symbolic link to $rn$exp$det${om}fbpm.fit"
- ln -s $rn$exp$det${om}fbpm.fit $bno1
- else
- echo "Creating BPM: $bno1 ..."
- cf_bad_pixels -n $bno1 $idf_file
- endif
- endif
-
- echo "Creating (LiF + SiC) FCAL: $cno1 ..."
- cf_extract_spectra -n $bno1 -r NO_$rn$exp $idf_file # Existence of $bno1 is not required
- endif
- endif
-
- if (!(-e $cno2)) then
- if ($etime == $ntime) then
- echo "Using a symbolic link to $cno2"
- ln -s $rn$exp${seg2}fcal.fit NO_$rn$exp${seg2}fcal.fit
- else
-
- set idf_file = $rn$exp$det2${om}fidf.fit
- if (!(-e $bno2)) then
- if ($ratio > 9) then
- echo "Using a symbolic link to $bno2"
- ln -s $rn$exp$det2${om}fbpm.fit NO_$rn$exp$det2${om}fbpm.fit
- else
- echo "Creating BPM: $bno2 ..."
- cf_bad_pixels -n $bno2 $idf_file
- endif
- endif
-
- echo "Creating (LiF + SiC) FCAL: $cno2 ..."
- cf_extract_spectra -n $bno2 -r NO_$rn$exp $idf_file # Existence of $bno2 is not required
- endif
- endif
-
- end
-
- # Combine exposures into a single spectrum.
- set s = NO_${rn}000${seg}fcal.fit
- awk '{print "NO_'$rn'"$1"'$seg'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg [no]
- $cf_combine tmp_combine.lis $s -k
- # $modhead "${s}[1]" NUM_EXP $n_night
- $modhead "${s}[0]" DAYNIGHT NIGHT
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_no.lis
-
- set s = NO_${rn}000${seg2}fcal.fit
- awk '{print "NO_'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg2 [no]
- $cf_combine tmp_combine.lis $s -k
- # $modhead "${s}[1]" NUM_EXP $n_night
- $modhead "${s}[0]" DAYNIGHT NIGHT
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_no.lis
-
- endif
-
- else
-
- #
- # --- Path 2: Optimize background ---
- #
-
- echo "Optimize background..."
-
- # Combine IDF files
- set idf1_all = DN_${rn}000$det${om}fidf.fit # Same for [dn] and [no]
- set idf2_all = DN_${rn}000$det2${om}fidf.fit
-
- if (!(-e $idf1_all)) then
- echo "Creating IDF: $idf1_all ..."
- ls ${rn}[0-8][0-9][0-9]$det${om}fidf.fit |& grep -v 000 > tmp_idf.lis # Reject EXP "9xx" and "000"
- if ($? == 0) then # IDF files exist
-
- set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
- idf_combine -c $idf1_all $idf_lis # Create combined IDF file for $seg
- $rm tmp_idf.lis
-
- else
-
- echo "ERROR: IDF files are missing"
- $rm -f tmp_idf.lis
- goto crash
-
- endif
- endif
-
- if (!(-e $idf2_all)) then
- echo "Creating IDF: $idf2_all ..."
- ls ${rn}[0-8][0-9][0-9]$det2${om}fidf.fit |& grep -v 000 > tmp_idf.lis # Reject EXP "9xx" and "000"
- if ($? == 0) then # IDF files exist
-
- set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
- idf_combine $idf2_all $idf_lis # Create combined IDF file for $seg2
- $rm tmp_idf.lis
-
- else
-
- echo "ERROR: IDF files are missing"
- $rm -f tmp_idf.lis
- goto crash
-
- endif
- endif
-
- # Get the number of (valid) combined IDF files
- set tmp_buf = `$modhead $idf1_all NSPEC`
- set n_comb1 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf1_all SPEC001`
- set idf1_1 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf2_all NSPEC`
- set n_comb2 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf2_all SPEC001`
- set idf2_1 = $tmp_buf[3]
-
- # Combine BPM files
- set bpm1_all = DN_${rn}000$det${om}fbpm.fit
- set bpm2_all = DN_${rn}000$det2${om}fbpm.fit
-
- if (!(-e $bpm1_all)) then
- echo "Combine all BPM (from IDF): $bpm1_all ..."
- bpm_combine $bpm1_all $idf1_all # Create combined BPM file [dn] for $seg
- endif
-
- if (!(-e $bpm2_all)) then
- echo "Combine all BPM (from IDF): $bpm2_all ..."
- bpm_combine $bpm2_all $idf2_all # Idem for $seg2
- endif
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}000${seg}fcal.fit
- set xxx = DN_${rn}xxx${seg}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
- $modhead "${s}[0]" NSPEC $n_comb1
- $modhead "${s}[0]" SPEC001 $idf1_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}000${seg2}fcal.fit
- set xxx = DN_${rn}xxx${seg2}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
- $modhead "${s}[0]" NSPEC $n_comb2
- $modhead "${s}[0]" SPEC001 $idf2_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_dn.lis
-
- set n_night = `cat tmp_all_night_exp.lis | wc -l`
- if ($om == ttag && $n_night > 0) then # Create and combine night only files
-
- echo "*** Creating night only files ***"
- set exp_nums = `awk '{print $1}' tmp_all_night_exp.lis`
- $rm tmp_bpm1.lis tmp_bpm2.lis
-
- foreach exp ($exp_nums)
-
- # Create bpm night only files (if they do not exist yet)
- set bno1 = NO_$rn$exp$det${om}fbpm.fit
- set bno2 = NO_$rn$exp$det2${om}fbpm.fit
-
- set idf_file = $rn$exp$det${om}fidf.fit
- if (!(-e $bno1)) then
- echo "Creating BPM: $bno1 ..."
- cf_bad_pixels -n $bno1 $idf_file
- endif
- if (-e $bno1) echo $bno1 >> tmp_bpm1.lis # If valid, add in $seg list
-
- set idf_file = $rn$exp$det2${om}fidf.fit
- if (!(-e $bno2)) then
- echo "Creating BPM: $bno2 ..."
- cf_bad_pixels -n $bno2 $idf_file
- endif
- if (-e $bno2) echo $bno2 >> tmp_bpm2.lis # If valid, add in $seg2 list
-
- end
-
-
- # Combine BPM for $seg and extract spectra
-
- set bpm1_all = NO_${rn}000$det${om}fbpm.fit
- set n_bpm = `cat tmp_bpm1.lis | wc -l`
- echo "Number of valid BPM files: $n_bpm"
-
- if ($n_bpm > 0) then
-
- echo $n_bpm > tmp_bpm.lis
- cat tmp_bpm1.lis >> tmp_bpm.lis
-
- if (!(-e $bpm1_all)) then
- echo "Combine all BPM (from list): $bpm1_all ..."
- bpm_combine $bpm1_all tmp_bpm.lis # Create combined BPM file [no] for $seg
- endif
- $rm tmp_bpm.lis
-
- endif
-
- # Extract [Night only] spectra. The existence of $bpm1_all is not required
- set s = NO_${rn}000${seg}fcal.fit
- set xxx = NO_${rn}xxx${seg}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -n $bpm1_all -r NO_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
- $modhead "${s}[0]" NSPEC $n_comb1
- $modhead "${s}[0]" SPEC001 $idf1_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_no.lis
-
-
- # Combine BPM for $seg2 and extract spectra
-
- set bpm2_all = NO_${rn}000$det2${om}fbpm.fit
- set n_bpm = `cat tmp_bpm2.lis | wc -l`
- echo "Number of valid BPM files: $n_bpm"
-
- if ($n_bpm > 0) then
-
- echo $n_bpm > tmp_bpm.lis
- cat tmp_bpm2.lis >> tmp_bpm.lis
-
- if (!(-e $bpm2_all)) then
- echo "Combine all BPM (from list): $bpm2_all ..."
- bpm_combine $bpm2_all tmp_bpm.lis # Create combined BPM file [no] for $seg2
- endif
- $rm tmp_bpm.lis
-
- endif
-
- # Extract [Night only] spectra. The existence of $bpm2_all is not required
- set s = NO_${rn}000${seg2}fcal.fit
- set xxx = NO_${rn}xxx${seg2}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -n $bpm2_all -r NO_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine tmp_combine.lis $s -k # Does not combine, just update keywords
- $modhead "${s}[0]" NSPEC $n_comb2
- $modhead "${s}[0]" SPEC001 $idf2_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_no.lis
-
- endif
- endif
- endif
- end
-
- $rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis
- $rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_night_exp.lis
-
- end
-
- # Pack the 8 [detector][channel] pairs together ([dn] and [no] for ttag)
- if (-e tmp_seg_dn.lis) then
-
- set fcal_all = ${rn}00000all$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_dn.lis | wc -l`
-
- if (!($n_segs == 8)) then
-
- @ mseg = 8 - $n_segs
- echo "ERROR: $mseg (day + night) segments are missing"
- $rm tmp_seg_dn.lis
- goto crash
-
- else
-
- $cf_pack tmp_seg_dn.lis $fcal_all
- $rm tmp_seg_dn.lis
-
- # Plot figures
- echo ".compile '$cf_obsplot'" > tmp_idl_batch
- echo "cf_obsplot, '$rn'" >> tmp_idl_batch
- echo "exit" >> tmp_idl_batch
- idl tmp_idl_batch
- $rm tmp_idl_batch
-
- # Create National Virtual Observatory file
- set nvo_file = ${rn}00000nvo$res${om}fcal.fit
- $rm $nvo_file # Clean (safe)
- $cf_nvo $fcal_all $nvo_file # Create file
-
- if (-e tmp_seg_no.lis) then
-
- set fcal_all = ${rn}00000ano$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_no.lis | wc -l`
-
- if (!($n_segs == 8)) then
-
- @ mseg = 8 - $n_segs
- echo "ERROR: $mseg (night only) segments are missing"
- $rm tmp_seg_no.lis
- goto crash
-
- else
-
- $cf_pack tmp_seg_no.lis $fcal_all
- $rm tmp_seg_no.lis
-
- endif
-
- endif
- endif
- endif
- end
-end
-
-# Clean [dn] and [no] files. Just keep: all, (ano) and nvo
-$rm DN_${rn}*.fit NO_${rn}*.fit
-exit(0)
-
-
-crash: # Procedure when script crashes
-
-# Clean directory
-$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
-$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
-$rm DN_*.fit NO_*.fit
-
-# Return 1
-exit(1)
diff --git a/bin/cf_make_all_obs.csh b/bin/cf_make_all_obs.csh
deleted file mode 100755
index 2a97247..0000000
--- a/bin/cf_make_all_obs.csh
+++ /dev/null
@@ -1,555 +0,0 @@
-#!/usr/local/bin/tcsh -f
-
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: cf_make_all_obs.csh association_file
-#*
-#* Description: Creates 3 files from Calfuse output (properly run):
-#*
-#* 1) An "all" file containing 1 extension per detector (= 8).
-#* Each extension contains a combined spectrum from the set
-#* of exposures, using "Xcorr" or "Background" method.
-#* 2) In the case of TTAG data, creates an "ano" file. Same as
-#* the "all" file but considering "night only" exposure time.
-#* 3) A National Virtual Observatory "nvo" file. One extension
-#* containing wavelengths that span the whole FUSE range.
-#*
-#* The Xcorr method consists of co-adding spectra, the latter
-#* being corrected for a possible shift. The Background method
-#* consists of combining all the IDF files.
-#*
-#* The Xcorr test is performed on 4 (detector, channel) pairs, the
-#* method of other pairs are given by them:
-#* LiF 1a -> Lif 1b
-#* LiF 2b -> LiF 2a
-#* SiC 1a -> Sic 1b
-#* Sic 2b -> Sic 2a
-#* In the script, the left segments are referred as to $seg (or
-#* $det) and the right segments are referred as to $seg2 (or
-#* $det2).
-#*
-#* When an expected data set is missing, the script stops, cleans
-#* the directory, and returns 1.
-#*
-#* History: 04/15/05 1.0 tc First release
-#* 08/22/05 1.1 wvd Argument is name of association file.
-#* 10/20/05 1.2 wvd Use idl_obsplot.pl to call cf_obsplot.
-#* 10/25/05 1.3 wvd Add option to delete BPM or IDF files.
-#* 03/21/06 1.4 wvd If there's only one exposure, always
-#* follow the cross-correlation path.
-#* Don't check the number of night-only
-#* spectra before calling cf_pack.
-#* 03/28/06 1.5 wvd If there's no good time in any exposure,
-#* follow the cross-correlation path.
-#* 04/27/06 1.6 wvd Be smarter when discarding 000 files.
-#* Always use cross-corr for HIST data.
-#* 05/23/06 1.7 wvd Move -k to proper spot after cf_combine.
-#* 06/02/06 1.8 wvd If OBJCLASS = 7 (Sky Background)
-#* always combine IDF files.
-#* 06/22/06 1.9 wvd Call idf_combine with -z flag.
-#* 05/24/07 1.10 bot If only 900+ spectra are available,
-#* use them.
-#* 04/04/08 1.11 bot Ignore EXP_STAT in cf_combine for HIST
-#* data.
-#* 07/25/08 1.12 wvd Ignore EXP_STAT in cf_combine and
-#* idf_combine for BR-EARTH observations
-#* (S100, M106, and 900+ exposures).
-#* 08/08/08 1.13 wvd Don't ignore EXP_STAT for 900+ exposures.
-#* 08/15/08 1.14 wvd Call cf_make_900_obs.csh
-#* to make quick-look airglow plot.
-#*
-#*****************************************************************************/
-
-# Delete files after processing? (Default is no.)
-#set DELETE_IDF # Delete intermediate data files
-#set DELETE_BPM # Delete bad-pixel map files
-
-# Set program path
-set rm = "/bin/rm -f"
-
-set cf_xcorr = cf_xcorr
-set cf_combine = cf_combine
-set cf_pack = cf_pack
-set cf_nvo = cf_nvo
-set idl_obsplot = idl_obsplot.pl
-set modhead = modhead
-
-#set cf_xcorr = /home/vela/civeit/Work/CalFuse/Xcorr/New/cf_xcorr
-#set cf_combine = /home/vela/civeit/Work/CalFuse/Shiftexp/cf_combine
-#set cf_pack = /home/vela/civeit/Work/CalFuse/Pack/cf_pack
-#set cf_nvo = /home/vela/civeit/Work/CalFuse/Nvo/cf_nvo
-#set modhead = /home/vela/civeit/local/bin/modhead
-
-#set cf_obsplot = /data1/fuse/calfuse/v3.1/idl/cf_obsplot.pro
-
-# Init var list
-set detector = (1a 2b)
-set channel = (lif sic)
-set resolution = (2 3 4)
-set obsmod = (hist ttag)
-
-# Determine the root name and the program ID
-set asnf = $1
-set rn = ${asnf:s/000asnf.fit//}
-set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
-
-# Determine the object class
-set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
-set tmp_buf = `$modhead $tmp_file OBJCLASS`
-set objclass = $tmp_buf[2]
-
-# Clean tmp files that the script will create (safe)
-$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
-$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
-$rm DN_${rn}*.fit NO_${rn}*.fit
-
-foreach om ($obsmod)
- foreach res ($resolution)
- foreach chan ($channel)
- foreach det ($detector)
-
- set ignore_exp_stat = ''
- if ($om == hist) set ignore_exp_stat = -a
- if ($pid == S100) set ignore_exp_stat = -a
- if ($pid == M106) set ignore_exp_stat = -a
-
- # Find exposures that match the current segment
- set seg = $det$chan$res$om
- set readfiles = 0
- ls ${rn}[0-8][0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Reject EXP "9xx" and "000"
-
- if ($? == 0) then
- set readfiles = 1
- else
- ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
- if ($? == 0) set readfiles = 2
- endif
-
- if ($readfiles >= 1) then # There are one or more exposures
-
- echo " "
- echo "*** Processing: $seg ***"
- # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
- if ($det == 1a) set det2 = 1b
- if ($det == 2b) set det2 = 2a
- set seg2 = $det2$chan$res$om
-
- echo "----- cf_xcorr input -----"
- cat tmp_exp.lis
- echo "----------------------------"
- $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
- echo "----- cf_xcorr results -----"
- cat tmp_xcorr.res
- echo "----------------------------"
-
- awk '{if ($5 > 0) print $6, $4, $5}' tmp_xcorr.res > tmp_all_night_exp.lis
- awk '{if ($3 >= 0) print $6, $2}' tmp_xcorr.res > tmp_good_exp.lis
- awk '{if (($3 >= 0) && ($5 > 0)) print $6, $2, $4, $5}' tmp_xcorr.res > tmp_night_exp.lis
- set time_good = `awk 'BEGIN{$t = 0} {if ($3 >= 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
- set time_bad = `awk 'BEGIN{$t = 0} {if ($3 < 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
- echo "Xcorr time: $time_good - Background time: $time_bad"
- set n_exp = `cat tmp_xcorr.res | wc -l`
-
- if (($time_good > 2 * $time_bad && $objclass != 7) || ($time_good == 0 && $time_bad == 0) || $n_exp == 1 || $om == hist) then
-
- #
- # --- Path 1: Optimize resolution ---
- #
-
- echo "Optimize resolution..."
- set n_good = `cat tmp_good_exp.lis | wc -l`
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}000${seg}fcal.fit
- awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}000${seg2}fcal.fit
- awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set n_night = `cat tmp_night_exp.lis | wc -l`
- if ($om == ttag && $n_night > 0) then # Create and combine night only files
-
- echo "*** Creating night only files ***"
- set exp_nums = `awk '{print $1}' tmp_night_exp.lis`
-
- foreach exp ($exp_nums)
-
- # Create night-only BPM and FCAL files if they do not already exist.
- set bno1 = NO_$rn$exp$det${om}fbpm.fit # Bad-pixel maps
- set bno2 = NO_$rn$exp$det2${om}fbpm.fit
- set cno1 = NO_$rn$exp${seg}fcal.fit # Extracted spectra
- set cno2 = NO_$rn$exp${seg2}fcal.fit
-
- set etime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $3}'`
- set ntime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $4}'`
- set ratio = `egrep "^$exp" tmp_night_exp.lis | awk '{printf "%.0f", 0.5+$4/$3*10.}'`
-
- if (!(-e $cno1)) then
- if ($etime == $ntime) then
- echo "$cno1 is a symbolic link to $rn$exp${seg}fcal.fit"
- ln -s $rn$exp${seg}fcal.fit $cno1
- else
-
- set idf_file = $rn$exp$det${om}fidf.fit
- if (!(-e $bno1)) then
- if ($ratio > 9) then
- echo "$bno1 is a symbolic link to $rn$exp$det${om}fbpm.fit"
- ln -s $rn$exp$det${om}fbpm.fit $bno1
- else
- echo "Creating BPM: $bno1 ..."
- cf_bad_pixels -n $bno1 $idf_file
- endif
- endif
-
- echo "Creating (LiF + SiC) FCAL: $cno1 ..."
- cf_extract_spectra -n $bno1 -r NO_$rn$exp $idf_file # Existence of $bno1 is not required
- endif
- endif
-
- if (!(-e $cno2)) then
- if ($etime == $ntime) then
- echo "Using a symbolic link to $cno2"
- ln -s $rn$exp${seg2}fcal.fit NO_$rn$exp${seg2}fcal.fit
- else
-
- set idf_file = $rn$exp$det2${om}fidf.fit
- if (!(-e $bno2)) then
- if ($ratio > 9) then
- echo "Using a symbolic link to $bno2"
- ln -s $rn$exp$det2${om}fbpm.fit NO_$rn$exp$det2${om}fbpm.fit
- else
- echo "Creating BPM: $bno2 ..."
- cf_bad_pixels -n $bno2 $idf_file
- endif
- endif
-
- echo "Creating (LiF + SiC) FCAL: $cno2 ..."
- cf_extract_spectra -n $bno2 -r NO_$rn$exp $idf_file # Existence of $bno2 is not required
- endif
- endif
-
- end
-
- # Combine exposures into a single spectrum.
- set s = NO_${rn}000${seg}fcal.fit
- awk '{print "NO_'$rn'"$1"'$seg'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg [no]
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_night
- $modhead "${s}[0]" DAYNIGHT NIGHT
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_no.lis
-
- set s = NO_${rn}000${seg2}fcal.fit
- awk '{print "NO_'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg2 [no]
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_night
- $modhead "${s}[0]" DAYNIGHT NIGHT
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_no.lis
-
- endif
-
- else
-
- #
- # --- Path 2: Optimize background ---
- #
-
- echo "Optimize background..."
-
- # Combine IDF files
- set idf1_all = DN_${rn}000$det${om}fidf.fit # Same for [dn] and [no]
- set idf2_all = DN_${rn}000$det2${om}fidf.fit
-
- if (!(-e $idf1_all)) then
- echo "Creating IDF: $idf1_all ..."
- if ($readfiles == 1) then
- ls ${rn}[0-8][0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Reject EXP "9xx" and "000"
- else
- ls ${rn}9[0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Consider only airglow
- endif
- if ($? == 0) then # IDF files exist
-
- set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
- # echo "Combining IDF files: " $idf_lis
- idf_combine -cz $ignore_exp_stat $idf1_all $idf_lis # Create combined IDF file for $seg
- $rm tmp_idf.lis
-
- else
-
- echo "ERROR: IDF files are missing"
- $rm tmp_idf.lis
- goto crash
-
- endif
- endif
-
- if (!(-e $idf2_all)) then
- echo "Creating IDF: $idf2_all ..."
- if ($readfiles == 1) then
- ls ${rn}[0-8][0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Reject EXP "9xx" and "000"
- else
- ls ${rn}9[0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Consider only airglow
- endif
- if ($? == 0) then # IDF files exist
-
- set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
- # echo "Combining IDF files: " $idf_lis
- idf_combine -cz $ignore_exp_stat $idf2_all $idf_lis # Create combined IDF file for $seg2
- $rm tmp_idf.lis
-
- else
-
- echo "ERROR: IDF files are missing"
- $rm tmp_idf.lis
- goto crash
-
- endif
- endif
-
- # Get the number of (valid) combined IDF files
- set tmp_buf = `$modhead $idf1_all NSPEC`
- set n_comb1 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf1_all SPEC001`
- set idf1_1 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf2_all NSPEC`
- set n_comb2 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf2_all SPEC001`
- set idf2_1 = $tmp_buf[3]
-
- # Combine BPM files
- set bpm1_all = DN_${rn}000$det${om}fbpm.fit
- set bpm2_all = DN_${rn}000$det2${om}fbpm.fit
-
- if (!(-e $bpm1_all)) then
- echo "Combine all BPM (from IDF): $bpm1_all ..."
- bpm_combine $bpm1_all $idf1_all # Create combined BPM file [dn] for $seg
- endif
-
- if (!(-e $bpm2_all)) then
- echo "Combine all BPM (from IDF): $bpm2_all ..."
- bpm_combine $bpm2_all $idf2_all # Idem for $seg2
- endif
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}000${seg}fcal.fit
- set xxx = DN_${rn}xxx${seg}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb1
- $modhead "${s}[0]" SPEC001 $idf1_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}000${seg2}fcal.fit
- set xxx = DN_${rn}xxx${seg2}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb2
- $modhead "${s}[0]" SPEC001 $idf2_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_dn.lis
-
- set n_night = `cat tmp_all_night_exp.lis | wc -l`
- if ($om == ttag && $n_night > 0) then # Create and combine night only files
-
- echo "*** Creating night only files ***"
- set exp_nums = `awk '{print $1}' tmp_all_night_exp.lis`
- $rm tmp_bpm1.lis tmp_bpm2.lis
-
- foreach exp ($exp_nums)
-
- # Create bpm night only files (if they do not exist yet)
- set bno1 = NO_$rn$exp$det${om}fbpm.fit
- set bno2 = NO_$rn$exp$det2${om}fbpm.fit
-
- set idf_file = $rn$exp$det${om}fidf.fit
- if (!(-e $bno1)) then
- echo "Creating BPM: $bno1 ..."
- cf_bad_pixels -n $bno1 $idf_file
- endif
- if (-e $bno1) echo $bno1 >> tmp_bpm1.lis # If valid, add in $seg list
-
- set idf_file = $rn$exp$det2${om}fidf.fit
- if (!(-e $bno2)) then
- echo "Creating BPM: $bno2 ..."
- cf_bad_pixels -n $bno2 $idf_file
- endif
- if (-e $bno2) echo $bno2 >> tmp_bpm2.lis # If valid, add in $seg2 list
-
- end
-
-
- # Combine BPM for $seg and extract spectra
-
- set bpm1_all = NO_${rn}000$det${om}fbpm.fit
- set n_bpm = `cat tmp_bpm1.lis | wc -l`
- echo "Number of valid BPM files: $n_bpm"
-
- if ($n_bpm > 0) then
-
- echo $n_bpm > tmp_bpm.lis
- cat tmp_bpm1.lis >> tmp_bpm.lis
-
- if (!(-e $bpm1_all)) then
- echo "Combine all BPM (from list): $bpm1_all ..."
- bpm_combine $bpm1_all tmp_bpm.lis # Create combined BPM file [no] for $seg
- endif
- $rm tmp_bpm.lis
-
- endif
-
- # Extract [Night only] spectra. The existence of $bpm1_all is not required
- set s = NO_${rn}000${seg}fcal.fit
- set xxx = NO_${rn}xxx${seg}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -n $bpm1_all -r NO_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb1
- $modhead "${s}[0]" SPEC001 $idf1_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_no.lis
-
-
- # Combine BPM for $seg2 and extract spectra
-
- set bpm2_all = NO_${rn}000$det2${om}fbpm.fit
- set n_bpm = `cat tmp_bpm2.lis | wc -l`
- echo "Number of valid BPM files: $n_bpm"
-
- if ($n_bpm > 0) then
-
- echo $n_bpm > tmp_bpm.lis
- cat tmp_bpm2.lis >> tmp_bpm.lis
-
- if (!(-e $bpm2_all)) then
- echo "Combine all BPM (from list): $bpm2_all ..."
- bpm_combine $bpm2_all tmp_bpm.lis # Create combined BPM file [no] for $seg2
- endif
- $rm tmp_bpm.lis
-
- endif
-
- # Extract [Night only] spectra. The existence of $bpm2_all is not required
- set s = NO_${rn}000${seg2}fcal.fit
- set xxx = NO_${rn}xxx${seg2}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -n $bpm2_all -r NO_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb2
- $modhead "${s}[0]" SPEC001 $idf2_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_no.lis
-
- endif
- endif
- endif
- end
-
- $rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis
- $rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_night_exp.lis
-
- end
-
- # Pack the 8 [detector][channel] pairs together ([dn] and [no] for ttag)
- if (-e tmp_seg_dn.lis) then
-
- set fcal_all = ${rn}00000all$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_dn.lis | wc -l`
-
- if (!($n_segs == 8)) then
-
- @ mseg = 8 - $n_segs
- echo "ERROR: $mseg (day + night) segments are missing"
- $rm tmp_seg_dn.lis
- goto crash
-
- else
-
- $cf_pack tmp_seg_dn.lis $fcal_all
- $rm tmp_seg_dn.lis
-
- # Plot figures
- $idl_obsplot {$rn}
-
- # Create National Virtual Observatory file
- set nvo_file = ${rn}00000nvo$res${om}fcal.fit
- $rm $nvo_file # Clean (safe)
- $cf_nvo $fcal_all $nvo_file # Create file
-
- if (-e tmp_seg_no.lis) then
-
- set fcal_all = ${rn}00000ano$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_no.lis | wc -l`
-
- # if (!($n_segs == 8)) then
- #
- # @ mseg = 8 - $n_segs
- # echo "ERROR: $mseg (night only) segments are missing"
- # $rm tmp_seg_no.lis
- # # goto crash
- #
- # else
-
- $cf_pack tmp_seg_no.lis $fcal_all
- $rm tmp_seg_no.lis
-
- # endif
-
- endif
- endif
- endif
- end
-end
-
-# Clean [dn] and [no] files. Just keep all, (ano) and nvo
-$rm DN_${rn}*.fit NO_${rn}*.fit
-
-# Delete IDF files
-if $?DELETE_IDF then
- echo "NOTE: Deleting intermediate data files."
- $rm ${rn}*idf.fit
-endif
-
-# Delete bad-pixel-map (bpm) files
-if $?DELETE_BPM then
- echo "NOTE: Deleting bad pixel map (bpm) files."
- $rm ${rn}*bpm.fit
-endif
-
-# Call routine to make quick-look airglow plot.
-cf_make_900_obs.csh $1
-
-exit(0)
-
-crash: # Procedure when script crashes
-
-# Clean directory
-$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
-$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
-$rm DN_*.fit NO_*.fit
-
-# Return 1
-exit(1)
diff --git a/bin/cfsetup.csh b/bin/cfsetup.csh
deleted file mode 100644
index 94dc3aa..0000000
--- a/bin/cfsetup.csh
+++ /dev/null
@@ -1,31 +0,0 @@
-# To execute, type "source cfsetup.csh"
-#
-set CF_DIR="${HOME}/calfuse"
-set CF_VERSION="v3.2"
-setenv PATH "${CF_DIR}/${CF_VERSION}/bin:${PATH}"
-setenv CF_CALDIR "${CF_DIR}/${CF_VERSION}/calfiles"
-setenv CF_PARMDIR "${CF_DIR}/${CF_VERSION}/parmfiles"
-setenv CF_IDLDIR "${CF_DIR}/${CF_VERSION}/idl"
-#
-if ( `uname -s` !~ Darwin ) then
- if ( $?LD_LIBRARY_PATH ) then
- setenv LD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib:${LD_LIBRARY_PATH}"
- else
- setenv LD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib"
- endif
-else
- if ( $?DYLD_LIBRARY_PATH ) then
- setenv DYLD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib:${DYLD_LIBRARY_PATH}"
- else
- setenv DYLD_LIBRARY_PATH "${CF_DIR}/${CF_VERSION}/lib"
- endif
-endif
-
-set tcsh_path=`which tcsh`
-if ( $tcsh_path != '/usr/local/bin/tcsh' ) then
- cp ${CF_DIR}/${CF_VERSION}/bin/calfuse.csh ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.csh
- sed -e "s#/usr/local/bin/tcsh#${tcsh_path}#g" ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.csh > ${CF_DIR}/${CF_VERSION}/bin/calfuse.csh
-endif
-
-rm -f ${CF_DIR}/${CF_VERSION}/bin/calfuse
-ln -sf ${CF_DIR}/${CF_VERSION}/bin/calfuse.csh ${CF_DIR}/${CF_VERSION}/bin/calfuse
diff --git a/bin/cfsetup.sh b/bin/cfsetup.sh
deleted file mode 100644
index b2f5bb1..0000000
--- a/bin/cfsetup.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-# To execute, type "source cfsetup.sh"
-#
-CF_DIR="${HOME}/calfuse"
-CF_VERSION="v3.2"
-export PATH="${CF_DIR}/${CF_VERSION}/bin:${PATH}"
-export LD_LIBRARY_PATH="${CF_DIR}/${CF_VERSION}/lib:${LD_LIBRARY_PATH}"
-export DYLD_LIBRARY_PATH="${CF_DIR}/${CF_VERSION}/lib:${DYLD_LIBRARY_PATH}"
-export CF_CALDIR="${CF_DIR}/${CF_VERSION}/calfiles"
-export CF_PARMDIR="${CF_DIR}/${CF_VERSION}/parmfiles"
-export CF_IDLDIR="${CF_DIR}/${CF_VERSION}/idl"
-export CF_HISTDIR=`pwd`
-
-sh_path=`which sh`
-if [ $sh_path != '/bin/sh' ]; then
- cp ${CF_DIR}/${CF_VERSION}/bin/calfuse.sh ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.sh
- sed -e "s#/bin/sh#${sh_path}#g" ${CF_DIR}/${CF_VERSION}/bin/calfuse_sv.sh > ${CF_DIR}/${CF_VERSION}/bin/calfuse.sh
-fi
-
-rm -f ${CF_DIR}/${CF_VERSION}/bin/calfuse
-ln -sf ${CF_DIR}/${CF_VERSION}/bin/calfuse.sh ${CF_DIR}/${CF_VERSION}/bin/calfuse
diff --git a/bin/idl_obsplot.pl b/bin/idl_obsplot.pl
deleted file mode 100755
index 1954936..0000000
--- a/bin/idl_obsplot.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env perl
-use FileHandle;
-
-# ******************************************************
-# idlplot_corr.pl
-#
-# This Perl module will run the idl script "cf_obsplot.pro"
-#
-# Author: Van Dixon
-#
-# History: Written July 3, 2001
-#
-# 10/20/05 wvd Add call to .run cf_obsplot.pro
-# 11/21/06 wvd Add process ID ($$) to name of
-# batch file.
-# 08/08/08 wvd Add airglow argument for 900+
-# files.
-#
-# ******************************************************
-
-if (@ARGV == 0) {
- print "You must enter the rootname of the observation.\n";
- print "Exiting.\n";
-
- } else {
-
- $batch_filename = $ARGV[0] . $$."_idl.bat";
-
- # Open the output batch file.
- open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
- print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
- print BAT_OUTFILE ".run cf_obsplot.pro\n";
- if (@ARGV == 2) {
- print BAT_OUTFILE "cf_obsplot,'" . $ARGV[0] . "', airglow=1\n";
- } else {
- print BAT_OUTFILE "cf_obsplot,'" . $ARGV[0] . "'\n";
- }
- print BAT_OUTFILE "exit\n";
-
- close (BAT_OUTFILE);
-
- system("idl $batch_filename > /dev/null");
-
- system("rm $batch_filename");
-
- }
-
-### end of Perl script
diff --git a/bin/idlplot_rate.pl b/bin/idlplot_rate.pl
deleted file mode 100755
index 9e33bed..0000000
--- a/bin/idlplot_rate.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env perl
-use FileHandle;
-
-# ***************************************************
-# add_tle.pl
-#
-# This Perl module will read in the latest five orbital elements
-# from the file five.tle (which was created by get_tle.pl) and
-# add any new orbital elements to the file FUSE.TLE. The file
-# FUSE.TLE is in descending order (i.e. the most recent elements
-# are first). In order to prepend the new TLE onto the old list
-# I found it was easiest to store everything in a temporary file
-# TEMP.TLE and rewrite FUSE.TLE.
-#
-# Author: Ed Murphy
-#
-# History: Written July 27, 1999
-# 11/21/06 wvd Add process ID ($$) to name of
-# batch file.
-#
-# ***************************************************
-
-# Define the file names. old_maintle_filename is not actually opened,
-# but is used in a system call at the end of the program.
-
-if (@ARGV == 0) {
- print "You must enter the rootname of the observation.\n";
- print "Exiting.\n";
-
- } else {
-
- $batch_filename = $ARGV[0] . $$."_idl.bat";
-
- # Open the output batch file.
- open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
- print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
- print BAT_OUTFILE "cf_plot_rate3,'" . $ARGV[0] . "'\n";
- print BAT_OUTFILE "exit\n";
-
- close (BAT_OUTFILE);
-
- system("idl $batch_filename > /dev/null");
-
- system("rm $batch_filename");
-
- }
-
-### end of Perl script
diff --git a/bin/idlplot_spex.pl b/bin/idlplot_spex.pl
deleted file mode 100755
index 701d2f7..0000000
--- a/bin/idlplot_spex.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env perl
-use FileHandle;
-
-# ***************************************************
-# add_tle.pl
-#
-# This Perl module will read in the latest five orbital elements
-# from the file five.tle (which was created by get_tle.pl) and
-# add any new orbital elements to the file FUSE.TLE. The file
-# FUSE.TLE is in descending order (i.e. the most recent elements
-# are first). In order to prepend the new TLE onto the old list
-# I found it was easiest to store everything in a temporary file
-# TEMP.TLE and rewrite FUSE.TLE.
-#
-# Author: Ed Murphy
-#
-# History: Written July 27, 1999
-# 11/21/06 wvd Add process ID ($$) to name of
-# batch file.
-#
-# ***************************************************
-
-# Define the file names. old_maintle_filename is not actually opened,
-# but is used in a system call at the end of the program.
-
-if (@ARGV == 0) {
- print "You must enter the rootname of the observation.\n";
- print "Exiting.\n";
-
- } else {
-
- $batch_filename = $ARGV[0] . $$."_idl.bat";
-
- # Open the output batch file.
- open (BAT_OUTFILE, ">$batch_filename") || die "Cannot open $batch_filename";
- print BAT_OUTFILE "!path='$ENV{CF_IDLDIR}:'+!path\n";
- print BAT_OUTFILE "cf_plot_extract3,'" . $ARGV[0] . "'\n";
- print BAT_OUTFILE "exit\n";
-
- close (BAT_OUTFILE);
-
- system("idl $batch_filename > /dev/null");
-
- system("rm $batch_filename");
-
- }
-
-### end of Perl script
diff --git a/bin/listhead b/bin/listhead
deleted file mode 100755
index 390f00e..0000000
--- a/bin/listhead
+++ /dev/null
Binary files differ
diff --git a/bin/listtra b/bin/listtra
deleted file mode 100755
index 4c23921..0000000
--- a/bin/listtra
+++ /dev/null
Binary files differ
diff --git a/configure b/configure
index 36191d0..99146f9 100755
--- a/configure
+++ b/configure
@@ -631,7 +631,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_unique_file="include/calfitsio.h"
+ac_unique_file="src"
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
@@ -12086,7 +12086,7 @@ CC=$lt_save_CC
-ac_config_headers="$ac_config_headers config.h"
+ac_config_headers="$ac_config_headers src/include/config.h"
# Checks for programs.
@@ -16617,7 +16617,7 @@ fi
done
-ac_config_files="$ac_config_files Makefile src/Makefile src/libcf/Makefile src/slalib/Makefile src/fes/Makefile src/fuv/Makefile src/analysis/Makefile src/cal/Makefile src/cal/jitter/Makefile"
+ac_config_files="$ac_config_files Makefile src/Makefile src/libcf/Makefile src/slalib/Makefile src/fes/Makefile src/fuv/Makefile src/analysis/Makefile src/cal/Makefile src/cal/jitter/Makefile scripts/Makefile doc/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -17705,7 +17705,7 @@ do
case $ac_config_target in
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "src/include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/config.h" ;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"src/libcf/Makefile") CONFIG_FILES="$CONFIG_FILES src/libcf/Makefile" ;;
@@ -17715,6 +17715,8 @@ do
"src/analysis/Makefile") CONFIG_FILES="$CONFIG_FILES src/analysis/Makefile" ;;
"src/cal/Makefile") CONFIG_FILES="$CONFIG_FILES src/cal/Makefile" ;;
"src/cal/jitter/Makefile") CONFIG_FILES="$CONFIG_FILES src/cal/jitter/Makefile" ;;
+ "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
@@ -19119,3 +19121,4 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi
+
diff --git a/configure.ac b/configure.ac
index f22025b..96a2e5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,8 +6,8 @@ AC_INIT([calfuse], [3.2.3], [archive@stsci.edu])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
AC_CONFIG_MACRO_DIRS([m4])
-AC_CONFIG_SRCDIR([include/calfitsio.h])
-AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_SRCDIR([src])
+AC_CONFIG_HEADERS([src/include/config.h])
# Checks for programs.
AC_PROG_CC
@@ -31,4 +31,6 @@ AC_CHECK_FUNCS([floor memchr memset modf pow sqrt strcasecmp strerror strncasecm
AC_OUTPUT([Makefile src/Makefile src/libcf/Makefile src/slalib/Makefile \
src/fes/Makefile src/fuv/Makefile src/analysis/Makefile \
- src/cal/Makefile src/cal/jitter/Makefile])
+ src/cal/Makefile src/cal/jitter/Makefile scripts/Makefile \
+ doc/Makefile])
+
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 239796f..8ece461 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -4,3 +4,5 @@ doc_DATA = FIXING_SELINUX_ISSUES \
INSTALLING_CalFUSEv3.2.3 \
INTRO_TO_CalFUSEv3.2.3 \
pipeline_status.html
+
+EXTRA_DIST = $(doc_DATA)
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 0ed656b..165934e 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -282,6 +282,7 @@ doc_DATA = FIXING_SELINUX_ISSUES \
INTRO_TO_CalFUSEv3.2.3 \
pipeline_status.html
+EXTRA_DIST = $(doc_DATA)
all: all-am
.SUFFIXES:
diff --git a/docs/FIXING_SELINUX_ISSUES b/docs/FIXING_SELINUX_ISSUES
deleted file mode 100644
index 548077b..0000000
--- a/docs/FIXING_SELINUX_ISSUES
+++ /dev/null
@@ -1,84 +0,0 @@
-
--------------------------------------------------------------------------------
- Fixing issues due to SELinux
--------------------------------------------------------------------------------
-
-While installing CalFUSE 3.2.0 on Scientific Linux V 5.0 the following
-SELinux issues came up. SELinux points to these web pages for a more
-detailed explanation of the issues:
-http://people.redhat.com/drepper/selinux-mem.html and
-http://people.redhat.com/drepper/textrelocs.html
-
-A suggestion from the http://people.redhat.com/drepper/textrelocs.html
-web page is to compile the c libraries with -fpic or -fPIC.
-
-The first SELinux issue maybe related to this being a new install of Scientific Linux and
-not truly related to CalFUSE.
-
-
-Summary
--------
-
-SELinux is preventing access to files with the label, file_t.
-
-Detailed Description
-
-SELinux permission checks on files labeled file_t are being
-denied. file_t is the context the SELinux kernel gives to files that do not have a label.
-This indicates a serious labeling problem. No files on an SELinux box should ever be
-labeled file_t. If you have just
-added a new disk drive to the system you can relabel it using the restorecon command.
-Otherwise you should relabel the entire files system.
-
-Allowing Access
-
-You can execute the following command as root to relabel your computer
-system:
-
-touch /.autorelabel; reboot
-
-Note that this will reboot your computer system.
-
-
-Summary
--------
-
-SELinux is preventing /calfuse/v3.2/bin/cf_hist_init from loading
-/calfuse/v3.2/lib/libcf.so,
-/calfuse/v3.2/lib/libsla.so, and
-/calfuse/v3.2/lib/libcfitsio-2.470.so
-which require text relocation.
-
-
-Detailed Description
-
-The /calfuse/v3.2/bin/cf_hist_init application attempted to load
-/calfuse/v3.2/lib/libcf.so,
-/calfuse/v3.2/lib/libsla.so, and
-/calfuse/v3.2/lib/libcfitsio-2.470.so
-which require text relocation. This is a potential security problem. Most libraries do
-not need this permission. Libraries are sometimes coded incorrectly and request this
-permission. The SELinux Memory Protection Tests web page explains how to remove this
-requirement. You can configure SELinux temporarily to allow
-/calfuse/v3.2/lib/libcf.so,
-/calfuse/v3.2/lib/libsla.so, and
-/calfuse/v3.2/lib/libcfitsio-2.470.so
-to use relocation as a workaround, until the libraries are fixed.
-Please file a bug report against this package.
-
-Allowing Access
-
-If you trust
-/calfuse/v3.2/lib/libcf.so,
-/calfuse/v3.2/lib/libsla.so, and
-/calfuse/v3.2/lib/libcfitsio-2.470.so
-to run correctly, you can change the file context to textrel_shlib_t.
-
-The following commands will allow this access:
-
-chcon -t textrel_shlib_t /calfuse/v3.2/lib/libcf.so
-chcon -t textrel_shlib_t /calfuse/v3.2/lib/libsla.so
-chcon -t textrel_shlib_t /calfuse/v3.2/lib/libcfitsio-2.470.so
-
-
-- Michael E. Van Steenberg
diff --git a/docs/INSTALLING_A_FORTRAN_COMPILER b/docs/INSTALLING_A_FORTRAN_COMPILER
deleted file mode 100644
index 9af64ff..0000000
--- a/docs/INSTALLING_A_FORTRAN_COMPILER
+++ /dev/null
@@ -1,259 +0,0 @@
-
--------------------------------------------------------------------------------
- INSTALLING A FORTRAN COMPILER
--------------------------------------------------------------------------------
-
-Please note that these are solutions that we tried and therefore recommend,
-especially since they worked on every machine we tried, but there might be other
-solutions if none of this works for you. Just google fortran and your machine
-specs and you should find some ideas.
-
-
-FORTRAN for Solaris:
---------------------
-
- CalFUSE has been compiled and tested on Solaris with the Fortran
- compilers provided by SUN (f77 and f90) and GNU (g77 and gfortran).
- Both are available for free, so even if you already have another fortran
- compiler, you should get one of these. Other Fortran compilers may
- work, but we cannot guarantee your results.
-
- -> We recommend that you first try the Sun Studio Compilers from Sun's
- development website:
- http://developers.sun.com/sunstudio/downloads/index.jsp
- CalFUSE compiles properly with version 12.
-
- -> An old version of Fortran may already exist on your machine. Look for
- the old 'libF77.so' and 'libM77.so' libraries in one of these
- directories: '/usr/4lib' and '/opt/SUNWspro/lib/'. They would probably
- have a name with a version number at the end. If so, you can try to
- create symbolic links to these two (with the command 'ln -s <library>
- <link>') using their exact names 'libF77.so' and 'libM77.so'. Then add
- to your LD_LIBRARY_PATH environment variable the directory in which you
- created the two links. Also add '/opt/SUNWspro/bin/' to your PATH and
- try again to run the CalFUSE configure routine.
-
- -> Otherwise, you can try to install 'g77' from the GNU compilers by
- installing the package 'gcc-3.4.6'. (We were unable to make 'gfortran'
- from GCC version 4 and higher work on Solaris.) You will need root
- access to do so.
-
- First type the command 'iconv' in your shell. If it returns "command
- not found", then you must first install the package libiconv as well.
-
- You can retrieve packages for various versions of Solaris (7 to 10) and
- different CPU architectures (Sparc or Intel) from this website (select
- the appropriate system/CPU combination in the menu on the right side):
- http://www.sunfreeware.com
-
- If the web page download fails, you can access the packages by ftp
- ( where <CPU> = sparc or intel and <V> = 7, 8, 9 or 10 ):
- ftp ftp.sunfreeware.com
- login: anonymous
- password: <your_email_address>
- binary
- cd pub/freeware/<CPU>/<V>/
- get gcc-3.4.6-sol<V>-<CPU>-local.gz
- get libiconv-1.11-sol<V>-<CPU>-local.gz (if iconv is missing)
- bye
-
- When you have the necessary packages, first add '/usr/local/bin' to your
- PATH environment variable and '/usr/local/man' to your MANPATH. Then
- unzip the packages with 'gunzip' and, as root, type the following
- commands:
- > pkgadd -d libiconv-1.9.2-sol<V>-<CPU>-local (if iconv is missing)
- > pkgadd -d gcc-3.4.6-sol<V>-<CPU>-local
-
- -> You can also try to recompile the GCC compilers yourself from the source
- available on the GNU website:
- http://ftp.gnu.org/gnu/gcc/
- But this is a very long (it took us 10 hours) and complicated process,
- and we recommend that you install the package as described above.
-
- If you really have to compile the code by hand, for example because
- you cannot get root permission, follow these instructions:
- - Choose the latest 3.x.x version available. (We were unable to
- install fortran version 4.x.x because the necessary libraries were
- missing.)
- - Create three directories, none of them a subdirectory of another:
- srcdir - to contain the source archive
- bindir - where the binaries will be installed
- insdir - from which you will do the install
- For example, I had respectively '/home/ooghe/gcc/src/',
- '/home/ooghe/gcc/bin/' and '/home/ooghe/gcc/install/'.
- - Unzip and untar the downloaded archive in 'srcdir'
- - Echo your 'PATH' environment variable and remove '/usr/ucb/bin'
- from it if it is present. Add '/usr/sfw/bin' if it is not.
- For example:
- > export PATH=/usr/bin:/etc:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin:.
- - Do the following:
- > export CONFIG_SHELL=/bin/ksh
- - Go to 'insdir' and do the following:
- > 'srcdir'/configure --prefix='bindir' --enable-languages=c,fortran
- where 'srcdir' and 'gccdir' should be complete path directories, e.g.,
- '/home/username/gcc/src' and '/home/username/gcc/bin'
- - Bootstrap and finally install the compiler:
- > gmake bootstrap
- > gmake install
- - Add 'bindir'/bin to your PATH environment variable, and
- 'bindir'/lib to your LD_LIBRARY_PATH one.
-
-
-===============================================================================
-
-FORTRAN for Linux:
-------------------
-
- CalFUSE has been compiled and tested on Linux with the Fortran compilers
- provided by GNU (g77 and gfortran). They are available for free, so
- even if you already have another fortran compiler, you should get one of
- these. You can try to make CalFUSE work with another compiler, but we
- cannot guarantee your results.
-
- Most Linux distributions include one of the GNU Fortran compilers, but
- if it is not on yours, you should first try to get a binary for your
- machine.
-
- -> If your Linux is based on a distribution like Debian, Fedora or SUSE,
- look for a binary on this web page:
- http://gcc.gnu.org/wiki/GFortranDistros
-
- -> Otherwise, you can try to install the latest binary from this web page,
- but we do not recommend it because the latest compilers may still contain
- some bugs:
- http://gcc.gnu.org/wiki/GFortranBinaries
-
- -> If you do not have any other solution, you should recompile GCC from the
- source by following the instructions available on
- http://gcc.gnu.org/wiki/GFortranBinaries
-
-
-===============================================================================
-
-FORTRAN for MAC OS X:
----------------------
-
-
- CalFUSE has been compiled and tested on MAC OS X with the Fortran
- compilers provided by GNU (g77 and gfortran). They are available for
- free, so even if you already have another Fortran compiler (like ifort
- from Intel or f77 from ABSoft), you should get one of these. You can
- try to make CalFUSE work with another compiler, but we cannot guarantee
- your results.
-
- There are many ways to install the GNU compilers on a MAC;
- here are some suggestions:
-
- -> For Mac OS X 10.4 (Tiger) or higher, we know that the installation
- provided on this web page works well:
- http://www.macresearch.org/xcode_gfortran_contest_winner_damien_bobillot
- Just download the gfortran compiler corresponding to your CPU
- architecture (Intel or PowerPC) and follow the "gfortran compiler
- instructions".
-
- If this web page is down, you can get the same archives from the
- CalFUSE FTP site:
-
- ftp fuse.pha.jhu.edu
- login: anonymous
- password: <your_email_address>
-
- cd fuseftp/calfuse
- binary
- (PPC) get macos-gfortran-intel-bin.tar.gz
- (Intel) get macos-gfortran-ppc-bin.tar.gz
- bye
-
- When you have the appropriate package, install the compiler
- using the following command:
- (PPC) sudo tar -zxvf macos-gfortran-ppc-bin.tar.gz -C /
- (Intel) sudo tar -zxvf macos-gfortran-intel-bin.tar.gz -C /
-
- Note: It is possible that /usr/local/bin is not in your default
- PATH environment variable. If the command 'gfortran' does not work,
- then, assuming you're using the default bash shell, type
- (or include in /etc/profile):
- > export PATH=/usr/local/bin:$PATH
-
- -> Otherwise, you can try to find more recent versions of these
- packages on these different websites, but we don't recommend them
- because they usually still have a few development bugs:
- http://hpc.sourceforge.net/
- http://www.macresearch.org/xcode_gfortran_plugin_update
- http://gcc.gnu.org/wiki/GFortranBinariesMacOS
-
- -> You can also try to install yourself a version of gfortran or
- g77 from one of GCC releases at this address:
- http://ftp.gnu.org/gnu/gcc/
- This might be the only solution if you are using Mac OS X 10.3
- or lower.
- In this specific case, we recommend that you try first to install
- 'g77' from 'gcc-3.3.3', following Jeff's instructions as follows:
-
--------------------------------------------------------------------------------
-Jeff Kruk
-31 May 2004
-
-Hi All-
-
-I have successfully installed GNU fortran on my Mac laptop.
-It is not part of the Apple Developer tools (at least not anymore),
-so you have to get it directly from GNU. The instructions from GNU
-state that you need the whole source tree to compile the compilers,
-so you have to ignore the portions of the GCC package that are provided
-by Apple with their developers toolkit.
-
-After reading through lots of instructions, I concluded that all the
-default options were just fine. So, here is a boiled-down set of
-instructions.
-
-You will need 3 different directories:
-srcdir: where you put all the files from GNU
-objdir: where you do the build
-installdir: this defaults to /usr/local, which is what I used.
-(You may have to do this as root to put things in /usr/local)
-
-The one complication is that GNU "strongly recommends" that none of
-these directories be subdirectories of one another.
-So I put the downloaded files in /Users/kruk/Desktop/gcc-3.3.3
-and I did the build in /Users/kruk/gcc/bin.
-
-Here's the sequence of commands needed:
-
-1) Use your browser to go to
-http://ftp.gnu.org/gnu/gcc/releases/gcc-3.3.3
-click on gcc-3.3.3.tar.gz
-unpack this in 'srcdir' (in my case this was ~/Desktop/gcc-3.3.3)
-
-2) Make the directory where you will do the build. In my case this was:
-> cd ~
-> mkdir gcc
-> mkdir bin
-> cd gcc/bin
-
-3) Configure all the files:
-> ~/Desktop/gcc-3.3.3/configure
-
-4) Make the compilers:
-> gnumake bootstrap
-(I think the default 'make' is the same as gnumake, but I wasn't taking
-any chances)
-When this completes, there are no files in /usr/local yet!
-
-5) Do the actual install:
-> gnumake install
-
-[This can take a long time -- up to 90 minutes. - Ed.]
-
-That's it!
-
-Note: If you are using an Intel-based Mac, also follow these instructions
- from Vincent Hénault-Brunet: "I recently compiled CalFUSE on my Mac
- Intel laptop. The problem had to do with g77. I didn't know, but g77
- doesn't work on Mac Intel. It will compile but doesn't work properly.
- I had to patch the power-pcc version of g77 (patch found at
- http://www1.gly.bris.ac.uk/~wookey/MEFTLG/g77.htm ), and CalFUSE
- compiled without any problem."
-
-
-- Van Dixon, Bernard Godard, Jeff Kruk and Benjamin Ooghe-Tabanou
diff --git a/docs/INSTALLING_CalFUSEv3.2.3 b/docs/INSTALLING_CalFUSEv3.2.3
deleted file mode 100644
index 9579254..0000000
--- a/docs/INSTALLING_CalFUSEv3.2.3
+++ /dev/null
@@ -1,215 +0,0 @@
-#
-# Note: Before downloading CalFUSE, please send a blank e-mail to
-# fuse_support@pha.jhu.edu with the subject line "GOT CALFUSE".
-# We'll save your address and send you information about future
-# software updates or bug reports. Thanks!
-#
-
--------------------------------------------------------------------------------
- INSTALLING CalFUSE v3.2.3
--------------------------------------------------------------------------------
-
-These instructions cover Solaris, Linux, Linux 64, and Mac OS X
-installations.
-
-You will need at least 1.6 GB of disk space to install the pipeline and
-its associated calibration files.
-
-The software is in the tar file cfv3.2.3.sw.tar.gz
-
-The calibration files are divided among three tar files:
-
-cfv3.2.3.cala.tar.gz <-- Cal files that start with letter a
-cfv3.2.3.calg.tar.gz <-- Cal files that start with letter g
-cfv3.2.3.calz.tar.gz <-- All other cal files
-
-
-A. DOWNLOADING THE CALFUSE SOFTWARE AND ASSOCIATED CALIBRATION FILES:
----------------------------------------------------------------------
-
- Obtain the compressed tar files:
-
- prompt> ftp fuse.pha.jhu.edu
- login: anonymous
- password: <your_email_address>
-
- cd fuseftp/calfuse
- binary
- get cfv3.2.3.sw.tar.gz
- get cfv3.2.3.cala.tar.gz
- get cfv3.2.3.calg.tar.gz
- get cfv3.2.3.calz.tar.gz
- bye
-
- Uncompress and extract all tarfiles in your calfuse directory.
-
-
-B. INSTALLATION INSTRUCTIONS:
------------------------------
-
-0) Note for all systems:
-
- You need to type "make -e install" only once, not in each
- subdirectory.
-
-
-1) SOLARIS
-
- First check whether '/opt/SUNWspro/lib' is in your
- 'LD_LIBRARY_PATH' environment variable. If it is not, be
- sure to add it.
-
- In [calfuse_directory]/v3.2/src, type:
-
- make distclean
- chmod +x configure.solaris
- ./configure.solaris
- make clean
- make -e install
-
- The Solaris operating system should come with a Fortran
- compiler; however, if the configure routine returns an error
- message about Fortran, it is probably missing, and you will
- have to install it. To do so, follow the instructions for
- Solaris in the file INSTALLING_A_FORTRAN_COMPILER.
-
-
-2) LINUX and LINUX 64
-
- If you are running Linux on a 64-bit machine, you must also
- install a 64-bit version of the CFITSIO library. You
- can skip this step if your machine is running in 32-bit
- mode. The operation may require root access to your system,
- so you may have to ask for help from your system manager.
- First use your 'Applications/Add-Remove Software'
- tool to see whether CFITSIO is available by default on
- your system (as it is for Scientific Linux version 5.0).
- If so, install it; if not, you can download the release
- corresponding to your operating system from the Internet.
- Search for 'cfitsio' on the web page http://rpm.pbone.net/.
- If this page is not available, search the FITSIO webpage
- (http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html)
- for RPM format distributions.
-
- Once the necessary libraries are installed, move to the
- directory [calfuse_directory]/v3.2/src and type
-
- make distclean
- chmod +x configure.linux or chmod +x configure.linux64
- ./configure.linux or ./configure.linux64
- make clean
- make -e install
-
- Notes:
-
- a) GCC should come with a Fortran compiler; however, if the
- configure routine returns an error message about Fortran,
- it is probably missing, and you will have to install it.
- To do so, follow the instructions for Linux in the file
- INSTALLING_A_FORTRAN_COMPILER.
-
- b) If the compilation fails with an error such as:
- "undefined reference to '_gfortran_pow_i4_i4'" or similar,
- it probably means you have both g77 and gfortran installed.
- In this case we recommand that you try to remove the gfortran
- package from your Linux distribution (using synaptic, apt-get
- or aptitude, for example).
-
- c) Linux64 users: If you installed cfitsio in a directory
- other than the usual '/usr/include/cfitsio', determine the
- path you used, for example '/usr/local/cfitsio64' and, in
- [calfuse_directory]/v3.2/src, type the following commands,
- where <new_path> is the path identified above:
-
- cp configure.linux64 configure.linux64.sv
- sed -e "s#/usr/include/cfitsio#<new_path>#g#" \
- configure.linux64.sv > configure.linux64.sv2
- sed -e "s/#cfit/ /g" \
- configure.linux64.sv2 > configure.linux64
-
- Then restart the installation procedure.
-
- d) If you encounter trouble with SELinux while installing
- CalFUSE, you should read the informations from Michael Van
- Steenberg in the file FIXING_SELINUX_ISSUES.
-
-
-3) MAC OS X
-
- In [calfuse_directory]/v3.2/src type
-
- make distclean
- chmod +x configure.macosx
- ./configure.macosx
- make clean
- make -e install
-
- Notes:
-
- a) CalFUSE requires Mac OS X 10.2 or higher.
-
- b) CalFUSE uses both the C and Fortran compilers. If you
- are running OS X 10.3 or above, you probably have a C
- compiler. If not, retrieve the Xcode suite of developer
- tools from the Apple Developer Connection website
- (developer.apple.com). To obtain the Fortran compiler,
- follow the instructions for MacOS in the file
- INSTALLING_A_FORTRAN_COMPILER.
-
- c) If the linker complains about missing library routines,
- you may need to modify the definition of LIBS in the various
- Makefiles. For example, you may need to replace "-L/usr/local/lib"
- with "-L/sw/lib".
-
- d) For best results, run CalFUSE in an X11 window; otherwise,
- your trailer files will be full of warning messages from IDL.
-
- e) FYI: the environment variable called 'LD_LIBRARY_PATH'
- on other systems is called 'DYLD_LIBRARY_PATH' by Mac OS.
-
-
-C. SETTING THE ENVIRONMENT VARIABLES:
--------------------------------------
-
- The directory '[calfuse_directory]/v3.2/bin' contains the
- scripts 'cfsetup.sh' and 'cfsetup.csh', which define the
- environment variables needed by CalFUSE. You will run one
- of these two depending on the shell you are using.
-
- Usually, if you are on a Solaris machine or on a Mac running
- OS X 10.2, you will use the '.csh' script. On Linux and
- more recent versions of MAC OS X, you should probably use
- the '.sh' script. If one gives you an error message, try
- the other.
-
- The scripts assume that you have installed the pipeline in
- your home directory. If you have installed it elsewhere,
- you must edit the script, changing the root CalFUSE directory
- ('CF_DIR') defined at the beginning.
-
- If you are using the '.csh' script, do the following:
- source cfsetup.csh
- rehash
- If you are using the '.sh' script, do the following:
- source cfsetup.sh
- hash -r
-
- You can also insert the whole script into your '.login'
- file, in which case the environment variables will be set
- each time you log in.
-
-
-D. RUNNING THE PIPELINE:
-------------------------
-
- To run the pipeline on either timetag or histogram
- data, just type 'calfuse' followed by the name of the raw
- data file. For example:
-
- calfuse P99901010011attagfraw.fit
- calfuse P99901010011ahistfraw.fit
-
-
-Address questions or concerns to fuse_support@pha.jhu.edu.
-
-- Van Dixon, Bernard Godard, and Benjamin Ooghe-Tabanou
diff --git a/docs/INTRO_TO_CalFUSEv3.2.3 b/docs/INTRO_TO_CalFUSEv3.2.3
deleted file mode 100644
index 0408121..0000000
--- a/docs/INTRO_TO_CalFUSEv3.2.3
+++ /dev/null
@@ -1,385 +0,0 @@
-# Documentation for CalFUSE, the FUSE Calibration Pipeline
-#
-# Introduction to CalFUSE v3.2
-#
-# Created 02/03/2004
-# Van Dixon
-#
-# History:
-# 03/05/2004 Update for v3.0.5.
-# Change name of POTHOLE column to QUALITY.
-# 04/01/2004 Update for v3.0.6.
-# Pipeline now runs on Linux and works on HIST data.
-# Default output binning reduced to 0.013 A.
-# 05/05/2004 Update for v3.0.7.
-# Fixed bug in initial spectral-centroiding routine.
-# Extraction routine now uses the same algorithm to
-# compute the spectral, weights, and bkgd arrays.
-# Modified boxcar extraction to improve background
-# estimate.
-# 08/20/2004 Update for v3.0.7 release.
-# Pipeline now runs on Mac OS X 10.2 and higher.
-# Screening now preceeds aperture centroiding.
-# Raised minimum pulse height to 2 for all segments.
-# 01/21/2005 Add a note about reading the new extracted
-# spectral files into IDL.
-# 04/19/2005 Update for v3.1.0 release.
-# 06/06/2005 Update for v3.1.1 release.
-# 06/10/2005 Clarify discussion of spectral file format.
-# 06/15/2005 Update for v3.1.2 release.
-# 06/24/2005 Add instructions for generating new jitter files.
-# 07/12/2005 Modify instructions for generating new jitter files.
-# 07/21/2005 Add information about post-processing tools.
-# 09/07/2005 Update for v3.1.3 release.
-# 12/02/2005 Update for v3.1.5 release.
-# 12/03/2005 New changes to cf_mirror_motion and cf_grating_motion
-# 01/24/2006 Update for v3.1.6 release.
-# 02/02/2006 Update for v3.1.7.
-# 05/24/2006 Update for v3.1.8.
-# 11/08/2006 Update for v3.2.0.
-# 01/15/2007 Move FIFO-overflow correction to cf_convert_to_farf.
-# 08/24/2007 Update for v3.2.1.
-# 02/15/2008 Update for v3.2.2.
-# 12/05/2008 Update for v3.2.3.
-#
-
-
-I. Introduction
-
- CalFUSE v3.2.3 is the latest version of the FUSE data-reduction
- pipeline. This package includes a new set of calibration files and
- support for Linux 64-bit and Solaris 10 machines.
-
- For complete details about the program, see the paper,
- "CalFUSE v3: A Data-Reduction Pipeline for the Far Ultraviolet
- Spectroscopic Explorer" by Dixon et al. (2007)
- (http://adsabs.harvard.edu/abs/2007PASP..119..527D). It describes
- the CalFUSE pipeline, the instrument calibrations upon which it is
- based, and the format of the resulting calibrated data files.
-
-
-II. Recent Improvements
-
- New in CalFUSE v3.1.5
-
- Bad-Pixel Correction: A new routine, cf_screen_bad_pixels, flags
- photon events falling in known bad-pixel regions.
-
- Histogram Mode: For data obtained in HIST mode,
- cf_count_rate_y_distort must use a single count-rate value for
- the entire exposure. To better estimate it, we replace the
- time-dependent FEC-rate array with its weighted mean value.
- Rather than using different HIST_PAD values for each aperture,
- cf_extraction_limits now pads apertures by 8 pixels (top and
- bottom).
-
- Jitter Correction: To improve the jitter-correction algorithm, we
- removed the data-screening functions from cf_satellite_jitter and
- moved them to a new routine, cf_screen_jitter.
-
- New in CalFUSE v3.1.6
-
- Burst Correction: Because cf_screen_bursts attempts to exclude
- airglow photons from the calculated background, these photons must
- be flagged before the routine is called. To this end,
- cf_screen_airglow is now the first of the screening routines.
-
- Background Models: The model background consists of a
- spatially-uniform component and a scattered-light image. As a
- result of changes introduced in CalFUSE v3.1.3, the scattered-light
- component was over-estimated, because the data were summed over a
- larger region of the detector than the scattered-light image. Now,
- the same limits are applied to both data and models.
-
- New in CalFUSE v3.1.7
-
- Spectral Centroids: We tightened the limits over which
- cf_find_spectra computes the spectral centroid to prevent a bright
- star in a nearby aperture or the enhanced background near the
- detector edge from pulling the extraction window off center. In
- both cf_compute_y_centroid and cf_find_spectra, we returned the
- parameter-file keywords EMAX_LIF and EMAX_SIC to their original
- behavior: if the centroid differs from the default value by more
- than this limit, the default value is used.
-
- New in CalFUSE v3.1.8
-
- Astigmatism and Dispersion: The routine
- cf_astigmatism_and_dispersion was divided into two programs,
- cf_astigmatism and cf_dispersion.
-
- Fewer Warnings: The pipeline no longer issues WARNING messages
- when a raw or intermediate data file is empty, when the jitter file
- is missing, when the detector voltage is low, or when it cannot
- perform optimal extraction.
-
- Fewer Bad Spectra: The program cf_extract_spectra no longer
- discards (that is, sets to zero the flux and error arrays of)
- spectra with non-zero values of EXP_STAT.
-
- New in CalFUSE v3.2.0
-
- Time-Dependent X and Y Distortions: It turns out that the X and Y
- coordinates computed by the detector electronics for a particular
- spectral feature drift slowly with time. The new routine
- cf_time_xy_distort corrects for this effect.
-
- Grating Motion: The grating-motion correction has been revised to
- better correct the zero point of the wavelength scale.
-
- Jitter Files: Over the years, FUSE engineers have repeatedly
- modified the spacecraft-control software, but the routine that
- generates jitter files has not been kept up to date. As a result,
- the program was not using all available information to determine
- the quality and value of pointing errors. We have modified the
- code to make use of this information. As a result, the meaning of
- the jitter-file TRKFLG array has changed: values between 1 and 5
- reflect increasing levels of confidence in the quality of reported
- pointing errors, a value of 0 indicates that pointing telemetry is
- missing, and a value of -1 says that the pointing is unknown but
- likely to be bad. Jitter files generated with the new routine
- receive a version number >= 3.0. The use of old jitter files with
- the new software is likely to yield unsatisfactory results. If you
- have the housekeeping files, you can generate jitter files that are
- consistent with the new pipeline. To do it, delete (or hide) the
- old jitter files, then type
-
- prompt> cf_jitter P9990101001hskpf.fit P9990101001jitrf.fit
-
- for each exposure. Run the pipeline as usual.
-
- Jitter Correction: The jitter routines cf_screen_jitter and
- cf_satellite_jitter have been updated to take advantage of the
- information present in the new jitter files, and three new keywords
- have been added to the parameter file. Times for which the X or Y
- pointing errors are greater than DX_MAX or DY_MAX (default is 30")
- are flagged as bad. Only pointing errors with associated tracking
- flag values >= TRKFLG (default is 3) are considered reliable.
-
- FIFO Overflow: Before, the screening routines flagged times when
- the detector count rate went to zero because of FIFO overflows.
- This technique underestimated the actual target flux. Now, we
- modify the IDS dead-time correction to account for photon losses
- due to FIFO overflows.
-
- New in CalFUSE v3.2.1
-
- Jitter Correction: We have modified the program cf_jitter, which
- constructs jitter files, to be more robust when presented with
- weird pointing data.
-
- SAA Contours: The size of the South Atlantic Anomaly varies on
- timescales of weeks. If you find that the default contours (in the
- file saac004.fit) are too small, causing times with elevated
- background rates to be flagged as good, you can switch to the
- smaller set of contours in the file saac005.fit by modifying the
- file master_calib_file.dat.
-
- New in CalFUSE v3.2.2
-
- New Platforms: CalFUSE now runs on 64-bit machines running Linux
- and Sun workstations running Solaris v10. See the file
- INSTALLING_CalFUSEv3.2.2 for installation details.
-
- We have used data from the last few months of the mission to
- produce final versions of the PHAH_CAL, STIM_CAL, and PHAX_CAL
- files.
-
- New in CalFUSE v3.2.3
-
- The final version of the pipeline includes updates needed for the
- final processing of the FUSE archive. First, airglow exposures get
- special treatment: data taken close to the earth limb are flagged
- but not rejected. Airglow exposures are ignored by cf_combine and
- idf_combine unless the -a flag is set. Second, the usual limits on
- the spectral centroids are not applied to HIST data, because
- spectra from other apertures are not present to confuse the
- centroiding algorithm.
-
-
-III. Overview of Pipeline
-
- The following modules are called by the shell script calfuse.csh:
-
- cf_ttag_init, cf_hist_init
- Converts raw-data file into an IDF containing photon-event
- list, GTI's, and timeline table. Histogram data are converted
- to a pseudo-time-tag format.
-
- cf_convert_to_farf
- Corrects for detector deadtime. Transforms photon coordinates
- into the FARF (flight alignment reference frame).
-
- cf_screen_photons
- Checks data quality. Assigns status flag to each photon.
-
- cf_remove_motions
- Corrects for mirror, grating, FPA, and spacecraft motions.
-
- cf_assign_wavelength
- Applies astigmatism and Doppler corrections.
- Assigns wavelength to each photon.
-
- cf_flux_calibrate
- Converts WEIGHT to ERG/CM2 for each photon.
-
- cf_bad_pixels
- Applies image-motion corrections to bad-pixel map.
-
- cf_extract_spectra
- Extracts LiF and SiC spectra only for target aperture.
- Wavelength array is user defined; default spacing is 0.013 A.
-
-
-IV. Installing and Running the Pipeline
-
- CalFUSE is now available for Macs running OS X 10.2 and higher,
- 64-bit Linux machines, and Sun workstations running Solaris 10.
-
- Please see the document INSTALLING_CalFUSEv3.2.2 for instructions.
-
- For both TTAG and HIST data, the command is
-
- prompt> calfuse P99901010011attagfraw.fit
- prompt> calfuse P99901010011ahistfraw.fit
-
- The pipeline expects to find all data files (*raw.fit, *jitrf.fit,
- *hskpf.fit) in the current directory. It operates on one detector
- segment at a time.
-
- CalFUSE v3 produces the following output files: an intermediate
- data file (IDF), discussed below; a bad-pixel map (BPM), with a
- format similar to the IDF; two extracted spectral files, one for
- each of the LiF and SiC channels; and (if IDL is installed on your
- machine) a pair of GIF or JPEG files, one an image of the detector
- and the other a count-rate plot.
-
-
-V. The Intermediate Data File (IDF)
-
- The photon-list files consist of three FITS binary tables. The
- first contains the photon events themselves. The pipeline does not
- discard any events, but uses a series of flags to indicate whether
- particular photons violate pulse-height limits, limb-angle
- constraints, etc. The IDL tool cf_edit (discussed below) allows
- users to modify these flags and combine IDF files from multiple
- exposures.
-
- The second extension to the data files is a list of good-time
- intervals (GTI's). They are not used by the extraction routine,
- but may prove helpful to pipeline users.
-
- The third extension is called a timeline table. For each second
- during the exposure, it lists a dozen parameters, including count
- rate, day-night status, and detector voltage. The pipeline uses
- this list to set the status flags for each photon.
-
- Note: because of the new file format employed by IDF files,
- extensions 1 and 3 must be read using the /fscale keyword.
-
- idl> a=mrdfits('P99901010011attagfidf.fit',1,/fscale)
- idl> help,a,/str
-
- Elements of individual arrays must be addressed using the syntax
-
- idl> print,a.time[3:30] -- not a[3:30].time
-
- For details about the format of the IDF, please see the document
-
- [calfuse_directory]/v3.1/src/README_FILES/IDF_Format.txt
-
-
-VI. Manipulating the IDF with cf_edit
-
- CF_EDIT is an Interactive Data Language (IDL) visualization tool
- for the examination and modification of FUSE IDF files containing
- flux- and wavelength-calibrated photon-event lists. Users without
- IDL licenses may use the IDL "Virtual Machine" version of the
- tool for free. Complete instructions for installing and using
- cf_edit are available at this URL:
-
- http://fuse.pha.jhu.edu/analysis/fuse_idl_tools.html
-
- More information on the IDL Virtual Machine is available here:
-
- http://www.rsinc.com/idlvm/index.asp
-
-
-VII. The Output Spectral File
-
- The format of the output spectral files is somewhat changed from
- earlier versions of CalFUSE.
-
- float WAVE Wavelength (Angstroms)
- float FLUX Flux (erg/cm2/s/A)
- float ERROR Gaussian errors (erg/cm2/s/A)
- int COUNTS Raw counts in extraction window
- float WEIGHTS Raw counts corrected for deadtime, etc.
- float BKGD Estimated background in extraction window
- short QUALITY Percentage of window used for extraction
-
- Note that the QUALITY array no longer lists the number of Y pixels
- that contribute to each output X pixel. Instead, it is the fraction
- of the extraction window considered to contain valid data, expressed
- as a percentage (0 is all bad; 100 is all good).
-
- Do-it-yourself-ers can use the following recipe to generate a
- flux-calibrated spectrum:
-
- TARGET_COUNTS = WEIGHTS - BKGD
- TARGET_FLUX = TARGET_COUNTS * HC / LAMBDA / AEFF / EXPTIME / WPC
-
- where AEFF = effective area in cm^2 and WPC = size of output pixel in
- Angstroms.
-
-VIII. Additional Files Available from MAST
-
- CalFUSE produces eight extracted spectral (*fcal.fit) files for
- each exposure. We combine them into a set of three
- observation-level files for submission to the MAST archive.
- Depending on the target and the questions that you are trying to
- answer, you may find that these files are of sufficient fidelity
- for scientific investigation. Here's a brief description of their
- contents:
-
- ALL: For each channel (LiF 1A, SiC 1A, etc.), we combine data from
- all exposures in the observation into a single spectrum. If the
- individual spectra are bright enough, we cross correlate and shift
- before combining them. If the spectra are too faint, we combine the
- individual IDF files and extract a single spectrum to optimize the
- background model. The combined spectrum for each channel is stored
- in a separate extension.
-
- Note: The cataloging software used by MAST requires the presence of
- an ALL file for each exposure, not just for the entire observation.
- We now generate such a file, but it contains no data, only a FITS
- file header. The observation-level ALL files discussed above can be
- identified by the string "00000all" in their names.
-
- ANO (all, night-only): Same format as the ALL files, but using only
- data obtained during the night-time portion of each exposure. These
- files are generated only for TTAG data, and only if EXPNIGHT > 0.
-
- NVO (National Virtual Observatory): Contains a single spectrum
- spanning the entire FUSE wavelength range. The spectrum is
- assembled by cutting and pasting segments from the most sensitive
- channel at each wavelength. Segments are shifted to match LiF 1A
- between 1045 and 1070 E. Columns are WAVE, FLUX, and ERROR and are
- stored in a single binary table extension.
-
-IX. Data-Analysis Tools
-
- A variety of IDL routines to display and manipulate FUSE data are
- available from the FUSE IDL Tools Reference Page:
-
- http://fuse.pha.jhu.edu/analysis/fuse_idl_tools.html
-
- Data-analysis tools distributed with the CalFUSE pipeline are
- reviewed in the document FUSE Tools in C:
-
- http://fuse.pha.jhu.edu/analysis/fuse_toolbox.html
-
- A subset of these programs, designed specifically for the
- manipulation of IDF files, is described in the IDF Cookbook:
-
- http://fuse.pha.jhu.edu/analysis/idfcook/index.html
diff --git a/docs/pipeline_status.html b/docs/pipeline_status.html
deleted file mode 100644
index be15d28..0000000
--- a/docs/pipeline_status.html
+++ /dev/null
@@ -1,3515 +0,0 @@
-<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta name="GENERATOR" content="Mozilla/4.6 [en] (X11; U; SunOS 5.7 sun4u) [Netscape]">
- <meta name="CREATED" content="20000121;18144100">
- <meta name="CHANGED" content="20000124;16081300">
- <title>CALFUSE Pipeline Status</title>
-</head>
-<body bgcolor="#FFFFFF">
-
-<h1>
-CalFUSE Pipeline Status</h1>
-<b>Final pipeline version is 3.2.3, dated December 5, 2008.</b>
-
-<p STYLE="margin-bottom: 0in">Latest updates:
-
-<p>December 5, 2008
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_calculate_y_centroid.c
-<BR>v3.2/src/libcf/cf_find_spectra.c
-<BR>v3.2/src/libcf/cf_screen_jitter.c
-
-<P>
-In HIST mode, there are no spectra in other apertures to cause
-confusion, so we need not require that the target centroid lie within X
-pixels of either the airglow centroid or the tabulated centroid. Both
-cf_find_spectra.c and cf_calculate_y_centroid.c were modified to effect
-this change.
-
-<P>
-Modified cf_screen_jitter.c so that the jitter correction is not
-applied to ERO observations of Jupiter (program X006).
-
-<P>
-<hr WIDTH="100%">
-
-<p>August 22, 2008
-<br>Van Dixon
-
-<P>
-<BR>v3.2/include/calfuse.h
-<BR>v3.2/src/fuv/cf_bad_pixels.c
-<BR>v3.2/src/fuv/cf_screen_photons.c
-<BR>v3.2/src/libcf/cf_apply_filters.c
-<BR>v3.2/src/libcf/cf_fuv_init.c
-<BR>v3.2/src/libcf/cf_screen_jitter.c
-<BR>v3.2/src/libcf/cf_set_photon_flags.c
-<BR>v3.2/src/analysis/cf_combine.c
-<BR>v3.2/src/analysis/cf_xcorr.c
-<BR>v3.2/src/analysis/idf_combine.c
-<BR>v3.2/src/analysis/cf_make_all_obs.csh
-<BR>v3.2/src/analysis/cf_make_900_obs.csh
-
-<P>
-I've modified CalFUSE to treat bright-earth and airglow observations
-differently than before. Here are the details:
-<P>
-When creating the IDF files for bright-earth observations (programs
-M106 and S100) or 900-level airglow exposures, CalFUSE sets the header
-keyword EXP_STAT = 2. For 900-level exposures, the SRC_TYPE is set to
-EE, and the following warning is written to the file header:
-"Airglow exposure. Not an astrophysical target."
-<P>
-The pipeline then processes the file as usual. In particular, the
-limb-angle flag is set in the timeline table (extension 3 of the IDF),
-and the "Time with low limb angle" is written to the file header.
-However, if EXP_STAT = 2, the following things change:
-
-<UL>
-<LI>no jitter correction is performed;
-<LI>when the time-dependent flags are copied from the timeline
- table to the individual photons, the limb-angle flag is masked
- out;
-<LI>when the good-time intervals and exposure time are
- calculated, the limb-angle flag is ignored.
-</UL>
-
-<P>
-The extracted spectra include photons obtained at low limb angles. The
-detector-image plots do, too. But the count-rate plots indicate times
-when the line of sight passes below the limb-angle limit.
-<P>
-For programs M106 and S100, all of the data are included in the
-observation-level ALL, ANO, and NVO files. For all other programs,
-900-level airglow exposures are excluded from the sum. A new
-observation-level file is produced: a single quick-look (gif) plot
-showing the summed spectrum from all of the 900-level exposures in the
-observation. It has a name like M112580100900specttagf.gif.
-
-<P>
-Update version number to v3.2.3.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 11, 2008
-<br>Van Dixon
-<BR>v3.2/src/analysis/cf_xcorr.c
-<BR>v3.2/src/analysis/cf_combine.c
-<BR>v3.2/src/analysis/cf_make_all_obs.csh
-
-<P>
-We've changed the logic used to combine individual exposures into
-observation-level files for data obtained in HIST mode. If the target
-is too faint to perform a cross-correlation, but is still in the slit
-(i.e., its flux is within 50% of the reference spectrum), add the
-spectra using a shift of zero. If an exposure suffers a limb-angle or
-SAA violation, include it anyway, assuming that HIST targets are
-bright enough that the additional background flux is not a problem.
-
-<P>
-<hr WIDTH="100%">
-
-<p>March 21, 2008
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_find_spectra.c
-
-<P>
-In HIST mode, there are no spectra in other apertures to cause
-confusion, so we need not require that the target centroid lie
-within 30 pixels of the expected value.
-
-<P>
-<hr WIDTH="100%">
-
-<p>Feb 22, 2008
-<br>Benjamin Ooghe
-<BR>INSTALLING_CalFUSEv3.2.2
-<BR>INSTALLING_A_FORTRAN_COMPILER
-<BR>FIXING_SELINUX_ISSUES
-
-<P>Updated installation information.
-
-<P>
-<BR>v3.2/bin/calfuse.sh
-<BR>v3.2/bin/cfsetup.sh
-<BR>v3.2/bin/cfsetup.csh
-
-<P>Added scripts to set environment variables in Bourne-based shells
-(sh and bash) for systems without CSH and automated the setting of the
-shell path.
-
-<P>
-<BR>v3.2/src/configure.linux
-<BR>v3.2/src/configure.linux64
-<BR>v3.2/src/configure.macosx
-<BR>v3.2/src/configure.solaris
-<BR>v3.2/src/cfitsio/configure
-<BR>v3.2/src/Makefile.Linux
-<BR>v3.2/src/Makefile.Linux64
-<BR>v3.2/src/Makefile.MacOSX
-<BR>v3.2/src/analysis/Makefile.Linux
-<BR>v3.2/src/analysis/Makefile.Linux64
-<BR>v3.2/src/analysis/Makefile.MacOSX
-<BR>v3.2/src/analysis/idf_combine.c
-<BR>v3.2/src/analysis/cf_coadd.c
-<BR>v3.2/src/analysis/cf_arith.c
-<BR>v3.2/src/analysis/cf_combine.c
-<BR>v3.2/src/analysis/cf_pack.c
-<BR>v3.2/src/cal/jitter/Makefile.Linux
-<BR>v3.2/src/cal/jitter/Makefile.Linux64
-<BR>v3.2/src/cal/jitter/Makefile.MacOSX
-<BR>v3.2/src/cal/jitter/cf_jitter.c
-<BR>v3.2/src/cal/jitter/cf_jitter_diag.c
-<BR>v3.2/src/fes/Makefile.Linux
-<BR>v3.2/src/fes/Makefile.Linux64
-<BR>v3.2/src/fuv/Makefile.Linux
-<BR>v3.2/src/fuv/Makefile.Linux64
-<BR>v3.2/src/fuv/Makefile.MacOSX
-<BR>v3.2/src/fuv/cf_gainmap.c
-<BR>v3.2/src/fuv/cf_countmap.c
-<BR>v3.2/src/libcf/Makefile.Linux
-<BR>v3.2/src/libcf/Makefile.Linux64
-<BR>v3.2/src/libcf/Makefile.MacOSX
-<BR>v3.2/src/libcf/cf_idf_io.c
-<BR>v3.2/src/slalib/mk
-<BR>v3.2/src/slalib/mk.sv
-<BR>v3.2/src/slalib/sla_source.tar
-
-<P>Updated configure files and Makefiles for all systems in order to
-compile with more different fortran compilers (f77, f90, g77, gfortran)
-and on recent systems (Solaris 10, recent Linux, Mac OS X 10.4)
-including 64-bit architecture machines. This required the modification
-of source files to correct bad int/long declarations that cause
-problems on 64-bit architectures, on Solaris 10 systems, and on some
-fortran compilers.
-
-<P>
-<BR>v3.2/include/calfuse.h
-<BR>v3.2/src/libcf/cf_fes_proc_update.c
-<BR>v3.2/src/libcf/cf_fes_proc_check.c
-
-<P>Fixed warning messages from GCC compiler (missing brackets and
-unused symbols).
-
-<P>
-<BR>v3.2/src/analysis/cf_make_all_obs.csh
-
-<P>Use airglow spectra when they are the only ones available.
-
-<P>
-<BR>v3.2/src/analysis/cf_nvo.c
-
-<P>Fixed memory problem causing occasional bad values in the NVO flux arrays.
-In copy_spec, the shift+start value was sometimes negative, causing the
-routine to read negative indexes in the flux and error arrays. Also,
-the final values of the flux_nvo and error_nvo arrays weren't always
-written.
-
-<P>
-<BR>v3.2/src/fuv/cf_bad_pixels.c
-
-<P>In cf_generate_pseudo_photons, verify for each fill-data event that
-the LOCATION_SHLD flag is not set to ensure that it does not
-fall outside of the active area of the detector.
-
-<P>
-<BR>v3.2/src/libcf/cf_thermal_distort.c
-
-<P>In cf_estimate_drift_coefficients, set max value of index to jmax-1
-rather than jmax.
-
-
-<P>
-<hr WIDTH="100%">
-
-<p>February 22, 2008
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_convert_to_farf.c
-<BR>v3.2/src/fuv/cf_flux_calibrate.c
-<BR>v3.2/src/fuv/cf_ttag_init.c
-<BR>v3.2/src/libcf/cf_modify_hist_pha.c
-<BR>v3.2/src/libcf/cf_screen_jitter.c
-<BR>v3.2/src/libcf/cf_set_good_time_intervals.c
-
-<P>
-Modified cf_convert_to_farf to write out the new PHA values assigned
-by cf_modify_hist_pha.
-
-<P>
-Cleaned up i/o in cf_flux_calibrate.
-
-<P>
-Added -e flag to cf_ttag_init. It sets the header keyword HKEXISTS
-to YES in the output IDF file.
-
-<P>
-In cf_modify_hist_pha, fixed bug in loop through MJD array.
-
-<P>
-In cf_screen_jitter, don't apply jitter correction to observations
-taken after the spacecraft lost pointing control.
-
-<P>
-Changed malloc to cf_malloc in cf_set_good_time_intervals.
-
-<P>
-Update version number to v3.2.2.
-
-<P>
-<hr WIDTH="100%">
-
-<br>
-<p>May 18, 2007
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_init_support.c
-
-<P>
-If HV array in HSKP file consists of a single 0 followed by all -1's,
-use header info to populate timeline table. Change name of subroutine
-fill_hv_array to hv_from_hskp and add hv_from_header.
-
-<P>
-Update version number to v3.2.1.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 7, 2007
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_bad_pixels.c
-
-<P>
-Within cf_bad_pixels, we scale nmax, the program's guess at the number
-of bad pixels it will have to deal with, by 1.5 to help prevent array
-overflows. To make warning messages more meaningful, we call
-cf_error_init after each call to cf_extraction_limits and make
-CF_PRGM_ID and CF_VER_NUM static variables.
-
-<P>
-This is the release version of CalFUSE v3.2.0.
-
-<P>
-<hr WIDTH="100%">
-
-<p>March 29, 2007
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_init_support.c
-<BR>v3.2/src/cal/jitter/cf_jitter.c
-
-<P>
-On error, cf_check_digitizer now sets EXP_STAT flag to -2, rather than
--999, to be more consistent with cf_hist_init.
-
-<P>
-We modified cf_jitter to handle the time period (in March 2007) when
-the ACS telemetry rate was cut in half and generally made the code
-more robust.
-
-<P>
-<hr WIDTH="100%">
-
-<br>
-<p>March 23, 2007
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_hist_init.c
-<BR>v3.2/src/libcf/cf_init_support.c
-<BR>v3.2/src/libcf/cf_screen_jitter.c
-<BR>v3.2/src/libcf/cf_satellite_jitter.c
-
-<P>
-In cf_hist_init, set EXP_STAT to -1 if a raw hist file contains no
-extensions. Treat the limits of the active area as good pixels.
-
-<P>
-In cf_init_support, give a more detailed error message if the
-housekeeping file is not usable.
-
-<P>
-In cf_screen_jitter and cf_satellite_jitter, calculate time_diff (the
-offset between the jitter and IDF versions of EXPSTART) once, rather
-than each time it's used.
-
-<br>
-<p>March 20, 2007
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_bad_pixels.c
-
-<P>
-In the subroutine cf_combine_pothole_data, if an entire dead spot falls
-outside of the aperture, skip it and move on to the next one.
-
-<P>
-<hr WIDTH="100%">
-
-<p>March 7, 2007
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_init_support.c
-<BR>v3.2/src/libcf/cf_velang.c
-<BR>v3.2/src/libcf/space_vel.c
-<BR>v3.2/include/calfuse.h v1.81
-
-<P>
-The subroutine space_vel used a convoluted scheme to compute what
-is essentially a dot product. I simplified the code, deleted an
-argument, and modified the subroutines that call it.
-
-<P>
-This is version 3.2.0 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>February 13, 2007
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_remove_motions.c
-
-<BR>v3.2/src/libcf/cf_fifo_dead_time.c
-<BR>v3.2/src/libcf/cf_init_support.c
-
-<P>
-When writing the LiF and SiC count rate arrays to the IDF file,
-cf_remove_motions crashed if the array values were too large to be
-stored as unsigned integers. As such enormous values are always wrong,
-they are now set to zero.
-
-<P>
-Sometimes, the header keyword TTPERIOD is erroneously set to 0.
-If so, cf_init_support and cf_fifo_dead_time now set it to 1.0,
-the most likely value.
-
-<P>
-<hr WIDTH="100%">
-
-<p>January 2, 2007
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_screen_photons.c
-<BR>v3.2/src/fuv/cf_convert_to_farf.c
-<BR>v3.2/src/fuv/cf_remove_motions.c
-
-<BR>v3.2/src/libcf/cf_apply_dead_time.c
-<BR>v3.2/src/libcf/cf_fifo_dead_time.c
-<BR>v3.2/src/libcf/cf_target_count_rate.c
-<BR>v3.2/src/libcf/pole_ang.c
-<BR>v3.2/src/libcf/cf_velang.c
-<BR>v3.2/src/libcf/cf_screen_high_voltage.c
-<BR>v3.2/src/libcf/cf_satellite_jitter.c
-<BR>v3.2/src/libcf/cf_grating_motion.c
-<BR>v3.2/src/libcf/cf_time_xy_distort.c
-<BR>v3.2/src/libcf/cf_init_support.c
-<BR>v3.2/src/libcf/cf_set_photon_flags.c
-
-<BR>v3.2/src/cal/jitter/cf_jitter.c
-
-<BR>v3.2/src/analysis/cf_combine.c
-<BR>v3.2/src/analysis/cf_nvo.c
-<BR>v3.2/src/analysis/cf_pack.c
-<BR>v3.2/src/analysis/idf_combine.c
-
-
-<P>
-To fix a bug in our correction for photon-event losses to FIFO
-overflows, we modified the subroutine cf_screen_fifo_overflow, renamed
-it cf_fifo_dead_time, and moved it from cf_screen_photons to
-cf_convert_to_farf. The subroutine cf_apply_dead_time issues a warning
-if DET_DEAD > 1.5, rather than TOT_DEAD. Because we no longer use
-the HV status flag to denote FIFO overflows, mention of the FIFO flag
-was removed from cf_set_photon_flags. Within cf_convert_to_farf, we
-now set the header keywords DET_DEAD, IDS_DEAD, and TOT_DEAD to unity
-by default.
-
-<P>
-Within cf_remove_motions, we now treat the LiF and SiC count-rate
-arrays as floats. We pass the WEIGHT array to cf_target_count_rate,
-so that it returns dead-time corrected count rates. If these count
-rates are too large to store as shorts, we use the TSCALE and TZERO
-keywords to store them as unsigned shorts. For HIST data, we scale
-the default LiF and SiC rates (read from the housekeeping file) by
-the value of DET_DEAD to account for detector dead-time losses.
-
-<P>
-The new subroutine pole_ang returns the angle between the orbit pole
-and a given RA and DEC. It is called by cf_velang, which populates
-the POLEANGL keyword.
-
-<P>
-The subroutine cf_screen_high_voltage no longer sets the EXP_STAT keyword.
-
-<P>
-The subroutine cf_find_spectra has been modified: if the new argument
-airglow_centroid is TRUE, then the program uses the airglow lines to
-compute the centroid of the target spectrum. To invoke this option,
-call cf_remove_motions with the -a flag.
-
-<P>
-The program cf_jitter has been extensively modified. Among other
-changes, it can (if necessary) compute the commanded quaternion from
-the target coordinates in the housekeeping file header. Values of the
-TRKFLG array now range from -1 to 5, with -1 meaning that tracking is
-bad, 0 that no information is available, and 1 to 5 representing
-increasingly reliable tracking estimates. The subroutines
-cf_satellite_jitter and cf_screen_jitter have been modified
-accordingly. In particular, the minimum value of TRKFLG that is to be
-considered reliable and the X and Y aperture limits are read from the
-pipeline parameter file.
-
-<P>
-Both the subroutine cf_grating_motion and the grating-motion
-calibration file have been completely revised. The new model depends
-on the target's beta and pole angles. An additional set of corrections
-tracks long-term drifts in the spectra's X and Y positions.
-
-<P>
-A new subroutine, cf_time_xy_distort, corrects for long-term drifts
-in the detector X and Y coordinate scales. It is called by
-cf_convert_to_farf.
-
-<P>
-We fixed a bug in the way that cf_init_support constructs the AIC
-count-rate array.
-
-<P>
-Lots of little changes in the analysis routines: When selecting which
-detector segment to include in the composite spectrum, cf_nvo now
-rejects segments with OBSTIME < 10 sec if the entire exposure is > 100
-s. The program idf_combine adds comment fields to the header keywords
-WOFFS and WOFFL. The program cf_combine now counts SPEC### and WAVE###
-using the variable ngood, rather than nfiles. Finally, we made small
-changes to the way that cf_pack copies the SPEC keywords to the output
-file header.
-
-
-<P>
-<hr WIDTH="100%">
-
-<p>June 22, 2006
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_hist_init.c
-<BR>v3.2/src/fuv/cf_extract_spectra.c
-<BR>v3.2/src/fuv/cf_ttag_init.c
-<BR>v3.2/src/libcf/cf_screen_jitter.c
-<BR>v3.2/src/libcf/cf_screen_burst.c
-<BR>v3.2/src/libcf/cf_optimal_extraction.c
-<BR>v3.2/src/libcf/cf_fuv_init.c
-<BR>v3.2/src/libcf/cf_error_msg.c
-
-<P>
-The pipeline no longer issues WARNING messages when a raw or
-intermediate data file is empty, either because it contains no photons
-or because the entire exposure has been flagged as bad; when the jitter
-file is missing (though out-of-date jitter files inspire a WARNING);
-when the detector voltage is low; and when the pipeline cannot perform
-optimal extraction. It issues level 1 verbose messages instead.
-
-<P>
-Now that OPUS has been updated, the variable morekeys has been set to
-zero in both cf_hist_init and cf_ttag_init.
-
-<P>
-This is version 3.1.8 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<br>
-<p>May 24, 2006
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_extract_spectra.c
-<BR>v3.2/src/analysis/cf_combine.c
-<BR>v3.2/src/analysis/cf_nvo.c
-<BR>v3.2/src/analysis/cf_pack.c
-<BR>v3.2/src/analysis/cf_xcorr.c
-<BR>v3.2/src/analysis/idf_combine.c
-<BR>v3.2/idl/cf_obsplot.pro
-
-<P>
-We modified cf_extract_spectra so that it will no longer discard (that
-is, set to zero the flux and errors arrays of) spectra with non-zero
-values of EXP_STAT. Those spectra are now rejected by cf_combine,
-instead.
-
-<P>
-The program cf_combine has been extensively revised:
-it now runs through the input files with a single loop;
-it supports the same command-line options as idf_combine; and
-it ignores spectra with EXP_STAT != 0 (unless the -a flag is set).
-
-<P>
-Both cf_nvo and cf_xcorr now use the Lyman beta line to align the
-spectra of background observations. They use the interstellar O VI and
-C II lines to align white dwarf spectra. For BKGD targets, cf_nvo
-always selects the channel with the highest effective area, regardless
-of its observed flux. The mean flux, used when deciding which segment
-to use, is now calculated using the same wavelength regions for each
-channel. For PC targets, the O VI lines are not included in the mean
-flux calculation.
-
-<P>
-The program cf_pack now writes an index to the various file extensions
-to the primary HDU of the output *000all* file.
-
-<P>
-Both cf_combine and idf_combine now write a number of header keywords
-as longs, rather than floats.
-
-<P>
-Three changes to cf_obsplot.pro: For BKGD targets, omit flux
-comparison when selecting which detector segments to use. Compute mean
-flux using same wavelength intervals for each band. For PC targets,
-don't include O VI in the calculation of the mean flux.
-
-<P>
-<hr WIDTH="100%">
-
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_assign_wavelength.c
-<BR>v3.2/src/fuv/cf_bad_pixels.c
-<BR>v3.2/src/libcf/cf_astigmatism.c
-<BR>v3.2/src/libcf/cf_dispersion.c
-<BR>v3.2/src/libcf/cf_apply_dead_time.c
-<BR>v3.2/src/libcf/cf_extraction_limits.c
-<BR>v3.2/src/libcf/cf_init_support.c
-<BR>v3.2/src/libcf/cf_screen_burst.c
-<BR>v3.2/src/libcf/cf_screen_fifo_overflow.c
-<BR>v3.2/src/libcf/cf_screen_jitter.c
-<BR>v3.2/src/libcf/cf_set_photon_flags.c
-<BR>v3.2/src/analysis/cf_make_all_obs.csh
-<BR>v3.2/src/analysis/cf_nvo.c
-<BR>v3.2/src/analysis/cf_pack.c
-<BR>v3.2/src/analysis/cf_xcorr.c
-
-<P>
-Divided cf_astigmatism_and_dispersion into two routines, incorporating
-astig_check_input_image into the new program cf_astigmatism and
-cf_x2lambda into cf_dispersion. Modified cf_assign_wavelength and
-cf_bad_pixels to call the new routines. Because cf_astig_farf is not
-used, it is no longer defined in calfuse.h or compiled by the
-Makefile.
-
-<P>
-Cleaned up i/o in cf_apply_dead_time.
-
-<P>
-For targets observed in HIST mode, cf_extraction_limits.c now pads
-apertures by SPECBINY pixels.
-
-<P>
-In cf_init_support, flag as bad all times after final OPUS GTI.
-
-<P>
-In cf_screen_burst, require that the number of windows in subroutine
-median_filter be >= 1.
-In cf_screen_fifo_overflow, changed length of data_rate array from
-nevents to nseconds.
-In cf_screen_jitter, screening is now applied to targets observed with
-APERTURE = RFPT.
-In cf_set_photon_flags, modify header keyword EXP_STAT only if was initially 0.
-
-<P>
-In the analysis directory, modified cf_make_all_obs.csh to be smarter
-when deciding whether to cross-correlate spectra or combine IDF files.
-Also modified logic for discarding 000 files. In cf_nvo, ignore
-segments with OBS_TIME = 0 and allow use of SiC data for 1000-1100 A
-region. (Sometimes the LiF channels are not used.) In cf_pack, if a
-segment is missing, write an empty image extension to the combined data
-file. In cf_xcorr, scale each spectrum to the mean flux of the
-reference spectrum.
-
-<P>
-This is version 3.1.8 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>February 3, 2006
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_compute_y_centroid.c
-<BR>v3.2/src/fuv/cf_find_spectra.c
-<BR>v3.2/src/libcf/cf_scale_bkgd.c
-<BR>v3.2/src/fuv/cf_extract_spectra.c
-
-<P>
-We tightened the limits over which cf_find_spectra computes the
-spectral centroid to prevent a bright star in a nearby aperture or the
-enhanced background near the detector edge from pulling the extraction
-window off center. In both cf_compute_y_centroid and cf_find_spectra,
-we returned the EMAX_LIF and EMAX_SIC keywords to their original
-behavior: if the centroid differs from the default value by more than
-this limit, the default value is used.
-
-<P>
-We fixed a bug introduced in the last modification of cf_scale_bkgd
-that essentially turned off the background subtraction.
-
-<P>
-We added a command-line flag to cf_extract_spectra that forces the use
-of optimal extraction, even for extended sources.
-
-<P>
-This is version 3.1.7 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>January 24, 2006
-<br>Van Dixon
-<BR>v3.2/src/fuv/cf_screen_photons.c
-<BR>v3.2/src/libcf/cf_scale_bkgd.c
-
-<P>
-Because cf_screen_burst wants to exclude airglow photons from the
-calculated background, we must identify them before calling the
-routine. To that end, I've made cf_screen_airglow the first of the
-screening routines.
-
-<P>
-The model background consists of a spatially-uniform component and a
-scattered-light image. The scattered-light component was
-over-estimated, because the data count totals were computed using a
-larger region of the detector than the scattered-light model totals.
-Now, we apply the same limits to both data and models.
-
-<P>
-The program returns a slice of the background that is supposed to match
-that covered by the probability array. Limit checks in the subroutine
-get_limits prevented the background slice from falling off of the
-detector. Sometimes, you want to background slice to fall off of the
-detector. In such cases, the limit checks could introduce an unwanted
-offset in the model background. We've deleted the limit checks and use
-other means to avoid bad index values.
-
-<P>
-This is version 3.1.6 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>January 3, 2006
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_grating_motion.c
-
-<P>
-Correct LiF 1 data for residual zero-point errors in the wavelength scale.
-
-<P>
-<hr WIDTH="100%">
-
-<p>December 2, 2005
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_mirror_motion.c
-
-<P>
-cf_mirror_motion now exits without modifying the data if target is an
-extended source.
-
-<P>
-<hr WIDTH="100%">
-
-<p>December 2, 2005
-<br>Van Dixon
-<BR>v3.2/src/libcf/cf_astigmatism_and_dispersion.c
-<BR>v3.2/src/libcf/cf_apply_dead_time.c
-<BR>v3.2/src/libcf/cf_convert_to_ergs.c
-<BR>v3.2/src/libcf/cf_count_rate_y_distort.c
-<BR>v3.2/src/libcf/cf_doppler_and_heliocentric.c
-<BR>v3.2/src/libcf/cf_extraction_limits.c
-<BR>v3.2/src/libcf/cf_fpa_position.c
-<BR>v3.2/src/libcf/cf_init_support.c
-<BR>v3.2/src/libcf/cf_make_mask.c
-<BR>v3.2/src/libcf/cf_optimal_extraction.c
-<BR>v3.2/src/libcf/cf_satellite_jitter.c
-<BR>v3.2/src/libcf/cf_screen_bad_pixels.c (NEW)
-<BR>v3.2/src/libcf/cf_screen_fifo_overflow.c
-<BR>v3.2/src/libcf/cf_screen_jitter.c (NEW)
-<BR>v3.2/src/fuv/cf_bad_pixels.c
-<BR>v3.2/src/fuv/cf_extract_spectra.c
-<BR>v3.2/src/fuv/cf_remove_motions.c
-<BR>v3.2/src/fuv/cf_screen_photons.c
-
-<P>
-To improve our bad-pixel correction, we've added a new routine,
-cf_screen_bad_pixels, which flags photon events falling in known
-pothole regions. cf_make_mask now fills gaps in the bad-pixel mask
-that open when it is converted from pixels to wavelengths. In the
-optimal-extraction algorithm, cf_optimal_extraction now scales the
-variance estimate by the bad-pixel mask to better approximate the
-observed counts. The main pothole routine, cf_bad_pixels, now uses
-cf_x2lambda() and cf_get_potholes(), rather than its own subroutines
-that do the same job. Also, it no longer adds random numbers to the
-output pixel coordinates -- that's no longer necessary. Finally,
-cf_bad_pixels no longer trims potholes at the edges of the
-extraction windows. We modified cf_astigmatism_and_dispersion so that
-it would not complain when events fall outside of the astig images.
-
-<P>
-We added a test to cf_apply_dead_time to catch bad dead-time values: If
-there is no housekeeping file, AND the engineering snapshot times are
-bad, AND the mean value of either dead-time array is > 1.5, set the
-array to unity and issue a warning.
-
-<P>
-In cf_convert_to_ergs, we changed the effective-area arrays to type
-double to match the AEFF_CAL files.
-
-<P>
-For histogram data, cf_count_rate_y_distort must use a single count
-rate value for all of the data. To better estimate it, we replace the
-time-dependent FEC-rate array with its weighted mean value.
-
-<P>
-To improve our calculation of the Doppler correction, we changed the
-variables velocity and doppler to doubles in cf_doppler_and_heliocentric.
-
-<P>
-Rather than using different HIST_PAD values for each aperture,
-cf_extraction_limits now always pads the apertures by 8 pixels (top and
-bottom) when in HIST mode.
-
-<P>
-We deleted unused variables in cf_fpa_position.
-
-<P>
-More efforts to catch corrupted keywords in cf_init_support: When
-the housekeeping file is missing and the engineering snapshot times are
-corrupted, we use EXPSTART and EXPEND to estimate eng_time. If EXPEND is
-corrupted, we use EXPTIME.
-
-<P>
-To improve the jitter-correction algorithm, we've removed the
-data-screening functions from cf_satellite_jitter and moved them to a
-new routine, cf_screen_jitter. The modules cf_remove_motions and
-cf_screen_photons have been modified accordingly.
-
-<P>
-We caught a bug in cf_screen_fifo_overflow: It was using the
-RATE_LIF and RATE_SIC arrays to estimate the raw count rate, but those
-arrays are populated from the housekeeping file and do not reflect data
-losses due to FIFO overflows. Now we calculate the count rate across
-the entire detector directly from the photon-event data.
-
-<P>
-We added a flag to cf_extract_spectra that allows the user to disable
-optimal extraction from the command line.
-
-<P>
-This is version 3.1.5 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>September 19, 2005
-<br>Van Dixon
-<BR>v3.1/src/libcf/cf_read_fpa_pos.c (RESTORED)
-
-<P>
-Had to restore cf_read_fpa_pos, as it's called by ttag_combine.
-
-<P>
-This is version 3.1.3 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>September 7, 2005
-<br>Van Dixon
-<BR>v3.1/src/analysis/cf_arith.c (RENAMED)
-<BR>v3.1/src/analysis/cf_coadd.c
-<BR>v3.1/src/analysis/cf_combine.c
-<BR>v3.1/src/analysis/cf_make_all_exp.c (NEW)
-<BR>v3.1/src/analysis/cf_nvo.c
-<BR>v3.1/src/analysis/cf_pack.c
-<BR>v3.1/src/analysis/cf_xcorr.c
-<BR>v3.1/src/analysis/getshift.c
-<BR>v3.1/src/analysis/modhead.c
-<BR>v3.1/src/libcf/cf_init_support.c
-<BR>v3.1/src/libcf/cf_fpa_position.c
-<BR>v3.1/src/libcf/cf_read_fpa_pos.c (DELETED)
-<BR>v3.1/src/libcf/cf_screen_burst.c
-<BR>v3.1/src/libcf/cf_write_extracted_spectrum.c
-
-<P>
-We are required to provide MAST an <b>all</b> file for each exposure and
-one set of <b>all</b>, <b>ano</b>, and <b>nvo</b> files per observation.
-These files are created by cf_coadd, which has been completely re-written.
-It calls cf_make_all_exp for each exposure and cf_make_all_obs.csh once
-per observation. The new program cf_make_all_exp copies the primary HDU
-of the channel with the longest EXPTIME into an otherwise empty file.
-cf_nvo now sets the keyword NEXTEND back to 1.
-In cf_pack, the keyword COMB_COR is set to COMPLETE.
-
-<P>
-The name of cf_arith3 has been changed back to cf_arith.
-If called with no arguments, cf_arith, cf_combine, cf_xcorr, and getshift
-don't return an error, just a "usage" message.
-If the input list given to cf_combine contains only file names (no shifts),
-the program assumes that all shifts are zero.
-The programs cf_xcorr and cf_combine have been modified
-to use the same sign convention for spectral shifts as FUSE_REGISTER.
-The program modhead now accepts multi-word strings as keyword values.
-
-<P>
-In cf_init_support, use LWRS background limits for RFPT observations.
-In cf_fpa_position, correct for both X and Z displacement of FPA's.
-Delete call to cf_read_fpa_pos.
-In cf_screen_burst, ignore photons with arrival times greater than MAX_EXPTIME.
-In cf_write_extracted_spectrum, delete FITS_write_date from cf_copy_hist_header.
-
-<P>
-<hr WIDTH="100%">
-
-<p>July 12, 2005
-<br>Van Dixon
-<BR>v3.1/src/analysis/cf_combine.c
-<BR>v3.1/src/analysis/cf_nvo.c
-<BR>v3.1/src/analysis/cf_pack.c
-<BR>v3.1/src/cal/jitter/cf_jitter.c
-<BR>v3.1/src/libcf/cf_satellite_jitter.c
-
-<P>
-In cf_combine, we use fgets to read the input file and assume that pix_shift
-is an integer.
-In cf_nvo, we modify the cross-correlation routine to use LiF 2B as the
-wavelength standard if header keyword FESCENT is set to FES B.
-In cf_pack, we set the header keyword COMB_COR to COMPLETE.
-
-<P>
-cf_jitter writes a new keyword, JIT_VERS, to the header of each jitter
-file. If this keyword is missing or is less than 2,
-cf_satellite_jitter now warns that the jitter file format is out
-of date, which may result in the rejection of good data.
-
-<P>
-<hr WIDTH="100%">
-
-<p>June 16, 2005
-<br>Van Dixon
-<BR>v3.1/src/libcf/cf_rebin_probability_array.c
-<BR>v3.1/src/libcf/cf_scale_bkgd.c
-<BR>v3.1/src/fuv/cf_extract_spectra.c
-<BR>v3.1/include/calfuse.h v1.71
-
-<P>
-A bug in the spectral-extraction subroutines caused CalFUSE always to
-use the smaller, point-source extraction window, even for extended
-sources. This could lead to an underestimate of the flux for extended
-sources. The pipeline now uses either the point-source or
-extended-source aperture, as appropriate.
-
-<P>
-This is version 3.1.2 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>June 8, 2005
-<br>Van Dixon
-<BR>v3.1/src/analysis/cf_combine.c
-<BR>v3.1/src/analysis/cf_make_all.csh
-<BR>v3.1/src/analysis/cf_nvo.c
-<BR>v3.1/src/analysis/cf_pack.c
-<BR>v3.1/src/analysis/cf_xcorr.c
-<BR>v3.1/src/analysis/extract_jitter.c
-<BR>v3.1/src/analysis/idf_combine.c
-<BR>v3.1/src/libcf/cf_calculate_y_centroid.c
-<BR>v3.1/src/libcf/cf_find_spectra.c
-<BR>v3.1/src/libcf/cf_idf_io.c
-<BR>v3.1/src/libcf/cf_modify_hist_pha.c
-<BR>v3.1/src/libcf/cf_rebin_probability_array.c
-
-<BR>v3.1/include/calfuse.h v1.70
-
-<P>
-We modified cf_combine to support the generation of our new
-observation-level spectral files. It now writes the keywords NSPEC,
-SPEC###, and WOFF### to the primary HDU of the output file.
-
-<P>
-Three C routines and a shell script generate a new set of
-observation-level spectral files. For targets that are bright enough,
-we cross-correlate and combine the extracted spectra from each
-exposure. For fainter targets, we combine the IDF files from each
-exposure and extract a single spectrum for the whole observation. Then
-we repeat this exercise for the night-only data. Finally, we combine
-observation-level spectra from the various channels into a single
-spectral file for submission to the National Virtual Observatory.
-
-<P>
-cf_make_all is the shell script that calls these routines.
-<br>
-cf_xcorr determines the relative wavelength offset of each exposure.
-<br>
-cf_pack combines the observation-level spectra from each channel into
-a single ALL or ANO (all data, night-only) file.
-<br>
-cf_nvo selects data from the best channel for each waveband, shifts
-it to a common wavelengh scale, and generates the NVO file.
-
-<P>
-In extract_jitter, fixed a bug that set EXPSTART equal to EXPEND.
-
-<P>
-In idf_combine, comment out warning when FPA motion is detected.
-The pipeline corrects for this.
-
-<P>
-In cf_calculate_y_centroid, don't override user-specified centroid,
-even if it is far from the expected value. Fixed bug in tabulation of
-the expected Y centroids.
-
-<P>
-In cf_find_spectra, use airglow centroid of LWRS aperture to constrain
-airglow centroids of smaller apertures. Use airglow centroid of
-target aperture to constrain search for centroid of target spectrum.
-
-<P>
-In cf_idf_io, allow arrays of floats to be read as doubles.
-
-<P>
-In cf_modify_hist_pha, fixed bug in loop through MJD array.
-
-<P>
-In cf_rebin_probability_array, rounding errors left non-zero
-probabilities in regions beyond the ends of the extraction windows.
-Re-normalization raised these probabilities to unity. Now, if total
-probability in a column is less than 0.1, it is set to zero.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 19, 2005
-<br>Van Dixon
-
-<BR>v3.0/include/calfuse.h v1.66, v1.67, v1.68, v1.69
-
-<P>
-Between August and December of 2004, pipeline modifications were
-limited to bug fixes and a few new data-analysis routines. Since
-January of 2005, we made extensive modifications to the code, both to
-correct errors and to add new capabilities. All changes are documented
-in the headers of the individual modules and subroutines. Rather than
-repeat that information, we list here only the principal changes to the
-pipeline's capabilities.
-
-<P>
-In v3.0, data obtained during periods of uncertain pointing information
-were often flagged as bad. Now, the jitter files are generated using a
-simpler, more robust algorithm to determine when pointing information
-is reliable. If it's not, the pipeline does nothing, rather than
-flagging the data as bad.
-
-<P>
-In v3.0, data obtained when the detector voltage was less than 95% of
-the expected value were flagged as bad. Now, for detectors 1A, 1B, and
-2B, the level is 85%. For detector 2A, data with HV > 90% of full is
-processed without comment, data with HV > 80% of full generates a
-warning message, and data with HV < 80% of full is flagged as bad.
-(These limits are stored in the VOLT_CAL file.) For detector 2A data
-in the 80-90% range, the user should examine the pulse-hight
-distribution of photon events in the target aperture to ensure that the
-peak of the distribution is well separated from the background.
-
-<P>
-In v3.0, the geometric-distortion correction moved small segments of the
-HIST spectra out of their extraction windows. The solution was to
-increase the size of the HIST extraction windows in Y. A new keyword,
-HIST_PAD, which depends on both the detector and the aperture, is read
-from the header of the corresponding extension of the CHID_CAL file.
-While making this change, we found and corrected a bug in the
-calculation of the spectral Y centroid that affected both TTAG and
-HIST data.
-
-<P>
-In v3.0, the HIST and TTAG wavelength scales did not agree. This was a
-result of the walk correction, which was applied to TTAG but not HIST
-data. Since the walk correction is never zero, HIST data were never
-fully converted to the FARF. We now assign a pulse height (the mean
-for a particular date and aperture) to each HIST photon and apply the
-walk correction to all data.
-
-<P>
-When scaling the model background image to match the data, the
-subroutine cf_scale_bkgd (formerly cf_ttag_bkgd) did not properly
-account for regions of the detector excluded because of airglow
-contamination. As a result, it underestimated the total background.
-The program has been extensively revised.
-
-<P>
-The final extracted spectral (*fcal.fit) files now have the standard
-FITS binary table format that was employed in old (v2.4.3 and earlier)
-versions of the pipeline.
-
-<P>
-Errors in the calculation of TIME_SUNRISE and TIME_SUNSET have been
-corrected. As these values are never greater than 6000 s, they are
-now stored (and treated) as SHORTs.
-
-<P>
-If the pipeline cannot compute the centroids of the detector stim
-pulses, it now reads a new calibration file (STIM_CAL), in which the
-time-dependent average values of the drift coefficients are tabulated.
-
-<P>
-The burst-detection algorithm computes the mean count rate on the
-unilluminated regions of the detector and writes it to the IDF. It now
-does so for the entire exposure, not just for times previously
-identified as good.
-
-<P>
-Several keywords have been added to the IDF file headers, including
-the limb-angle limits BRITLIMB and DARKLIMB from the SCRN_CAL file
-and the calculated orbital period (ORBPERID).
-
-<P>
-The AIRG_CAL files, which identify regions of each detector likely
-to be contaminated by airglow features, are now expressed in FARF,
-rather than RAW, coordinates. This change allows us to use smaller
-airglow windows and thus to throw away less data.
-
-<P>
-The default pulse-height limits (both upper and lower) have been
-modified for all four detectors.
-
-<P>
-<hr WIDTH="100%">
-
-<p>August 24, 2004
-<br>Van Dixon
-<BR>v3.0/src/libcf/cf_fes_proc_update.c
-<BR>v3.0/src/libcf/cf_fes_proc_check.c
-<BR>v3.0/src/libcf/cf_count_rate_y_distort.c
-<BR>v3.0/src/libcf/cf_calculate_y_centroid.c
-<BR>v3.0/src/libcf/cf_optimal_extraction.c
-
-<BR>v3.0/include/calfuse.h v1.65
-
-<P>
-Installed two subroutines needed to process FES files. Modified calfuse.h
-to support them.
-
-<P>
-In cf_count_rate_y_distort, interpolate stretch correction among
-tabulated Y values to prevent counts from piling up at 10-pixel
-boundaries.
-
-<P>
-In cf_calculate_y_centroid, confirm that all spectral centroids, not
-just that of the target aperture, are within bounds.
-
-<P>
-In cf_optimal_extraction, use QUALITY array to set X limits of
-extraction region. Insure that sigma_out array is non-zero.
-
-<P>
-<hr WIDTH="100%">
-
-<p>August 12, 2004
-<br>Van Dixon
-<BR>v3.0/src/fuv/cf_assign_wavelength.c
-<BR>v3.0/src/fuv/cf_bad_pixels.c
-<BR>v3.0/src/fuv/cf_extract_spectra.c
-<BR>v3.0/src/fuv/cf_remove_motions.c
-<BR>v3.0/src/fuv/cf_screen_photons.c
-<BR>v3.0/src/libcf/cf_astigmatism_and_dispersion.c
-<BR>v3.0/src/libcf/cf_apply_filters.c
-<BR>v3.0/src/libcf/cf_calculate_y_centroid.c
-<BR>v3.0/src/libcf/cf_fuv_init.c
-<BR>v3.0/src/libcf/cf_find_spectra.c
-<BR>v3.0/src/libcf/cf_grating_motion.c
-<BR>v3.0/src/libcf/cf_identify_channel.c
-<BR>v3.0/src/libcf/cf_init_support.c
-<BR>v3.0/src/libcf/cf_make_mask.c
-<BR>v3.0/src/libcf/cf_mirror_motion.c
-<BR>v3.0/src/libcf/cf_modify_hist_times.c
-<BR>v3.0/src/libcf/cf_optimal_extraction.c
-<BR>v3.0/src/libcf/cf_proc_check.c
-<BR>v3.0/src/libcf/cf_rebin_background.c
-<BR>v3.0/src/libcf/cf_satellite_jitter.c
-<BR>v3.0/src/libcf/cf_screen_burst.c
-<BR>v3.0/src/libcf/cf_screen_high_voltage.c
-<BR>v3.0/src/libcf/cf_screen_limb_angle.c
-<BR>v3.0/src/libcf/cf_set_photon_flags.c
-<BR>v3.0/src/libcf/cf_thermal_distort.c
-<BR>v3.0/src/libcf/cf_ttag_bkgd.c
-<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
-<BR>v3.0/src/libcf/eclipse.c
-<BR>v3.0/src/libcf/solar_ang.c
-<BR>v3.0/src/libcf/space_vel.c
-<BR>v3.0/src/libcf/state_geod.c
-<BR>v3.0/src/libcf/state_limb.c
-
-<BR>v3.0/include/calfuse.h v1.64
-
-<P>
-Re-organized the pipeline, moving cf_screen_photons before
-cf_remove_motions. This required changes to both programs, as well as
-a number of subroutines.
-
-<P>
-Numerous modifications to cf_fuv_init: We now allow for the possibility
-that the time associated with a calibration file exactly equals
-EXPSTART. If the BRIT_OBJ keyword is set to DEFOCUS, we modify
-SRC_TYPE to E. Write CF_VERS to trailer file. Set ASTG_COR to
-PERFORM, as the pipeline doesn't do it automatically.
-
-<P>
-Changes to routines in cf_init_support: Add BRIT_OBJ keyword to header.
-Rewrite fill_hv_array() to make it more robust. If HV values in header
-are good, use them to determine whether HV arrays for 2A and 2B are
-swapped.
-
-<P>
-In both eclipse and state_geod, we corrected the FORTRAN call to sla_preces.
-To address warnings from the Mac OS X compiler, we made minor
-modifications to month_day.
-
-<P>
-If more than 90% of an exposure is lost to a burst, jitter, etc.,
-cf_set_photon_flags will write the cause to the trailer file.
-
-<P>
-Changes to cf_identify_channel: Don't bother shifting extraction
-windows to correct for FPA position. If shift is known, it is not needed.
-Because the extraction windows don't quite match the WGTS arrays, pad
-windows by XPAD pixels in X. Change i (which steps through targ_ap
-array) from long to int.
-
-<P>
-Corrected bug in cf_mirror_motion that caused it to swap motion corrections
-for sides 1 and 2. (This routine also got a new calibration file.)
-
-<P>
-In cf_grating_motion, we estimate the time between sunrises using the
-orbit period in the file header, rather than assuming a 6000-second orbit.
-
-<P>
-In cf_satellite_jitter, we skip the jitter correction if the jitter
-file lacks the JIT_STAT keyword. The program returns EXP_JITR
-to the calling routine.
-
-<P>
-Both cf_find_spectra and cf_calculate_y_centroid now use the photon
-flags to exclude events arriving during bursts, etc., from their
-centroid calculations.
-
-<P>
-In cf_astigmatism_and_dispersion, must change ASTG_COR to COMPLETE or
-SKIPPED by hand, as the pipeline won't do it automatically.
-
-<P>
-Changes to bad-pixel routines: Fixed bug in cf_make_mask, changing & to &&.
-
-<P>
-Changes to extraction subroutines:
-Fixed bug in cf_ttag_bkgd: nxb was undefined if RUN_BKGD = NO.
-Don't bother shifting the weights array to account for FPA motions, as
-this should already have been corrected in the conversion to the FARF.
-In cf_optimal_extraction: If weights_out[j] = 0, set variance = bkgd.
-Iterate optimal extraction to accuracy of 0.01 counts. In the boxcar
-extraction algorithm, we reduced the parray limit to 1E-4 to better
-match fluxes from optimal extraction for bright stars.
-The routine cf_write_extracted_spectrum now has an option (-o)
-to override the default root name for the extracted spectra.
-
-<P>
-Removed unused variables from the following routines: state_limb,
-cf_rebin_background, cf_screen_high_voltage, cf_screen_limb_angle,
-cf_thermal_distort, solar_ang, space_vel, and cf_bad_pixels.
-
-<P>
-Made minor i/o changes to cf_screen_burst. The routine cf_proc_check
-now calls cf_verbose rather than cf_if_warning when a pipeline step is
-inappropriate for TTAG data.
-
-<P>
-We made a lot of changes to the way that we deal with time for HIST
-data: In cf_apply_filters, we mask the BRST, SAA, and LIMB flags when
-calculating exposure time. In cf_set_photon_flags, we set only DAY
-flag; we all write other flags to EXP_STAT keyword. A new routine,
-cf_modify_hist_times, sets the photon-arrival times of photons in HIST
-files to the midpoint of the longest good-time interval.
-
-<P>
-This is the release version 3.0.7 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>June 4, 2004
-<br>Van Dixon
-<BR>v2.4/src/fuv/cf_fuv_init.c
-<BR>v2.4/include/calfuse.h v1.175
-
-<P>
-Modified cf_fuv_init to allow for the possibility that the MJD for a
-calibration file equals EXPSTART for an exposure.
-
-<P>
-This is version 2.4.4 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>May 13, 2004
-<br>Van Dixon
-<BR>v2.4/src/fuv/cf_update_qual.c
-<BR>v2.4/src/fuv/cf_dtcor.c
-<BR>v2.4/include/calfuse.h v1.174
-
-<P>
-Modified cf_update_qual and cf_dtcor to deal gracefully with bad
-counters in the data file headers.
-
-<P>
-This is version 2.4.3 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>May 4, 2004
-<br>Van Dixon
-<BR>v3.0/src/fuv/cf_assign_wavelength.c
-<BR>v3.0/src/fuv/cf_countmap.c
-<BR>v3.0/src/fuv/cf_extract_spectra.c
-<BR>v3.0/src/fuv/cf_gainmap.c
-<BR>v3.0/src/fuv/cf_hist_init.c
-<BR>v3.0/src/fuv/cf_remove_motions.c
-<BR>v3.0/src/fuv/cf_ttag_init.c
-<BR>v3.0/src/libcf/cf_apply_dead_time.c
-<BR>v3.0/src/libcf/cf_calculate_y_centroid.c
-<BR>v3.0/src/libcf/cf_convert_to_ergs.c
-<BR>v3.0/src/libcf/cf_doppler_and_heliocentric.c.c
-<BR>v3.0/src/libcf/cf_error_msg.c
-<BR>v3.0/src/libcf/cf_find_spectra.c
-<BR>v3.0/src/libcf/cf_fuv_init.c
-<BR>v3.0/src/libcf/cf_init_support.c
-<BR>v3.0/src/libcf/cf_rebin_background.c
-<BR>v3.0/src/libcf/cf_set_good_time_intervals.c
-<BR>v3.0/src/libcf/cf_set_photon_flags.c
-<BR>v3.0/src/libcf/cf_set_user_gtis.c
-<BR>v3.0/src/libcf/cf_source_aper.c
-<BR>v3.0/src/libcf/cf_ttag_bkgd.c
-<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
-
-<BR>v3.0/include/calfuse.h v1.61, v1.62, v1.63
-
-<P>
-Bernard performed housecleaning (removing unused variables, changing
-variable types to match subroutine definitions, etc.) on the following
-routines: cf_assign_wavelength, cf_hist_init, cf_ttag_init, cf_countmap,
-and cf_bad_pixels.c. Also these subroutines: cf_apply_dead_time,
-cf_calculate_y_centroid, cf_doppler_and_heliocentric.c,
-cf_error_msg, cf_init_support, cf_set_good_time_intervals,
-cf_set_photon_flags, cf_set_user_gtis, and cf_source_aper.
-
-In addition, he modified cf_ttag_init to create a photon list
-containing a single dummy event when the raw file is empty and
-cf_init_support to better catch errors in the header counter keywords.
-
-<P>
-We made significant modifications to cf_extract_spectra, replacing
-cf_rebin_and_flux_calibrate_background with cf_rebin_background.
-cf_optimal_extraction now performs all calculations with the weights
-array, rather than ergcm2. It returns counts and sigma arrays, rather
-than flux and variance as before; cf_extract_spectra must
-flux-calibrate each array, and cf_write_extracted_spectrum no longer
-converts from variance to sigma. The boxcar algorithm now uses the
-probability (weights) array to set the limits of the extraction window,
-better replicating the results of optimal extraction. Optimal
-extraction now iterates to 10% accuracy. The output weights and bkgd
-arrays are calculated by the optimal-extraction routine, so better
-match the final flux-calibrated spectra.
-
-<P>
-In verbose mode, cf_convert_to_ergs prints out the relative weighting of
-the two effective-area files.
-
-<P>
-The first call to cf_identify_channel was moved from cf_find_spectra to
-cf_remove_motions. The documentation of cf_remove_motions was improved.
-
-<P>
-The keywords MKBK_COR and BKGD_COR are gone, so cf_fuv_init no longer
-populates them.
-
-<P>
-The routine cf_rebin_and_flux_calibrate_background was replaced by
-cf_rebin_background. Flux calibration is now performed by
-cf_extract_spectra. cf_ttag_bkgd returns a null-valued background
-image if RUN_BKGD = NO.
-
-<P>
-This is version 3.0.7 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 5, 2004
-<br>Van Dixon
-<BR>v3.0/src/libcf/cf_geometric_distort.c
-<BR>v3.0/include/calfuse.h v1.60
-
-<P>
-Rescale SPECBINY only if it is > 1.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 1,2004
-<br>Van Dixon
-<BR>v3.0/src/fuv/cf_extract_spectra.c
-<BR>v3.0/src/libcf/cf_geometric_distort.c
-<BR>v3.0/src/libcf/cf_hist_init.c
-<BR>v3.0/src/libcf/cf_init_support.c
-<BR>v3.0/src/libcf/cf_optimal_extraction.c
-<BR>v3.0/src/libcf/cf_proc_check.c
-<BR>v3.0/src/libcf/cf_rebin_probability_array.c
-<BR>v3.0/src/libcf/cf_ttag_bkgd.c
-<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
-<BR>v3.0/include/calfuse.h v1.59
-
-<P>
-Abandon use of WPC array throughout the pipeline. Instead, modify
-cf_optimal_extraction to evenly distribute photon events across
-one X pixel when in HIST mode. If optimal-extraction loop does not
-converge within 50 iterations, exit and use results from boxcar extraction.
-<p>
-In cf_proc_check, call cf_verbose rather than cf_if_warning if program
-not appropriate for HIST data.
-<p>
-Change the way that routines deal with empty data files. In
-cf_hist_init, issue a warning -- but continue
-processing -- if NEVENTS = 0. (A similar change for cf_ttag_init
-will have to wait for the next version of the pipeline.)
-In cf_extract_spectra, write null-valued
-output spectra if either EXPTIME or NEVENTS = 0. In
-cf_write_extracted_spectrum, if valid_spectrum = FALSE, write warning
-message to file header.
-<p>
-Include math.h in cf_hist_init to define fmod(). This solves the
-long-standing problem of the program crashing on Linux machines.
-<p>
-Modify cf_init_support to better deal with counter errors.
-<p>
-In cf_geometric_distort, modify header keyword SPECBINY to reflect
-Y spacing in the FARF.
-<p>
-In cf_ttag_bkgd, set Y limits of 2-D background arrays equal to those
-of the probability (weights) array. Since the sizes are now equal,
-cf_optimal_extraction does not need to test them. Make centroid of
-probability array a float in cf_extract_spectra and associated
-subroutines.
-<p>
-In cf_rebin_probability_array, shift probability array to account
-for position of FPA.
-
-<P>
-This is version 3.0.6 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>March 30, 2004
-<br>Van Dixon
-<BR>v2.4/src/fuv/cf_hist_init.c
-<BR>v2.4/include/calfuse.h v1.173
-
-<P>
-Modified cf_hist_init to produce
-null-valued data file if NEVENTS=0.
-
-<P>
-This is version 2.4.2 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>March 16,2004
-<br>Van Dixon
-<BR>v3.0/src/fuv/cf_extract_spectra.c
-<BR>v3.0/src/fuv/cf_hist_init.c
-<BR>v3.0/src/fuv/cf_ttag_init.c
-<BR>v3.0/src/fuv/cf_bad_pixels.c
-<BR>v3.0/src/fuv/cf_countmap.c
-<BR>v3.0/src/fuv/cf_gainmap.c
-<BR>v3.0/src/fuv/cf_convert_to_farf.c
-<BR>v3.0/src/libcf/cf_astigmatism_and_dispersion.c
-<BR>v3.0/src/libcf/cf_init_support.c
-<BR>v3.0/src/libcf/cf_satellite_jitter.c
-<BR>v3.0/src/libcf/cf_thermal_distort.c
-<BR>v3.0/src/libcf/cf_write_extracted_spectrum.c
-<BR>v3.0/include/calfuse.h v1.57, v1.58
-
-<P>
-Implement WPC array in cf_extract_spectra and associated subroutines.
-<br>In cf_hist_init.c, fix error in correcting hot pixels.
-<br>In cf_ttag_init.c, exit if no photons in raw data file.
-<br>In cf_bad_pixels.c, change maximum size of the output arrays in
-cf_combine_pothole_data and insure that lif_cnt and sic_cnt arrays are
-non zero.
-<br>In cf_countmap.c and cf_gainmap.c, allow user to select coordinate
-system: RAW, FARF (default), final.
-<br>In cf_astigmatism_and_dispersion.c, make subroutine cf_x2lambda globally
-accessible.
-<br>In cf_convert_to_farf.c, pass weight array to cf_thermal_distort.
-<br>In cf_init_support.c, read begin and end counters as float.
-Set countrate to zero when cntb is more than 16777216.
-<br>In cf_satellite_jitter.c, polulate the PLATESC keyword in the input file header.
-<br>In cf_thermal_distort.c, added weights to the calculation (needed for
-histogram mode) and corrected bug in procedure for finding stim pulses.
-<br>In cf_write_extracted_spectrum.c, populate archive search keywords and
-change name of POTHOLE column to QUALITY.
-
-<P>
-This is version 3.0.5 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>February 16, 2004
-<br>Van Dixon
-<BR>v3.0/include/calfuse.h v1.56
-
-<P>
-Release CalFUSE v3.0.4 for beta testing.
-
-<P>
-<hr WIDTH="100%">
-
-<p>May 22, 2003
-<br>Van Dixon
-<BR>v2.4/src/idl/cf_plot_rate.pro
-<BR>v2.4/src/fuv/fcal.c
-<BR>v2.4/src/fuv/cf_make_ttag_bkgd.c
-<BR>v2.4/include/calfuse.h v1.172
-
-<P>
-Modified cf_plot_rate.pro, fcal.c, and cf_make_ttag_bkgd.c to deal
-gracefully with zero-length exposures. Resulting spectral file has
-FLUX and ERROR arrays set to zero.
-
-<P>
-This is version 2.4.1 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>May 19, 2003
-<br>Van Dixon
-<BR>v2.4/src/analysis/cf_combine.c
-<BR>v2.4/include/calfuse.h v1.171
-
-<P>
-Imported two of Jeff's modifications to cf_combine:
-<br>
-Close each input file in initial loop.
-Without this, cfitsio crashes upon opening the 60th file.
-<br>
-Weight each pixel by exposure time after excluding ``bad'' pixels.
-
-<P>
-<hr WIDTH="100%">
-
-<p>May 2, 2003
-<br>Van Dixon
-<BR>v2.4/src/analysis/cf_uninterp.c
-<BR>v2.4/include/calfuse.h v1.170
-
-<P>
-Added cf_uninterp.c to re-calibrate extracted spectra using only
-the most recent flux-calibration file.
-
-<P>
-This is version 2.4.0 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 29, 2003
-<br>Van Dixon
-<BR>v2.3/src/fuv/cf_ttag_jitter.c
-<BR>v2.3/src/fuv/cf_hist_jitter.c
-<BR>v2.3/include/calfuse.h v1.169
-
-<P>
-Modified jitter routines to allow possiblity that jitter filename is in
-lower-case letters.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 25, 2003
-<br>Van Dixon
-<BR>v2.3/src/fuv/cf_fuv_init.c
-<BR>v2.3/include/calfuse.h v1.167, v1.168
-
-<P>
-In cf_fuv_init, never linearly extrapolate calibration files forward in
-time. If an observation is not bracketed by calibration files,
-simply use the latest one.
-
-<P>
-This is version 2.3.2 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 16, 2003
-<br>Van Dixon
-<BR>v2.3/src/fuv/cf_fuv_init.c
-<BR>v2.3/include/calfuse.h v1.166
-
-<P>
-In cf_fuv_init, test for corrupted detector bias values. Updated
-comment field of HV_FLAG. Modified associated warning messages.
-
-<P>
-This is version 2.3.1 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 15, 2003
-<br>Van Dixon
-<BR>v2.3/src/fuv/cf_ttag_screen.c
-<BR>v2.3/include/calfuse.h v1.165, v1.166
-
-<P>
-Test only first letter of scrn*.fit keyword DAYNIGHT in cf_ttag_screen.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 2, 2003
-<br>Van Dixon
-<BR>v2.3/src/fuv/cf_ttag_geodopp.c
-<BR>v2.3/src/fuv/cf_ttag_jitter.c
-<BR>v2.3/include/calfuse.h v1.164
-
-<P>
-Simplified DX/DY test in cf_ttag_geodopp. Test that TRKFLG is <= 5
-(the highest allowed value) in cf_ttag_jitter.
-
-<P>
-<hr WIDTH="100%">
-
-<p>April 2, 2003
-<br>Van Dixon
-<BR>v2.3/src/fuv/cf_ttag_geodopp.c
-<BR>v2.3/include/calfuse.h v1.163
-
-<P>
-Test DX and DY values to make sure they are valid before combining
-into mean Doppler shift. NaN values lead to bad-pixels masks full
-of zeros, which lead to empty extracted spectra.
-
-<P>
-<hr WIDTH="100%">
-
-<p>March 10, 2003
-<br>Van Dixon
-<BR>v2.3/src/fuv/cf_ttag_geodopp.c
-<BR>v2.3/include/calfuse.h v1.162
-
-<P>
-Alain Lecavelier points out that, for high-count-rate TTAG data, the
-pipeline produces error bars that are about half of what one would
-expect from SQRT(N) statistics. Turns out that the change that I made
-to cf_ttag_geodopp in March 2002 was in error. I returned the code to
-its previous state, and the error bars are now much better behaved.
-Error bars for histogram data are unaffected by this change.
-
-<P>
-This is version 2.3.0 of the CalFUSE pipeline.
-
-<P>
-<hr WIDTH="100%">
-
-<p>February 24, 2003
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_make_ttag_bkgd.c
-<BR>v2.2/src/fuv/cf_make_hist_bkgd.c
-<BR>v2.2/include/calfuse.h v1.161
-
-<P>
-Peter Young's Dec Alpha compiler identified a bug in these routines.
-EXPNIGHT is stored in the header as type LONG, but these routines read
-it as type FLOAT. CFITSIO should make the conversion automatically,
-but apparently fails to do so on his machine. I've modified the calls
-to FITS_read_key() in both routines.
-<P>
-<font color=red>This is the release version of CalFUSE v2.2.3.</font>
-
-<P>
-<hr WIDTH="100%">
-
-<p>February 20, 2003
-<br>Van Dixon
-<BR>v2.2/src/libcf/read_tle.c
-<BR>v2.2/src/libcf/sgp4.c
-<BR>v2.2/src/fuv/cf_ttag_jitter.c
-<BR>v2.2/src/fuv/cf_make_ttag_bkgd.c
-<BR>v2.2/src/fuv/cf_extract.c
-<BR>v2.2/src/fuv/cf_driftcorr2.c
-<BR>v2.2/src/fuv/cf_coadd.c
-<BR>v2.2/src/analysis/ttag_combine.c
-<BR>v2.2/include/calfuse.h v1.160
-
-<P>
-Peter Young's Dec Alpha compiler identified two sets of bugs in these routines.
-Several calls to FITS_read_key() or FITS_update_key() used an ampersand incorrectly:
-<br>
-FITS_read_key(fptr, TSTRING, "INSTRUME", &instrument, comment, &status);
-<br>
-and a few routines used abs() when fabs() is required.
-<P>
-P.Y.'s compiler refused to recognize one of the #define keywords in
-sgp4.c, so Bryce Roberts replaced it with the actual value throughout
-the routine.
-
-<P>
-<hr WIDTH="100%">
-
-<p>December 13, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_ttag_screen.c
-<BR>v2.2/src/fuv/cf_hist_screen.c
-<BR>v2.2/src/fuv/cf_ttag_burst.c
-<BR>v2.2/src/fuv/cf_ttag_jitter.c
-<BR>v2.2/include/calfuse.h v1.159
-
-<P>
-Modify cf_ttag_screen and cf_hist_screen to write all EXP_* keywords as
-type long. Modify cf_ttag_burst and cf_ttag_jitter to pass through all
-photon events in the stim-pin regions, even during bad times. Have
-them add EXP_BRST and EXP_JITR to EXP_BAD, and write all as type long.
-
-<P>
-Updated CALFUSE version to 2.2.3.
-
-<P>
-<hr WIDTH="100%">
-
-<p>November 8, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_extract.c
-<BR>v2.2/include/calfuse.h v1.158
-
-<P>
-Modify cf_extract to write keyword SPECYCNT to outfits, not infits.
-
-<P>
-<hr WIDTH="100%">
-
-<p>November 6, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_hist_jitter.c
-<BR>v2.2/src/fuv/cf_ttag_jitter.c
-<BR>v2.2/include/calfuse.h v1.157
-
-<P>
-Make cf_hist_jitter and cf_ttag_jitter issue warning, but continue
-running, if keyword JIT_STAT is not found.
-
-<P>
-<hr WIDTH="100%">
-
-<p>November 1, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_hist_jitter.c
-<BR>v2.2/idl/cf_plot_hist_rate.pro
-<BR>v2.2/include/calfuse.h v1.156
-
-<P>
-Make cf_hist_jitter and cf_plot_hist_rate exit gracefully if jitter
-file not found.
-
-<P>
-<hr WIDTH="100%">
-
-<p>October 29, 2002
-<br>Van Dixon
-<BR>v2.2/src/analysis/cf_arith.c
-<BR>v2.2/src/analysis/cf_combine.c
-<BR>v2.2/include/calfuse.h v1.155
-
-<P>
-Corrected error in history lines of both routines.
-
-<P>
-<hr WIDTH="100%">
-
-<p>October 24, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/Makefile
-<BR>v2.2/src/fuv/cf_make_hist_bkgd.c
-<BR>v2.2/include/calfuse.h v1.154
-
-<P>
-Add cf_hist_jitter to Makefiles.
-Remove unused variables in cf_make_ttag_bkgd.
-
-<P>
-<hr WIDTH="100%">
-
-<p>October 11, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_ttag_jitter.c
-<BR>v2.2/include/calfuse.h v1.153
-
-<P>
-Three changes to cf_ttag_jitter: Initialized nrej to 0, made program
-exit quietly if jitter file not found, and set all times to floats in
-test step, to correct bug whereby some photons were being erroneously
-rejected. Note that the program still rejects photons with times later
-than the end of the input good-time interval. This happens because the
-burst-correction routine converts the GTI boundaries to integers.
-
-<P>
-Updated CALFUSE version to 2.2.2.
-
-<P>
-<hr WIDTH="100%">
-
-<p>August 29, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_hist_init.c
-<BR>v2.2/src/fuv/cf_ttag_init.c
-<BR>v2.2/include/calfuse.h v1.152
-
-<P>
-The initialization routines now exit with an error if NEVENTS = 0.
-
-<P>
-<hr WIDTH="100%">
-
-<p>August 28, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_hist_jitter.c
-<BR>v2.2/src/libcf/cf_fcal.c
-<BR>v2.2/idl/cf_plot_hist_rate.pro
-<BR>v2.2/include/calfuse.h v1.151
-
-<P>
-cf_hist_jitter reads the jitter file, determines how much time (if any)
-the target spent out of the aperture, and writes this number to the
-keyword EXP_JITR. cf_fcal subtracts this value from EXPTIME when
-flux-calibrating the spectrum. The IDL procedure cf_plot_hist_rate.pro
-plots the count rate during a histogram exposure using counter values
-from the housekeeping file.
-
-<P>
-Updated CALFUSE version to 2.2.1.
-
-<P>
-<hr WIDTH="100%">
-
-<p>July 31, 2002
-<br>Van Dixon
-<BR>v2.2/src/fuv/cf_hist_count_map.c
-<BR>v2.2/src/fuv/cf_ttag_count_map.c
-<BR>v2.2/src/fuv/cf_ttag_gain_map.c
-<BR>v2.2/src/fuv/cf_make_ttag_bkgd.c
-<BR>v2.2/src/fuv/cf_ttag_jitter.c
-<BR>v2.2/src/fuv/cf_update_qual.c
-<BR>v2.2/src/libcf/cf_fuv_init.c
-<BR>v2.2/include/calfuse.h v1.150
-
-<P>
-The SDP group decided that CalFUSE 3.0 should use a radically different
-scheme for processing time-tagged data. In the mean time, we have made
-incremental progress on CalFUSE v2, and we have decided that this
-version of the program should go behind the firewall as soon as
-possible. Accordingly, I copied v2.1.7 to v2.2.0 and have continuued
-to make incremental changes to the code. Highlights are
-
-<P>
-Modify cf_hist_count_map, cf_ttag_count_map, cf_ttag_gain_map, and
-cf_update_qual to read version 002 YSTR files.
-<BR>
-Correct a Linux bug in cf_make_ttag_bkgd.
-<BR>
-Add cf_ttag_jitter and modify cf_fuv_init to support it.
-
-<P>
-Updated CALFUSE version to 2.2.0.
-<P>
-<font color=red>This version of CalFUSE will go behind the firewall on
-1 August 2002.</font>
-
-<P>
-<hr WIDTH="100%">
-
-<p>June 14, 2002
-<br>Van Dixon
-<BR>v2.1/src/fuv/cf_make_ttag_bkgd.c
-<BR>v2.1/include/calfuse.h v1.149
-
-<p>
-Moved v1.16 of cf_make_ttag_bkgd back to CalFUSE v2.1.
-<P>
-Updated CALFUSE version to 2.1.7.
-
-<hr WIDTH="100%">
-
-<p>June 14, 2002
-<br>Van Dixon
-<BR>cf_make_ttag_bkgd.c
-<BR>cf_undistort.c
-<BR>cf_driftcorr.c
-<BR>cf_extract.c
-<BR>cf_dpix.c
-<BR>cf_ttag_screen.c
-<BR>cf_hist_dopp.c
-<BR>cf_wcal.c
-<BR>cf_doppler_util.c
-<BR>calfuse.h v1.151
-
-<br>
-<p>
-In cf_make_ttag_bkgd, correct error when using MKBK_COR=OMIT (1.15) and
-fill in holes made by the removal of geocoronal lines. The latter is
-needed in determination of X variations of scattered light. Re-wrote
-cf_undistort to handle shifts as floats. Modified cf_driftcorr to
-write output as an array of shorts. Modified cf_extract, cf_dpix to
-read linear wavelength scale. Modified read_wavelengths in
-cf_doppler_util and calls to it in cf_ttag_screen and cf_hist_dopp.
-Modified cf_wcal to implement linear wavelength solution.
-<P>
-Updated CALFUSE version to 3.0.1.
-
-<hr WIDTH="100%">
-
-<p>May 30, 2002
-<br>Van Dixon
-<BR>cf_doppler_util.c
-<BR>cf_ttag_screen.c
-<BR>cf_hist_dopp.c
-<BR>cf_dpix.c
-<BR>cf_extract.c
-<BR>calfuse.h v1.150
-
-<br>
-<p>
-In cf_doppler_util, modified read_wavelength no longer to generate and
-return an xpix array, then modified the calling routines cf_ttag_screen
-and cf_hist_dopp accordingly. Modified cf_dpix and cf_extract to
-handle the linear wavelength scale.
-
-<hr WIDTH="100%">
-
-<p>May 29, 2002
-<br>Van Dixon
-<BR>cf_doppler_util.c
-<BR>cf_driftcorr.c
-<BR>cf_update_qual.c
-<BR>calfuse.h v1.149
-
-<br>
-<p>
-In cf_doppler_util, modified the subroutine read_wavelength to handle a
-linear wavelength scale. Installed Rich's new version of cf_driftcorr,
-which puts a correction for the count-rate dependent Y stretch into the
-DY image. Because we no longer need to correct the bad-pixel map for
-the Y stretch, I moved back from v1.8 to v1.5 of cf_update_qual.
-
-<hr WIDTH="100%">
-
-<p>May 21, 2002
-<br>Van Dixon
-<BR>cf_dpix
-<BR>calfuse.h v1.148
-
-<br>
-<p>
-Fixed a couple of bugs in cf_dpix: made LWRS the default aperture and
-allowed the boundary between the SiC and LiF regions to vary with
-detector.
-<p>
-Made this change to both v2.1 and v3.0.
-
-<hr WIDTH="100%">
-
-<p>May 17, 2002
-<br>Van Dixon
-<BR>cf_dtcorr
-<BR>cf_undistort
-<BR>cf_wcal
-<BR>calfuse.h v1.147
-
-<br>
-<p>
-Updated #define keywords in cf_dtcorr. Turned on X-distortion
-correction in cf_undistort and moved it to follow cf_driftcorr2.
-Implemented linear wavelength scale in cf_wcal.
-<p>
-Updated CALFUSE version to 3.0.0.
-
-<hr WIDTH="100%">
-
-<p>May 14, 2002
-<br>Van Dixon
-<BR>cf_make_ttag_bkgd
-<BR>cf_make_hist_bkgd
-<BR>calfuse.h v1.146
-
-<br>
-<p>
-Teach background modules to read compressed background-calibration files.
-<P>
-<font color=red>This is the release version of CalFUSE v2.1.</font>
-
-<hr WIDTH="100%">
-
-<p>April 16, 2002
-<br>Van Dixon
-<BR>cal_fuse_exp_ttag.csh
-<BR>cal_fuse_exp_hist.csh
-<BR>calfuse.h v1.145
-
-<br>
-<p>
-Remove cf_wormcorr from pipeline for now.
-<P>
-Updated CALFUSE version to 2.1.6.
-
-<hr WIDTH="100%">
-
-<p>April 8, 2002
-<br>Van Dixon
-<BR>cf_make_hist_bkgd
-<BR>cf_make_ttag_bkgd
-<BR>cf_ttag_burst
-<BR>bchr*001.fit
-<BR>scrn*013.fit
-<BR>calfuse.h v1.144
-
-<br>
-<p>
-New software from Rich: New BCHR (background characterization) files
-contain the binary extensions that used to be in the SCRN files.
-Pipeline modules were modified to read the new files.
-<P>
-Updated CALFUSE version to 2.1.5.
-
-<hr WIDTH="100%">
-
-<p>March 29, 2002
-<br>Van Dixon
-<BR>cf_make_ttag_bkgd
-<BR>cf_ttag_burst
-<BR>bkgd*005.fit
-<BR>bkgd*006.fit
-<BR>bkgd*007.fit
-<BR>bkgd*008.fit
-<BR>scrn*012.fit
-<BR>calfuse.h v1.143
-
-<br>
-<p>
-New software from Rich: The burst module has been modified to update
-the EXPNIGHT value. The background module has a new procedure for
-determining the intrinsic background from the data. The background
-files should do a better job at short wavelengths. The screening files
-redefine the background sample regions and add a few more geocoronal
-line positions.
-<P>
-Updated CALFUSE version to 2.1.4.
-
-<hr WIDTH="100%">
-
-<p>March 17, 2002
-<br>Van Dixon
-<BR>cf_make_ttag_bkgd
-<BR>cf_make_hist_bkgd
-<BR>cf_ttag_geodopp
-<BR>cf_hist_geodopp
-<BR>calfuse.h v1.142
-
-<br>
-<p>
-Turns out that all of these programs were treating the error arrays as
-sigmas rather than variances (sigma squared). Modified to propagate
-errors correctly.
-
-<P>
-Updated CALFUSE version to 2.1.3.
-
-<hr WIDTH="100%">
-
-<p>February 22, 2002
-<br>Van Dixon
-<BR>cf_fuv_init
-<BR>ttag_combine
-<BR>cf_dtcor
-<BR>calfuse.h v1.141
-
-<br>
-<p>
-Introduced new keyword, RAWTIME, which is equal to EXPTIME before
-CalFUSE starts tossing out data. Modified cf_fuv_init and ttag_combine
-to propagate it correctly.
-<p>
-Modified cf_dtcor to determine exposure time from the keywords CTIME_B
-and CTIME_E, which are the times of the initial and final engineering
-packets from which the counter data were taken.
-<P>
-Updated CALFUSE version to 2.1.2.
-
-<hr WIDTH="100%">
-
-<p>February 15, 2002
-<br>Van Dixon
-<BR>calfuse.h v1.140
-
-<br>
-<p>
-Changed OPUS_VERSION to 2.5.
-
-<hr WIDTH="100%">
-
-<p>February 13, 2002
-<br>Van Dixon
-<BR>cf_fuv_init
-<BR>ttag_combine
-<BR>calfuse.h v1.139
-
-<br>
-<p>
-Modified logic of voltage test in cf_fuv_init. Add COMMENT lines
-to data file header if low voltage found. Respond gracefully if
-bias keywords do not exist.
-<p>
-Modified ttag_combine to respond gracefully if EXPNIGHT does not exist.
-
-<hr WIDTH="100%">
-
-<p>February 12, 2002
-<br>Van Dixon
-<BR>cf_fuv_init
-<BR>calfuse.h v1.138
-
-<br>
-<p>
-Modified cf_fuv_init to check detector voltage and complain if low.
-New volt***001.fit calibration files, VOLT_CAL keyword.
-<P>
-Updated CALFUSE version to 2.1.1.
-
-<hr WIDTH="100%">
-
-<p>January 25, 2002
-<br>Van Dixon
-<BR>cf_ttag_burst
-<BR>calfuse.h v1.137
-
-<br>
-<p>
-Modified cf_ttag_burst to write a list of bursts to an ASCII file.
-
-<hr WIDTH="100%">
-
-<p>January 15, 2002
-<br>Van Dixon
-<BR>ttag_combine
-<BR>calfuse.h v1.136
-
-<br>
-<p>
-Modified ttag_combine to update keyword EXPNIGHT in output file.
-
-<hr WIDTH="100%">
-
-<p>December 7, 2001
-<br>Van Dixon
-<BR>cf_update_qual
-<BR>calfuse.h v1.135
-
-<br>
-<p>
-Richard's new version of cf_update_qual modifies the bad-pixel maps to
-account for the count-rate dependence of the detector Y scale.
-
-<hr WIDTH="100%">
-
-<p>November 30, 2001
-<br>Van Dixon
-<BR>cf_dpix, cf_extract, cf_wormcorr, cf_optextract, cf_spexextract,
-cf_plot_extract.pro, cal_fuse_exp_ttag.csh, cal_fuse_exp_hist.csh,
-parm**007.fit
-<BR>calfuse.h v1.134
-
-<br>
-<p>
-In earlier versions of the pipeline, the shift to correct for FPA
-offsets was performed by cf_wcal. We have moved it earlier in the
-pipeline, right after the astigmatism correction, and combine the
-FPA corrections with the other shifts in order to have a single
-float-to-integer conversion. The new module is called cf_dpix.
-
-<p>
-cf_extract now reads the keyword RUN_OPTI, rather than OPT_EXTR, from
-the parameter file. It also writes the Y centroid of each spectrum to
-the corresponding output file header.
-
-<p>
-Sylvestre added software to identify the worm in the LiF 1B spectrum:
-cf_wormcorr reads the keyword RUN_WORM from the parameter file. If
-RUN_WORM = LIF, SIC, or BOTH, the program attempts to identify the
-region of the worm and write the range of affected pixels (WORM_BEG and
-WORM_END) to the output file header. The IDL routine
-cf_plot_extract.pro draws a ring around the worm, if found.
-
-<p> Modified cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
-both cf_dpix and cf_wormcorr. Modified calfuse.h to include new
-processing keywords DPIX_COR and WORM_COR.
-
-<hr WIDTH="100%">
-
-<p>November 27, 2001
-<br>Van Dixon
-<BR>cf_ttag_screen
-<BR>calfuse.h v1.133
-
-<br>
-<p>
-Changed the way that cf_ttag_screen treats user-defined good-time
-intervals. Now takes intersection of them with pre-defined intervals
-(from OPUS or cf_ttag_combine) before screening. Also changed the
-module to apply all screens (SAA, day/night, limb angle, pulse height)
-regardless of where the good-time intervals came from. Screening can
-be turned off by modifying the <tt>scrn*.fit</tt> files, if desired.
-
-<hr WIDTH="100%">
-
-<p>November 21, 2001
-<br>Van Dixon
-<BR>cf_update_qual
-<BR>calfuse.h v1.132
-
-<br>
-<p>
-Installed Rich's new QUAL files. Modified cf_update_qual to read them.
-
-<hr WIDTH="100%">
-
-<p>November 16, 2001
-<br>Van Dixon
-<BR>calfuse.h v1.131
-
-<br>
-<p>
-Defined NO_PIXEL in calfuse.h. Used by geometric-distortion and
-extraction routines.
-
-<hr WIDTH="100%">
-
-<p>October 26, 2001
-<br>Van Dixon
-<BR>cf_dtcor
-<BR>calfuse.h v1.130
-
-<br>
-<p>
-Modified cf_dtcor to set counters to zero if values are too large to
-read as longs.
-
-<hr WIDTH="100%">
-
-<p>October 26, 2001
-<br>Van Dixon
-<BR>cf_fuv_init
-<BR>calfuse.h v1.129
-
-<br>
-<p>
-Modified cf_fuv_init to check header keyword OPUSVERS and complain if
-the data file was processed using an old version of OPUS.
-
-<hr WIDTH="100%">
-
-<p>October 10, 2001
-<br>Van Dixon
-<BR>cf_ttag_init
-<BR>calfuse.h v1.128
-
-<br>
-<p>
-Modified cf_ttag_init to reset the keywords SPECBINX, SPECBINY,
-SIA_TBL, and NUM_HIST without checking their current value.
-This code was moved from cf_ttag_image, where it had been
-commented out in April 2001.
-<p>
-Added keyword OPUS_VERSION to calfuse.h
-<p>
-Updated CALFUSE version to 2.1.0.
-
-<hr WIDTH="100%">
-
-<p>October 10, 2001
-<br>Van Dixon
-<BR>ttag_combine
-<BR>flux*008.fit
-<BR>calfuse.h v1.127
-
-<br>
-<p>
-Rich Robinson has made numerous upgrades to ttag_combine. Among other
-things, it can now handle the DX, DY and DNFLG columns added by
-cf_ttag_init.
-<p>
-Jeff Kruk has produced new flux-calibration files
-based on the latest wavelength calibration.
-<p>
-Updated CALFUSE version to 2.0.5.
-<font color=red>This is the release version of CalFUSE v2.0.</font>
-
-<hr WIDTH="100%">
-
-<p>October 2, 2001
-<br>Van Dixon
-<BR>wave*014.fit
-
-<br>
-<p>
-Don Lindler has produced new wavelength files appropriate for data that
-do NOT have the walk correction applied to their stim pins.
-They were created by taking the previous line locations and correcting
-them before fitting by:
-
-<pre>
- xx = ((x-leftF)/(rightF-leftF))*(right1-left1)+left1
- xcor = ((xx-left2)/(right2-left2))*(rightF-leftF)+leftF
-where:
- left1,right1 are the measured STIM positions when the walk correction
- was applied to the STIMs
- left2,right2 are the measured STIM positions when the walk correction
- was not applied to the STIMs
- leftF, rightF - are the FARF STIM positions
- x - is the measured x position in the spectra that had the walk
- correction applied to the STIMs
- xcor is the corrected x position that would be expected if the walk
- correction was not applied to the STIMs
-</pre>
-
-<hr WIDTH="100%">
-
-<p>September 21, 2001
-<br>Van Dixon
-<BR>scrn*010.fit
-
-<br>
-<p>
-Version 008 had new PHA limits. Version 009 had new information for
-background models. Version 010 has both.
-
-<hr WIDTH="100%">
-
-<p>September 17, 2001
-<br>Van Dixon
-<br>calfuse.h 1.126
-<BR>cf_make_ttag_bkgd
-
-<br>
-<p>
-New version of background routine reads the keyword BKGDTYPE in the
-screening file. Default value is 1; if set to -1, routine does not
-perform an iterative fit to the observed scattered light.
-<P>
-Installed new wavelength calibration files, v013, which are corrected
-for the motion of the stim pins due to walk correction in previous
-versions of the pipeline.
-<P>
-Updated CALFUSE version to 2.0.4.
-
-<hr WIDTH="100%">
-
-<p>September 11, 2001
-<br>Van Dixon
-<br>calfuse.h 1.125
-<BR>cf_ttag_walk
-<BR>cf_hist_walk
-
-<br>
-<p>
-Don't apply walk correction to photons/pixels within STIM_PAD (512)
-pixels of the detector edge. New walk-correction files (v003) have
-zeros in the stim-pin region.
-
-<hr WIDTH="100%">
-
-<p>September 5, 2001
-<br>Van Dixon
-<br>calfuse.h 1.124
-<BR>cf_make_ttag_bkgd
-<BR>cf_extract
-
-<br>
-<p>
-If MKBK_COR is set to OMIT, cf_make_ttag_bkgd changes it to SKIPPED.
-cf_extract copies the keyword OPT_EXTR into the FITS file headers.
-
-<hr WIDTH="100%">
-
-<p>August 30, 2001
-<br>Van Dixon
-<br>calfuse.h 1.123
-<BR>cf_make_ttag_bkgd
-
-<br>
-<p>
-New cf_make_ttag_bkgd iteratively fits dark-count and scattered-light
-components of the background to deal with the fact that the dark count
-varies with time. Spits out a file filled with zeros if MKBK_COR
-is set to OMIT.
-<P>
-New wavelength calibration files. Updated CALFUSE version to 2.0.3.
-
-<hr WIDTH="100%">
-
-<p>August 23, 2001
-<br>Van Dixon
-<br>calfuse.h 1.122
-<br>cf_fuv_init
-<br>cf_ttag_burst
-<br>cf_ttag_walk
-<br>cf_hist_walk
-<br>cf_astig
-<BR>cf_make_hist_bkgd
-<BR>cf_make_ttag_bkgd
-<BR>cf_bkgd
-
-<br>
-<p>
-Replaced keyword TBURST with EXP_BRST in cf_ttag_burst.
-<p>
-Enable user to turn off the burst rejection, walk correction,
-background subtraction, or astigmatism correction by changing keywords
-in parm**006.fit. cf_fuv_init reads the PARM file and changes the
-appropriate keywords (e.g., BRST_COR) from PERFORM to OMIT. Subsequent
-pipeline steps check their keyword; if it is OMIT, they change the
-value to SKIPPED, issue a warning, and exit, copying input to output if
-appropriate. Updated CALFUSE version to 2.0.2.
-
-<hr WIDTH="100%">
-
-<p>August 21, 2001
-<br>Van Dixon
-<br>calfuse.h 1.121
-<br>cf_wcal
-<br>cf_fpa_pos
-<br>cf_ttag_init
-
-<br>
-<p>
-Moved cf_fpa_pos from cf_wcal to libcf. ttag_combine uses this routine
-to determine the FPA positions and complains if an FPA moves by more
-than 10 microns between exposures.
-
-<hr WIDTH="100%">
-
-<p>August 20, 2001
-<br>Van Dixon
-<br>calfuse.h 1.120
-<br>cf_ttag_init
-<br>cf_dtcor
-
-<br>
-<p>
-Header keywords SPECBINX and SPECBINY should be 1 for ttag data. An
-old version of OPUS set these to 0. Changed cf_ttag_init to update
-these parameters if it finds them equal to 0. Also updated cf_dtcor to
-use Dave Sahnow's new parameters for dead-time correction. Added a
-check: if DET_DEAD > 2.0, assume it's wrong and set to 1.0.
-
-<hr WIDTH="100%">
-
-<p>July 25, 2001
-<br>Van Dixon
-<br>calfuse.h 1.119
-<br>cf_astig.c
-
-<br>
-<p>
-New version of cf_astig employs Sylvester's cross-correlation routine
-to determine spectral centroids. New PHAM, WAVE, and FLUX files.
-Updated CALFUSE version to 2.0.1.
-<br><font color=red>This is the beta-test version of CalFUSE v2.0.</font>
-
-<hr WIDTH="100%">
-
-<p>July 2, 2001
-<br>Van Dixon
-<br>calfuse.h 1.118
-<br>cf_ttag_init.c
-<br>cf_ttag_screen.c
-<br>cf_ttag_burst.c
-<br>cf_make_ttag_bkgd.c
-<br>cf_make_hist_bkgd.c
-
-<br>
-<p>
-Implemented Richard's new background modeling routine, which
-independently computes the day- and night-time contributions to the
-scattered-light background. To do so, he adds an extra column, DNFLG,
-to all of the photon-event files. Package includes improvements
-to the burst-screening algorithm. Updated CALFUSE version to 2.0.0.
-
-<hr WIDTH="100%">
-
-<p>June 29, 2001
-<br>Van Dixon
-<br>calfuse.h 1.114
-<br>lsrd_vel.c
-<br>lsrk_vel.c
-
-<br>
-<p>
-Changed sign returned by the LSR correction subroutines to conform with
-astronomical standard. Updated CALFUSE version to 1.9.9
-
-<hr WIDTH="100%">
-
-<p>June 19, 2001
-<br>Jeff Kruk
-<br>helio_vel.c
-<p>
-Alex Fullerton determined that we have been applying the heliocentric
-velocity correction with the wrong sign. The orbital dopper correction
-has been applied with the correct sign. The function helio_vel.c
-inverts the sign returned by the SLALIB routines, so the simplest
-correction is to remove this sign inversion.
-
-<hr WIDTH="100%">
-
-<p>April 10, 2001
-<br>Van Dixon
-<br>calfuse.h 1.111
-<br>cf_hist_walk.c 1.1
-<br>cal_fuse_exp_hist.csh
-
-<br>
-<p>
-Installed new module to apply walk correction to histogram data.
-Modified shell script cal_fuse_exp_hist.csh to call this routine.
-Added PHAM entry to CALIBRATION_FILE_KEYS in calfuse.h. Updated
-CALFUSE version to 1.9.8
-
-<hr WIDTH="100%">
-
-<p>April 2, 2001
-<br>Van Dixon
-<br>calfuse.h 1.110
-<br>cf_ttag_walk.c 1.1
-<br>cal_fuse_exp_ttag.csh
-<br>cal_fuse_exp_hist.csh
-
-<br>
-<p>
-Installed new module to apply walk correction. Modified shell
-scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call this
-routine. Added WALK entry to CALIBRATION_FILE_KEYS in calfuse.h.
-Updated CALFUSE version to 1.9.7
-
-<hr WIDTH="100%">
-
-<p>March 28, 2001
-<br>Van Dixon
-<br>calfuse.h 1.109
-<br>cf_extract.c 1.52
-<br>cal_fuse_exp_ttag.csh
-<br>cal_fuse_exp_hist.csh
-
-<br>
-<p>
-Installed new module to perform optimal extraction. Modified shell
-scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call this
-routine. In calfuse.h, added definition of cf_optextract and new
-arguments to cf_spextract. Updated CALFUSE version to 1.9.6
-
-<hr WIDTH="100%">
-
-<p>March 27, 2001
-<br>Van Dixon
-<br>calfuse.h 1.108
-<br>cf_make_bkgd.c 1.22
-<br>cal_fuse_exp_ttag.csh
-<br>cal_fuse_exp_hist.csh
-
-<br>
-<p>
-Installed new module to scale background calibration file. Modified
-shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
-this routine (instead of cf_make_bkgd_temp). Add AIRG entry to
-CALIBRATION_FILE_KEYS in calfuse.h. Updated CALFUSE version to 1.9.5
-
-<hr>
-
-<p>March 19, 2001
-<br>Van Dixon
-<br>calfuse.h 1.107
-<br>cf_ttag_burst.c 1.9
-<br>cal_fuse_exp_ttag.csh
-<br>cal_fuse_exp_hist.csh
-
-<br>
-<p>
-Installed new module to reject data during detector bursts. Modified
-shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
-this routine. Modified Makefiles to install it. Updated CALFUSE
-version to 1.9.4
-
-<hr>
-<p>March 14, 2001
-<br>Van Dixon
-<br>calfuse.h 1.106
-<br>cf_astig.c 1.8
-<br>cal_fuse_exp_ttag.csh
-<br>cal_fuse_exp_hist.csh
-
-<br>
-<p>
-Installed new program to implement astigmatism correction, now called cf_astig.
-Modified shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh to call
-this routine. Modified Makefiles to install it.
-Updated CALFUSE version to 1.9.3
-
-<hr>
-<p>February 9, 2001
-<br>Jeff Kruk
-<br>calfuse.h 1.105
-<br>cf_ttag_screen.c 1.55
-
-<br>
-<p>
-Add checks to cf_ttag_screen.c to ensure that user-defined good time intervals
-actually fit within the time spanned by the dataset, and that in each case the
-end of a good time interval is later than the beginning. Invalid user GTI's
-are ignored. Also added printout to trailer file of the number of events that
-were rejected by pulse height limits. Updated CALFUSE version to 1.9.2
-
-<hr>
-<p>February 8, 2001
-<br>J.C. Hsu
-<br>calfuse.h 1.104
-<br>cf_linear.c 1.0
-<br>cf_transform1d.c 1.0
-<br>cf_1dff.c 1.0
-<br>cf_make_1dff.c 1.0
-
-<br>
-<p>
-Install programs needed to perform 1-D flat fielding. All Makefiles updated.
-The "official" pipeline shell scripts were not updated; users wishing to try
-the 1-D flatfields should edit their local copies of the shell scripts for
-the time being. Thus, the pipeline version was not updated.
-
-<hr>
-<p>December 21, 2000
-<br>Paul Barrett, J.C. Hsu
-<br>Makefile.Alpha
-<br>cf_ttag_screen.c 1.54
-<br>cf_ttag_image.c 1.22
-<br>cf_ttag_init.c 1.16
-<br>cf_wcal.c 1.25
-
-<br>
-<p>
-In response to problems encountered by Vincent LeBrun installing
-calfuse on a DEC Alpha running True64, we made a number of changes.
-The main one was to correct type mismatches in cfitsio calls:
-in a number of cases an "int" variable was referenced as TLONG and vice versa.
-Added -ieee flag to compiler options in Makefile.Alpha.
-cf_ttag_image: fix type mismatches in cfitsio calls
-cf_ttag_init: fix type mismatches in cfitsio calls
-cf_ttag_screen: fix type mismatches in cfitsio calls
-cf_wcal: fix type mismatches in cfitsio calls
-This is the first instance in which v1.9.1 differs from v1.8.7, and no
-change in functionality was involved, so the pipeline version was
-not updated.
-
-<hr>
-<p>November 15, 2000
-<br>Jeff Kruk
-<br>cf_make_ff_temp.c 1.6
-<br>cf_make_bkgd_temp.c 1.6
-<br>cf_ttag_screen.c 1.53
-
-<br>
-<p>
-Fixed typos in print statements in several routines.
-No change in functionality resulted, so the pipeline version number
-was not incremented.
-
-<hr>
-<p>October 19, 2000
-<br>Jeff Kruk
-<br>CALFUSE 1.9.1
-<br>calfuse.h 1.103
-
-<br>
-<p>
-Created CALFUSE version 1.9.1 as the new development version.
-calfuse.h was updated to reflect the new version number.
-
-<hr>
-<p>October 18, 2000
-<br>Martial Andre, Jeff Kruk
-<br>cf_extract.c 1.47
-<br>calfuse.h 1.102
-
-<br>
-<p>
-The image centroid (in Y) for extended sources is once again calculated
-including airglow lines. In many cases extended sources are very faint
-and the airglow will help locate the spectra. Extended sources will
-ordinarily fill the slits in the same manner as airglow, so the accuracy
-of the centroid calculation will not be adversely affected.
-<p>
-Changed CALFUSE version to 1.8.7.
-
-<hr>
-<p>October 13, 2000
-<br>Jeff Kruk
-<br>cf_ttag_screen.c 1.52
-<br>cf_extract.c 1.46
-<br>cf_fuv_init.c 1.9
-
-<br>
-<p>
-Three calls to FITS_read_key (infits, TSTRING, keyword, &arrayname,...) in the
-program cf_ttag_screen were modified to remove the extraneous ampersand.
-<p>
-One call to FITS_read_key (infits, TSTRING, keyword, &arrayname,...) in
-cf_extract.c was modified to remove the extraneous ampersand. Also
-fixed a bug in the test for the variable ystop_bis being out of limits.
-<p>
-CF_VER_NUM was brought up to date in cf_fuv_init.c
-
-<P>These changes are too small to update the version number of the pipeline.
-
-<hr>
-<p>October 2, 2000
-<br>Jeff Kruk, JC Hsu
-<br>cf_hist_dopp 1.25
-<br>calfuse.h 1.101
-<br>cal_fuse_exp_ttag.csh
-<br>cal_fuse_exp_hist.csh
-
-<br>
-<p>
-The program cf_hist_dopp was modified to incorporate corrections for
-grating thermal motion. The mean motion for the exposure is added to
-the doppler correction.
-<p>
-The shell script cal_fuse_exp_hist.csh was
-modified to call cf_make_shift and to pass the resulting shift file
-to cf_hist_dopp.
-<p>
-The include file calfuse.h was modified to include the function prototype
-for lif_sic_border() (see below), and to change the MKSH_COR
-histogram pipeline entry in CALIBRATION_STEP_KEYS to PERFORM.
-<p>
-The shell scripts cal_fuse_exp_ttag.csh and cal_fuse_exp_hist.csh were
-modified to test cfstat before calling the idlplot routines.
-
-<P>The pipeline version number was incremented to 1.8.6.
-
-<hr>
-<p>October 2, 2000
-<br>Jeff Kruk
-<br>cf_check_point 1.17
-<br>cf_hist_screen 1.21
-<br>cf_ttag_screen 1.51
-
-<br>
-<p>
-The programs cf_hist_screen and cf_ttag_screen were modified to
-update the keyword EXPNIGHT, newly created to provide the number of
-seconds of exposure time (after screening) that were obtained during
-the night side of the oribt. This keyword will be used by an upcoming
-version of cf_bkgd.
-<p>
-The function cf_check_point was modified to return a flag indicating
-whether the satellite was in daylight or night at the time being
-checked.
-
-<P>The pipeline version number was updated for an additional change made
-later in the day.
-
-<hr>
-<p>October 2, 2000
-<br>Jeff Kruk, JC Hsu
-<br>lif_sic_border() 1.00
-
-<br>
-<p>
-The function lif_sic_border() was extracted from cf_hist_dopp.c
-and make a function in libcf so that it would be available for
-the upcoming 1-D version of cf_ff. The libcf Makefiles were modified
-accordingly.
-
-<P>No change in functionality resulted, so no update to the pipeline
-version number was made.
-
-<hr>
-<p>October 2, 2000
-<br>Jeff Kruk
-<br>state_limb 1.08
-
-<br>
-<p>
-The function state_limb() was modified (v1.08) to include fortran
-function prototype wrappers for the new slalib calls introduced by
-the previous change (slaDcc2s, slaEvp, slaDranrm).
-
-<P>This change was solely for running Make on the distribution version
-of calfuse, so no update to the pipeline version number was made.
-
-<hr>
-<p>September 26, 2000
-<br>Martial Andre
-<br>state_limb 1.05, 1.06, 1.07
-<br>cf_check_point 1.16
-<br>cf_orbit 1.03
-<br>calfuse.h 1.98, 1.99, 1.100
-
-<br>
-<p>
-The function state_limb() was modified (v1.05) to calculate the limb angle
-constraint in the same way as is done by the mission planners:
-it checks if the limb itself is in daylight or night, rather than the
-old simplistic method of seeing if the satellite was in day or night.
-This required a modification to the call to state_limb.
-Versions 1.06, 1.07 of state_limb were to fix minor bugs.
-<p>
-The function cf_check_point (v1.16) and the program cf_orbit (v1.03) were
-modified to make use of this new limb angle constraint calculation.
-<p>
-The include file calfuse.h (v1.98, v1.99) was modified to provide the
-proper function prototype for the new versions of state_limb and
-cf_check_point.
-
-<P>These changes led to the increase in pipeline version number to 1.8.5
-(implemented by version 1.100 of calfuse.h).
-
-
-<hr>
-<p>September 18, 2000
-<br>Ed Murphy
-<br>Pipeline Distribution Version
-
-<br>
-<p>
-Ed Murphy & Paul Barrett produce distribution version of pipeline.
-Major change was to incorporate "makemake" files.
-
-<P>Update the version number of the pipeline to v1.8.4.
-
-<hr>
-<p>September 18, 2000
-<br>Ed Murphy
-<br>cf_astig2 1.07
-
-<br>
-<p>
-Ed made some change, not documented in the header.
-
-<P>Since this routine is still in testing, I have not updated the
-pipeline version number. The new version of cf_astig2.c is 1.07.
-
-
-<hr>
-<p>September 6, 2000
-<br>Jeff Kruk
-<br>cf_dtcor 1.18
-
-<br>
-<p>
-Jeff Kruk modified cf_dtcor.c to populate three new keywords
-in the FUV header:
-DEAD_DET Detector dead time factor
-DEAD_IDS IDS dead time factor
-DEAD_TOT Combined dead time factor
-
-New version of cf_dtcor.c is 1.18. He also changed sunmath.h to math.h.
-
-<P>These changes are too small to update the version number of the pipeline.
-
-<hr>
-<p>September 5, 2000
-<br>Ed Murphy
-<br>cf_astig2 1.06
-
-<br>
-<p>
-Modify cf_astig2 to get the calibration file from the ASTG_CAL keyword
-rather than being hardcoded.
-
-<P>Since this routine is still in testing, I have not update the
-pipeline version number. The new version of cf_astig2.c is 1.06.
-
-<hr>
-<p>August 25, 2000
-<br>Ed Murphy
-<br>cf_astig2 1.05
-
-<br>
-<p>
-Jeff Kruk found that cf_astig2 crashed on all segment 1B data. The
-routine lacked any boundary checking and was running off the bottom
-of the image when attempting to centroid the SiC spectrum. The
-centroiding routines have been updated to include boundary checking.
-
-<P>I also added the ability for the routine to check the number
-of arguments.
-
-<P>Since this routine is still in testing, I have not update the
-pipeline version number. The new version of cf_astig2.c is 1.05.
-
-<hr>
-<p>August 23, 2000
-<br>Martial Andre
-<br>cf_extract 1.44
-
-<br>
-<p>
-Martial fixed a bug in the initialization of column_sum that caused a
-fatal bus error.
-The change is too small to update the pipeline version number.
-<P>
-
-<hr>
-<p>August 18, 2000
-<br>Ed Murphy
-<br>cf_update_qual 1.03
-
-<br>
-<p>
-I added calls to cf_proc_check and cf_proc_update to cf_update_qual
-to rid the trailer files of the warnings concerning the QUAL_COR
-keyword. New version of cf_update_qual is 1.03. The change is too
-small to update the pipeline version number.
-<P>
-
-<hr>
-<p>August 14, 2000
-<br>Martial
-<br>cf_extract 1.43
-
-<br>
-<p>
-To avoid the centroid to be shifted close to the bright edge, the procedure should compute the size of
-the scanning window for each different channel (the changes done in version 1.41 were wrong!!!)
-<P>
-
-<hr>
-<p>August 13, 2000
-<br>Martial
-<br>cf_coadd 1.17
-
-<br>
-<p>
-Propagation of quality should have been done with float since the very beginning (now fixed).
-<P>
-
-<hr>
-<p>August 9, 2000
-<br>Martial
-<br>cf_extract 1.42
-
-<br>
-<p>
-Added a define statement to use sunmath only ifdef SOLARIS.
-<P>
-
-<hr>
-<p>July 26, 2000
-<br>J. C. Hsu, R. Robinson, Ed Murphy
-<br>cf_update_qual v1.02
-<br>cf_driftcorr2 v1.23
-
-<p>J. C. Hsu has written a program cf_update_qual to update the quality
-flags in the *_img.fit files after the drift correction has been
-determined. The FARF positions of the dead spots and edges of the detectors
-were determined by Rich Robinson and are in the qual*001.fit calibration
-files. The drift correction is used to correct for the strecth/shift
-in going from the FARF to the observed data frame.
-
-<p>When implementing cf_update_qual, Ed Murphy noticed that cf_driftcorr2
-was centroiding the stims incorrectly. The error arose because the
-algorithm was computing the stim centroid in a box that had an extent
-of +-256 in X. Since the stims are at pixel ~230 (on segment 1a) the
-centroiding box was including counts along the X=0 column, which
-skewed the centroid. In the particular observation that he used
-to test the routine (M999 flat field) the X=0 column was particularly
-bright due to the high count rates in a stim lamp observation. This
-problem probably does not effect most observations, since the X=0 column
-is normally much weaker. He also modified cf_driftcorr2 to use the
-FARF stim positions given in calfuse.h as opposed to the positions that
-were hard coded into the routine.
-<P>
-Ed Murphy created V1.8.3.
-
-<hr>
-<p>July 21, 2000
-<br>Martial
-<br>cf_extract 1.41
-
-<br>
-<p>
-Fixed bug of implementation of a pointer in im_centroid wich caused a bus error.
-<P>
-
-<hr>
-<p>June 27, 2000
-<br>Jeff Kruk
-<br>cf_dtcor v1.17
-
-<p>Jeff Kruk added an IDS dead time correction to the dead time correction
-routine cf_dtcor.c.
-
-<P>
-Ed Murphy created V1.8.2 and V1.7.8.
-
-<hr>
-<p>June 26, 2000
-<br>Martial
-<br>cf_coadd v1.15
-
-<p>Now the default resolution of the coadded spectra is 0.1 Angstrom. This way,
-we make sure that astronomers outside JHU don't use them for science purpose
-(since some of the channels are currently misaligned => artefacts). Note that
-the user is still free to have maximal resolution by tuning the arguments.
-
-<hr>
-<p>June 20, 2000
-<br>Ed Murphy
-<br>cf_ttag_screen 1.49, cf_hist_dopp v1.23
-<br>PR 41926
-
-<br>
-<p>
-Peter Young noticed that the Doppler shift in pixels for the SiC and
-LiF spectra on segment 1a were both in the same direction. Since the
-dispersions run in opposite directions, the two shifts should be opposite
-in sign. The DISPAPIX keyword in the wavelength calibration file records
-the average dispersion in Angstroms/pixel. It should be positive when
-the wavelength increases with increasing pixel number and it should be
-negative when the wavelength decreases with increasing pixel number
-(SiC1 and LiF2). However, I found that the DISPAPIX keyword was always
-positive in the recent versions of the wavelength calibration files.
-Therefore, for SiC1 and LiF2, the sign of the Doppler and heliocentric
-corrections are incorrect.
-
-<P>
-I have modified the code in cf_ttag_screen and cf_hist_dopp to read in
-the absolute value of DISPAPIX and compute the sign of the shift based
-on the aperture to which the photon belongs. The new version of
-cf_ttag_screen is 1.49 and the new version of cf_hist_dopp is 1.23.
-
-<P>
-I have also removed the flat-fielding step from the pipeline. Even
-though we do not have a flat-field file, we have been applying a flat
-field (filled with 1's) to the data so that we could incorporate a bad
-pixel mask. However, we are not stretching/shifting the flat field file
-(since it is all 1's) to match the data which means that the bad pixel
-mask does not line up with the data. J.C. Hsu is in the process of
-writing a new module to properly apply the bad pixel mask. However,
-the routine cf_ttag_geodopp.c still requires the _ff.fit file, so we
-must still run cf_make_ff_temp. This intermediate _ff.fit data file
-contains all 1's over the active area of the detectors, and 0's
-everywhere else. Since we are not running the cf_ff, the locations
-where the flat field is 0 are not being flagged as bad. This was
-causing cf_ttag_geodopp to report a lot of "Divide by zero in ffbuf"
-errors. For now, I have turned off the warning in cf_ttag_geodopp.
-
-<P>
-Ed Murphy created V1.8.1 and V1.7.7.
-
-<hr>
-<p>June 13, 2000
-<br>Martial
-<br>cf_extract 1.40
-<br>
-
-<br>
-<p>
-The algorithm of finding the centroid has been totally changed. Now the position
-of the spectrum is reached via a maximisation of the flux in the extraction window.
-Moreover, the airglows are systematically screened to center only on the source.
-
-<hr>
-<p>June 9, 2000
-<br>Martial
-<br>cf_extract 1.39
-
-<br>
-<p>
-Airglow screened while computing the centroid.
-<P>
-<hr>
-<p>June 9, 2000
-<br>Martial
-<br>cf_extract 1.38
-
-<br>
-<p>
-Major change to calculate the centroid. Center is reached for flux maximum.
-<P>
-<hr>
-<p>June 4, 2000
-<br>Martial
-<br>Version 7 of the extraction windows
-<br>
-
-<br>
-<p>
-The way the windows are calculated changed drastically. Using the parameter of the distortion
-correction, the shape of each window has been simplified (butterfly or trapeze) and the
-weigth files are filled with parabolic profiles (first approximation). For more details
-see /data1/fuse/calfuse/v1.8/src/cal/extraction_masks/README
-
-
-<hr>
-<p>May 24, 2000
-<br>Martial
-<br>cf_extract 1.37
-
-<br>
-<p>
-Added a define statement for the cpp and DEC
-<P>
-<hr>
-<br>
-<hr>
-<p>May 18, 2000
-<br>Jeff Kruk, Ed Murphy
-<br>cf_wcal 1.24
-
-<br>
-<p>
-Jeff Kruk upgraded cf_wcal to read either the new FPA keywords (FPASXPOS
-or FPALXPOS) or the old keywords (FP1SXPOS, FP1LXPOS, FP2SXPOS, or
-FP2LXPOS). New version is 1.24.
-<P>
-Ed Murphy created V1.8.0.
-
-
-<hr>
-<p>May 17, 2000
-<br>Jeff Kruk, Ed Murphy, Paul Barrett
-<br>CALFUSE v1.7.6
-
-<br>
-<p>
-Jeff Kruk has completed the new version of cf_dtcor.
-<P>
-Ed Murphy found and corrected a bug in cf_extract that prevented the
-SiC extraction windows from being reset to the default position if
-the centroid was more than EMAX_SIC pixels from the exptected position.
-<P>
-Paul Barret changed the interpolation algorithm back to a constant (to
-prevent ringing around the outside of the spectrum) and fixed a bug in
-that implementation.
-
-<hr>
-
-<p>May 12, 2000
-<br>Jeff Kruk, Paul Barrett
-<br>CALFUSE v1.7.5
-
-<br>
-<p>
-Jeff Kruk has modified cf_wcal.c (now version 1.23) to correct the
-wavelength scale for the position of the FPA.
-<P>
-Paul Barrett has produced new versions of the detector distortion
-files: geom*005.fit in /data1/fuse/calfuse/calfiles.
-
-<hr>
-
-<p>April 24, 2000
-<br>Ed Murphy
-<br>CALFUSE v1.7.4
-
-<br>
-<p>
-The pipeline can now generate a few diagnostic plots (using IDL) while
-it is running if the CF_IDLDIR environment variable is set to point to
-the location of the IDL programs. To set up the pipeline to make the
-plots, add the following to your .cshrc or .login file:<BR>
-setenv CF_IDLDIR '/data1/fuse/calfuse/current/idl/'
-<P>
-The plots are in GIF format so that they can, at some future time,
-be linked to the SDOG pages.
-<hr>
-<p>April 24, 2000
-<br>Ed Murphy
-<br>CALFUSE v1.7.4
-
-<br>
-<p>
-Development on V1.7.4 of the pipeline has been frozen. Only bug fixes
-will be made from now on. The current stable version of the pipeline
-now points to V1.7.4. You will need new calibration files, new
-parameter files, and a new master_calib_file.dat
-<P>
-Upgrades (besides those listed in previous messages) include:
-<ol>
-<li> Both the code (V1.7.*) and calibration files are now in the
-Flight Alignment Reference Frame. This means that the stretch and
-shift has been reduced from about 120 pixels in X to less than 10
-pixels in X.
-<li> Improved wavelength calibration from Don Lindler.
-<li> Improved flux calibration from Jeff Kruk.
-<li> Improved distortion correction from Paul Barrett.
-<li> The user now has the ability to scale the background by a simple
-scalar value when using pulse height screening. The value to scale
-the background is in the PHA_BKGD keyword in the screening parameter
-file.
-<li> The user now has the ability to limit the motion of the spectral
-extraction windows based on the pipeline determined centroid. If the
-difference between the expected and actual positions is larger than
-the limit, the pipeline defaults to the expected position. The limit
-is set using the EMAX_LIF and EMAX_SIC keywords in the parm**002.fit
-files.
-<li> The user now has the ability to ignore the pipeline determined
-centroid and place the extraction windows where ever they wish using
-the SPEX_SIC and SPEX_LIF keywords in the parm**002.fit files. Note
-that the maximum motion limit described above still applies.
-</ol>
-
-<hr WIDTH="100%">
-
-<p>March 24, 2000
-<br>Paul Barrett
-<br>CALFUSE v1.7.4
-<br>PR 41000
-<p>It has been suggested that a higher order interpolation scheme be used
-when expanding the binned histogram data, instead of the current constant
-interpolation scheme. A quadratic average interpolation algorithm has been
-implemented in cf_hist_init. This algorithm uses data from neighboring
-pixels to interpolate the data in binned pixles while conserving the total
-number of counts per binned pixel. This routine has been tested.
-<p>This modification to cf_hist_init will now allow histogram data to be
-used for determining distortion corrections by providing necessary spatial
-resolution.
-<hr WIDTH="100%">
-<p>March 7, 2000
-<br>Ed Murphy
-<br>CALFUSE V1.6.9 and V1.7.3
-<br>PR 40864
-
-<p STYLE="margin-bottom: 0in">In the SDOG report for P1320101 Jeff Kruk
-found that the pipeline seemed to be excessively screening out data that
-was near, but not violating, the night time limb angle limit. I found flawed
-logic in the limb angle check in cf_check_point.c that meant that the bright
-limb angle was always used regardless of the day/night flag. The problem
-has been corrected (cf_check_point.c now V1.15) and the routine has been
-tested.
-<br>
-<hr>
-<p>February 10, 2000
-<br>Ed Murphy
-<br>CALFUSE V1.6.8 and V1.7.2
-<br>PR 40661
-
-<p STYLE="margin-bottom: 0in">Bill Oegerle noticed that the pipeline was
-not subtracting the background from some recently processed datasets. The
-pipeline has been in this state since sometime around the end of December
-1999. I fixed the problem in both versions of the pipeline: new versions
-are V1.6.8 and V1.7.2
-<p>The problem was found in cf_make_bkgd_temp.c, which is a temporary module
-designed to read in the background calibration file and write it into the
-*ttagf_bkgd.fit file needed by the pipeline. The module does not stretch
-or shift the background image but does scale the background by the integration
-time. In the calibration file, the background image is composed of short
-integers with the value 1 everywhere. The keyword BSCALE gives the number
-of square cm per pixel, so that the file contains the number of counts
-per pixel per second. The original version of cf_make_bkgd_temp.c read
-in the calibration image and wrote it out directly, without converting
-the input image to floats. All it did was multiply BSCALE by the integration
-time, so that when cf_bkgd.c read in the file and scaled by BSCALE, the
-resulting image would be background counts per pixel for the full integration.
-<p>In late December 1999, it was decided to rewrite cf_make_bkgd_temp.c
-to rebin the data for histogram mode observations. In this case, the new
-routine read in the calibration file array (all 1), converted the background
-image to floats by applying BSCALE, rebinned the data (if necessary), and
-wrote out an array of floats. However, the header was copied from the input
-file, so the BSCALE keyword still remained even though the data had already
-been scaled as part of the routine. In addition, the step where BSCALE
-was multiplied by the integration time also remained in the new version.
-Therefore, when cf_bkgd.c read in the *ttagf_bkgd.fit intermediate file,
-it used the BSCALE keyword a second time. The result was that the subtracted
-background was about two orders of magnitude too small.
-<p>Because the pipeline now unbins the histogram data, we have reverted
-back to the original versions of the routines which do not rebin the data
-and do not suffer from this problem. The new version of cf_make_bkgd_temp.c
-is V1.4.&nbsp;
-<hr>
-<p>February 1, 2000
-<br>Ed Murphy
-<br>CALFUSE V1.6.7 and V1.7.1
-<br>PR 40541
-
-<p STYLE="margin-bottom: 0in">A few histogram data sets were crashing the
-pipeline becuause of a bad pixel value that was larger than 32767. This
-value was large enough that it would not fit into a short integer in the
-pipeline and cfitsio would return a data conversion error. Jim Rose has
-agreed to modify the OPUS pipeline to find pixel values larger than 32767
-and change them to the data fill value 21865. As seen below, the pipeline
-will convert the data fill value to 0.0 and change its quality flag to
-bad.
-<hr>
-<p>February 1, 2000
-<br>Ed Murphy
-<br>CALFUSE V1.6.7 and V1.7.1
-<br>PR 40544
-
-<p STYLE="margin-bottom: 0in">A number of histogram data sets have fill
-data in them (decimal 21865) which the pipeline was not filtering out.
-I have modifed v1.6.7 and v1.7.1 of the pipeline to check pixels for the
-fill data value. If the fill data value is found, it will replace the data
-with 0.0 and change the quality flag to bad.
-<hr>
-<p>January 31, 2000
-<br>Ed Murphy
-<br>CALFUSE V1.6.7 and V1.7.1
-<br>PR 40553
-
-<p STYLE="margin-bottom: 0in">Until now, the DATE keyword in the header
-was not modified by any of the modules in the pipeline, even though its
-comment stated that it was the "date the file was written." I have modified
-cf_proc_update.c to update the DATE keyword. Since cf_proc_update is called
-at the end of each module of the pipeline, the output files and all intermediate
-data products will now have accurate dates and times in the DATE keyword.
-This change was made to both V.1.6.7 and V1.7.1 of the pipeline.
-<hr>
-<p>January 24, 2000
-<br>Martial
-<br>CALFUSE V1.6 and V1.7
-
-<p STYLE="margin-bottom: 0in">CENTROIDING PROBLEMS FIXED :
-
-<p STYLE="margin-bottom: 0in">Until now, the cf_extract procedure was unable
-to perform a good centroiding in Y when very few counts were involved.
-Since we used the formula : Ycenter = (<font face="symbol">&aring;</font>
-Yi * nbcounts_i)/<font face="symbol">&aring;</font>nbcounts_i, where nbcounts_i
-is the total number of counts along the row i, the result was depending
-on the Y limits of the sum. For instance, if the upper limit equals infinity,
-the result is infinity (do not forget that the noise is different of 0).
-So, to use this formula, we need a first guess for the position of the
-center in order
-
-<p STYLE="margin-bottom: 0in">to choose a domain of calculation surrounding
-it. At present, this first guess is the maximum peak.
-<br>
-<hr>
-<p>January 21, 2000
-<br>Martial
-<br>CALFUSE V1.6 and V1.7
-
-<p STYLE="margin-bottom: 0in">The new extraction windows are now available
-(spex*005.fit). This is the first set of In Orbit Based Extraction Windows
-: all the apertures have the same window (based on 100 percent with LWRS).
-
-<p STYLE="margin-bottom: 0in">The associated weight files are also available
-(wgts*003.fit). Note that since the raw windows extracted from In Orbit
-Data are very noisy, I had to smooth and correct the geometrical distorsions
-, sometimes " by hand ".
-<br>&nbsp;
-<table BORDER CELLSPACING=3 CELLPADDING=4 >
-<caption><COL WIDTH=85><COL WIDTH=85><COL WIDTH=85><THEAD>
-<br></THEAD><TBODY>
-<br></TBODY></caption>
-
-<tr VALIGN=TOP>
-<th>Detector</th>
-
-<th>Data Used</th>
-
-<th>Notes</th>
-</tr>
-
-<tr VALIGN=TOP>
-<td>1A (LiF)</td>
-
-<td>/data2/fuse/CAL/M101/M1010201</td>
-
-<td>Good&nbsp;</td>
-</tr>
-
-<tr VALIGN=TOP>
-<td>1A (SiC)</td>
-
-<td>/data2/fuse/CAL/M103/M1030303</td>
-
-<td>Good&nbsp;</td>
-</tr>
-
-<tr VALIGN=TOP>
-<td>1B (LiF)</td>
-
-<td>/data2/fuse/CAL/M101/M1010201</td>
-
-<td>Corrected by hand : mirror transformation applied</td>
-</tr>
-
-<tr VALIGN=TOP>
-<td>1B (SiC)</td>
-
-<td>/data2/fuse/CAL/M103/M1030304</td>
-
-<td>Corrected by hand : linear regression for the narrow domain</td>
-</tr>
-
-<tr VALIGN=TOP>
-<td>2A (LiF)</td>
-
-<td>/data2/fuse/CAL/M101/M1010201</td>
-
-<td>Good</td>
-</tr>
-
-<tr VALIGN=TOP>
-<td>2A (SiC)</td>
-
-<td>/data2/fuse/CAL/M103/M1030304</td>
-
-<td>Good&nbsp;</td>
-</tr>
-
-<tr VALIGN=TOP>
-<td>2B (LiF)</td>
-
-<td>NOT AVAILABLE</td>
-
-<td>Here I didn't find a signal strong enough ... I used the old Ground
-Based Files + geometrical correction</td>
-</tr>
-
-<tr VALIGN=TOP>
-<td>2B (SiC)</td>
-
-<td>/data2/fuse/CAL/M103/M1030304</td>
-
-<td>Ground Based Files + geometrical correction</td>
-</tr>
-</table>
-
-<div STYLE="margin-bottom: 0in"></div>&nbsp;
-
-
-<p STYLE="margin-bottom: 0in">Note also that you can change the windows
-with "cf_modifwindows" wich apply an homothetic factor to the LiF channel
-and the SiC channel :
-
-<p STYLE="margin-bottom: 0in">>cf_modifwindows filename 0.8 (80% for LiF)
-0.9 (90% for SiC)
-<br>
-<hr>
-<br>&nbsp;
-<br>&nbsp;
-<br>&nbsp;
-<p>January 5, 2000
-<br>Ed Murphy
-<br>CALFUSE V1.6 and V1.7
-
-<p STYLE="margin-bottom: 0in">By popular demand, I have written a program
-to convert an ASCII file to the 1-D FITS extracted format that comes out
-of the pipeline. The program is called ascii2fits and is in the /usr/local/fusesw/calfuse/current/bin
-directory. The program takes 3 arguments: Calling sequence:ascii2fits ascii_file
-template_fits_file output_fits_file The ASCII file must have six columns:
-wavelength (float) flux (float) errors (float) quality flags (int) counts
-(float) errors on counts (float) The template FITS file is used to populate
-the header keywords. It can be any raw or pipeline processed file.
-<br>
-<hr>
-<p>January 03, 2000
-<br>Paul Barrett
-<br>CALFUSE V1.6.5
-
-<p STYLE="margin-bottom: 0in">Overlapping pixels are now averaged by cf_hist_geodopp.
-This is a temporary fix to minimize the effect on the spectrum due to a
-mis-match between the BARF and FARF, i.e. it removes the spikes from the
-spectrum.
-<br>
-<hr>
-<p>December 21, 1999
-<br>Ed Murphy
-<br>CALFUSE V1.7.1
-
-<p STYLE="margin-bottom: 0in">Version 1.7.1 of the pipeline is now in the
-FARF frame, however, the calibration files are not.
-<br>
-<hr>
-<p>December 21, 1999
-<br>Ed Murphy
-<br>CALFUSE V1.6.5
-
-<p STYLE="margin-bottom: 0in">The dead time correction step has been removed
-from the pipeline. The new version of pipeline is V1.6.5. The pipeline
-module itself was fine. However, Dave Sahnow has found that the on-board
-counters behave strangely at low count rates (in addition to behaving strangely
-in the SAA). Until this issue is resolved, we will not dead time correct
-the data.
-<br>
-<hr>
-<p>December 21, 1999
-<br>Ed Murphy
-<br>CALFUSE V1.6.4
-
-<p STYLE="margin-bottom: 0in">Histogram data currently show strong spikes
-approximately once per Angstrom. This behavior is not unexpected. It comes
-from the fact that we have to compress the image in the X direction by
-about 110 pixels in order to bring the data into the reference frame of
-the calibration files. Until we can redefine the calibration file reference
-frame and remake all our calibration files, this behavior will be present
-in the data.
-<br>
-<hr>
-<p>December 17, 1999
-<br>Ed Murphy
-<br>CALFUSE V1.6.4
-<p>Version 1.6.4 of the CALFUSE pipeline is now frozen. In the future,
-only bug fixes will occur. The /usr/local/fusesw/calfuse/current directory
-will now point to v1.6. All development will take place in v1.7.
-<p>Upgrades include:
-<ol>
-<div STYLE="margin-bottom: 0in">The histogram pipeline finally works. The
-histogram images are, for now, expanded out to 16384x1024 in size to avoid
-some of the binning problems we were encountering.</div>
-
-
-<p STYLE="margin-bottom: 0in">The spectral thermal shifts are now removed
-from the data using Kathy's algorithm. If you have a local copy of the
-calibration files, will need to copy the new version of master_calib_file.dat
-from /data1/fuse/calfuse/parmfiles and the new calibration file shft001.fit
-from /data1/fuse/calfuse/calfiles.
-
-<p STYLE="margin-bottom: 0in">In ttag data, the calculated centroid of
-the target aperture is used to offset all apertures to account for movememnt
-in the Y direction. In the past, each aperture was centroided and offset
-independently. However, because of the overlapping spectra on side 2, the
-HIRS aperture centroid often caused the HIRS extraction to contain significant
-flux from the LWRS aperture.
-<p>A large number of small items were taken care of (keyword updates, minor
-bug fixes, etc.).</ol>
-
-<div STYLE="margin-bottom: 0in">REMINDER: Many people directly reference
-"v1.5" rather than "current" in their PATH and LD_LIBRARY_PATH. If you
-do this, be sure to change both PATH and LD_LIBARARY_PATH to v1.6. Otherwise,
-you will be running the pipeline with outdated copies of the library routines
-since we are now using dynamically linked libraries (linked in at run time).</div>
-
-<br>
-<hr>
- <address><a href="mailto:emurphy@pha.jhu.edu">Ed Murphy</a></address>
-<!-- Created: Fri Apr 28 15:14:57 EDT 2000 -->
-<!-- hhmts start -->
-Last modified: Monday, December 10 2001
-<!-- hhmts end -->
- </body>
-</html>
diff --git a/include/calfitsio.h b/include/calfitsio.h
deleted file mode 100644
index faa6505..0000000
--- a/include/calfitsio.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*****************************************************************************
- * Johns Hopkins University
- * Center For Astrophysical Sciences
- * FUSE
- *****************************************************************************
- *
- * Description: Wrappers for cfitsio routines which includes error checking.
- *
- * History: 04/14/99 peb Finished work on subset of routines
- * from cfitsio v2.031.
- * 04/14/99 barrett Delete calfuse.h from file
- * 04/15/99 barrett Added FITS_get_rowsize
- * 04/16/99 barrett Added FITS_get_hdu_num
- * 04/20/99 barrett Added FITS_insert_key_[str, log, lng,
- * fixflt, flt, fixdbl, dbl, fixcmp,
- * cmp, fixdblcmp, dblcmp]
- *
- ****************************************************************************/
-
-#ifndef FITSIO_H
-#define FITSIO_H
-
-#include "fitsio.h"
-
-int FITS_open_file(fitsfile **fptr, const char *filename, int iomode,
- int *status);
-int FITS_reopen_file(fitsfile *openfptr, fitsfile **newfptr, int *status);
-int FITS_create_file(fitsfile **fptr, const char *filename, int *status);
-int FITS_flush_file(fitsfile *fptr, int *status);
-int FITS_close_file(fitsfile *fptr, int *status);
-int FITS_delete_file(fitsfile *fptr, int *status);
-int FITS_file_name(fitsfile *fptr, char *filename, int *status);
-int FITS_file_mode(fitsfile *fptr, int *filemode, int *status);
-int FITS_write_record(fitsfile *fptr, const char *card, int *status);
-int FITS_write_key(fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int FITS_write_comment(fitsfile *fptr, const char *comm, int *status);
-int FITS_write_history(fitsfile *fptr, const char *history, int *status);
-int FITS_write_date(fitsfile *fptr, int *status);
-int FITS_copy_key(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
- char *rootname, int *status);
-int FITS_write_imghdr(fitsfile *fptr, int bitpix, int naxis, long naxes[],
- int *status);
-int FITS_write_grphdr(fitsfile *fptr, int simple, int bitpix, int naxis,
- long naxes[], long pcount, long gcount, int extend,
- int *status);
-int FITS_write_btblhdr(fitsfile *fptr, long naxis2, int tfields, char **ttype,
- char **tform, char **tunit, char *extname, long pcount,
- int *status);
-int FITS_get_hdrpos(fitsfile *fptr, int *nexist, int *position, int *status);
-int FITS_read_record(fitsfile *fptr, int nrec, char *card, int *status);
-int FITS_read_card(fitsfile *fptr, char *keyname, char *card, int *status);
-int FITS_read_key(fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int FITS_read_imghdr(fitsfile *fptr, int maxdim, int *simple, int *bitpix,
- int *naxis, long naxes[], long *pcount, long *gcount,
- int *extend, int *status);
-int FITS_read_btblhdr(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
- char **ttype, char **tform, char **tunit, char *extname,
- long *pcount, int *status);
-int FITS_update_card(fitsfile *fptr, char *keyname, char *card, int *status);
-int FITS_update_key(fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int FITS_modify_record(fitsfile *fptr, int nkey, char *card, int *status);
-int FITS_modify_card(fitsfile *fptr, char *keyname, char *card, int *status);
-int FITS_modify_comment(fitsfile *fptr, char *keyname, char *comm,
- int *status);
-int FITS_insert_record(fitsfile *fptr, int nkey, char *card, int *status);
-int FITS_insert_key_str(fitsfile *fptr, char *keyname, char *value,
- char *comment, int *status);
-int FITS_insert_key_log(fitsfile *fptr, char *keyname, int value,
- char *comment, int *status);
-int FITS_insert_key_lng(fitsfile *fptr, char *keyname, long value,
- char *comment, int *status);
-int FITS_insert_key_flt(fitsfile *fptr, char *keyname, float value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_fixflt(fitsfile *fptr, char *keyname, float value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_dbl(fitsfile *fptr, char *keyname, double value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_fixdbl(fitsfile *fptr, char *keyname, double value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_cmp(fitsfile *fptr, char *keyname, float *value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_dblcmp(fitsfile *fptr, char *keyname, double *value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_fixcmp(fitsfile *fptr, char *keyname, float *value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_fixdblcmp(fitsfile *fptr, char *keyname, double *value,
- int decimals, char *comment, int *status);
-int FITS_insert_key_null(fitsfile *fptr, char *keyname, char *comment,
- int *status);
-int FITS_delete_key(fitsfile *fptr, char *keyname, int *status);
-int FITS_delete_record(fitsfile *fptr, int keypos, int *status);
-int FITS_get_hdu_num(fitsfile *fptr, int *hdunum);
-int FITS_get_hdu_type(fitsfile *fptr, int *exttype, int *status);
-int FITS_movabs_hdu(fitsfile *fptr, int hdunum, int *exttype, int *status);
-int FITS_movrel_hdu(fitsfile *fptr, int hdumov, int *exttype, int *status);
-int FITS_movnam_hdu(fitsfile *fptr, int exttype, char *hduname, int hduvers,
- int *status);
-int FITS_get_num_hdus(fitsfile *fptr, int *nhdu, int *status);
-int FITS_create_img(fitsfile *fptr, int bitpix, int naxis, long *naxes,
- int *status);
-int FITS_create_tbl(fitsfile *fptr, int tbltype, long naxis2, int tfields,
- char **ttype, char **tform, char **tunit, char *extname,
- int *status);
-int FITS_create_hdu(fitsfile *fptr, int *status);
-int FITS_insert_img(fitsfile *fptr, int bitpix, int naxis, long *naxes,
- int *status);
-int FITS_insert_atbl(fitsfile *fptr, long naxis1, long naxis2, int tfields,
- char **ttype, long *tbcol, char **tform, char **tunit,
- char *extname, int *status);
-int FITS_insert_btbl(fitsfile *fptr,long naxis2, int tfields, char **ttype,
- char **tform, char **tunit, char *extname, long pcount,
- int *status);
-int FITS_delete_hdu(fitsfile *fptr, int *hdutype, int *status);
-int FITS_copy_hdu(fitsfile *infptr, fitsfile *outfptr, int morekeys,
- int *status);
-int FITS_copy_header(fitsfile *infptr, fitsfile *outfptr, int *status);
-int FITS_copy_data(fitsfile *infptr, fitsfile *outfptr, int *status);
-int FITS_get_colnum(fitsfile *fptr, int casesen, char *templt, int *colnum,
- int *status);
-int FITS_get_colname(fitsfile *fptr, int casesen, char *templt, char *colname,
- int *colnum, int *status);
-int FITS_get_coltype(fitsfile *fptr, int colnum, int *typecode, long *repeat,
- long *width, int *status);
-int FITS_get_num_rows(fitsfile *fptr, long *nrows, int *status);
-int FITS_get_rowsize(fitsfile *fptr, long *nrows, int *status);
-int FITS_get_num_cols(fitsfile *fptr, int *ncols, int *status);
-int FITS_get_acolparms(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
- char *tunit, char *tform, double *tscal, double *tzero,
- char *tnull, char *tdisp, int *status);
-int FITS_get_bcolparms(fitsfile *fptr, int colnum, char *ttype, char *tunit,
- char *dtype, long *repeat, double *tscal, double *tzero,
- long *tnull, char *tdisp, int *status);
-int FITS_read_img(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *nulval, void *array, int *anynul, int *status);
-int FITS_read_col(fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *nulval, void *array,
- int *anynul, int *status);
-int FITS_write_img(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *array, int *status);
-int FITS_write_col(fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *array, int *status);
-int FITS_insert_rows(fitsfile *fptr, long firstrow, long nrows, int *status);
-int FITS_delete_rows(fitsfile *fptr, long firstrow, long nrows, int *status);
-int FITS_delete_rowlist(fitsfile *fptr, long *rownum, long nrows,
- int *status);
-int FITS_insert_col(fitsfile *fptr, int numcol, char *ttype, char *tform,
- int *status);
-int FITS_insert_cols(fitsfile *fptr, int firstcol, int ncols, char **ttype,
- char **tform, int *status);
-int FITS_delete_col(fitsfile *fptr, int numcol, int *status);
-int FITS_copy_col(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
- int create_col, int *status);
-
-#endif
diff --git a/include/calfuse.h b/include/calfuse.h
deleted file mode 100644
index a1ab6e9..0000000
--- a/include/calfuse.h
+++ /dev/null
@@ -1,536 +0,0 @@
-/*****************************************************************************
- * Johns Hopkins University
- * Center For Astrophysical Sciences
- * FUSE
- *****************************************************************************
- *
- * Synopsis: #include "calfuse.h"
- *
- * Description: Master include file for FUSE calibration pipeline processing
- * system. Global shared variables and structures are defined
- * here, as well as symbols and default values of parameters.
- *
- * Arguments: none
- *
- * Returns: none
- *
- * History: 11/01/02 1.1 peb Begin work
- * 12/10/02 1.3 wvd Continue work
- * 12/20/02 1.4 wvd Change flags to unsigned char in
- * screening routines.
- * 01/14/03 1.5 wvd Change cf_fpa_pos to cf_read_fpa_pos
- * 01/17/03 1.6 wvd Added new calibration files
- * DIGI_CAL and SPEC_CAL
- * Added cf_check_digitizer and DIGI_COR
- * 02/05/03 1.7 wvd Added spectral extraction routines
- * Interpolate between FLUX_CAL files.
- * Define HC
- * 02/12/03 1.8 wvd Added convert_to_ergs
- * Replace FLUX_CAL with AEFF_CAL
- * 02/14/03 1.9 wvd Added FLAT, WGTS and WORM calibration
- * file keywords.
- * 02/24/03 1.10 wvd Added subroutines of cf_extract
- * and char *cf_hist_file(char *);
- * 02/28/03 1.12 peb Added function definitions for
- * cf_rebin_and_flux_calibrate_backround,
- * cf_standard_or_optimal_extraction,
- * cf_optimal_extraction, and
- * cf_write_extracted_spectrum.
- * 03/04/03 1.13 peb Added astig_read_file,
- * astig_check_input_image,
- * astig_target_aperture
- * 03/05/03 1.14 wvd Added cf_target_count_rate
- * 03/07/03 1.15 peb Changed cf_error_init, added
- * cf_verbose, and made pha, timeflgs, and
- * loc_flgs function type consistent.
- * 03/11/03 1.16 wvd Changed channel from unsigned char to
- * char in a few subroutines.
- * 03/18/03 1.17 wvd variable argument list for cf_verbose
- * 03/25/03 1.18 peb variable argument list for cf_if_error
- * and cf_if_warning
- * 03/21/03 1.19 wvd Add flag for photon in pot hole
- * 04/01/03 1.21 wvd Delete cf_errmsg; obsolete
- * 04/08/03 1.22 wvd Change definition of cf_apply_filters
- * 04/09/03 1.23 wvd Add bad-pixel maps to calibration files.
- * 04/17/03 1.25 wvd Add final_call to cf_identify_channel
- * Add final_call and weight to
- * cf_calculate_y_centroid
- * 04/18/03 1.26 wvd Add cf_find_spectra
- * 04/21/03 1.27 wvd Modify cf_grating_motion,
- * cf_mirror_motion, and
- * cf_satellite_jitter.
- * Define FRAME_TOLERANCE.
- * 04/28/03 v1.28 wvd Modified cf_fuv_init not to extrapolate
- * the last two calibration files forward.
- * 05/10/03 v1.29 wvd Pass locflag to cf_set_photon_flags
- * 05/16/03 v1.30 wvd Add cf_make_mask.
- * Set PERFORM keywords for HIST data.
- * 05/28/03 v1.31 rdr Modified def of cf_optimal_extraction
- * and cf_write_extracted_spectrum
- * 05/30/03 v1.34 wvd Pass WEIGHTS to cf_set_photon_flags
- * 06/09/03 v1.35 rdr Change definition of cf_apply_filters
- * 06/11/03 v1.36 wvd Change HV array to type short.
- * 06/11/03 v1.37 wvd Pass datatype to cf_read_col and
- * cf_write_col.
- * 07/16/03 v1.38 wvd Move initialization routines to libcf
- * 07/23/03 v1.39 wvd Add HSKP_CAL to list of cal files
- * Increment OPUS_VERSION to 2.7
- * 08/01/03 v1.40 wvd Add cf_apply_dead_time to pipeline,
- * modify arguments of dead-time routines.
- * 08/04/03 v1.41 wvd Convert count-rate arrays to shorts.
- * 08/06/03 v1.42 wvd Delete GTI's from cf_satellite_jitter
- * 08/21/03 v1.43 wvd Change channel array to unsigned char
- * in subroutines of cf_remove_motion
- * 08/22/03 v1.44 wvd Add cf_get_extraction_limits.
- * 08/22/03 v1.45 wvd Change limits of extraction window
- * from type int to type short.
- * 08/25/03 v1.46 wvd Add cf_nint, change coltype in
- * cf_idf_io routines from string to int
- * 08/28/03 v1.47 wvd Modify structure saareg
- * 09/10/03 v1.48 wvd Define cf_set_user_gtis
- * Modify args of cf_screen_burst
- * 09/15/03 v1.49 wvd Add structure top_level_routines
- * Delete astig_read_file and
- * astig_target_aperture.
- * Modify args of cf_identify_channel
- * 10/02/03 v1.50 wvd Exchange PHA and GTI flags.
- * Change version number to 3.0.2.
- * 10/08/03 v1.51 wvd Change counts_out to type long
- * 10/26/03 v1.52 wvd Change arguments of cf_find_spectra
- * and cf_calculate_y_centroid.
- * 10/31/03 v1.53 wvd Change channel to unsigned char
- * throughout.
- * 11/26/03 v1.54 wvd Change aic_rate and fec_rate to float
- * throughout.
- * 12/21/03 v1.55 wvd Remove underscore from idf and bpm
- * filenames.
- * Change version number to 3.0.3.
- * 02/09/04 v1.56 wvd Employ new scheme for dead-time
- * correction. Add cf_nlong() and
- * cf_screen_fifo_overflow.
- * Change version number to 3.0.4.
- * 02/27/04 v1.57 rdr Change def of cf_thermal_distortion
- * 03/02/04 v1.58 wvd Implement WPC array in extraction
- * routine.
- * Add cf_x2lambda.
- * Change version number to 3.0.5.
- * 03/16/04 v1.59 wvd Delete WPC array.
- * Smooth HIST data in X.
- * Comment out cf_astig_farf.
- * Change version number to 3.0.6.
- * 04/05/04 v1.60 wvd Modify cf_geometric_distort to
- * rescale SPECBINY only for HIST data.
- * 04/09/04 v1.61 wvd Fix bugs in cf_optimal_extraction.
- * Change version number to 3.0.7.
- * 04/09/04 v1.62 bjg Define FILL_DATA and LOCATION_FILL
- * 04/26/04 v1.63 wvd Replace cf_rebin_and_flux_
- * calibrate_background with
- * cf_rebin_background.
- * Modify args to cf_optimal_extraction
- * and cf_find_spectra.
- * 06/02/04 v1.64 wvd Add cf_modify_hist_times.
- * Populate the header keywords
- * TIME_COR, COMB_COR, and QUIK_COR
- * Modify args to cf_calculate_y_centroid,
- * cf_find_spectra, cf_satellite_jitter,
- * cf_apply_filters, and
- * cf_write_extracted_spectrum.
- * Modify order of CALIBRATION_STEP_KEYS.
- * 08/19/04 v1.65 wvd Add FES definitions and subroutines.
- * 10/12/04 v1.66 wvd Change version number to 3.0.8
- * 02/01/05 v1.67 wvd Change version number to 3.1.0
- * Modify args to cf_screen_burst
- * 03/02/05 v1.68 wvd Add cf_modify_hist_pha and PHAH_COR.
- * Walk correct HIST data.
- * Change cf_ttag_bkgd to cf_scale_bkgd
- * and pass weights array to it.
- * Change cf_get_extraction_limits to
- * cf_extraction_limits; it now returns
- * X limits of extraction window.
- * Add cf_screen_airglow.
- * 03/22/05 v1.69 wvd Change TIME_SUNRISE and TIME_SUNSET
- * from floats to shorts.
- * 04/19/05 v1.70 wvd Change version number to 3.1.1
- * 06/15/05 v1.71 wvd BUG FIX: cf_extract_spectra always
- * read the point-source probability
- * array from WGTS_CAL file. Now uses
- * variable "extended" to determine
- * which HDU to read. Modify args to
- * cf_rebin_probability_array
- * Change version number to 3.1.2
- * Delete QUIK_COR from structure
- * CALIBRATION_STEP_KEYS.
- * 08/30/05 v1.72 wvd Define MAX_EXPTIME = 55000
- * Delete cf_read_fpa_pos
- * Change version number to 3.1.3
- * 09/19/05 v1.73 wvd Reinstall cf_read_fpa_pos, as it is
- * needed by ttag_combine.
- * 09/30/05 v1.74 wvd Change version number to 3.1.4
- * Pass photon array to
- * cf_screen_fifo_overflow.
- * 11/22/05 v1.75 wvd Add cf_screen_bad_pixels,
- * cf_screen_jitter, and
- * cf_get_potholes
- * Change version number to 3.1.5
- * 01/24/06 v1.76 wvd Change version number to 3.1.6
- * 02/03/06 v1.77 wvd Change version number to 3.1.7
- * 05/15/06 v1.78 wvd Divide cf_astigmatism_and_dispersion
- * into two separate routines. Incorporate
- * cf_x2lambda into cf_dispersion.
- * Change version number to 3.1.8
- * Delete cf_astig_farf.
- * 06/12/06 v1.79 wvd Add pole_ang.c
- * Change version number to 3.1.9
- * Add -a to cf_remove_motions
- * 11/02/06 v1.80 wvd Add cf_time_xy_distort.c
- * Change version number to 3.2.0
- * Add APER_COR to list of cal steps.
- * Change cf_screen_fifo_overflow to
- * cf_fifo_deadtime. Modify args to
- * it, cf_apply_dead_time, and
- * cf_target_count_rate. Run
- * cf_target_count_rate on HIST data.
- * 03/07/07 v1.81 wvd Modify arguments to space_vel.
- * 05/18/07 v1.82 wvd Change version number to 3.2.1.
- * 09/15/07 v1.83 bot Change version number to 3.2.2.
- * 10/16/07 v1.84 bot Added brackets in
- * FES_CALIBRATION_STEP_KEYS
- * and in CALIBRATION_FILE_KEYS.
- * 08/22/08 v1.85 wvd Change version number to 3.2.3.
- * Many changes to better handle
- * bright-earth observations &
- * 900-level airglow exposures.
- *
- ****************************************************************************/
-
-#include "calfitsio.h"
-
-#define CALFUSE_VERSION "3.2.3"
-
-#define LARGEMJD 9999999999.0
-#define OPUS_VERSION 2.7 /* Oldest compatible version of OPUS */
-#define PI 3.1415926535897932384626433832795028841971693993751
-#define RADIAN 0.017453292519943295769236907684886127134428718885417
-#define C 299792.458
-#define HC 1.98644746104e-8 /* erg A */
-#define MU 3.986005E5 /* km^3 s^-2 */
-#define RE 6371.00 /* km */
-#define RS 6.960E5
-#define AU 1.495978707E8
-#define FRAME_TOLERANCE 0.004
-
-#define FESPIX 266256 /* This is 516*516 */
-#define FILL_DATA 21865
-#define NXMAX 16384
-#define NYMAX 1024
-
-#define TEMPORAL_DAY (0x01<<0)
-#define TEMPORAL_LIMB (0x01<<1)
-#define TEMPORAL_SAA (0x01<<2)
-#define TEMPORAL_HV (0x01<<3)
-#define TEMPORAL_BRST (0x01<<4)
-#define TEMPORAL_OPUS (0x01<<5)
-#define TEMPORAL_JITR (0x01<<6)
-#define TEMPORAL_USER (0x01<<7)
-
-#define LOCATION_SHLD (0x01<<0)
-#define LOCATION_AIR (0x01<<1)
-#define LOCATION_STIML (0x01<<2)
-#define LOCATION_STIMR (0x01<<3)
-#define LOCATION_PHA (0x01<<4)
-#define LOCATION_BADPX (0x01<<5)
-#define LOCATION_FILL (0x01<<6)
-
-#define MAX_EXPTIME 55000
-
-struct fes_keyword_tab
-{
- char name[9];
- char value[8];
- char proc[18];
-};
-
-#define NUM_FES_PROC_STEPS 6
-
-#define FES_CALIBRATION_STEP_KEYS { \
- {"INIT_FES\0","PERFORM\0","cf_fes_init\0"},\
- {"MASK_FES\0","PERFORM\0","cf_fes_mask\0"},\
- {"BIAS_FES\0","PERFORM\0","cf_fes_bias\0"},\
- {"FLAT_FES\0","PERFORM\0","cf_fes_flat\0"},\
- {"UNDS_FES\0","PERFORM\0","cf_fes_undistort\0"},\
- {"FLUX_FES\0","PERFORM\0","cf_fes_flux\0"},\
-}
-
-#define NUM_FES_CAL_KEYS 5
-
-#define FES_CALIBRATION_FILE_KEYS { \
- "MASK",1,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
- "BIAS",2,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
- "FFLT",2,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
- "FGEO",1,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0,\
- "FFLX",2,"FCL","\0","\0","\0",0.0,0.0,LARGEMJD,0,0,0\
- }
-
-typedef struct {
- double ra_ap;
- double dec_ap;
- double limb;
-} orbital;
-
-typedef struct {
- long n_points;
- float *lat;
- float *lon;
-} saareg;
-
-typedef struct {
- long ntimes; /* The number of intervals */
- double *start; /* An array of starting times (in seconds) */
- double *stop; /* An array of stoping times (in seconds) */
-} GTI; /* Good Time Intervals */
-
-struct keyword_tab
-{
- char name[9];
- char hist_value[8];
- char hist_proc[32];
- char ttag_value[8];
- char ttag_proc[32];
-};
-
-#define NTOP_LEVEL_ROUTINES 11
-
-#define TOP_LEVEL_ROUTINES { \
- "cf_ttag_init", \
- "cf_hist_init", \
- "cf_convert_to_farf", \
- "cf_ttag_countmap", \
- "cf_ttag_gainmap", \
- "cf_remove_motions", \
- "cf_assign_wavelength", \
- "cf_screen_photons", \
- "cf_flux_calibrate", \
- "cf_bad_pixels", \
- "cf_extract_spectra" \
-}
-
-#define NUM_PROC_STEPS 40
-
-#define CALIBRATION_STEP_KEYS { \
- {"INIT_COR", "PERFORM", "cf_hist_init", "PERFORM", "cf_ttag_init"}, \
- {"DIGI_COR", "PERFORM", "cf_check_digitizer", "PERFORM", "cf_check_digitizer"}, \
- {"IDS__COR", "PERFORM", "cf_ids_dead_time", "PERFORM", "cf_ids_dead_time"}, \
- {"ELEC_COR", "PERFORM", "cf_electronics_dead_time", "PERFORM", "cf_electronics_dead_time"}, \
- {"FIFO_COR", "OMIT", "cf_fifo_dead_time", "PERFORM", "cf_fifo_dead_time"}, \
- {"DEAD_COR", "PERFORM", "cf_apply_dead_time", "PERFORM", "cf_apply_dead_time"}, \
- {"THRM_COR", "PERFORM", "cf_thermal_distort", "PERFORM", "cf_thermal_distort"}, \
- {"RATE_COR", "PERFORM", "cf_count_rate_y_distort", "PERFORM", "cf_count_rate_y_distort"}, \
- {"TMXY_COR", "PERFORM", "cf_time_xy_distort", "PERFORM", "cf_time_xy_distort"}, \
- {"GEOM_COR", "PERFORM", "cf_geometric_distort", "PERFORM", "cf_geometric_distort"}, \
- {"PHAH_COR", "PERFORM", "cf_modify_hist_pha", "OMIT", "cf_modify_hist_pha"}, \
- {"PHAX_COR", "PERFORM", "cf_pha_x_distort", "PERFORM", "cf_pha_x_distort"}, \
- {"ACTV_COR", "PERFORM", "cf_active_region", "PERFORM", "cf_active_region"}, \
- {"LIMB_COR", "PERFORM", "cf_screen_limb_angle", "PERFORM", "cf_screen_limb_angle"}, \
- {"SAA__COR", "PERFORM", "cf_screen_saa", "PERFORM", "cf_screen_saa"}, \
- {"VOLT_COR", "PERFORM", "cf_screen_high_voltage", "PERFORM", "cf_screen_high_voltage"}, \
- {"BRST_COR", "OMIT", "cf_screen_burst", "PERFORM", "cf_screen_burst"}, \
- {"APER_COR", "PERFORM", "cf_screen_jitter", "PERFORM", "cf_screen_jitter"}, \
- {"UGTI_COR", "OMIT", "cf_set_user_gtis", "PERFORM", "cf_set_user_gtis"}, \
- {"FLAG_COR", "PERFORM", "cf_set_photon_flags", "PERFORM", "cf_set_photon_flags"}, \
- {"GTI__COR", "PERFORM", "cf_set_good_time_intervals", "PERFORM", "cf_set_good_time_intervals"}, \
- {"TIME_COR", "PERFORM", "cf_modify_hist_times", "OMIT", "cf_modify_hist_times"}, \
- {"AIRG_COR", "PERFORM", "cf_screen_airglow", "PERFORM", "cf_screen_airglow"}, \
- {"BPIX_COR", "PERFORM", "cf_screen_bad_pixels", "PERFORM", "cf_screen_bad_pixels"}, \
- {"PHA__COR", "OMIT", "cf_screen_pulse_height", "PERFORM", "cf_screen_pulse_height"}, \
- {"FIND_COR", "PERFORM", "cf_find_spectra", "PERFORM", "cf_find_spectra"}, \
- {"YMOT_COR", "OMIT", "cf_calculate_ycent_motion", "PERFORM", "cf_calculate_ycent_motion"}, \
- {"GRAT_COR", "PERFORM", "cf_grating_motion", "PERFORM", "cf_grating_motion"}, \
- {"FPA__COR", "PERFORM", "cf_fpa_position", "PERFORM", "cf_fpa_position"}, \
- {"MIRR_COR", "PERFORM", "cf_mirror_motion", "PERFORM", "cf_mirror_motion"}, \
- {"JITR_COR", "OMIT", "cf_satellite_jitter", "PERFORM", "cf_satellite_jitter"}, \
- {"YCNT_COR", "PERFORM", "cf_calculate_y_centroid", "PERFORM", "cf_calculate_y_centroid"}, \
- {"CHID_COR", "PERFORM", "cf_identify_channel", "PERFORM", "cf_identify_channel"}, \
- {"TCRT_COR", "PERFORM", "cf_target_count_rate", "PERFORM", "cf_target_count_rate"}, \
- {"ASTG_COR", "PERFORM", "cf_astigmatism", "PERFORM", "cf_astigmatism"}, \
- {"WAVE_COR", "PERFORM", "cf_dispersion", "PERFORM", "cf_dispersion"}, \
- {"DOPP_COR", "PERFORM", "cf_doppler_and_heliocentric", "PERFORM", "cf_doppler_and_heliocentric"}, \
- {"FLAT_COR", "OMIT", "cf_flat_field", "OMIT", "cf_flat_field"}, \
- {"FLUX_COR", "PERFORM", "cf_convert_to_ergs", "PERFORM", "cf_convert_to_ergs"}, \
- {"COMB_COR", "PERFORM", "cf_coadd", "PERFORM", "cf_coadd"} \
-}
-
-
-struct cal_file_tab
-{
- char name[5];
- int numfiles;
- char extension[4];
- char filenames[3][19];
- float aftermjd[3];
- int interp[3];
-};
-
-#define NUMCALKEYS 28
-
-#define CALIBRATION_FILE_KEYS { \
- {"AEFF", 2, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"AIRG", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"ASTG", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"BCHR", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"BKGD", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"CHID", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"DIGI", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"ELEC", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"FLAT", 2, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"GEOM", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"GRAT", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"HSKP", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"JITR", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"MIRR", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"PARM", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"PHAH", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"PHAX", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"QUAL", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"RATE", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"TMXY", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"SAAC", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"SCRN", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"SPEC", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"STIM", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"VOLT", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"WAVE", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"WGTS", 1, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}},\
- {"WORM", 2, "CAL", {"", "", ""}, {0.0, 0.0, LARGEMJD}, {0, 0, 0}} \
-}
-
-extern int verbose_level;
-
-void cf_error_init(const char *, const char *, FILE *);
-void cf_verbose(int, const char *, ...);
-void cf_if_fits_error(int);
-void cf_if_warning(char *, ...);
-void cf_if_error(char *, ...);
-void *cf_malloc(size_t);
-void *cf_calloc(size_t, size_t);
-
-void cf_timestamp(const char *, const char *, char *);
-int cf_proc_check(fitsfile *, char *);
-int cf_proc_update(fitsfile *, char *, char *);
-int cf_fuv_init(fitsfile *);
-
-char *cf_cal_file(char *);
-char *cf_parm_file(char *);
-int eclipse(double *, double, double *);
-double geod_mag(double, double);
-double helio_vel(double, double, double);
-double lsrd_vel(double, double);
-double lsrk_vel(double, double);
-void month_day(int, int, int*, int*);
-void read_tle(fitsfile *);
-double pole_ang(double *, double *, double, double);
-double solar_ang(double, double, double);
-int saa(saareg *, double, double);
-double space_vel(double *, double, double);
-void state_geod(double *, double, double *, double *, double *);
-double state_limb(double *, double, double, double, double *,int *);
-void cf_velang(fitsfile *, double);
-int astig_check_input_image(fitsfile *);
-
-long cf_read_col(fitsfile *, int, char *, void **);
-int cf_write_col(fitsfile *, int, char *, void *, long);
-int cf_nint (double);
-long cf_nlong (double);
-
-int cf_fes_proc_check(fitsfile *, char *);
-int cf_fes_proc_update(fitsfile *, char *, char *);
-
-int cf_add_header_keywords(fitsfile *);
-long cf_get_times(fitsfile *, double **);
-int cf_get_gti(fitsfile *, double **, double **);
-int cf_get_geocorona(fitsfile *, short **, short **, short **, short **);
-int cf_get_potholes(fitsfile *, float **, float **, float **, float **);
-int cf_timeline(fitsfile *);
-int cf_set_background_limits(fitsfile *);
-long cf_extraction_limits(fitsfile *, int, int, short **, short **,
- short*, short*);
-
-int cf_check_digitizer(fitsfile *);
-int cf_ids_dead_time(fitsfile *, long, float *, float *);
-int cf_electronics_dead_time(fitsfile *, long, float *, float *);
-int cf_fifo_dead_time(fitsfile *, long, float *, long, float *, float *,
- float *);
-int cf_apply_dead_time(fitsfile *, long, float *, float *,
- long, float *, float *, float *);
-int cf_thermal_distort(fitsfile *, long, float *, float *, float *,
- unsigned char *);
-int cf_count_rate_y_distort(fitsfile *, long, float *, float *,
- unsigned char *, long, float *, float *);
-int cf_time_xy_distort(fitsfile *, long, float *, float *, unsigned char *);
-int cf_geometric_distort(fitsfile *, long, float *, float *,
- unsigned char *);
-int cf_modify_hist_pha(fitsfile *, long, unsigned char *, unsigned char *);
-int cf_pha_x_distort(fitsfile *, long, unsigned char *, float *,
- unsigned char *);
-int cf_active_region(fitsfile *, long, float *, float *, unsigned char *);
-
-int cf_find_spectra(fitsfile *, long, float *, float *, float *,
- unsigned char *, unsigned char *, unsigned char *, int);
-int cf_identify_channel(fitsfile *, long, float *, float *, unsigned char *,
- unsigned char *, int, int);
-int cf_calculate_ycent_motion(fitsfile*, long, float*, float*,
- unsigned char*, unsigned char*, long, float*, float*, float*);
-int cf_source_aper(fitsfile*, int*);
-int cf_grating_motion(fitsfile *, long, float *, float *, float *,
- unsigned char *, long, float *, short *);
-int cf_fpa_position(fitsfile *, long, float *, unsigned char *);
-int cf_read_fpa_pos (fitsfile *, float *, float *);
-int cf_mirror_motion(fitsfile *, long, float *, float *, float *,
- unsigned char *, long, float *, short *);
-int cf_satellite_jitter(fitsfile *, long, float *, float *, float *,
- unsigned char *, long, float *, unsigned char *);
-int cf_calculate_y_centroid(fitsfile*, long, float*, float*, float*,
- unsigned char*, unsigned char*, unsigned char*);
-int cf_target_count_rate(fitsfile *, long, float *, float *, unsigned char *,
- unsigned char *, long, float *, float *, float *);
-int cf_screen_limb_angle(fitsfile *, long, unsigned char *, float *);
-int cf_screen_saa(fitsfile *, long, unsigned char *, float *, float *);
-int cf_screen_airglow(fitsfile *, long, float *, float *, unsigned char *);
-int cf_screen_bad_pixels(fitsfile *, long, float *, float *, unsigned char *);
-int cf_screen_burst(fitsfile *, long, float *, float *, float *,
- unsigned char *, GTI *, long, float *, unsigned char *, float *,
- short *);
-int cf_screen_jitter(fitsfile *, long, float *, unsigned char *);
-int cf_set_user_gtis(fitsfile *, long, float *, unsigned char *);
-int cf_screen_high_voltage(fitsfile *, long, unsigned char *, short *);
-int cf_screen_pulse_height(fitsfile *, long, unsigned char *, unsigned char *);
-int cf_set_photon_flags(fitsfile *, long, float *, float *, unsigned char *,
- unsigned char *, long, float *, unsigned char *);
-int cf_set_good_time_intervals(fitsfile *, long, float *, unsigned char *,
- GTI *);
-int cf_modify_hist_times(fitsfile *, long, float *, GTI *);
-int cf_astigmatism(fitsfile *, long, float *, float *, unsigned char *);
-int cf_dispersion(fitsfile *, long , float *, unsigned char *, float *);
-int cf_doppler_and_heliocentric(fitsfile *, long, float *, unsigned char *,
- float *, long, float *, float *);
-int cf_convert_to_ergs(fitsfile *, long , float *, float *,
- unsigned char *, float *);
-int cf_apply_filters(fitsfile *, int, long, unsigned char *, unsigned char *,
- long, unsigned char *, long *, long *, long *, long **);
-int cf_scale_bkgd(fitsfile *, long, float *, float *, float *, unsigned char *,
- unsigned char *, unsigned char *, long,
- long *, long, long, int *, int *, int *, int *, int *, float **,
- int *, int *, int *, float **);
-int cf_make_mask(fitsfile *, int, long, float *, int, int, float **);
-int cf_make_wave_array(fitsfile *, int, long *, float **);
-int cf_rebin_probability_array(fitsfile *, int, int, long, float *, int *,
- float *, float **);
-int cf_rebin_background(fitsfile *, int, long, float *,
- int, int, int, int, float *, float **);
-int cf_standard_or_optimal_extraction(fitsfile *, int *);
-int cf_optimal_extraction(fitsfile *, int, int, float *, float *,
- unsigned char *, float *, long, long *, float *,
- float *, int, float, float *, long, float *, float **,
- float **, long **, float **, float **, short **);
-int cf_write_extracted_spectrum(fitsfile *, int, int, long, float *,
- float *, float *, long *, float *, float *, short *, char *);
-char *cf_hist_file(char *);
diff --git a/include/cfitsio/cfortran.h b/include/cfitsio/cfortran.h
deleted file mode 100644
index 0688224..0000000
--- a/include/cfitsio/cfortran.h
+++ /dev/null
@@ -1,2149 +0,0 @@
-/* cfortran.h 3.9 */ /* anonymous ftp@zebra.desy.de */
-/* Burkhard Burow burow@desy.de 1990 - 1997. */
-
-#ifndef __CFORTRAN_LOADED
-#define __CFORTRAN_LOADED
-
-/*
- THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU
- SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING,
- MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
-*/
-
-/*******
- Modifications:
- Oct 1997: Changed symbol name extname to appendus (PDW/HSTX)
- (Conflicted with a common variable name in FTOOLS)
- Nov 1997: If g77Fortran defined, also define f2cFortran (PDW/HSTX)
- Nov 1997: Define MIN(A,B) as _cfMIN(A,B)
- Feb 1998: Let VMS see the NUM_ELEMS code. Lets programs treat
- single strings as vectors with single elements
- *******/
-#define MIN(A,B) _cfMIN(A,B)
-
-/*
- Avoid symbols already used by compilers and system *.h:
- __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c
-
- */
-
-
-/* First prepare for the C compiler. */
-
-#ifndef ANSI_C_preprocessor /* i.e. user can override. */
-#ifdef __CF__KnR
-#define ANSI_C_preprocessor 0
-#else
-#ifdef __STDC__
-#define ANSI_C_preprocessor 1
-#else
-#define _cfleft 1
-#define _cfright
-#define _cfleft_cfright 0
-#define ANSI_C_preprocessor _cfleft/**/_cfright
-#endif
-#endif
-#endif
-
-#if ANSI_C_preprocessor
-#define _0(A,B) A##B
-#define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */
-#define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */
-#define _3(A,B,C) _(A,_(B,C))
-#else /* if it turns up again during rescanning. */
-#define _(A,B) A/**/B
-#define _2(A,B) A/**/B
-#define _3(A,B,C) A/**/B/**/C
-#endif
-
-#if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__))
-#define VAXUltrix
-#endif
-
-#include <stdio.h> /* NULL [in all machines stdio.h] */
-#include <string.h> /* strlen, memset, memcpy, memchr. */
-#if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) )
-#include <stdlib.h> /* malloc,free */
-#else
-#include <malloc.h> /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/
-#ifdef apollo
-#define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */
-#endif
-#endif
-
-#if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx))
-#define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */
- /* Manually define __CF__KnR for HP if desired/required.*/
-#endif /* i.e. We will generate Kernighan and Ritchie C. */
-/* Note that you may define __CF__KnR before #include cfortran.h, in order to
-generate K&R C instead of the default ANSI C. The differences are mainly in the
-function prototypes and declarations. All machines, except the Apollo, work
-with either style. The Apollo's argument promotion rules require ANSI or use of
-the obsolete std_$call which we have not implemented here. Hence on the Apollo,
-only C calling FORTRAN subroutines will work using K&R style.*/
-
-
-/* Remainder of cfortran.h depends on the Fortran compiler. */
-
-#if defined(CLIPPERFortran) || defined(g77Fortran) /* 11/3/97 PDW */
-#define f2cFortran
-#endif
-
-/* VAX/VMS does not let us \-split long #if lines. */
-/* Split #if into 2 because some HP-UX can't handle long #if */
-#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
-#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
-/* If no Fortran compiler is given, we choose one for the machines we know. */
-#if defined(lynx) || defined(VAXUltrix)
-#define f2cFortran /* Lynx: Only support f2c at the moment.
- VAXUltrix: f77 behaves like f2c.
- Support f2c or f77 with gcc, vcc with f2c.
- f77 with vcc works, missing link magic for f77 I/O.*/
-#endif
-#if defined(WIN32) || defined(macintosh)
-#define f2cFortran
-#endif
-#if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */
-#define hpuxFortran /* Should also allow hp9000s7/800 use.*/
-#endif
-#if defined(apollo)
-#define apolloFortran /* __CF__APOLLO67 also defines some behavior. */
-#endif
-#if defined(sun) || defined(__sun)
-#define sunFortran
-#endif
-#if defined(_IBMR2)
-#define IBMR2Fortran
-#endif
-#if defined(_CRAY)
-#define CRAYFortran /* _CRAYT3E also defines some behavior. */
-#endif
-#if defined(_SX)
-#define SXFortran
-#endif
-#if defined(mips) || defined(__mips)
-#define mipsFortran
-#endif
-#if defined(vms) || defined(__vms)
-#define vmsFortran
-#endif
-#if defined(__alpha) && defined(__unix__)
-#define DECFortran
-#endif
-#if defined(__convex__)
-#define CONVEXFortran
-#endif
-#if defined(VISUAL_CPLUSPLUS)
-#define PowerStationFortran
-#endif
-#endif /* ...Fortran */
-#endif /* ...Fortran */
-
-/* Split #if into 2 because some HP-UX can't handle long #if */
-#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
-#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
-/* If your compiler barfs on ' #error', replace # with the trigraph for # */
- #error "cfortran.h: Can't find your environment among:\
- - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \
- - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \
- - VAX VMS CC 3.1 and FORTRAN 5.4. \
- - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \
- - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \
- - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \
- - CRAY \
- - NEC SX-4 SUPER-UX \
- - CONVEX \
- - Sun \
- - PowerStation Fortran with Visual C++ \
- - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \
- - LynxOS: cc or gcc with f2c. \
- - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \
- - f77 with vcc works; but missing link magic for f77 I/O. \
- - NO fort. None of gcc, cc or vcc generate required names.\
- - f2c : Use #define f2cFortran, or cc -Df2cFortran \
- - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \
- - g77 v0.5.18 for linux \
- - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran"
-/* Compiler must throw us out at this point! */
-#endif
-#endif
-
-
-#if defined(VAXC) && !defined(__VAXC)
-#define OLD_VAXC
-#pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */
-#endif
-
-/* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */
-
-#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(appendus) /* 10/31/97 PDW */
-#define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */
-#define orig_fcallsc(UN,LN) CFC_(UN,LN)
-#else
-#if defined(CRAYFortran) || defined(PowerStationFortran)
-#ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */
-#define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
-#else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */
-#define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */
-#endif
-#define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */
-#else /* For following machines one may wish to change the fcallsc default. */
-#define CF_SAME_NAMESPACE
-#ifdef vmsFortran
-#define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */
- /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/
- /* because VAX/VMS doesn't do recursive macros. */
-#define orig_fcallsc(UN,LN) UN
-#else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */
-#define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */
-#define orig_fcallsc(UN,LN) CFC_(UN,LN)
-#endif /* vmsFortran */
-#endif /* CRAYFortran PowerStationFortran */
-#endif /* ....Fortran */
-
-#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
-#define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN))
-#define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p))
-
-#define C_FUNCTION(UN,LN) fcallsc(UN,LN)
-#define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN)
-
-#ifndef COMMON_BLOCK
-#ifndef CONVEXFortran
-#ifndef CLIPPERFortran
-#ifndef AbsoftUNIXFortran
-#define COMMON_BLOCK(UN,LN) CFC_(UN,LN)
-#else
-#define COMMON_BLOCK(UN,LN) _(_C,LN)
-#endif
-#else
-#define COMMON_BLOCK(UN,LN) _(LN,__)
-#endif
-#else
-#define COMMON_BLOCK(UN,LN) _3(_,LN,_)
-#endif
-#endif
-
-#ifndef DOUBLE_PRECISION
-#if defined(CRAYFortran) && !defined(_CRAYT3E)
-#define DOUBLE_PRECISION long double
-#else
-#define DOUBLE_PRECISION double
-#endif
-#endif
-
-#ifndef FORTRAN_REAL
-#if defined(CRAYFortran) && defined(_CRAYT3E)
-#define FORTRAN_REAL double
-#else
-#define FORTRAN_REAL float
-#endif
-#endif
-
-#ifdef CRAYFortran
-#ifdef _CRAY
-#include <fortran.h>
-#else
-#include "fortran.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-#define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */
-/* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/
-#define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine
- arg.'s have been declared float *, or double *. */
-#else
-#define FLOATVVVVVVV_cfPP
-#define VOIDP
-#endif
-
-#ifdef vmsFortran
-#if defined(vms) || defined(__vms)
-#include <descrip.h>
-#else
-#include "descrip.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-#endif
-
-#ifdef sunFortran
-#if defined(sun) || defined(__sun)
-#include <math.h> /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */
-#else
-#include "math.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-/* At least starting with the default C compiler SC3.0.1 of SunOS 5.3,
- * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in
- * <math.h>, since sun C no longer promotes C float return values to doubles.
- * Therefore, only use them if defined.
- * Even if gcc is being used, assume that it exhibits the Sun C compiler
- * behavior in order to be able to use *.o from the Sun C compiler.
- * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc.
- */
-#endif
-
-#ifndef apolloFortran
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) extern DEFINITION NAME
-#define CF_NULL_PROTO
-#else /* HP doesn't understand #elif. */
-/* Without ANSI prototyping, Apollo promotes float functions to double. */
-/* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */
-#define CF_NULL_PROTO ...
-#ifndef __CF__APOLLO67
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
- DEFINITION NAME __attribute((__section(NAME)))
-#else
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
- DEFINITION NAME #attribute[section(NAME)]
-#endif
-#endif
-
-#ifdef __cplusplus
-#undef CF_NULL_PROTO
-#define CF_NULL_PROTO ...
-#endif
-
-#ifdef mipsFortran
-#define CF_DECLARE_GETARG int f77argc; char **f77argv
-#define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV
-#else
-#define CF_DECLARE_GETARG
-#define CF_SET_GETARG(ARGC,ARGV)
-#endif
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define ACOMMA ,
-#define ACOLON ;
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES USED WITHIN CFORTRAN.H */
-
-#define _cfMIN(A,B) (A<B?A:B)
-#ifndef FALSE
-#define FALSE (1==0)
-#endif
-
-/* 970211 - XIX.145:
- firstindexlength - better name is all_but_last_index_lengths
- secondindexlength - better name is last_index_length
- */
-#define firstindexlength(A) (sizeof(A[0])==1 ? 1 : (sizeof(A) / sizeof(A[0])) )
-#define secondindexlength(A) (sizeof(A[0])==1 ? sizeof(A) : sizeof(A[0]) )
-
-/* Behavior of FORTRAN LOGICAL. All machines' LOGICAL is same size as C's int.
-Conversion is automatic except for arrays which require F2CLOGICALV/C2FLOGICALV.
-f2c, MIPS f77 [DECstation, SGI], VAX Ultrix f77,
-HP-UX f77 : as in C.
-VAX/VMS FORTRAN, VAX Ultrix fort,
-Absoft Unix Fortran, IBM RS/6000 xlf : LS Bit = 0/1 = TRUE/FALSE.
-Apollo : neg. = TRUE, else FALSE.
-[Apollo accepts -1 as TRUE for function values, but NOT all other neg. values.]
-[DECFortran for Ultrix RISC is also called f77 but is the same as VAX/VMS.]
-[MIPS f77 treats .eqv./.neqv. as .eq./.ne. and hence requires LOGICAL_STRICT.]*/
-
-#if defined(NAGf90Fortran) || defined(f2cFortran) || defined(mipsFortran) || defined(PowerStationFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(SXFortran)
-/* SX/PowerStationFortran have 0 and 1 defined, others are neither T nor F. */
-/* hpuxFortran800 has 0 and 0x01000000 defined. Others are unknown. */
-#define LOGICAL_STRICT /* Other Fortran have .eqv./.neqv. == .eq./.ne. */
-#endif
-
-#define C2FLOGICALV(A,I) \
- do {int __i; for(__i=0;__i<I;__i++) A[__i]=C2FLOGICAL(A[__i]); } while (FALSE)
-#define F2CLOGICALV(A,I) \
- do {int __i; for(__i=0;__i<I;__i++) A[__i]=F2CLOGICAL(A[__i]); } while (FALSE)
-
-#if defined(apolloFortran)
-#define C2FLOGICAL(L) ((L)?-1:(L)&~((unsigned)1<<sizeof(int)*8-1))
-#define F2CLOGICAL(L) ((L)<0?(L):0)
-#else
-#if defined(CRAYFortran)
-#define C2FLOGICAL(L) _btol(L)
-#define F2CLOGICAL(L) _ltob(&(L)) /* Strangely _ltob() expects a pointer. */
-#else
-#if defined(IBMR2Fortran) || defined(vmsFortran) || defined(DECFortran) || defined(AbsoftUNIXFortran)
-#define C2FLOGICAL(L) ((L)?(L)|1:(L)&~(int)1)
-#define F2CLOGICAL(L) ((L)&1?(L):0)
-#else
-#if defined(CONVEXFortran)
-#define C2FLOGICAL(L) ((L) ? ~0 : 0 )
-#define F2CLOGICAL(L) (L)
-#else /* others evaluate LOGICALs as for C. */
-#define C2FLOGICAL(L) (L)
-#define F2CLOGICAL(L) (L)
-#ifndef LOGICAL_STRICT
-#undef C2FLOGICALV
-#undef F2CLOGICALV
-#define C2FLOGICALV(A,I)
-#define F2CLOGICALV(A,I)
-#endif /* LOGICAL_STRICT */
-#endif /* CONVEXFortran || All Others */
-#endif /* IBMR2Fortran vmsFortran DECFortran AbsoftUNIXFortran */
-#endif /* CRAYFortran */
-#endif /* apolloFortran */
-
-/* 970514 - In addition to CRAY, there may be other machines
- for which LOGICAL_STRICT makes no sense. */
-#if defined(LOGICAL_STRICT) && !defined(CRAYFortran)
-/* Force C2FLOGICAL to generate only the values for either .TRUE. or .FALSE.
- SX/PowerStationFortran only have 0 and 1 defined.
- Elsewhere, only needed if you want to do:
- logical lvariable
- if (lvariable .eq. .true.) then ! (1)
- instead of
- if (lvariable .eqv. .true.) then ! (2)
- - (1) may not even be FORTRAN/77 and that Apollo's f77 and IBM's xlf
- refuse to compile (1), so you are probably well advised to stay away from
- (1) and from LOGICAL_STRICT.
- - You pay a (slight) performance penalty for using LOGICAL_STRICT. */
-#undef C2FLOGICAL
-#ifdef hpuxFortran800
-#define C2FLOGICAL(L) ((L)?0x01000000:0)
-#else
-#if defined(apolloFortran) || defined(vmsFortran) || defined(DECFortran)
-#define C2FLOGICAL(L) ((L)?-1:0) /* These machines use -1/0 for .true./.false.*/
-#else
-#define C2FLOGICAL(L) ((L)? 1:0) /* All others use +1/0 for .true./.false.*/
-#endif
-#endif
-#endif /* LOGICAL_STRICT */
-
-/* Convert a vector of C strings into FORTRAN strings. */
-#ifndef __CF__KnR
-static char *c2fstrv(char* cstr, char *fstr, int elem_len, int sizeofcstr)
-#else
-static char *c2fstrv( cstr, fstr, elem_len, sizeofcstr)
- char* cstr; char *fstr; int elem_len; int sizeofcstr;
-#endif
-{ int i,j;
-/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
- Useful size of string must be the same in both languages. */
-for (i=0; i<sizeofcstr/elem_len; i++) {
- for (j=1; j<elem_len && *cstr; j++) *fstr++ = *cstr++;
- cstr += 1+elem_len-j;
- for (; j<elem_len; j++) *fstr++ = ' ';
-} /* 95109 - Seems to be returning the original fstr. */
-return fstr-sizeofcstr+sizeofcstr/elem_len; }
-
-/* Convert a vector of FORTRAN strings into C strings. */
-#ifndef __CF__KnR
-static char *f2cstrv(char *fstr, char* cstr, int elem_len, int sizeofcstr)
-#else
-static char *f2cstrv( fstr, cstr, elem_len, sizeofcstr)
- char *fstr; char* cstr; int elem_len; int sizeofcstr;
-#endif
-{ int i,j;
-/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
- Useful size of string must be the same in both languages. */
-cstr += sizeofcstr;
-fstr += sizeofcstr - sizeofcstr/elem_len;
-for (i=0; i<sizeofcstr/elem_len; i++) {
- *--cstr = '\0';
- for (j=1; j<elem_len; j++) *--cstr = *--fstr;
-} return cstr; }
-
-/* kill the trailing char t's in string s. */
-#ifndef __CF__KnR
-static char *kill_trailing(char *s, char t)
-#else
-static char *kill_trailing( s, t) char *s; char t;
-#endif
-{char *e;
-e = s + strlen(s);
-if (e>s) { /* Need this to handle NULL string.*/
- while (e>s && *--e==t); /* Don't follow t's past beginning. */
- e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
-} return s; }
-
-/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally
-points to the terminating '\0' of s, but may actually point to anywhere in s.
-s's new '\0' will be placed at e or earlier in order to remove any trailing t's.
-If e<s string s is left unchanged. */
-#ifndef __CF__KnR
-static char *kill_trailingn(char *s, char t, char *e)
-#else
-static char *kill_trailingn( s, t, e) char *s; char t; char *e;
-#endif
-{
-if (e==s) *e = '\0'; /* Kill the string makes sense here.*/
-else if (e>s) { /* Watch out for neg. length string.*/
- while (e>s && *--e==t); /* Don't follow t's past beginning. */
- e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
-} return s; }
-
-/* Note the following assumes that any element which has t's to be chopped off,
-does indeed fill the entire element. */
-#ifndef __CF__KnR
-static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t)
-#else
-static char *vkill_trailing( cstr, elem_len, sizeofcstr, t)
- char* cstr; int elem_len; int sizeofcstr; char t;
-#endif
-{ int i;
-for (i=0; i<sizeofcstr/elem_len; i++) /* elem_len includes \0 for C strings. */
- kill_trailingn(cstr+elem_len*i,t,cstr+elem_len*(i+1)-1);
-return cstr; }
-
-#ifdef vmsFortran
-typedef struct dsc$descriptor_s fstring;
-#define DSC$DESCRIPTOR_A(DIMCT) \
-struct { \
- unsigned short dsc$w_length; unsigned char dsc$b_dtype; \
- unsigned char dsc$b_class; char *dsc$a_pointer; \
- char dsc$b_scale; unsigned char dsc$b_digits; \
- struct { \
- unsigned : 3; unsigned dsc$v_fl_binscale : 1; \
- unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; \
- unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; \
- } dsc$b_aflags; \
- unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; \
- char *dsc$a_a0; long dsc$l_m [DIMCT]; \
- struct { \
- long dsc$l_l; long dsc$l_u; \
- } dsc$bounds [DIMCT]; \
-}
-
-typedef DSC$DESCRIPTOR_A(1) fstringvector;
-/*typedef DSC$DESCRIPTOR_A(2) fstringarrarr;
- typedef DSC$DESCRIPTOR_A(3) fstringarrarrarr;*/
-#define initfstr(F,C,ELEMNO,ELEMLEN) \
-( (F).dsc$l_arsize= ( (F).dsc$w_length =(ELEMLEN) ) \
- *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO) ), \
- (F).dsc$a_a0 = ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length ,(F))
-
-#endif /* PDW: 2/10/98 -- Let VMS see NUM_ELEMS definitions */
-#define _NUM_ELEMS -1
-#define _NUM_ELEM_ARG -2
-#define NUM_ELEMS(A) A,_NUM_ELEMS
-#define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG
-#define TERM_CHARS(A,B) A,B
-#ifndef __CF__KnR
-static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term)
-#else
-static int num_elem( strv, elem_len, term_char, num_term)
- char *strv; unsigned elem_len; int term_char; int num_term;
-#endif
-/* elem_len is the number of characters in each element of strv, the FORTRAN
-vector of strings. The last element of the vector must begin with at least
-num_term term_char characters, so that this routine can determine how
-many elements are in the vector. */
-{
-unsigned num,i;
-if (num_term == _NUM_ELEMS || num_term == _NUM_ELEM_ARG)
- return term_char;
-if (num_term <=0) num_term = (int)elem_len;
-for (num=0; ; num++) {
- for (i=0; i<(unsigned)num_term && *strv==term_char; i++,strv++);
- if (i==(unsigned)num_term) break;
- else strv += elem_len-i;
-}
-return (int)num;
-}
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS */
-
-/* C string TO Fortran Common Block STRing. */
-/* DIM is the number of DIMensions of the array in terms of strings, not
- characters. e.g. char a[12] has DIM = 0, char a[12][4] has DIM = 1, etc. */
-#define C2FCBSTR(CSTR,FSTR,DIM) \
- c2fstrv((char *)CSTR, (char *)FSTR, sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM))
-
-/* Fortran Common Block string TO C STRing. */
-#define FCB2CSTR(FSTR,CSTR,DIM) \
- vkill_trailing(f2cstrv((char *)FSTR, (char *)CSTR, \
- sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM)), \
- sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM), ' ')
-
-#define cfDEREFERENCE0
-#define cfDEREFERENCE1 *
-#define cfDEREFERENCE2 **
-#define cfDEREFERENCE3 ***
-#define cfDEREFERENCE4 ****
-#define cfDEREFERENCE5 *****
-#define cfelementsof(A,D) (sizeof(A)/sizeof(_(cfDEREFERENCE,D)(A)))
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO CALL FORTRAN SUBROUTINES */
-
-/* Define lookup tables for how to handle the various types of variables. */
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#define ZTRINGV_NUM(I) I
-#define ZTRINGV_ARGFP(I) (*(_2(A,I))) /* Undocumented. For PINT, etc. */
-#define ZTRINGV_ARGF(I) _2(A,I)
-#ifdef CFSUBASFUN
-#define ZTRINGV_ARGS(I) ZTRINGV_ARGF(I)
-#else
-#define ZTRINGV_ARGS(I) _2(B,I)
-#endif
-
-#define PBYTE_cfVP(A,B) PINT_cfVP(A,B)
-#define PDOUBLE_cfVP(A,B)
-#define PFLOAT_cfVP(A,B)
-#ifdef ZTRINGV_ARGS_allows_Pvariables
-/* This allows Pvariables for ARGS. ARGF machinery is above ARGFP.
- * B is not needed because the variable may be changed by the Fortran routine,
- * but because B is the only way to access an arbitrary macro argument. */
-#define PINT_cfVP(A,B) int B = (int)A; /* For ZSTRINGV_ARGS */
-#else
-#define PINT_cfVP(A,B)
-#endif
-#define PLOGICAL_cfVP(A,B) int *B; /* Returning LOGICAL in FUNn and SUBn */
-#define PLONG_cfVP(A,B) PINT_cfVP(A,B)
-#define PSHORT_cfVP(A,B) PINT_cfVP(A,B)
-
-#define VCF_INT_S(T,A,B) _(T,VVVVVVV_cfTYPE) B = A;
-#define VCF_INT_F(T,A,B) _(T,_cfVCF)(A,B)
-/* _cfVCF table is directly mapped to _cfCCC table. */
-#define BYTE_cfVCF(A,B)
-#define DOUBLE_cfVCF(A,B)
-#if !defined(__CF__KnR)
-#define FLOAT_cfVCF(A,B)
-#else
-#define FLOAT_cfVCF(A,B) FORTRAN_REAL B = A;
-#endif
-#define INT_cfVCF(A,B)
-#define LOGICAL_cfVCF(A,B)
-#define LONG_cfVCF(A,B)
-#define SHORT_cfVCF(A,B)
-
-#define VCF(TN,I) _Icf4(4,V,TN,_(A,I),_(B,I),F)
-#define VVCF(TN,AI,BI) _Icf4(4,V,TN,AI,BI,S)
-#define INT_cfV(T,A,B,F) _(VCF_INT_,F)(T,A,B)
-#define INTV_cfV(T,A,B,F)
-#define INTVV_cfV(T,A,B,F)
-#define INTVVV_cfV(T,A,B,F)
-#define INTVVVV_cfV(T,A,B,F)
-#define INTVVVVV_cfV(T,A,B,F)
-#define INTVVVVVV_cfV(T,A,B,F)
-#define INTVVVVVVV_cfV(T,A,B,F)
-#define PINT_cfV( T,A,B,F) _(T,_cfVP)(A,B)
-#define PVOID_cfV( T,A,B,F)
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfV(T,A,B,F) void (*B)(CF_NULL_PROTO) = (void (*)(CF_NULL_PROTO))A;
-#else
-#define ROUTINE_cfV(T,A,B,F)
-#endif
-#define SIMPLE_cfV(T,A,B,F)
-#ifdef vmsFortran
-#define STRING_cfV(T,A,B,F) static struct {fstring f; unsigned clen;} B = \
- {{0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL},0};
-#define PSTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
-#define STRINGV_cfV(T,A,B,F) static fstringvector B = \
- {sizeof(A),DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
-#define PSTRINGV_cfV(T,A,B,F) static fstringvector B = \
- {0,DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
-#else
-#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
-#define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen;} B;
-#define PSTRING_cfV(T,A,B,F) int B;
-#define PSTRINGV_cfV(T,A,B,F) struct{char *fs; unsigned int sizeofA,flen;}B;
-#endif
-#define ZTRINGV_cfV(T,A,B,F) STRINGV_cfV(T,A,B,F)
-#define PZTRINGV_cfV(T,A,B,F) PSTRINGV_cfV(T,A,B,F)
-
-/* Note that the actions of the A table were performed inside the AA table.
- VAX Ultrix vcc, and HP-UX cc, didn't evaluate arguments to functions left to
- right, so we had to split the original table into the current robust two. */
-#define ACF(NAME,TN,AI,I) _(TN,_cfSTR)(4,A,NAME,I,AI,_(B,I),0)
-#define DEFAULT_cfA(M,I,A,B)
-#define LOGICAL_cfA(M,I,A,B) B=C2FLOGICAL(B);
-#define PLOGICAL_cfA(M,I,A,B) A=C2FLOGICAL(A);
-#define STRING_cfA(M,I,A,B) STRING_cfC(M,I,A,B,sizeof(A))
-#define PSTRING_cfA(M,I,A,B) PSTRING_cfC(M,I,A,B,sizeof(A))
-#ifdef vmsFortran
-#define AATRINGV_cfA( A,B, sA,filA,silA) \
- initfstr(B,(char *)malloc((sA)-(filA)),(filA),(silA)-1), \
- c2fstrv(A,B.dsc$a_pointer,(silA),(sA));
-#define APATRINGV_cfA( A,B, sA,filA,silA) \
- initfstr(B,A,(filA),(silA)-1),c2fstrv(A,A,(silA),(sA));
-#else
-#define AATRINGV_cfA( A,B, sA,filA,silA) \
- (B.s=(char *)malloc((sA)-(filA)),B.fs=c2fstrv(A,B.s,(B.flen=(silA)-1)+1,(sA)));
-#define APATRINGV_cfA( A,B, sA,filA,silA) \
- B.fs=c2fstrv(A,A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
-#endif
-#define STRINGV_cfA(M,I,A,B) \
- AATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
-#define PSTRINGV_cfA(M,I,A,B) \
- APATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
-#define ZTRINGV_cfA(M,I,A,B) AATRINGV_cfA( (char *)A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-#define PZTRINGV_cfA(M,I,A,B) APATRINGV_cfA( (char *)A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-
-#define PBYTE_cfAAP(A,B) &A
-#define PDOUBLE_cfAAP(A,B) &A
-#define PFLOAT_cfAAP(A,B) FLOATVVVVVVV_cfPP &A
-#define PINT_cfAAP(A,B) &A
-#define PLOGICAL_cfAAP(A,B) B= &A /* B used to keep a common W table. */
-#define PLONG_cfAAP(A,B) &A
-#define PSHORT_cfAAP(A,B) &A
-
-#define AACF(TN,AI,I,C) _SEP_(TN,C,COMMA) _Icf(3,AA,TN,AI,_(B,I))
-#define INT_cfAA(T,A,B) &B
-#define INTV_cfAA(T,A,B) _(T,VVVVVV_cfPP) A
-#define INTVV_cfAA(T,A,B) _(T,VVVVV_cfPP) A[0]
-#define INTVVV_cfAA(T,A,B) _(T,VVVV_cfPP) A[0][0]
-#define INTVVVV_cfAA(T,A,B) _(T,VVV_cfPP) A[0][0][0]
-#define INTVVVVV_cfAA(T,A,B) _(T,VV_cfPP) A[0][0][0][0]
-#define INTVVVVVV_cfAA(T,A,B) _(T,V_cfPP) A[0][0][0][0][0]
-#define INTVVVVVVV_cfAA(T,A,B) _(T,_cfPP) A[0][0][0][0][0][0]
-#define PINT_cfAA(T,A,B) _(T,_cfAAP)(A,B)
-#define PVOID_cfAA(T,A,B) (void *) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfAA(T,A,B) &B
-#else
-#define ROUTINE_cfAA(T,A,B) (void(*)(CF_NULL_PROTO))A
-#endif
-#define STRING_cfAA(T,A,B) STRING_cfCC(T,A,B)
-#define PSTRING_cfAA(T,A,B) PSTRING_cfCC(T,A,B)
-#ifdef vmsFortran
-#define STRINGV_cfAA(T,A,B) &B
-#else
-#ifdef CRAYFortran
-#define STRINGV_cfAA(T,A,B) _cptofcd(B.fs,B.flen)
-#else
-#define STRINGV_cfAA(T,A,B) B.fs
-#endif
-#endif
-#define PSTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-#define ZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-#define PZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define JCF(TN,I)
-#define KCF(TN,I)
-#else
-#define JCF(TN,I) _(TN,_cfSTR)(1,J,_(B,I), 0,0,0,0)
-#if defined(AbsoftUNIXFortran)
-#define DEFAULT_cfJ(B) ,0
-#else
-#define DEFAULT_cfJ(B)
-#endif
-#define LOGICAL_cfJ(B) DEFAULT_cfJ(B)
-#define PLOGICAL_cfJ(B) DEFAULT_cfJ(B)
-#define STRING_cfJ(B) ,B.flen
-#define PSTRING_cfJ(B) ,B
-#define STRINGV_cfJ(B) STRING_cfJ(B)
-#define PSTRINGV_cfJ(B) STRING_cfJ(B)
-#define ZTRINGV_cfJ(B) STRING_cfJ(B)
-#define PZTRINGV_cfJ(B) STRING_cfJ(B)
-
-/* KCF is identical to DCF, except that KCF ZTRING is not empty. */
-#define KCF(TN,I) _(TN,_cfSTR)(1,KK,_(B,I), 0,0,0,0)
-#if defined(AbsoftUNIXFortran)
-#define DEFAULT_cfKK(B) , unsigned B
-#else
-#define DEFAULT_cfKK(B)
-#endif
-#define LOGICAL_cfKK(B) DEFAULT_cfKK(B)
-#define PLOGICAL_cfKK(B) DEFAULT_cfKK(B)
-#define STRING_cfKK(B) , unsigned B
-#define PSTRING_cfKK(B) STRING_cfKK(B)
-#define STRINGV_cfKK(B) STRING_cfKK(B)
-#define PSTRINGV_cfKK(B) STRING_cfKK(B)
-#define ZTRINGV_cfKK(B) STRING_cfKK(B)
-#define PZTRINGV_cfKK(B) STRING_cfKK(B)
-#endif
-
-#define WCF(TN,AN,I) _(TN,_cfSTR)(2,W,AN,_(B,I), 0,0,0)
-#define DEFAULT_cfW(A,B)
-#define LOGICAL_cfW(A,B)
-#define PLOGICAL_cfW(A,B) *B=F2CLOGICAL(*B);
-#define STRING_cfW(A,B) (A[B.clen]!='\0'?A[B.clen]='\0':0); /* A?="constnt"*/
-#define PSTRING_cfW(A,B) kill_trailing(A,' ');
-#ifdef vmsFortran
-#define STRINGV_cfW(A,B) free(B.dsc$a_pointer);
-#define PSTRINGV_cfW(A,B) \
- vkill_trailing(f2cstrv((char*)A, (char*)A, \
- B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0]), \
- B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0], ' ');
-#else
-#define STRINGV_cfW(A,B) free(B.s);
-#define PSTRINGV_cfW(A,B) vkill_trailing( \
- f2cstrv((char*)A,(char*)A,B.flen+1,B.sizeofA), B.flen+1,B.sizeofA,' ');
-#endif
-#define ZTRINGV_cfW(A,B) STRINGV_cfW(A,B)
-#define PZTRINGV_cfW(A,B) PSTRINGV_cfW(A,B)
-
-#define NCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,N,TN,_(A,I),0)
-#define NNCF(TN,I,C) UUCF(TN,I,C)
-#define NNNCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,N,TN,_(A,I),0)
-#define INT_cfN(T,A) _(T,VVVVVVV_cfTYPE) * A
-#define INTV_cfN(T,A) _(T,VVVVVV_cfTYPE) * A
-#define INTVV_cfN(T,A) _(T,VVVVV_cfTYPE) * A
-#define INTVVV_cfN(T,A) _(T,VVVV_cfTYPE) * A
-#define INTVVVV_cfN(T,A) _(T,VVV_cfTYPE) * A
-#define INTVVVVV_cfN(T,A) _(T,VV_cfTYPE) * A
-#define INTVVVVVV_cfN(T,A) _(T,V_cfTYPE) * A
-#define INTVVVVVVV_cfN(T,A) _(T,_cfTYPE) * A
-#define PINT_cfN(T,A) _(T,_cfTYPE) * A
-#define PVOID_cfN(T,A) void * A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfN(T,A) void (**A)(CF_NULL_PROTO)
-#else
-#define ROUTINE_cfN(T,A) void ( *A)(CF_NULL_PROTO)
-#endif
-#ifdef vmsFortran
-#define STRING_cfN(T,A) fstring * A
-#define STRINGV_cfN(T,A) fstringvector * A
-#else
-#ifdef CRAYFortran
-#define STRING_cfN(T,A) _fcd A
-#define STRINGV_cfN(T,A) _fcd A
-#else
-#define STRING_cfN(T,A) char * A
-#define STRINGV_cfN(T,A) char * A
-#endif
-#endif
-#define PSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PNSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PPSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PSTRINGV_cfN(T,A) STRINGV_cfN(T,A)
-#define ZTRINGV_cfN(T,A) STRINGV_cfN(T,A)
-#define PZTRINGV_cfN(T,A) PSTRINGV_cfN(T,A)
-
-
-/* Apollo 6.7, CRAY, old Sun, VAX/Ultrix vcc/cc and new ultrix
- can't hack more than 31 arg's.
- e.g. ultrix >= 4.3 gives message:
- zow35> cc -c -DDECFortran cfortest.c
- cfe: Fatal: Out of memory: cfortest.c
- zow35>
- Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine
- if using -Aa, otherwise we have a problem.
- */
-#ifndef MAX_PREPRO_ARGS
-#if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR)))
-#define MAX_PREPRO_ARGS 31
-#else
-#define MAX_PREPRO_ARGS 99
-#endif
-#endif
-
-#if defined(AbsoftUNIXFortran)
-/* In addition to explicit Absoft stuff, only Absoft requires:
- - DEFAULT coming from _cfSTR.
- DEFAULT could have been called e.g. INT, but keep it for clarity.
- - M term in CFARGT14 and CFARGT14FS.
- */
-#define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0)
-#define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0)
-#define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0)
-#define DEFAULT_cfABSOFT1
-#define LOGICAL_cfABSOFT1
-#define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING
-#define DEFAULT_cfABSOFT2
-#define LOGICAL_cfABSOFT2
-#define STRING_cfABSOFT2 ,unsigned D0
-#define DEFAULT_cfABSOFT3
-#define LOGICAL_cfABSOFT3
-#define STRING_cfABSOFT3 ,D0
-#else
-#define ABSOFT_cf1(T0)
-#define ABSOFT_cf2(T0)
-#define ABSOFT_cf3(T0)
-#endif
-
-/* _Z introduced to cicumvent IBM and HP silly preprocessor warning.
- e.g. "Macro CFARGT14 invoked with a null argument."
- */
-#define _Z
-
-#define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
- S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E)
-#define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
- M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-
-#if !(defined(PowerStationFortran)||defined(hpuxFortran800))
-/* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields:
- SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c
- "c.c", line 406: warning: argument mismatch
- Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok.
- Behavior is most clearly seen in example:
- #define A 1 , 2
- #define C(X,Y,Z) x=X. y=Y. z=Z.
- #define D(X,Y,Z) C(X,Y,Z)
- D(x,A,z)
- Output from preprocessor is: x = x . y = 1 . z = 2 .
- #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-*/
-#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
- M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- Z(T1,1,0) Z(T2,2,1) Z(T3,3,1) Z(T4,4,1) Z(T5,5,1) Z(T6,6,1) Z(T7,7,1) \
- Z(T8,8,1) Z(T9,9,1) Z(TA,A,1) Z(TB,B,1) Z(TC,C,1) Z(TD,D,1) Z(TE,E,1) \
- Z(TF,F,1) Z(TG,G,1) Z(TH,H,1) Z(TI,I,1) Z(TJ,J,1) Z(TK,K,1) \
- S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
- S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E) \
- S(TF,F) S(TG,G) S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
-#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
- F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
- F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,A,1) F(TB,AB,B,1) F(TC,AC,C,1) \
- F(TD,AD,D,1) F(TE,AE,E,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
- S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
- S(TB,B) S(TC,C) S(TD,D) S(TE,E)
-#if MAX_PREPRO_ARGS>31
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- Z(T1,A1,1,0) Z(T2,A2,2,1) Z(T3,A3,3,1) Z(T4,A4,4,1) Z(T5,A5,5,1) Z(T6,A6,6,1) \
- Z(T7,A7,7,1) Z(T8,A8,8,1) Z(T9,A9,9,1) Z(TA,AA,A,1) Z(TB,AB,B,1) Z(TC,AC,C,1) \
- Z(TD,AD,D,1) Z(TE,AE,E,1) Z(TF,AF,F,1) Z(TG,AG,G,1) Z(TH,AH,H,1) Z(TI,AI,I,1) \
- Z(TJ,AJ,J,1) Z(TK,AK,K,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
- S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
- S(TB,B) S(TC,C) S(TD,D) S(TE,E) S(TF,F) S(TG,G) \
- S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
-#endif
-#else
-#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
- F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
- F(T9,9,1) S(T9,9) F(TA,A,1) S(TA,A) F(TB,B,1) S(TB,B) F(TC,C,1) S(TC,C) \
- F(TD,D,1) S(TD,D) F(TE,E,1) S(TE,E)
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- Z(T1,1,0) S(T1,1) Z(T2,2,1) S(T2,2) Z(T3,3,1) S(T3,3) Z(T4,4,1) S(T4,4) \
- Z(T5,5,1) S(T5,5) Z(T6,6,1) S(T6,6) Z(T7,7,1) S(T7,7) Z(T8,8,1) S(T8,8) \
- Z(T9,9,1) S(T9,9) Z(TA,A,1) S(TA,A) Z(TB,B,1) S(TB,B) Z(TC,C,1) S(TC,C) \
- Z(TD,D,1) S(TD,D) Z(TE,E,1) S(TE,E) Z(TF,F,1) S(TF,F) Z(TG,G,1) S(TG,G) \
- Z(TH,H,1) S(TH,H) Z(TI,I,1) S(TI,I) Z(TJ,J,1) S(TJ,J) Z(TK,K,1) S(TK,K)
-#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
- F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
- F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
- F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
- F(TA,AA,A,1) S(TA,A) F(TB,AB,B,1) S(TB,B) F(TC,AC,C,1) S(TC,C) \
- F(TD,AD,D,1) S(TD,D) F(TE,AE,E,1) S(TE,E)
-#if MAX_PREPRO_ARGS>31
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- Z(T1,A1,1,0) S(T1,1) Z(T2,A2,2,1) S(T2,2) Z(T3,A3,3,1) S(T3,3) \
- Z(T4,A4,4,1) S(T4,4) Z(T5,A5,5,1) S(T5,5) Z(T6,A6,6,1) S(T6,6) \
- Z(T7,A7,7,1) S(T7,7) Z(T8,A8,8,1) S(T8,8) Z(T9,A9,9,1) S(T9,9) \
- Z(TA,AA,A,1) S(TA,A) Z(TB,AB,B,1) S(TB,B) Z(TC,AC,C,1) S(TC,C) \
- Z(TD,AD,D,1) S(TD,D) Z(TE,AE,E,1) S(TE,E) Z(TF,AF,F,1) S(TF,F) \
- Z(TG,AG,G,1) S(TG,G) Z(TH,AH,H,1) S(TH,H) Z(TI,AI,I,1) S(TI,I) \
- Z(TJ,AJ,J,1) S(TJ,J) Z(TK,AK,K,1) S(TK,K)
-#endif
-#endif
-
-
-#define PROTOCCALLSFSUB1( UN,LN,T1) \
- PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB2( UN,LN,T1,T2) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-
-#define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
-#define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
-
-
-#ifndef FCALLSC_QUALIFIER
-#ifdef VISUAL_CPLUSPLUS
-#define FCALLSC_QUALIFIER __stdcall
-#else
-#define FCALLSC_QUALIFIER
-#endif
-#endif
-
-#ifdef __cplusplus
-#define CFextern extern "C"
-#else
-#define CFextern extern
-#endif
-
-
-#ifdef CFSUBASFUN
-#define PROTOCCALLSFSUB0(UN,LN) \
- PROTOCCALLSFFUN0( VOID,UN,LN)
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
- PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#else
-/* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after
- #include-ing cfortran.h if calling the FORTRAN wrapper within the same
- source code where the wrapper is created. */
-#define PROTOCCALLSFSUB0(UN,LN) CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)();
-#ifndef __CF__KnR
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) );
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
- CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT20(NCF,KCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) );
-#else
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFSUB0(UN,LN)
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- PROTOCCALLSFSUB0(UN,LN)
-#endif
-#endif
-
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-
-#define CCALLSFSUB1( UN,LN,T1, A1) \
- CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
-#define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \
- CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
-#define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \
- CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
-#define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
- CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
-#define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
-#define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
-#define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
-#define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
-#define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
-#define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
-#define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
-#define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
-#define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
-
-#ifdef __cplusplus
-#define CPPPROTOCLSFSUB0( UN,LN)
-#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#else
-#define CPPPROTOCLSFSUB0(UN,LN) \
- PROTOCCALLSFSUB0(UN,LN)
-#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#endif
-
-#ifdef CFSUBASFUN
-#define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN)
-#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)
-#else
-/* do{...}while(FALSE) allows if(a==b) FORT(); else BORT(); */
-#define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(FALSE)
-#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
-do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
- VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
- VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) \
- CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \
- ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \
- ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) \
- ACF(LN,TC,AC,C) ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) \
- CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
- WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) }while(FALSE)
-#endif
-
-
-#if MAX_PREPRO_ARGS>31
-#define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0)
-#define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0)
-#define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0)
-#define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0)
-#define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0)
-
-#ifdef CFSUBASFUN
-#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK)
-#else
-#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
-do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
- VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
- VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) VVCF(TF,AF,BF) \
- VVCF(TG,AG,BG) VVCF(TH,AH,BH) VVCF(TI,AI,BI) VVCF(TJ,AJ,BJ) VVCF(TK,AK,BK) \
- CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
- ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
- ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) ACF(LN,TC,AC,C) \
- ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) ACF(LN,TF,AF,F) ACF(LN,TG,AG,G) \
- ACF(LN,TH,AH,H) ACF(LN,TI,AI,I) ACF(LN,TJ,AJ,J) ACF(LN,TK,AK,K) \
- CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
- WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) WCF(TB,AB,B) WCF(TC,AC,C) \
- WCF(TD,AD,D) WCF(TE,AE,E) WCF(TF,AF,F) WCF(TG,AG,G) WCF(TH,AH,H) WCF(TI,AI,I) \
- WCF(TJ,AJ,J) WCF(TK,AK,K) }while(FALSE)
-#endif
-#endif /* MAX_PREPRO_ARGS */
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */
-
-/*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN
- function is called. Therefore, especially for creator's of C header files
- for large FORTRAN libraries which include many functions, to reduce
- compile time and object code size, it may be desirable to create
- preprocessor directives to allow users to create code for only those
- functions which they use. */
-
-/* The following defines the maximum length string that a function can return.
- Of course it may be undefine-d and re-define-d before individual
- PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived
- from the individual machines' limits. */
-#define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE
-
-/* The following defines a character used by CFORTRAN.H to flag the end of a
- string coming out of a FORTRAN routine. */
-#define CFORTRAN_NON_CHAR 0x7F
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#define _SEP_(TN,C,COMMA) _(__SEP_,C)(TN,COMMA)
-#define __SEP_0(TN,COMMA)
-#define __SEP_1(TN,COMMA) _Icf(2,SEP,TN,COMMA,0)
-#define INT_cfSEP(T,B) _(A,B)
-#define INTV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PINT_cfSEP(T,B) INT_cfSEP(T,B)
-#define PVOID_cfSEP(T,B) INT_cfSEP(T,B)
-#define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B)
-#define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B)
-#define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/
-#define STRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define STRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-
-#if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE)
-#ifdef OLD_VAXC
-#define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */
-#else
-#define INTEGER_BYTE signed char /* default */
-#endif
-#else
-#define INTEGER_BYTE unsigned char
-#endif
-#define BYTEVVVVVVV_cfTYPE INTEGER_BYTE
-#define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION
-#define FLOATVVVVVVV_cfTYPE FORTRAN_REAL
-#define INTVVVVVVV_cfTYPE int
-#define LOGICALVVVVVVV_cfTYPE int
-#define LONGVVVVVVV_cfTYPE long
-#define SHORTVVVVVVV_cfTYPE short
-#define PBYTE_cfTYPE INTEGER_BYTE
-#define PDOUBLE_cfTYPE DOUBLE_PRECISION
-#define PFLOAT_cfTYPE FORTRAN_REAL
-#define PINT_cfTYPE int
-#define PLOGICAL_cfTYPE int
-#define PLONG_cfTYPE long
-#define PSHORT_cfTYPE short
-
-#define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A)
-#define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V)
-#define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W)
-#define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X)
-#define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y)
-#define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z)
-
-#define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0)
-#define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z)
-#define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0)
-#define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0)
-#define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0)
-#define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0)
-#define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0)
-#define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0)
-#define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0)
-#define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-/*CRAY coughs on the first,
- i.e. the usual trouble of not being able to
- define macros to macros with arguments.
- New ultrix is worse, it coughs on all such uses.
- */
-/*#define SIMPLE_cfINT PVOID_cfINT*/
-#define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define CF_0_cfINT(N,A,B,X,Y,Z)
-
-
-#define UCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,U,TN,_(A,I),0)
-#define UUCF(TN,I,C) _SEP_(TN,C,COMMA) _SEP_(TN,1,I)
-#define UUUCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,U,TN,_(A,I),0)
-#define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A
-#define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A
-#define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A
-#define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A
-#define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A
-#define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A
-#define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A
-#define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A
-#define PINT_cfU(T,A) _(T,_cfTYPE) * A
-#define PVOID_cfU(T,A) void *A
-#define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO)
-#define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */
-#define STRING_cfU(T,A) char *A /* via VOID and wrapper. */
-#define STRINGV_cfU(T,A) char *A
-#define PSTRING_cfU(T,A) char *A
-#define PSTRINGV_cfU(T,A) char *A
-#define ZTRINGV_cfU(T,A) char *A
-#define PZTRINGV_cfU(T,A) char *A
-
-/* VOID breaks U into U and UU. */
-#define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
-#define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */
-#define STRING_cfUU(T,A) char *A
-
-
-#define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A
-#define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A
-#else
-#define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
-#endif
-#define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A
-#define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A
-#define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A
-#define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A
-#define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A
-#define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A
-
-#define BYTE_cfE INTEGER_BYTE A0;
-#define DOUBLE_cfE DOUBLE_PRECISION A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfE FORTRAN_REAL A0;
-#else
-#define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0;
-#endif
-#define INT_cfE int A0;
-#define LOGICAL_cfE int A0;
-#define LONG_cfE long A0;
-#define SHORT_cfE short A0;
-#define VOID_cfE
-#ifdef vmsFortran
-#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- static fstring A0 = \
- {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\
- memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
- *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
-#else
-#ifdef CRAYFortran
-#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\
- memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
- A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING);
-#else
-/* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1];
- * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */
-#define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- memset(A0, CFORTRAN_NON_CHAR, \
- MAX_LEN_FORTRAN_FUNCTION_STRING); \
- *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
-#endif
-#endif
-/* ESTRING must use static char. array which is guaranteed to exist after
- function returns. */
-
-/* N.B.i) The diff. for 0 (Zero) and >=1 arguments.
- ii)That the following create an unmatched bracket, i.e. '(', which
- must of course be matched in the call.
- iii)Commas must be handled very carefully */
-#define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)(
-#define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)(
-#ifdef vmsFortran
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0
-#else
-#if defined(CRAYFortran) || defined(AbsoftUNIXFortran)
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0
-#else
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING
-#endif
-#endif
-
-#define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN)
-#define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN)
-#define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/
-
-#define BYTEVVVVVVV_cfPP
-#define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */
-#define DOUBLEVVVVVVV_cfPP
-#define LOGICALVVVVVVV_cfPP
-#define LONGVVVVVVV_cfPP
-#define SHORTVVVVVVV_cfPP
-#define PBYTE_cfPP
-#define PINT_cfPP
-#define PDOUBLE_cfPP
-#define PLOGICAL_cfPP
-#define PLONG_cfPP
-#define PSHORT_cfPP
-#define PFLOAT_cfPP FLOATVVVVVVV_cfPP
-
-#define BCF(TN,AN,C) _SEP_(TN,C,COMMA) _Icf(2,B,TN,AN,0)
-#define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A
-#define INTV_cfB(T,A) A
-#define INTVV_cfB(T,A) (A)[0]
-#define INTVVV_cfB(T,A) (A)[0][0]
-#define INTVVVV_cfB(T,A) (A)[0][0][0]
-#define INTVVVVV_cfB(T,A) (A)[0][0][0][0]
-#define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0]
-#define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0]
-#define PINT_cfB(T,A) _(T,_cfPP)&A
-#define STRING_cfB(T,A) (char *) A
-#define STRINGV_cfB(T,A) (char *) A
-#define PSTRING_cfB(T,A) (char *) A
-#define PSTRINGV_cfB(T,A) (char *) A
-#define PVOID_cfB(T,A) (void *) A
-#define ROUTINE_cfB(T,A) (void(*)(CF_NULL_PROTO))A
-#define ZTRINGV_cfB(T,A) (char *) A
-#define PZTRINGV_cfB(T,A) (char *) A
-
-#define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0)
-#define DEFAULT_cfS(M,I,A)
-#define LOGICAL_cfS(M,I,A)
-#define PLOGICAL_cfS(M,I,A)
-#define STRING_cfS(M,I,A) ,sizeof(A)
-#define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \
- +secondindexlength(A))
-#define PSTRING_cfS(M,I,A) ,sizeof(A)
-#define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A)
-#define ZTRINGV_cfS(M,I,A)
-#define PZTRINGV_cfS(M,I,A)
-
-#define HCF(TN,I) _(TN,_cfSTR)(3,H,COMMA, H,_(C,I),0,0)
-#define HHCF(TN,I) _(TN,_cfSTR)(3,H,COMMA,HH,_(C,I),0,0)
-#define HHHCF(TN,I) _(TN,_cfSTR)(3,H,COLON, H,_(C,I),0,0)
-#define H_CF_SPECIAL unsigned
-#define HH_CF_SPECIAL
-#define DEFAULT_cfH(M,I,A)
-#define LOGICAL_cfH(S,U,B)
-#define PLOGICAL_cfH(S,U,B)
-#define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B
-#define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define ZTRINGV_cfH(S,U,B)
-#define PZTRINGV_cfH(S,U,B)
-
-/* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */
-/* No spaces inside expansion. They screws up macro catenation kludge. */
-#define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E)
-#define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E)
-#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E)
-#define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E)
-#define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E)
-#define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E)
-#define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E)
-#define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E)
-#define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E)
-#define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E)
-#define CF_0_cfSTR(N,T,A,B,C,D,E)
-
-/* See ACF table comments, which explain why CCF was split into two. */
-#define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I))
-#define DEFAULT_cfC(M,I,A,B,C)
-#define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A);
-#define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A);
-#ifdef vmsFortran
-#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \
- C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \
- (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0'));
- /* PSTRING_cfC to beware of array A which does not contain any \0. */
-#define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \
- B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \
- memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1));
-#else
-#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A), \
- C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \
- (memset((A)+B.clen,' ',C-B.clen-1),A[B.flen=C-1]='\0'));
-#define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \
- (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1));
-#endif
- /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */
-#define STRINGV_cfC(M,I,A,B,C) \
- AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
-#define PSTRINGV_cfC(M,I,A,B,C) \
- APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
-#define ZTRINGV_cfC(M,I,A,B,C) \
- AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
-#define PZTRINGV_cfC(M,I,A,B,C) \
- APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
-
-#define BYTE_cfCCC(A,B) &A
-#define DOUBLE_cfCCC(A,B) &A
-#if !defined(__CF__KnR)
-#define FLOAT_cfCCC(A,B) &A
- /* Although the VAX doesn't, at least the */
-#else /* HP and K&R mips promote float arg.'s of */
-#define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */
-#endif /* use A here to pass the argument to FORTRAN. */
-#define INT_cfCCC(A,B) &A
-#define LOGICAL_cfCCC(A,B) &A
-#define LONG_cfCCC(A,B) &A
-#define SHORT_cfCCC(A,B) &A
-#define PBYTE_cfCCC(A,B) A
-#define PDOUBLE_cfCCC(A,B) A
-#define PFLOAT_cfCCC(A,B) A
-#define PINT_cfCCC(A,B) A
-#define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */
-#define PLONG_cfCCC(A,B) A
-#define PSHORT_cfCCC(A,B) A
-
-#define CCCF(TN,I,M) _SEP_(TN,M,COMMA) _Icf(3,CC,TN,_(A,I),_(B,I))
-#define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
-#define INTV_cfCC(T,A,B) A
-#define INTVV_cfCC(T,A,B) A
-#define INTVVV_cfCC(T,A,B) A
-#define INTVVVV_cfCC(T,A,B) A
-#define INTVVVVV_cfCC(T,A,B) A
-#define INTVVVVVV_cfCC(T,A,B) A
-#define INTVVVVVVV_cfCC(T,A,B) A
-#define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
-#define PVOID_cfCC(T,A,B) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfCC(T,A,B) &A
-#else
-#define ROUTINE_cfCC(T,A,B) A
-#endif
-#define SIMPLE_cfCC(T,A,B) A
-#ifdef vmsFortran
-#define STRING_cfCC(T,A,B) &B.f
-#define STRINGV_cfCC(T,A,B) &B
-#define PSTRING_cfCC(T,A,B) &B
-#define PSTRINGV_cfCC(T,A,B) &B
-#else
-#ifdef CRAYFortran
-#define STRING_cfCC(T,A,B) _cptofcd(A,B.flen)
-#define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen)
-#define PSTRING_cfCC(T,A,B) _cptofcd(A,B)
-#define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen)
-#else
-#define STRING_cfCC(T,A,B) A
-#define STRINGV_cfCC(T,A,B) B.fs
-#define PSTRING_cfCC(T,A,B) A
-#define PSTRINGV_cfCC(T,A,B) B.fs
-#endif
-#endif
-#define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B)
-#define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B)
-
-#define BYTE_cfX return A0;
-#define DOUBLE_cfX return A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfX return A0;
-#else
-#define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0;
-#endif
-#define INT_cfX return A0;
-#define LOGICAL_cfX return F2CLOGICAL(A0);
-#define LONG_cfX return A0;
-#define SHORT_cfX return A0;
-#define VOID_cfX return ;
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define STRING_cfX return kill_trailing( \
- kill_trailing(AA0,CFORTRAN_NON_CHAR),' ');
-#else
-#define STRING_cfX return kill_trailing( \
- kill_trailing( A0,CFORTRAN_NON_CHAR),' ');
-#endif
-
-#define CFFUN(NAME) _(__cf__,NAME)
-
-/* Note that we don't use LN here, but we keep it for consistency. */
-#define CCALLSFFUN0(UN,LN) CFFUN(UN)()
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define CCALLSFFUN1( UN,LN,T1, A1) \
- CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
-#define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \
- CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
-#define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \
- CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
-#define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
- CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
-#define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
-#define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
-#define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
-#define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
-#define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
-#define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
-#define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
-#define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
-#define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
-
-#define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
-((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \
- BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \
- BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \
- SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \
- SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \
- SCF(T9,LN,9,A9) SCF(TA,LN,A,AA) SCF(TB,LN,B,AB) SCF(TC,LN,C,AC) \
- SCF(TD,LN,D,AD))))
-
-/* N.B. Create a separate function instead of using (call function, function
-value here) because in order to create the variables needed for the input
-arg.'s which may be const.'s one has to do the creation within {}, but these
-can never be placed within ()'s. Therefore one must create wrapper functions.
-gcc, on the other hand may be able to avoid the wrapper functions. */
-
-/* Prototypes are needed to correctly handle the value returned correctly. N.B.
-Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN
-functions returning strings have extra arg.'s. Don't bother, since this only
-causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn
-for the same function in the same source code. Something done by the experts in
-debugging only.*/
-
-#define PROTOCCALLSFFUN0(F,UN,LN) \
-_(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \
-static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)}
-
-#define PROTOCCALLSFFUN1( T0,UN,LN,T1) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0)
-#define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0)
-#define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
-#define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
-#define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-/* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */
-
-#ifndef __CF__KnR
-#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
- CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
-{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
- CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
- CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
- CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
- CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
- WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
-#else
-#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
- CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
- CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \
-{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
- CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
- CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
- CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
- CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
- WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
-#endif
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR FORTRAN TO CALL C ROUTINES */
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define DCF(TN,I)
-#define DDCF(TN,I)
-#define DDDCF(TN,I)
-#else
-#define DCF(TN,I) HCF(TN,I)
-#define DDCF(TN,I) HHCF(TN,I)
-#define DDDCF(TN,I) HHHCF(TN,I)
-#endif
-
-#define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0)
-#define DEFAULT_cfQ(B)
-#define LOGICAL_cfQ(B)
-#define PLOGICAL_cfQ(B)
-#define STRINGV_cfQ(B) char *B; unsigned int _(B,N);
-#define STRING_cfQ(B) char *B=NULL;
-#define PSTRING_cfQ(B) char *B=NULL;
-#define PSTRINGV_cfQ(B) STRINGV_cfQ(B)
-#define PNSTRING_cfQ(B) char *B=NULL;
-#define PPSTRING_cfQ(B)
-
-#ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */
-#define ROUTINE_orig *(void**)&
-#else
-#define ROUTINE_orig (void *)
-#endif
-
-#define ROUTINE_1 ROUTINE_orig
-#define ROUTINE_2 ROUTINE_orig
-#define ROUTINE_3 ROUTINE_orig
-#define ROUTINE_4 ROUTINE_orig
-#define ROUTINE_5 ROUTINE_orig
-#define ROUTINE_6 ROUTINE_orig
-#define ROUTINE_7 ROUTINE_orig
-#define ROUTINE_8 ROUTINE_orig
-#define ROUTINE_9 ROUTINE_orig
-#define ROUTINE_10 ROUTINE_orig
-#define ROUTINE_11 ROUTINE_orig
-#define ROUTINE_12 ROUTINE_orig
-#define ROUTINE_13 ROUTINE_orig
-#define ROUTINE_14 ROUTINE_orig
-
-#define TCF(NAME,TN,I,M) _SEP_(TN,M,COMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I))
-#define BYTE_cfT(M,I,A,B,D) *A
-#define DOUBLE_cfT(M,I,A,B,D) *A
-#define FLOAT_cfT(M,I,A,B,D) *A
-#define INT_cfT(M,I,A,B,D) *A
-#define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A)
-#define LONG_cfT(M,I,A,B,D) *A
-#define SHORT_cfT(M,I,A,B,D) *A
-#define BYTEV_cfT(M,I,A,B,D) A
-#define DOUBLEV_cfT(M,I,A,B,D) A
-#define FLOATV_cfT(M,I,A,B,D) VOIDP A
-#define INTV_cfT(M,I,A,B,D) A
-#define LOGICALV_cfT(M,I,A,B,D) A
-#define LONGV_cfT(M,I,A,B,D) A
-#define SHORTV_cfT(M,I,A,B,D) A
-#define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/
-#define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */
-#define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */
-#define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */
-#define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */
-#define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */
-#define DOUBLEVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define PBYTE_cfT(M,I,A,B,D) A
-#define PDOUBLE_cfT(M,I,A,B,D) A
-#define PFLOAT_cfT(M,I,A,B,D) VOIDP A
-#define PINT_cfT(M,I,A,B,D) A
-#define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
-#define PLONG_cfT(M,I,A,B,D) A
-#define PSHORT_cfT(M,I,A,B,D) A
-#define PVOID_cfT(M,I,A,B,D) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A)
-#else
-#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A
-#endif
-/* A == pointer to the characters
- D == length of the string, or of an element in an array of strings
- E == number of elements in an array of strings */
-#define TTSTR( A,B,D) \
- ((B=(char*)malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' '))
-#define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \
- memchr(A,'\0',D) ?A : TTSTR(A,B,D)
-#define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=(char*)malloc(_(B,N)*(D+1)), (void *) \
- vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' '))
-#ifdef vmsFortran
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
- A->dsc$w_length , A->dsc$l_m[0])
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer
-#else
-#ifdef CRAYFortran
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A))
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \
- num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I)))
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A))
-#define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A)
-#else
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D)
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I)))
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D)
-#define PPSTRING_cfT(M,I,A,B,D) A
-#endif
-#endif
-#define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D)
-#define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D)
-#define CF_0_cfT(M,I,A,B,D)
-
-#define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0)
-#define DEFAULT_cfR(A,B,D)
-#define LOGICAL_cfR(A,B,D)
-#define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
-#define STRING_cfR(A,B,D) if (B) free(B);
-#define STRINGV_cfR(A,B,D) free(B);
-/* A and D as defined above for TSTRING(V) */
-#define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \
- (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), free(B);
-#define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), free(B);
-#ifdef vmsFortran
-#define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length)
-#else
-#ifdef CRAYFortran
-#define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A))
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A))
-#else
-#define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D)
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D)
-#endif
-#endif
-#define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D)
-#define PPSTRING_cfR(A,B,D)
-
-#define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#ifndef __CF__KnR
-/* The void is req'd by the Apollo, to make this an ANSI function declaration.
- The Apollo promotes K&R float functions to double. */
-#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
-#ifdef vmsFortran
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
-#else
-#ifdef CRAYFortran
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS
-#else
-#if defined(AbsoftUNIXFortran)
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS
-#else
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0
-#endif
-#endif
-#endif
-#else
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#else
-#define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#endif
-#if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran)
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS
-#else
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0
-#endif
-#endif
-
-#define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN)
-#define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN)
-#ifndef __CF_KnR
-#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#else
-#define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN)
-#endif
-#define INT_cfF(UN,LN) INT_cfFZ(UN,LN)
-#define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN)
-#define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN)
-#define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN)
-#define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN)
-#define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN),
-
-#define INT_cfFF
-#define VOID_cfFF
-#ifdef vmsFortran
-#define STRING_cfFF fstring *AS;
-#else
-#ifdef CRAYFortran
-#define STRING_cfFF _fcd AS;
-#else
-#define STRING_cfFF char *AS; unsigned D0;
-#endif
-#endif
-
-#define INT_cfL A0=
-#define STRING_cfL A0=
-#define VOID_cfL
-
-#define INT_cfK
-#define VOID_cfK
-/* KSTRING copies the string into the position provided by the caller. */
-#ifdef vmsFortran
-#define STRING_cfK \
- memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\
- AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \
- memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \
- AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0;
-#else
-#ifdef CRAYFortran
-#define STRING_cfK \
- memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \
- _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \
- memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \
- _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0;
-#else
-#define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \
- D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \
- ' ', D0-(A0==NULL?0:strlen(A0))):0;
-#endif
-#endif
-
-/* Note that K.. and I.. can't be combined since K.. has to access data before
-R.., in order for functions returning strings which are also passed in as
-arguments to work correctly. Note that R.. frees and hence may corrupt the
-string. */
-#define BYTE_cfI return A0;
-#define DOUBLE_cfI return A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfI return A0;
-#else
-#define FLOAT_cfI RETURNFLOAT(A0);
-#endif
-#define INT_cfI return A0;
-#ifdef hpuxFortran800
-/* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */
-#define LOGICAL_cfI return ((A0)?1:0);
-#else
-#define LOGICAL_cfI return C2FLOGICAL(A0);
-#endif
-#define LONG_cfI return A0;
-#define SHORT_cfI return A0;
-#define STRING_cfI return ;
-#define VOID_cfI return ;
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN)
-#define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1)
-#define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2)
-#define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3)
-#define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \
- FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4)
-#define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \
- FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5)
-#define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \
- FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6)
-#define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7)
-#define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8)
-#define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9)
-#define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA)
-#define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB)
-#define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC)
-#define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD)
-#define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-
-#define FCALLSCFUN1( T0,CN,UN,LN,T1) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0)
-#define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0)
-#define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0)
-#define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
-#define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
-#define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
-#define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-#ifndef __CF__KnR
-#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
- TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) }
-#else
-#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \
- CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
- TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)}
-#endif
-
-
-#endif /* __CFORTRAN_LOADED */
diff --git a/include/cfitsio/compress.h b/include/cfitsio/compress.h
deleted file mode 100644
index 7e3c406..0000000
--- a/include/cfitsio/compress.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/* compress.h -- definitions for the decompression routines used in CFITSIO */
-
-/* Blatantly copied and modified from the original gzip-1.2.4 source code. */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-/* 'near' is only relevant for 16-bit PC with small memory model */
-# define near
-
-#if defined(VAXC) || defined(VMS)
-# define RECORD_IO 1
-#else
-# define RECORD_IO 0
-#endif
-
-#define get_char() get_byte()
-
-/* gzip.h -- common declarations for all gzip modules */
-
-#define OF(args) args
-typedef void *voidp;
-
-#define memzero(s, n) memset ((voidp)(s), 0, (n))
-
-typedef unsigned char uch;
-typedef unsigned short ush;
-typedef unsigned long ulg;
-
-/* Return codes from gzip */
-#define OK 0
-#define ERROR 1
-#define WARNING 2
-
-/* Compression methods (see algorithm.doc) */
-#define STORED 0
-#define COMPRESSED 1
-#define PACKED 2
-#define LZHED 3
-/* methods 4 to 7 reserved */
-#define DEFLATED 8
-#define MAX_METHODS 9
-
-#define INBUFSIZ 0x8000 /* input buffer size */
-#define INBUF_EXTRA 64 /* required by unlzw() */
-#define OUTBUFSIZ 16384 /* output buffer size */
-#define OUTBUF_EXTRA 2048 /* required by unlzw() */
-#define DIST_BUFSIZE 0x8000 /* buffer for distances, see trees.c */
-#define WSIZE 0x8000 /* window size--must be a power of two, and */
-
-#define DECLARE(type, array, size) type array[size]
-
-#define tab_suffix window
-#define tab_prefix prev /* hash link (see deflate.c) */
-#define head (prev+WSIZE) /* hash head (see deflate.c) */
-
-#define PACK_MAGIC "\037\036" /* Magic header for packed files */
-#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */
-#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */
-#define LZH_MAGIC "\037\240" /* Magic header for SCO LZH Compress files*/
-#define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */
-#define PKZIP_MAGIC "\120\113\003\004" /* Magic header for pkzip files */
-
-/* gzip flag byte */
-#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
-#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
-#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
-#define COMMENT 0x10 /* bit 4 set: file comment present */
-#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
-#define RESERVED 0xC0 /* bit 6,7: reserved */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-#define MAX_DIST (WSIZE-MIN_LOOKAHEAD)
-#define translate_eol 0 /* no option -a yet */
-
-#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0))
-#define try_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(1))
-#define put_ubyte(c) {window[outcnt++]=(uch)(c); if (outcnt==WSIZE)\
- flush_window();}
-
-/* Macros for getting two-byte and four-byte header values */
-#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8))
-#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16))
-
-/* Diagnostic functions */
-# define Assert(cond,msg)
-# define Trace(x)
-# define Tracev(x)
-# define Tracevv(x)
-# define Tracec(c,x)
-# define Tracecv(c,x)
-
-/* lzw.h -- define the lzw functions. */
-
-#ifndef BITS
-# define BITS 16
-#endif
-#define INIT_BITS 9 /* Initial number of bits per code */
-#define BIT_MASK 0x1f /* Mask for 'number of compression bits' */
-#define BLOCK_MODE 0x80
-#define LZW_RESERVED 0x60 /* reserved bits */
-#define CLEAR 256 /* flush the dictionary */
-#define FIRST (CLEAR+1) /* first free entry */
-
-/* prototypes */
-
-#define local static
-void ffpmsg(const char *err_message);
-
-local int get_method OF((FILE *in));
-
-local ulg updcrc OF((uch *s, unsigned n));
-local int fill_inbuf OF((int eof_ok));
-local void flush_outbuf OF((void));
-local void flush_window OF((void));
-local void write_buf OF((voidp buf, unsigned cnt));
-local void error OF((char *m));
-local ulg flush_block OF((char *buf, ulg stored_len, int eof));
-typedef int file_t; /* Do not use stdio */
-#define NO_FILE (-1) /* in memory compression */
-local int file_read OF((char *buf, unsigned size));
-local void send_bits OF((int value, int length));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup OF((void));
-local void copy_block OF((char *buf, unsigned len, int header));
-local int (*read_buf) OF((char *buf, unsigned size));
-local void lm_init OF((int pack_level, ush *flags));
-local ulg deflate OF((void));
-local void ct_init OF((ush *attr, int *method));
-local int ct_tally OF((int dist, int lc));
-local void bi_init OF((file_t zipfile));
-
-#define put_byte(c) {outbuf[outcnt++]=(uch)(c); if (outcnt==OUTBUFSIZ)\
- flush_outbuf();}
-
-/* Output a 16 bit value, lsb first */
-#define put_short(w) \
-{ if (outcnt < OUTBUFSIZ-2) { \
- outbuf[outcnt++] = (uch) ((w) & 0xff); \
- outbuf[outcnt++] = (uch) ((ush)(w) >> 8); \
- } else { \
- put_byte((uch)((w) & 0xff)); \
- put_byte((uch)((ush)(w) >> 8)); \
- } \
-}
-
-/* Output a 32 bit value to the bit stream, lsb first */
-#define put_long(n) { \
- put_short((n) & 0xffff); \
- put_short(((ulg)(n)) >> 16); \
-}
-
-#define seekable() 0 /* force sequential output */
-
-/* io.c */
-local void fillbuf OF((int n));
-local unsigned getbits OF((int n));
-local void init_getbits OF((void));
-
-/* maketbl.c */
-local void make_table OF((int nchar, uch bitlen[],
- int tablebits, ush table[]));
-
-/* huf.c */
-local void read_pt_len OF((int nn, int nbit, int i_special));
-local void read_c_len OF((void));
-local unsigned decode_c OF((void));
-local unsigned decode_p OF((void));
-local void huf_decode_start OF((void));
-
-/* decode.c */
-local void decode_start OF((void));
-local unsigned decode OF((unsigned count, uch buffer[]));
-
-local int unlzh OF((FILE *in, FILE *out));
-local int unlzw OF((FILE *in, FILE *out));
-
-local void read_tree OF((void));
-local void build_tree_unpack OF((void));
-
-local int unpack OF((FILE *in, FILE *out));
-local int check_zipfile OF((FILE *in));
-local int unzip OF((FILE *in, FILE *out));
-
-int (*work) OF((FILE *infile, FILE *outfile)) = unzip; /* function to call */
-
-/* inflate.c */
-struct huft {
- uch e; /* number of extra bits or operation */
- uch b; /* number of bits in this code or subcode */
- union {
- ush n; /* literal, length base, or distance base */
- struct huft *t; /* pointer to next level of table */
- } v;
-};
-
-local int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *,
- struct huft **, int *));
-local int huft_free OF((struct huft *));
-local int inflate_codes OF((struct huft *, struct huft *, int, int));
-local int inflate_stored OF((void));
-local int inflate_fixed OF((void));
-local int inflate_dynamic OF((void));
-local int inflate_block OF((int *));
-local int inflate OF((void));
-
-/* end of compress.h include file */
diff --git a/include/cfitsio/drvrsmem.h b/include/cfitsio/drvrsmem.h
deleted file mode 100644
index cd63810..0000000
--- a/include/cfitsio/drvrsmem.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* S H A R E D M E M O R Y D R I V E R
- =======================================
-
- by Jerzy.Borkowski@obs.unige.ch
-
-09-Mar-98 : initial version 1.0 released
-23-Mar-98 : shared_malloc now accepts new handle as an argument
-*/
-
-
-#include <sys/ipc.h> /* this is necessary for Solaris/Linux */
-#include <sys/shm.h>
-#include <sys/sem.h>
-
-#ifdef _AIX
-#include <fcntl.h>
-#else
-#include <sys/fcntl.h>
-#endif
-
- /* configuration parameters */
-
-#define SHARED_MAXSEG (16) /* maximum number of shared memory blocks */
-
-#define SHARED_KEYBASE (14011963) /* base for shared memory keys, may be overriden by getenv */
-#define SHARED_FDNAME ("/tmp/.shmem-lockfile") /* template for lock file name */
-
-#define SHARED_ENV_KEYBASE ("SHMEM_LIB_KEYBASE") /* name of environment variable */
-#define SHARED_ENV_MAXSEG ("SHMEM_LIB_MAXSEG") /* name of environment variable */
-
- /* useful constants */
-
-#define SHARED_RDONLY (0) /* flag for shared_(un)lock, lock for read */
-#define SHARED_RDWRITE (1) /* flag for shared_(un)lock, lock for write */
-#define SHARED_WAIT (0) /* flag for shared_lock, block if cannot lock immediate */
-#define SHARED_NOWAIT (2) /* flag for shared_lock, fail if cannot lock immediate */
-#define SHARED_NOLOCK (0x100) /* flag for shared_validate function */
-
-#define SHARED_RESIZE (4) /* flag for shared_malloc, object is resizeable */
-#define SHARED_PERSIST (8) /* flag for shared_malloc, object is not deleted after last proc detaches */
-
-#define SHARED_INVALID (-1) /* invalid handle for semaphore/shared memory */
-
-#define SHARED_EMPTY (0) /* entries for shared_used table */
-#define SHARED_USED (1)
-
-#define SHARED_GRANUL (16384) /* granularity of shared_malloc allocation = phys page size, system dependent */
-
-
-
- /* checkpoints in shared memory segments - might be omitted */
-
-#define SHARED_ID_0 ('J') /* first byte of identifier in BLKHEAD */
-#define SHARED_ID_1 ('B') /* second byte of identifier in BLKHEAD */
-
-#define BLOCK_REG (0) /* value for tflag member of BLKHEAD */
-#define BLOCK_SHARED (1) /* value for tflag member of BLKHEAD */
-
- /* generic error codes */
-
-#define SHARED_OK (0)
-
-#define SHARED_ERR_MIN_IDX SHARED_BADARG
-#define SHARED_ERR_MAX_IDX SHARED_NORESIZE
-
-
-#define DAL_SHM_FREE (0)
-#define DAL_SHM_USED (1)
-
-#define DAL_SHM_ID0 ('D')
-#define DAL_SHM_ID1 ('S')
-#define DAL_SHM_ID2 ('M')
-
-#define DAL_SHM_SEGHEAD_ID (0x19630114)
-
-
-
- /* data types */
-
-/* BLKHEAD object is placed at the beginning of every memory segment (both
- shared and regular) to allow automatic recognition of segments type */
-
-typedef union
- { struct BLKHEADstruct
- { char ID[2]; /* ID = 'JB', just as a checkpoint */
- char tflag; /* is it shared memory or regular one ? */
- int handle; /* this is not necessary, used only for non-resizeable objects via ptr */
- } s;
- double d; /* for proper alignment on every machine */
- } BLKHEAD;
-
-typedef void *SHARED_P; /* generic type of shared memory pointer */
-
-typedef struct SHARED_GTABstruct /* data type used in global table */
- { int sem; /* access semaphore (1 field): process count */
- int semkey; /* key value used to generate semaphore handle */
- int key; /* key value used to generate shared memory handle (realloc changes it) */
- int handle; /* handle of shared memory segment */
- int size; /* size of shared memory segment */
- int nprocdebug; /* attached proc counter, helps remove zombie segments */
- char attr; /* attributes of shared memory object */
- } SHARED_GTAB;
-
-typedef struct SHARED_LTABstruct /* data type used in local table */
- { BLKHEAD *p; /* pointer to segment (may be null) */
- int tcnt; /* number of threads in this process attached to segment */
- int lkcnt; /* >=0 <- number of read locks, -1 - write lock */
- long seekpos; /* current pointer position, read/write/seek operations change it */
- } SHARED_LTAB;
-
-
- /* system dependent definitions */
-
-#ifndef HAVE_FLOCK_T
-typedef struct flock flock_t;
-#define HAVE_FLOCK_T
-#endif
-
-#ifndef HAVE_UNION_SEMUN
-union semun
- { int val;
- struct semid_ds *buf;
- unsigned short *array;
- };
-#define HAVE_UNION_SEMUN
-#endif
-
-
-typedef struct DAL_SHM_SEGHEAD_STRUCT DAL_SHM_SEGHEAD;
-
-struct DAL_SHM_SEGHEAD_STRUCT
- { int ID; /* ID for debugging */
- int h; /* handle of sh. mem */
- int size; /* size of data area */
- int nodeidx; /* offset of root object (node struct typically) */
- };
-
- /* API routines */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void shared_cleanup(void); /* must be called at exit/abort */
-int shared_init(int debug_msgs); /* must be called before any other shared memory routine */
-int shared_recover(int id); /* try to recover dormant segment(s) after applic crash */
-int shared_malloc(long size, int mode, int newhandle); /* allocate n-bytes of shared memory */
-int shared_attach(int idx); /* attach to segment given index to table */
-int shared_free(int idx); /* release shared memory */
-SHARED_P shared_lock(int idx, int mode); /* lock segment for reading */
-SHARED_P shared_realloc(int idx, long newsize); /* reallocate n-bytes of shared memory (ON LOCKED SEGMENT ONLY) */
-int shared_size(int idx); /* get size of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
-int shared_attr(int idx); /* get attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
-int shared_set_attr(int idx, int newattr); /* set attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
-int shared_unlock(int idx); /* unlock segment (ON LOCKED SEGMENT ONLY) */
-int shared_set_debug(int debug_msgs); /* set/reset debug mode */
-int shared_set_createmode(int mode); /* set/reset debug mode */
-int shared_list(int id); /* list segment(s) */
-int shared_uncond_delete(int id); /* uncondintionally delete (NOWAIT operation) segment(s) */
-
-int smem_init(void);
-int smem_shutdown(void);
-int smem_setoptions(int options);
-int smem_getoptions(int *options);
-int smem_getversion(int *version);
-int smem_open(char *filename, int rwmode, int *driverhandle);
-int smem_create(char *filename, int *driverhandle);
-int smem_close(int driverhandle);
-int smem_remove(char *filename);
-int smem_size(int driverhandle, long *size);
-int smem_flush(int driverhandle);
-int smem_seek(int driverhandle, long offset);
-int smem_read(int driverhandle, void *buffer, long nbytes);
-int smem_write(int driverhandle, void *buffer, long nbytes);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/include/cfitsio/eval_defs.h b/include/cfitsio/eval_defs.h
deleted file mode 100644
index c650311..0000000
--- a/include/cfitsio/eval_defs.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#include <stdio.h>
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#if defined(__sgi) || defined(__hpux)
-#include <alloca.h>
-#endif
-#ifdef sparc
-#include <malloc.h>
-#endif
-#include "fitsio2.h"
-
-#ifndef FFBISON
-#include "eval_tab.h"
-#endif
-
-#define MAXDIMS 5
-#define MAXSUBS 10
-#define MAXVARNAME 80
-#define CONST_OP -1000
-#define pERROR -1
-
-typedef struct {
- char name[MAXVARNAME+1];
- int type;
- long nelem;
- int naxis;
- long naxes[MAXDIMS];
- char *undef;
- void *data;
- } DataInfo;
-
-typedef struct {
- long nelem;
- int naxis;
- long naxes[MAXDIMS];
- char *undef;
- union {
- double dbl;
- long lng;
- char log;
- char str[256];
- double *dblptr;
- long *lngptr;
- char *logptr;
- char **strptr;
- void *ptr;
- } data;
- } lval;
-
-typedef struct Node {
- int operation;
- void (*DoOp)(struct Node *this);
- int nSubNodes;
- int SubNodes[MAXSUBS];
- int type;
- lval value;
- } Node;
-
-typedef struct {
- fitsfile *def_fptr;
- int (*getData)( char *dataName, void *dataValue );
- int (*loadData)( int varNum, long fRow, long nRows,
- void *data, char *undef );
-
- int compressed;
- int timeCol;
- int parCol;
- int valCol;
-
- char *expr;
- int index;
- int is_eobuf;
-
- Node *Nodes;
- int nNodes;
- int nNodesAlloc;
- int resultNode;
-
- long firstRow;
- long nRows;
-
- int nCols;
- iteratorCol *colData;
- DataInfo *varData;
-
- long firstDataRow;
- long nDataRows;
- long totalRows;
-
- int datatype;
-
- int status;
- } ParseData;
-
-typedef enum {
- rnd_fct = 1001,
- sum_fct,
- nelem_fct,
- sin_fct,
- cos_fct,
- tan_fct,
- asin_fct,
- acos_fct,
- atan_fct,
- sinh_fct,
- cosh_fct,
- tanh_fct,
- exp_fct,
- log_fct,
- log10_fct,
- sqrt_fct,
- abs_fct,
- atan2_fct,
- ceil_fct,
- floor_fct,
- round_fct,
- min1_fct,
- min2_fct,
- max1_fct,
- max2_fct,
- near_fct,
- circle_fct,
- box_fct,
- elps_fct,
- isnull_fct,
- defnull_fct,
- gtifilt_fct,
- regfilt_fct,
- row_fct
- } funcOp;
-
-extern ParseData gParse;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- int ffparse(void);
- int fflex(void);
- void ffrestart(FILE*);
-
- void Evaluate_Parser( long firstRow, long nRows );
-
-#ifdef __cplusplus
- }
-#endif
diff --git a/include/cfitsio/eval_tab.h b/include/cfitsio/eval_tab.h
deleted file mode 100644
index 784ac91..0000000
--- a/include/cfitsio/eval_tab.h
+++ /dev/null
@@ -1,37 +0,0 @@
-typedef union {
- int Node; /* Index of Node */
- double dbl; /* real value */
- long lng; /* integer value */
- char log; /* logical value */
- char str[256]; /* string value */
-} FFSTYPE;
-#define BOOLEAN 258
-#define LONG 259
-#define DOUBLE 260
-#define STRING 261
-#define BITSTR 262
-#define FUNCTION 263
-#define BFUNCTION 264
-#define GTIFILTER 265
-#define REGFILTER 266
-#define COLUMN 267
-#define BCOLUMN 268
-#define SCOLUMN 269
-#define BITCOL 270
-#define ROWREF 271
-#define OR 272
-#define AND 273
-#define EQ 274
-#define NE 275
-#define GT 276
-#define LT 277
-#define LTE 278
-#define GTE 279
-#define POWER 280
-#define NOT 281
-#define INTCAST 282
-#define FLTCAST 283
-#define UMINUS 284
-
-
-extern FFSTYPE fflval;
diff --git a/include/cfitsio/f77_wrap.h b/include/cfitsio/f77_wrap.h
deleted file mode 100644
index 121850f..0000000
--- a/include/cfitsio/f77_wrap.h
+++ /dev/null
@@ -1,277 +0,0 @@
-#define UNSIGNED_BYTE
-#include "cfortran.h"
-
-/************************************************************************
- DEC C creates longs as 8-byte integers. On most other machines, ints
- and longs are both 4-bytes, so both are compatible with Fortrans
- default integer which is 4-bytes. To support DECs, we must redefine
- LONGs and convert them to 8-bytes when going to C, and restore them
- to 4-bytes when returning to Fortran. Ugh!!!
-*************************************************************************/
-
-#if (defined DECFortran) || (defined(__alpha) && defined(g77Fortran))
-
-#undef LONGV_cfSTR
-#undef PLONG_cfSTR
-#undef LONGVVVVVVV_cfTYPE
-#undef PLONG_cfTYPE
-#undef LONGV_cfT
-#undef PLONG_cfT
-
-#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LONGV,A,B,C,D,E)
-#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLONG,A,B,C,D,E)
-#define LONGVVVVVVV_cfTYPE int
-#define PLONG_cfTYPE int
-#define LONGV_cfQ(B) long *B, _(B,N);
-#define PLONG_cfQ(B) long B;
-#define LONGV_cfT(M,I,A,B,D) ( (_(B,N) = * _3(M,_LONGV_A,I)), \
- B = F2Clongv(_(B,N),A) )
-#define PLONG_cfT(M,I,A,B,D) ((B=*A),&B)
-#define LONGV_cfR(A,B,D) C2Flongv(_(B,N),A,B);
-#define PLONG_cfR(A,B,D) *A=B;
-#define LONGV_cfH(S,U,B)
-#define PLONG_cfH(S,U,B)
-
-static long *F2Clongv(long size, int *A)
-{
- long i;
- long *B;
-
- B=(long *)malloc( size*sizeof(long) );
- for(i=0;i<size;i++) B[i]=A[i];
- return(B);
-}
-
-static void C2Flongv(long size, int *A, long *B)
-{
- long i;
-
- for(i=0;i<size;i++) A[i]=B[i];
- free(B);
-}
-
-#endif
-
-/************************************************************************
- Modify cfortran.h's handling of strings. C interprets a "char **"
- parameter as an array of pointers to the strings (or as a handle),
- not as a pointer to a block of contiguous strings. Also set a
- a minimum length for string allocations, to minimize risk of
- overflow.
-*************************************************************************/
-
-extern unsigned long gMinStrLen;
-
-#undef STRINGV_cfQ
-#undef STRINGV_cfR
-#undef TTSTR
-#undef TTTTSTRV
-#undef RRRRPSTRV
-
-#undef PPSTRING_cfT
-
-#ifdef vmsFortran
-#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A->dsc$a_pointer
-
-/* We want single strings to be equivalent to string vectors with */
-/* a single element, so ignore the number of elements info in the */
-/* vector structure, and rely on the NUM_ELEM definitions. */
-
-#undef STRINGV_cfT
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
- A->dsc$w_length, \
- num_elem(A->dsc$a_pointer, \
- A->dsc$w_length, \
- _3(M,_STRV_A,I) ) )
-#else
-#ifdef CRAYFortran
-#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)_fcdtocp(A)
-#else
-#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A
-#endif
-#endif
-
-#define _cfMAX(A,B) ( (A>B) ? A : B )
-#define STRINGV_cfQ(B) char **B; unsigned int _(B,N), _(B,M);
-#define STRINGV_cfR(A,B,D) free(B[0]); free(B);
-#define TTSTR( A,B,D) \
- ((B=(char*)malloc(_cfMAX(D,gMinStrLen)+1))[D]='\0',memcpy(B,A,D), \
- kill_trailing(B,' '))
-#define TTTTSTRV( A,B,D,E) ( \
- _(B,N)=_cfMAX(E,1), \
- _(B,M)=_cfMAX(D,gMinStrLen)+1, \
- B=(char**)malloc(_(B,N)*sizeof(char*)), \
- B[0]=(char*)malloc(_(B,N)*_(B,M)), \
- vindex(B,_(B,M),_(B,N),f2cstrv2(A,B[0],D,_(B,M),_(B,N))) \
- )
-#define RRRRPSTRV(A,B,D) \
- c2fstrv2(B[0],A,_(B,M),D,_(B,N)), \
- free(B[0]), \
- free(B);
-
-static char **vindex(char **B, int elem_len, int nelem, char *B0)
-{
- int i;
- if( nelem )
- for( i=0;i<nelem;i++ ) B[i] = B0+i*elem_len;
- return B;
-}
-
-static char *c2fstrv2(char* cstr, char *fstr, int celem_len, int felem_len,
- int nelem)
-{
- int i,j;
-
- if( nelem )
- for (i=0; i<nelem; i++) {
- for (j=0; j<felem_len && *cstr; j++) *fstr++ = *cstr++;
- cstr += celem_len-j;
- for (; j<felem_len; j++) *fstr++ = ' ';
- }
- return( fstr-felem_len*nelem );
-}
-
-static char *f2cstrv2(char *fstr, char* cstr, int felem_len, int celem_len,
- int nelem)
-{
- int i,j;
-
- if( nelem )
- for (i=0; i<nelem; i++, cstr+=(celem_len-felem_len)) {
- for (j=0; j<felem_len; j++) *cstr++ = *fstr++;
- *cstr='\0';
- kill_trailingn( cstr-felem_len, ' ', cstr );
- }
- return( cstr-celem_len*nelem );
-}
-
-/************************************************************************
- The following definitions redefine the BYTE data type to be
- interpretted as a character*1 string instead of an integer*1 which
- is not supported by all compilers.
-*************************************************************************/
-
-#undef BYTE_cfT
-#undef BYTEV_cfT
-#undef BYTE_cfINT
-#undef BYTEV_cfINT
-#undef BYTE_cfSTR
-#undef BYTEV_cfSTR
-
-#define BYTE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTE,B,X,Y,Z,0)
-#define BYTEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTEV,B,X,Y,Z,0)
-#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTE,A,B,C,D,E)
-#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTEV,A,B,C,D,E)
-#define BYTE_cfSEP(T,B) INT_cfSEP(T,B)
-#define BYTEV_cfSEP(T,B) INT_cfSEP(T,B)
-#define BYTE_cfH(S,U,B) STRING_cfH(S,U,B)
-#define BYTEV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define BYTE_cfQ(B)
-#define BYTEV_cfQ(B)
-#define BYTE_cfR(A,B,D)
-#define BYTEV_cfR(A,B,D)
-
-#ifdef vmsFortran
-#define BYTE_cfN(T,A) fstring * A
-#define BYTEV_cfN(T,A) fstringvector * A
-#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((A->dsc$a_pointer)[0])
-#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)A->dsc$a_pointer
-#else
-#ifdef CRAYFortran
-#define BYTE_cfN(T,A) _fcd A
-#define BYTEV_cfN(T,A) _fcd A
-#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((_fcdtocp(A))[0])
-#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)_fcdtocp(A)
-#else
-#define BYTE_cfN(T,A) INTEGER_BYTE * A
-#define BYTEV_cfN(T,A) INTEGER_BYTE * A
-#define BYTE_cfT(M,I,A,B,D) A[0]
-#define BYTEV_cfT(M,I,A,B,D) A
-#endif
-#endif
-
-/************************************************************************
- The following definitions and functions handle conversions between
- C and Fortran arrays of LOGICALS. Individually, LOGICALS are
- treated as int's but as char's when in an array. cfortran defines
- (F2C/C2F)LOGICALV but never uses them, so these routines also
- handle TRUE/FALSE conversions.
-*************************************************************************/
-
-#undef LOGICALV_cfSTR
-#undef LOGICALV_cfT
-#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICALV,A,B,C,D,E)
-#define LOGICALV_cfQ(B) char *B; unsigned int _(B,N);
-#define LOGICALV_cfT(M,I,A,B,D) (_(B,N)= * _3(M,_LOGV_A,I), \
- B=F2CcopyLogVect(_(B,N),A))
-#define LOGICALV_cfR(A,B,D) C2FcopyLogVect(_(B,N),A,B);
-#define LOGICALV_cfH(S,U,B)
-
-static char *F2CcopyLogVect(long size, int *A)
-{
- long i;
- char *B;
-
- B=(char *)malloc(size*sizeof(char));
- for( i=0; i<size; i++ ) B[i]=F2CLOGICAL(A[i]);
- return(B);
-}
-
-static void C2FcopyLogVect(long size, int *A, char *B)
-{
- long i;
-
- for( i=0; i<size; i++ ) A[i]=C2FLOGICAL(B[i]);
- free(B);
-}
-
-/*------------------ Fortran File Handling ----------------------*/
-/* Fortran uses unit numbers, whereas C uses file pointers, so */
-/* a global array of file pointers is setup in which Fortran's */
-/* unit number serves as the index. Two FITSIO routines are */
-/* the integer unit number and the fitsfile file pointer. */
-/*-----------------------------------------------------------------*/
-
-#define MAXFITSFILES 200 /* Array of file pointers indexed */
-extern fitsfile *gFitsFiles[]; /* by Fortran unit numbers */
-
-#define FITSUNIT_cfINT(N,A,B,X,Y,Z) INT_cfINT(N,A,B,X,Y,Z)
-#define FITSUNIT_cfSTR(N,T,A,B,C,D,E) INT_cfSTR(N,T,A,B,C,D,E)
-#define FITSUNIT_cfT(M,I,A,B,D) gFitsFiles[*A]
-#define FITSUNITVVVVVVV_cfTYPE int
-#define PFITSUNIT_cfINT(N,A,B,X,Y,Z) PINT_cfINT(N,A,B,X,Y,Z)
-#define PFITSUNIT_cfSTR(N,T,A,B,C,D,E) PINT_cfSTR(N,T,A,B,C,D,E)
-#define PFITSUNIT_cfT(M,I,A,B,D) (gFitsFiles + *A)
-#define PFITSUNIT_cfTYPE int
-
-
-/*---------------------- Make C++ Happy -----------------------------*/
-/* Redefine FCALLSCFUNn so that they create prototypes of themselves */
-/* and change TTTTSTR to use (char *)0 instead of NULL */
-/*-------------------------------------------------------------------*/
-
-#undef FCALLSCFUN0
-#undef FCALLSCFUN14
-#undef TTTTSTR
-
-#define TTTTSTR(A,B,D) ( !(D<4||A[0]||A[1]||A[2]||A[3]) ) ? ((char*)0) : \
- memchr(A,'\0',D) ? A : TTSTR(A,B,D)
-
-#define FCALLSCFUN0(T0,CN,UN,LN) \
- CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)); \
- CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)) \
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
- TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) \
- }
-
diff --git a/include/cfitsio/fitsio.h b/include/cfitsio/fitsio.h
deleted file mode 100644
index 9330127..0000000
--- a/include/cfitsio/fitsio.h
+++ /dev/null
@@ -1,1355 +0,0 @@
-#ifndef _FITSIO_H
-#define _FITSIO_H
-
-#include <stdio.h>
-/* stddef.h is apparently needed to define size_t */
-#include <stddef.h>
-
-/* The following exclusion if __CINT__ is defined is needed for ROOT */
-#ifndef __CINT__
-#include "longnam.h"
-#endif
-
-/* global variables */
-
-#define FLEN_FILENAME 1025 /* max length of a filename */
-#define FLEN_KEYWORD 72 /* max length of a keyword (HIERARCH convention) */
-#define FLEN_CARD 81 /* length of a FITS header card */
-#define FLEN_VALUE 71 /* max length of a keyword value string */
-#define FLEN_COMMENT 73 /* max length of a keyword comment string */
-#define FLEN_ERRMSG 81 /* max length of a FITSIO error message */
-#define FLEN_STATUS 31 /* max length of a FITSIO status text string */
-
-#define TBIT 1 /* codes for FITS table data types */
-#define TBYTE 11
-#define TLOGICAL 14
-#define TSTRING 16
-#define TUSHORT 20
-#define TSHORT 21
-#define TUINT 30
-#define TINT 31
-#define TULONG 40
-#define TLONG 41
-#define TFLOAT 42
-#define TDOUBLE 82
-#define TCOMPLEX 83
-#define TDBLCOMPLEX 163
-
-#define TYP_STRUC_KEY 10
-#define TYP_CMPRS_KEY 20
-#define TYP_SCAL_KEY 30
-#define TYP_NULL_KEY 40
-#define TYP_DIM_KEY 50
-#define TYP_RANG_KEY 60
-#define TYP_UNIT_KEY 70
-#define TYP_DISP_KEY 80
-#define TYP_HDUID_KEY 90
-#define TYP_CKSUM_KEY 100
-#define TYP_WCS_KEY 110
-#define TYP_REFSYS_KEY 120
-#define TYP_COMM_KEY 130
-#define TYP_CONT_KEY 140
-#define TYP_USER_KEY 150
-
-#define INT32BIT int /* 32-bit integer datatype. Currently this */
- /* datatype is an 'int' on all useful platforms */
- /* however, it is possible that that are cases */
- /* where 'int' is a 2-byte integer, in which case */
- /* FITSINT would need to be defined as 'long'. */
-
-#define BYTE_IMG 8 /* BITPIX code values for FITS image types */
-#define SHORT_IMG 16
-#define LONG_IMG 32
-#define FLOAT_IMG -32
-#define DOUBLE_IMG -64
- /* The following 2 codes are not true FITS */
- /* datatypes; these codes are only used internally */
- /* within cfitsio to make it easier for users */
- /* to deal with unsigned integers. */
-#define USHORT_IMG 20
-#define ULONG_IMG 40
-
-#define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */
-#define ASCII_TBL 1 /* ASCII table HDU */
-#define BINARY_TBL 2 /* Binary table HDU */
-#define ANY_HDU -1 /* matches any HDU type */
-
-#define READONLY 0 /* options when opening a file */
-#define READWRITE 1
-
-/* adopt a hopefully obscure number to use as a null value flag */
-/* could be problems if the FITS files contain data with these values */
-#define FLOATNULLVALUE -9.11912E-36F
-#define DOUBLENULLVALUE -9.1191291391491E-36
-
-/* Image compression algorithm types */
-#define MAX_COMPRESS_DIM 6
-#define RICE_1 11
-#define GZIP_1 21
-#define PLIO_1 31
-#define HCOMPRESS_1 41
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#define CASESEN 1 /* do case-sensitive string match */
-#define CASEINSEN 0 /* do case-insensitive string match */
-
-#define MAXHDU 1000 /* maximum number of extensions allowed in a FITS file */
-
-#define GT_ID_ALL_URI 0 /* hierarchical grouping parameters */
-#define GT_ID_REF 1
-#define GT_ID_POS 2
-#define GT_ID_ALL 3
-#define GT_ID_REF_URI 11
-#define GT_ID_POS_URI 12
-
-#define OPT_RM_GPT 0
-#define OPT_RM_ENTRY 1
-#define OPT_RM_MBR 2
-#define OPT_RM_ALL 3
-
-#define OPT_GCP_GPT 0
-#define OPT_GCP_MBR 1
-#define OPT_GCP_ALL 2
-
-#define OPT_MCP_ADD 0
-#define OPT_MCP_NADD 1
-#define OPT_MCP_REPL 2
-#define OPT_MCP_MOV 3
-
-#define OPT_MRG_COPY 0
-#define OPT_MRG_MOV 1
-
-#define OPT_CMT_MBR 1
-#define OPT_CMT_MBR_DEL 11
-
-typedef struct /* structure used to store table column information */
-{
- char ttype[70]; /* column name = FITS TTYPEn keyword; */
- long tbcol; /* offset in row to first byte of each column */
- int tdatatype; /* datatype code of each column */
- long trepeat; /* repeat count of column; number of elements */
- double tscale; /* FITS TSCALn linear scaling factor */
- double tzero; /* FITS TZEROn linear scaling zero point */
- long tnull; /* FITS null value for int image or binary table cols */
- char strnull[20]; /* FITS null value string for ASCII table columns */
- char tform[10]; /* FITS tform keyword value */
- long twidth; /* width of each ASCII table column */
-}tcolumn;
-
-#define VALIDSTRUC 555 /* magic value used to identify if structure is valid */
-
-typedef struct /* structure used to store basic FITS file information */
-{
- int filehandle; /* handle returned by the file open function */
- int driver; /* defines which set of I/O drivers should be used */
- int open_count; /* number of opened 'fitsfiles' using this structure */
- char *filename; /* file name */
- int validcode; /* magic value used to verify that structure is valid */
- long filesize; /* current size of the physical disk file in bytes */
- long logfilesize; /* logical size of file, including unflushed buffers */
- int lasthdu; /* is this the last HDU in the file? 0 = no, else yes */
- long bytepos; /* current logical I/O pointer position in file */
- long io_pos; /* current I/O pointer position in the physical file */
- int curbuf; /* number of I/O buffer currently in use */
- int curhdu; /* current HDU number; 0 = primary array */
- int hdutype; /* 0 = primary array, 1 = ASCII table, 2 = binary table */
- int writemode; /* 0 = readonly, 1 = readwrite */
- int maxhdu; /* highest numbered HDU known to exist in the file */
- long headstart[MAXHDU + 1]; /* byte offset in file to start of each HDU */
- long headend; /* byte offest in file to end of the current HDU header */
- long nextkey; /* byte offset in file to beginning of next keyword */
- long datastart; /* byte offset in file to start of the current data unit */
- int tfield; /* number of fields in the table (primary array has 2 */
- long origrows; /* original number of rows (value of NAXIS2 keyword) */
- long numrows; /* number of rows in the table (dynamically updated) */
- long rowlength; /* total length of a table row, in bytes */
- tcolumn *tableptr; /* pointer to the table structure */
- long heapstart; /* heap start byte relative to start of data unit */
- long heapsize; /* size of the heap, in bytes */
-
- /* the following elements are related to compress images */
- int compressimg; /* 1 if HDU contains a compressed image, else 0 */
- char zcmptype[12]; /* compression type string */
- int compress_type; /* type of compression algorithm */
- int zbitpix; /* FITS data type of image (BITPIX) */
- int zndim; /* dimension of image */
- long znaxis[MAX_COMPRESS_DIM]; /* length of each axis */
- long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
- long maxtilelen; /* max number of pixels in each image tile */
- long maxelem; /* maximum length of variable length arrays */
-
- int cn_compressed; /* column number for COMPRESSED_DATA column */
- int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
- int cn_zscale; /* column number for ZSCALE column */
- int cn_zzero; /* column number for ZZERO column */
- int cn_zblank; /* column number for the ZBLANK column */
-
- double zscale; /* scaling value, if same for all tiles */
- double zzero; /* zero pt, if same for all tiles */
- int zblank; /* value for null pixels, if not a column */
-
- int rice_blocksize; /* first compression parameter */
- int rice_nbits; /* second compression parameter */
-} FITSfile;
-
-typedef struct /* structure used to store basic HDU information */
-{
- int HDUposition; /* HDU position in file; 0 = first HDU */
- FITSfile *Fptr; /* pointer to FITS file structure */
-}fitsfile;
-
-typedef struct /* structure for the iterator function column information */
-{
- /* elements required as input to fits_iterate_data: */
-
- fitsfile *fptr; /* pointer to the HDU containing the column */
- int colnum; /* column number in the table (use name if < 1) */
- char colname[70]; /* name (= TTYPEn value) of the column (optional) */
- int datatype; /* output datatype (converted if necessary */
- int iotype; /* = InputCol, InputOutputCol, or OutputCol */
-
- /* output elements that may be useful for the work function: */
-
- void *array; /* pointer to the array (and the null value) */
- long repeat; /* binary table vector repeat value */
- long tlmin; /* legal minimum data value */
- long tlmax; /* legal maximum data value */
- char tunit[70]; /* physical unit string */
- char tdisp[70]; /* suggested display format */
-
-} iteratorCol;
-
-#define InputCol 0 /* flag for input only iterator column */
-#define InputOutputCol 1 /* flag for input and output iterator column */
-#define OutputCol 2 /* flag for output only iterator column */
-
-/* error status codes */
-
-#define USE_MEM_BUFF -101 /* use memory buffer when opening file */
-#define OVERFLOW_ERR -11 /* overflow during datatype conversion */
-#define SAME_FILE 101 /* input and output files are the same */
-#define TOO_MANY_FILES 103 /* tried to open too many FITS files */
-#define FILE_NOT_OPENED 104 /* could not open the named file */
-#define FILE_NOT_CREATED 105 /* could not create the named file */
-#define WRITE_ERROR 106 /* error writing to FITS file */
-#define END_OF_FILE 107 /* tried to move past end of file */
-#define READ_ERROR 108 /* error reading from FITS file */
-#define FILE_NOT_CLOSED 110 /* could not close the file */
-#define ARRAY_TOO_BIG 111 /* array dimensions exceed internal limit */
-#define READONLY_FILE 112 /* Cannot write to readonly file */
-#define MEMORY_ALLOCATION 113 /* Could not allocate memory */
-#define BAD_FILEPTR 114 /* invalid fitsfile pointer */
-#define NULL_INPUT_PTR 115 /* NULL input pointer to routine */
-#define SEEK_ERROR 116 /* error seeking position in file */
-
-#define BAD_URL_PREFIX 121 /* invalid URL prefix on file name */
-#define TOO_MANY_DRIVERS 122 /* tried to register too many IO drivers */
-#define DRIVER_INIT_FAILED 123 /* driver initialization failed */
-#define NO_MATCHING_DRIVER 124 /* matching driver is not registered */
-#define URL_PARSE_ERROR 125 /* failed to parse input file URL */
-
-#define SHARED_ERRBASE (150)
-#define SHARED_BADARG (SHARED_ERRBASE + 1)
-#define SHARED_NULPTR (SHARED_ERRBASE + 2)
-#define SHARED_TABFULL (SHARED_ERRBASE + 3)
-#define SHARED_NOTINIT (SHARED_ERRBASE + 4)
-#define SHARED_IPCERR (SHARED_ERRBASE + 5)
-#define SHARED_NOMEM (SHARED_ERRBASE + 6)
-#define SHARED_AGAIN (SHARED_ERRBASE + 7)
-#define SHARED_NOFILE (SHARED_ERRBASE + 8)
-#define SHARED_NORESIZE (SHARED_ERRBASE + 9)
-
-#define HEADER_NOT_EMPTY 201 /* header already contains keywords */
-#define KEY_NO_EXIST 202 /* keyword not found in header */
-#define KEY_OUT_BOUNDS 203 /* keyword record number is out of bounds */
-#define VALUE_UNDEFINED 204 /* keyword value field is blank */
-#define NO_QUOTE 205 /* string is missing the closing quote */
-#define BAD_KEYCHAR 207 /* illegal character in keyword name or card */
-#define BAD_ORDER 208 /* required keywords out of order */
-#define NOT_POS_INT 209 /* keyword value is not a positive integer */
-#define NO_END 210 /* couldn't find END keyword */
-#define BAD_BITPIX 211 /* illegal BITPIX keyword value*/
-#define BAD_NAXIS 212 /* illegal NAXIS keyword value */
-#define BAD_NAXES 213 /* illegal NAXISn keyword value */
-#define BAD_PCOUNT 214 /* illegal PCOUNT keyword value */
-#define BAD_GCOUNT 215 /* illegal GCOUNT keyword value */
-#define BAD_TFIELDS 216 /* illegal TFIELDS keyword value */
-#define NEG_WIDTH 217 /* negative table row size */
-#define NEG_ROWS 218 /* negative number of rows in table */
-#define COL_NOT_FOUND 219 /* column with this name not found in table */
-#define BAD_SIMPLE 220 /* illegal value of SIMPLE keyword */
-#define NO_SIMPLE 221 /* Primary array doesn't start with SIMPLE */
-#define NO_BITPIX 222 /* Second keyword not BITPIX */
-#define NO_NAXIS 223 /* Third keyword not NAXIS */
-#define NO_NAXES 224 /* Couldn't find all the NAXISn keywords */
-#define NO_XTENSION 225 /* HDU doesn't start with XTENSION keyword */
-#define NOT_ATABLE 226 /* the CHDU is not an ASCII table extension */
-#define NOT_BTABLE 227 /* the CHDU is not a binary table extension */
-#define NO_PCOUNT 228 /* couldn't find PCOUNT keyword */
-#define NO_GCOUNT 229 /* couldn't find GCOUNT keyword */
-#define NO_TFIELDS 230 /* couldn't find TFIELDS keyword */
-#define NO_TBCOL 231 /* couldn't find TBCOLn keyword */
-#define NO_TFORM 232 /* couldn't find TFORMn keyword */
-#define NOT_IMAGE 233 /* the CHDU is not an IMAGE extension */
-#define BAD_TBCOL 234 /* TBCOLn keyword value < 0 or > rowlength */
-#define NOT_TABLE 235 /* the CHDU is not a table */
-#define COL_TOO_WIDE 236 /* column is too wide to fit in table */
-#define COL_NOT_UNIQUE 237 /* more than 1 column name matches template */
-#define BAD_ROW_WIDTH 241 /* sum of column widths not = NAXIS1 */
-#define UNKNOWN_EXT 251 /* unrecognizable FITS extension type */
-#define UNKNOWN_REC 252 /* unrecognizable FITS record */
-#define END_JUNK 253 /* END keyword is not blank */
-#define BAD_HEADER_FILL 254 /* Header fill area not blank */
-#define BAD_DATA_FILL 255 /* Data fill area not blank or zero */
-#define BAD_TFORM 261 /* illegal TFORM format code */
-#define BAD_TFORM_DTYPE 262 /* unrecognizable TFORM datatype code */
-#define BAD_TDIM 263 /* illegal TDIMn keyword value */
-
-#define BAD_HDU_NUM 301 /* HDU number < 1 or > MAXHDU */
-#define BAD_COL_NUM 302 /* column number < 1 or > tfields */
-#define NEG_FILE_POS 304 /* tried to move before beginning of file */
-#define NEG_BYTES 306 /* tried to read or write negative bytes */
-#define BAD_ROW_NUM 307 /* illegal starting row number in table */
-#define BAD_ELEM_NUM 308 /* illegal starting element number in vector */
-#define NOT_ASCII_COL 309 /* this is not an ASCII string column */
-#define NOT_LOGICAL_COL 310 /* this is not a logical datatype column */
-#define BAD_ATABLE_FORMAT 311 /* ASCII table column has wrong format */
-#define BAD_BTABLE_FORMAT 312 /* Binary table column has wrong format */
-#define NO_NULL 314 /* null value has not been defined */
-#define NOT_VARI_LEN 317 /* this is not a variable length column */
-#define BAD_DIMEN 320 /* illegal number of dimensions in array */
-#define BAD_PIX_NUM 321 /* first pixel number greater than last pixel */
-#define ZERO_SCALE 322 /* illegal BSCALE or TSCALn keyword = 0 */
-#define NEG_AXIS 323 /* illegal axis length < 1 */
-
-#define NOT_GROUP_TABLE 340
-#define HDU_ALREADY_MEMBER 341
-#define MEMBER_NOT_FOUND 342
-#define GROUP_NOT_FOUND 343
-#define BAD_GROUP_ID 344
-#define TOO_MANY_HDUS_TRACKED 345
-#define HDU_ALREADY_TRACKED 346
-#define BAD_OPTION 347
-#define IDENTICAL_POINTERS 348
-
-#define BAD_I2C 401 /* bad int to formatted string conversion */
-#define BAD_F2C 402 /* bad float to formatted string conversion */
-#define BAD_INTKEY 403 /* can't interprete keyword value as integer */
-#define BAD_LOGICALKEY 404 /* can't interprete keyword value as logical */
-#define BAD_FLOATKEY 405 /* can't interprete keyword value as float */
-#define BAD_DOUBLEKEY 406 /* can't interprete keyword value as double */
-#define BAD_C2I 407 /* bad formatted string to int conversion */
-#define BAD_C2F 408 /* bad formatted string to float conversion */
-#define BAD_C2D 409 /* bad formatted string to double conversion */
-#define BAD_DATATYPE 410 /* bad keyword datatype code */
-#define BAD_DECIM 411 /* bad number of decimal places specified */
-#define NUM_OVERFLOW 412 /* overflow during datatype conversion */
-
-# define DATA_COMPRESSION_ERR 413 /* error in imcompress routines */
-# define DATA_DECOMPRESSION_ERR 414 /* error in imcompress routines */
-
-#define BAD_DATE 420 /* error in date or time conversion */
-
-#define PARSE_SYNTAX_ERR 431 /* syntax error in parser expression */
-#define PARSE_BAD_TYPE 432 /* expression did not evaluate to desired type */
-#define PARSE_LRG_VECTOR 433 /* vector result too large to return in array */
-#define PARSE_NO_OUTPUT 434 /* data parser failed not sent an out column */
-#define PARSE_BAD_COL 435 /* bad data encounter while parsing column */
-#define PARSE_BAD_OUTPUT 436 /* Output file not of proper type */
-
-#define ANGLE_TOO_BIG 501 /* celestial angle too large for projection */
-#define BAD_WCS_VAL 502 /* bad celestial coordinate or pixel value */
-#define WCS_ERROR 503 /* error in celestial coordinate calculation */
-#define BAD_WCS_PROJ 504 /* unsupported type of celestial projection */
-#define NO_WCS_KEY 505 /* celestial coordinate keywords not found */
-#define APPROX_WCS_KEY 506 /* approximate WCS keywords were calculated */
-
-/*------- following error codes are used in the grparser.c file -----------*/
-#define NGP_ERRBASE (360) /* base chosen so not to interfere with CFITSIO */
-#define NGP_OK (0)
-#define NGP_NO_MEMORY (NGP_ERRBASE + 0) /* malloc failed */
-#define NGP_READ_ERR (NGP_ERRBASE + 1) /* read error from file */
-#define NGP_NUL_PTR (NGP_ERRBASE + 2) /* null pointer passed as argument */
-#define NGP_EMPTY_CURLINE (NGP_ERRBASE + 3) /* line read seems to be empty */
-#define NGP_UNREAD_QUEUE_FULL (NGP_ERRBASE + 4) /* cannot unread more then 1 line (or single line twice) */
-#define NGP_INC_NESTING (NGP_ERRBASE + 5) /* too deep include file nesting (inf. loop ?) */
-#define NGP_ERR_FOPEN (NGP_ERRBASE + 6) /* fopen() failed, cannot open file */
-#define NGP_EOF (NGP_ERRBASE + 7) /* end of file encountered */
-#define NGP_BAD_ARG (NGP_ERRBASE + 8) /* bad arguments passed */
-#define NGP_TOKEN_NOT_EXPECT (NGP_ERRBASE + 9) /* token not expected here */
-
-/* The following exclusion if __CINT__ is defined is needed for ROOT */
-#ifndef __CINT__
-/* the following 3 lines are needed to support C++ compilers */
-#ifdef __cplusplus
-extern "C" {
-#endif
-#endif
-
-/*---------------- FITS file URL parsing routines -------------*/
-int fits_get_token(char **ptr, char *delimiter, char *token, int *isanumber);
-int ffiurl(char *url, char *urltype, char *infile,
- char *outfile, char *extspec, char *rowfilter,
- char *binspec, char *colspec, int *status);
-int ffrtnm(char *url, char *rootname, int *status);
-int ffourl(char *url, char *urltype, char *outfile, char *tmplfile,
- int *status);
-int ffexts(char *extspec, int *extnum, char *extname, int *extvers,
- int *hdutype, char *colname, char *rowexpress, int *status);
-int ffextn(char *url, int *extension_num, int *status);
-int ffurlt(fitsfile *fptr, char *urlType, int *status);
-int ffbins(char *binspec, int *imagetype, int *haxis,
- char colname[4][FLEN_VALUE], double *minin,
- double *maxin, double *binsizein,
- char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
- char binname[4][FLEN_VALUE], double *weight, char *wtname,
- int *recip, int *status);
-int ffbinr(char **binspec, char *colname, double *minin,
- double *maxin, double *binsizein, char *minname,
- char *maxname, char *binname, int *status);
-int ffimport_file( char *filename, char **contents, int *status );
-
-/*---------------- FITS file I/O routines -------------*/
-int ffomem(fitsfile **fptr, const char *name, int mode, void **buffptr,
- size_t *buffsize, size_t deltasize,
- void *(*mem_realloc)(void *p, size_t newsize),
- int *status);
-int ffopen(fitsfile **fptr, const char *filename, int iomode, int *status);
-int ffreopen(fitsfile *openfptr, fitsfile **newfptr, int *status);
-int ffinit(fitsfile **fptr, const char *filename, int *status);
-int fftplt(fitsfile **fptr, const char *filename, const char *tempname,
- int *status);
-int ffflus(fitsfile *fptr, int *status);
-int ffclos(fitsfile *fptr, int *status);
-int ffdelt(fitsfile *fptr, int *status);
-int ffflnm(fitsfile *fptr, char *filename, int *status);
-int ffflmd(fitsfile *fptr, int *filemode, int *status);
-
-/*---------------- utility routines -------------*/
-float ffvers(float *version);
-void ffupch(char *string);
-void ffgerr(int status, char *errtext);
-void ffpmsg(const char *err_message);
-int ffgmsg(char *err_message);
-void ffcmsg(void);
-void ffrprt(FILE *stream, int status);
-void ffcmps(char *templt, char *colname, int casesen, int *match,
- int *exact);
-int fftkey(char *keyword, int *status);
-int fftrec(char *card, int *status);
-int ffnchk(fitsfile *fptr, int *status);
-int ffkeyn(char *keyroot, int value, char *keyname, int *status);
-int ffnkey(int value, char *keyroot, char *keyname, int *status);
-int ffgkcl(char *card);
-int ffdtyp(char *cval, char *dtype, int *status);
-int ffpsvc(char *card, char *value, char *comm, int *status);
-int ffgknm(char *card, char *name, int *length, int *status);
-int ffgthd(char *tmplt, char *card, int *hdtype, int *status);
-int ffasfm(char *tform, int *datacode, long *width, int *decim, int *status);
-int ffbnfm(char *tform, int *datacode, long *repeat, long *width, int *status);
-int ffgabc(int tfields, char **tform, int space, long *rowlen, long *tbcol,
- int *status);
-
-/*----------------- write single keywords --------------*/
-int ffpky(fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int ffprec(fitsfile *fptr, const char *card, int *status);
-int ffpcom(fitsfile *fptr, const char *comm, int *status);
-int ffpunt(fitsfile *fptr, char *keyname, char *unit, int *status);
-int ffphis(fitsfile *fptr, const char *history, int *status);
-int ffpdat(fitsfile *fptr, int *status);
-int ffgstm(char *timestr, int *timeref, int *status);
-int ffgsdt(int *day, int *month, int *year, int *status);
-int ffdt2s(int year, int month, int day, char *datestr, int *status);
-int fftm2s(int year, int month, int day, int hour, int minute, double second,
- int decimals, char *datestr, int *status);
-int ffs2dt(char *datestr, int *year, int *month, int *day, int *status);
-int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour,
- int *minute, double *second, int *status);
-int ffpkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffpkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffpkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffplsw(fitsfile *fptr, int *status);
-int ffpkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffpkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffpkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffpkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffpkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffpkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffpkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffpkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffpkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffpkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffpkyt(fitsfile *fptr, char *keyname, long intval, double frac, char *comm,
- int *status);
-int ffptdm( fitsfile *fptr, int colnum, int naxis, long naxes[], int *status);
-
-/*----------------- write array of keywords --------------*/
-int ffpkns(fitsfile *fptr, char *keyroot, int nstart, int nkey, char *value[],
- char *comm[], int *status);
-int ffpknl(fitsfile *fptr, char *keyroot, int nstart, int nkey, int *value,
- char *comm[], int *status);
-int ffpknj(fitsfile *fptr, char *keyroot, int nstart, int nkey, long *value,
- char *comm[], int *status);
-int ffpknf(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
- int decim, char *comm[], int *status);
-int ffpkne(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
- int decim, char *comm[], int *status);
-int ffpkng(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
- int decim, char *comm[], int *status);
-int ffpknd(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
- int decim, char *comm[], int *status);
-int ffcpky(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
- char *rootname, int *status);
-
-/*----------------- write required header keywords --------------*/
-int ffphps( fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status);
-int ffphpr( fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[],
- long pcount, long gcount, int extend, int *status);
-int ffphtb(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
- long *tbcol, char **tform, char **tunit, char *extname, int *status);
-int ffphbn(fitsfile *fptr, long naxis2, int tfields, char **ttype,
- char **tform, char **tunit, char *extname, long pcount, int *status);
-
-/*----------------- write template keywords --------------*/
-int ffpktp(fitsfile *fptr, const char *filename, int *status);
-
-/*------------------ get header information --------------*/
-int ffghsp(fitsfile *fptr, int *nexist, int *nmore, int *status);
-int ffghps(fitsfile *fptr, int *nexist, int *position, int *status);
-
-/*------------------ move position in header -------------*/
-int ffmaky(fitsfile *fptr, int nrec, int *status);
-int ffmrky(fitsfile *fptr, int nrec, int *status);
-
-/*------------------ read single keywords -----------------*/
-int ffgnxk(fitsfile *fptr, char **inclist, int ninc, char **exclist,
- int nexc, char *card, int *status);
-int ffgrec(fitsfile *fptr, int nrec, char *card, int *status);
-int ffgcrd(fitsfile *fptr, char *keyname, char *card, int *status);
-int ffgunt(fitsfile *fptr, char *keyname, char *unit, int *status);
-int ffgkyn(fitsfile *fptr, int nkey, char *keyname, char *keyval, char *comm,
- int *status);
-int ffgkey(fitsfile *fptr, char *keyname, char *keyval, char *comm,
- int *status);
-
-int ffgky( fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int ffgkys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
-int ffgkls(fitsfile *fptr, char *keyname, char **value, char *comm, int *status)
-;
-int ffgkyl(fitsfile *fptr, char *keyname, int *value, char *comm, int *status);
-int ffgkyj(fitsfile *fptr, char *keyname, long *value, char *comm, int *status);
-int ffgkye(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
-int ffgkyd(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
-int ffgkyc(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
-int ffgkym(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
-int ffgkyt(fitsfile *fptr, char *keyname, long *ivalue, double *dvalue,
- char *comm, int *status);
-int ffgtdm(fitsfile *fptr, int colnum, int maxdim, int *naxis, long naxes[],
- int *status);
-int ffdtdm(fitsfile *fptr, char *tdimstr, int colnum, int maxdim,
- int *naxis, long naxes[], int *status);
-
-/*------------------ read array of keywords -----------------*/
-int ffgkns(fitsfile *fptr, char *keyname, int nstart, int nmax, char *value[],
- int *nfound, int *status);
-int ffgknl(fitsfile *fptr, char *keyname, int nstart, int nmax, int *value,
- int *nfound, int *status);
-int ffgknj(fitsfile *fptr, char *keyname, int nstart, int nmax, long *value,
- int *nfound, int *status);
-int ffgkne(fitsfile *fptr, char *keyname, int nstart, int nmax, float *value,
- int *nfound, int *status);
-int ffgknd(fitsfile *fptr, char *keyname, int nstart, int nmax, double *value,
- int *nfound, int *status);
-int ffh2st(fitsfile *fptr, char **header, int *status);
-
-/*----------------- read required header keywords --------------*/
-int ffghpr(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
- long naxes[], long *pcount, long *gcount, int *extend, int *status);
-
-int ffghtb(fitsfile *fptr,int maxfield, long *naxis1, long *naxis2,
- int *tfields, char **ttype, long *tbcol, char **tform, char **tunit,
- char *extname, int *status);
-
-int ffghbn(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
- char **ttype, char **tform, char **tunit, char *extname,
- long *pcount, int *status);
-
-/*--------------------- update keywords ---------------*/
-int ffuky(fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int ffucrd(fitsfile *fptr, char *keyname, char *card, int *status);
-int ffukyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffukys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
-int ffukls(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
-int ffukyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffukyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffukyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffukye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffukyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffukyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffukyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffukym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffukfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffukfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-
-/*--------------------- modify keywords ---------------*/
-int ffmrec(fitsfile *fptr, int nkey, char *card, int *status);
-int ffmcrd(fitsfile *fptr, char *keyname, char *card, int *status);
-int ffmnam(fitsfile *fptr, char *oldname, char *newname, int *status);
-int ffmcom(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffmkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffmkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffmkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffmkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffmkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffmkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffmkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffmkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffmkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffmkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffmkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffmkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffmkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-
-/*--------------------- insert keywords ---------------*/
-int ffirec(fitsfile *fptr, int nkey, char *card, int *status);
-int ffikyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffikys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffikls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffikyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffikyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffikyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffikye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffikyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffikyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffikyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffikym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffikfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffikfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-
-/*--------------------- delete keywords ---------------*/
-int ffdkey(fitsfile *fptr, char *keyname, int *status);
-int ffdrec(fitsfile *fptr, int keypos, int *status);
-
-/*--------------------- get HDU information -------------*/
-int ffghdn(fitsfile *fptr, int *chdunum);
-int ffghdt(fitsfile *fptr, int *exttype, int *status);
-int ffghad(fitsfile *fptr, long *headstart, long *datastart, long *dataend,
- int *status);
-int ffgipr(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis,
- long *naxes, int *status);
-int ffgidt(fitsfile *fptr, int *imgtype, int *status);
-int ffgidm(fitsfile *fptr, int *naxis, int *status);
-int ffgisz(fitsfile *fptr, int nlen, long *naxes, int *status);
-
-/*--------------------- HDU operations -------------*/
-int ffmahd(fitsfile *fptr, int hdunum, int *exttype, int *status);
-int ffmrhd(fitsfile *fptr, int hdumov, int *exttype, int *status);
-int ffmnhd(fitsfile *fptr, int exttype, char *hduname, int hduvers,
- int *status);
-int ffthdu(fitsfile *fptr, int *nhdu, int *status);
-int ffcrhd(fitsfile *fptr, int *status);
-int ffcrim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
-int ffcrtb(fitsfile *fptr, int tbltype, long naxis2, int tfields, char **ttype,
- char **tform, char **tunit, char *extname, int *status);
-int ffiimg(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
-int ffitab(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
- long *tbcol, char **tform, char **tunit, char *extname, int *status);
-int ffibin(fitsfile *fptr,long naxis2, int tfields, char **ttype, char **tform,
- char **tunit, char *extname, long pcount, int *status);
-int ffrsim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
-int ffdhdu(fitsfile *fptr, int *hdutype, int *status);
-int ffcopy(fitsfile *infptr, fitsfile *outfptr, int morekeys, int *status);
-int ffcphd(fitsfile *infptr, fitsfile *outfptr, int *status);
-int ffcpdt(fitsfile *infptr, fitsfile *outfptr, int *status);
-int ffchfl(fitsfile *fptr, int *status);
-int ffcdfl(fitsfile *fptr, int *status);
-
-int ffrdef(fitsfile *fptr, int *status);
-int ffhdef(fitsfile *fptr, int morekeys, int *status);
-int ffpthp(fitsfile *fptr, long theap, int *status);
-
-int ffcsum(fitsfile *fptr, long nrec, unsigned long *sum, int *status);
-void ffesum(unsigned long sum, int complm, char *ascii);
-unsigned long ffdsum(char *ascii, int complm, unsigned long *sum);
-int ffpcks(fitsfile *fptr, int *status);
-int ffupck(fitsfile *fptr, int *status);
-int ffvcks(fitsfile *fptr, int *datastatus, int *hdustatus, int *status);
-int ffgcks(fitsfile *fptr, unsigned long *datasum, unsigned long *hdusum,
- int *status);
-
-/*--------------------- define scaling or null values -------------*/
-int ffpscl(fitsfile *fptr, double scale, double zero, int *status);
-int ffpnul(fitsfile *fptr, long nulvalue, int *status);
-int fftscl(fitsfile *fptr, int colnum, double scale, double zero, int *status);
-int fftnul(fitsfile *fptr, int colnum, long nulvalue, int *status);
-int ffsnul(fitsfile *fptr, int colnum, char *nulstring, int *status);
-
-/*--------------------- get column information -------------*/
-int ffgcno(fitsfile *fptr, int casesen, char *templt, int *colnum,
- int *status);
-int ffgcnn(fitsfile *fptr, int casesen, char *templt, char *colname,
- int *colnum, int *status);
-
-int ffgtcl(fitsfile *fptr, int colnum, int *typecode, long *repeat,
- long *width, int *status);
-int ffgncl(fitsfile *fptr, int *ncols, int *status);
-int ffgnrw(fitsfile *fptr, long *nrows, int *status);
-int ffgacl(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
- char *tunit, char *tform, double *tscal, double *tzero,
- char *tnull, char *tdisp, int *status);
-int ffgbcl(fitsfile *fptr, int colnum, char *ttype, char *tunit,
- char *dtype, long *repeat, double *tscal, double *tzero,
- long *tnull, char *tdisp, int *status);
-int ffgrsz(fitsfile *fptr, long *nrows, int *status);
-int ffgcdw(fitsfile *fptr, int colnum, int *width, int *status);
-
-/*--------------------- read primary array or image elements -------------*/
-int ffgpv(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *nulval, void *array, int *anynul, int *status);
-int ffgpf(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *array, char *nullarray, int *anynul, int *status);
-int ffgpvb(fitsfile *fptr, long group, long firstelem, long nelem, unsigned
- char nulval, unsigned char *array, int *anynul, int *status);
-int ffgpvui(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned short nulval, unsigned short *array, int *anynul,
- int *status);
-int ffgpvi(fitsfile *fptr, long group, long firstelem, long nelem,
- short nulval, short *array, int *anynul, int *status);
-int ffgpvuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long nulval, unsigned long *array, int *anynul,
- int *status);
-int ffgpvj(fitsfile *fptr, long group, long firstelem, long nelem,
- long nulval, long *array, int *anynul, int *status);
-int ffgpvuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int nulval, unsigned int *array, int *anynul, int *status);
-int ffgpvk(fitsfile *fptr, long group, long firstelem, long nelem,
- int nulval, int *array, int *anynul, int *status);
-int ffgpve(fitsfile *fptr, long group, long firstelem, long nelem,
- float nulval, float *array, int *anynul, int *status);
-int ffgpvd(fitsfile *fptr, long group, long firstelem, long nelem,
- double nulval, double *array, int *anynul, int *status);
-
-int ffgpfb(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned char *array, char *nularray, int *anynul, int *status);
-int ffgpfui(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned short *array, char *nularray, int *anynul, int *status);
-int ffgpfi(fitsfile *fptr, long group, long firstelem, long nelem,
- short *array, char *nularray, int *anynul, int *status);
-int ffgpfuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long *array, char *nularray, int *anynul, int *status);
-int ffgpfj(fitsfile *fptr, long group, long firstelem, long nelem,
- long *array, char *nularray, int *anynul, int *status);
-int ffgpfuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int *array, char *nularray, int *anynul, int *status);
-int ffgpfk(fitsfile *fptr, long group, long firstelem, long nelem,
- int *array, char *nularray, int *anynul, int *status);
-int ffgpfe(fitsfile *fptr, long group, long firstelem, long nelem,
- float *array, char *nularray, int *anynul, int *status);
-int ffgpfd(fitsfile *fptr, long group, long firstelem, long nelem,
- double *array, char *nularray, int *anynul, int *status);
-
-int ffg2db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
- long naxis1, long naxis2, unsigned char *array,
- int *anynul, int *status);
-int ffg2dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
- long naxis1, long naxis2, unsigned short *array,
- int *anynul, int *status);
-int ffg2di(fitsfile *fptr, long group, short nulval, long ncols,
- long naxis1, long naxis2, short *array,
- int *anynul, int *status);
-int ffg2duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
- long naxis1, long naxis2, unsigned long *array,
- int *anynul, int *status);
-int ffg2dj(fitsfile *fptr, long group, long nulval, long ncols,
- long naxis1, long naxis2, long *array,
- int *anynul, int *status);
-int ffg2duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
- long naxis1, long naxis2, unsigned int *array,
- int *anynul, int *status);
-int ffg2dk(fitsfile *fptr, long group, int nulval, long ncols,
- long naxis1, long naxis2, int *array,
- int *anynul, int *status);
-int ffg2de(fitsfile *fptr, long group, float nulval, long ncols,
- long naxis1, long naxis2, float *array,
- int *anynul, int *status);
-int ffg2dd(fitsfile *fptr, long group, double nulval, long ncols,
- long naxis1, long naxis2, double *array,
- int *anynul, int *status);
-
-int ffg3db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned char *array, int *anynul, int *status);
-int ffg3dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned short *array, int *anynul, int *status);
-int ffg3di(fitsfile *fptr, long group, short nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- short *array, int *anynul, int *status);
-int ffg3duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned long *array, int *anynul, int *status);
-int ffg3dj(fitsfile *fptr, long group, long nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- long *array, int *anynul, int *status);
-int ffg3duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned int *array, int *anynul, int *status);
-int ffg3dk(fitsfile *fptr, long group, int nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- int *array, int *anynul, int *status);
-int ffg3de(fitsfile *fptr, long group, float nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- float *array, int *anynul, int *status);
-int ffg3dd(fitsfile *fptr, long group, double nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- double *array, int *anynul, int *status);
-
-int ffgsvb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned char nulval, unsigned char *array,
- int *anynul, int *status);
-int ffgsvui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned short nulval, unsigned short *array,
- int *anynul, int *status);
-int ffgsvi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, short nulval, short *array, int *anynul, int *status);
-int ffgsvuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned long nulval, unsigned long *array,
- int *anynul, int *status);
-int ffgsvj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, long nulval, long *array, int *anynul, int *status);
-int ffgsvuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned int nulval, unsigned int *array,
- int *anynul, int *status);
-int ffgsvk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, int nulval, int *array, int *anynul, int *status);
-int ffgsve(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, float nulval, float *array, int *anynul, int *status);
-int ffgsvd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, double nulval, double *array, int *anynul,
- int *status);
-
-int ffgsfb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned char *array, char *flagval,
- int *anynul, int *status);
-int ffgsfui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned short *array, char *flagval, int *anynul,
- int *status);
-int ffgsfi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, short *array, char *flagval, int *anynul, int *status);
-int ffgsfuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned long *array, char *flagval, int *anynul,
- int *status);
-int ffgsfj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, long *array, char *flagval, int *anynul, int *status);
-int ffgsfuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned int *array, char *flagval, int *anynul,
- int *status);
-int ffgsfk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, int *array, char *flagval, int *anynul, int *status);
-int ffgsfe(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, float *array, char *flagval, int *anynul, int *status);
-int ffgsfd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, double *array, char *flagval, int *anynul,
- int *status);
-
-int ffggpb(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned char *array, int *status);
-int ffggpui(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned short *array, int *status);
-int ffggpi(fitsfile *fptr, long group, long firstelem, long nelem,
- short *array, int *status);
-int ffggpuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long *array, int *status);
-int ffggpj(fitsfile *fptr, long group, long firstelem, long nelem,
- long *array, int *status);
-int ffggpuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int *array, int *status);
-int ffggpk(fitsfile *fptr, long group, long firstelem, long nelem,
- int *array, int *status);
-int ffggpe(fitsfile *fptr, long group, long firstelem, long nelem,
- float *array, int *status);
-int ffggpd(fitsfile *fptr, long group, long firstelem, long nelem,
- double *array, int *status);
-
-/*--------------------- read column elements -------------*/
-int ffgcv( fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *nulval, void *array, int *anynul,
- int *status);
-int ffgcf( fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *array, char *nullarray,
- int *anynul, int *status);
-int ffgcvs(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *nulval, char **array, int *anynul, int *status);
-int ffgcl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *array, int *status);
-int ffgcvl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char nulval, char *array, int *anynul, int *status);
-int ffgcvb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned char nulval, unsigned char *array,
- int *anynul, int *status);
-int ffgcvui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short nulval, unsigned short *array,
- int *anynul, int *status);
-int ffgcvi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short nulval, short *array, int *anynul, int *status);
-int ffgcvuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long nulval, unsigned long *array, int *anynul,
- int *status);
-int ffgcvj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long nulval, long *array, int *anynul, int *status);
-int ffgcvuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int nulval, unsigned int *array, int *anynul,
- int *status);
-int ffgcvk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int nulval, int *array, int *anynul, int *status);
-int ffgcve(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float nulval, float *array, int *anynul, int *status);
-int ffgcvd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double nulval, double *array, int *anynul, int *status);
-int ffgcvc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float nulval, float *array, int *anynul, int *status);
-int ffgcvm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double nulval, double *array, int *anynul, int *status);
-int ffgcx(fitsfile *fptr, int colnum, long firstrow, long firstbit,
- long nbits, char *larray, int *status);
-int ffgcxui(fitsfile *fptr, int colnum, long firstrow, long nrows,
- long firstbit, int nbits, unsigned short *array, int *status);
-int ffgcxuk(fitsfile *fptr, int colnum, long firstrow, long nrows,
- long firstbit, int nbits, unsigned int *array, int *status);
-
-int ffgcfs(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, char **array, char *nularray, int *anynul, int *status);
-int ffgcfl(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, char *array, char *nularray, int *anynul, int *status);
-int ffgcfb(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, unsigned char *array, char *nularray, int *anynul, int *status);
-int ffgcfui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short *array, char *nularray, int *anynul,
- int *status);
-int ffgcfi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short *array, char *nularray, int *anynul, int *status);
-int ffgcfuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long *array, char *nularray, int *anynul,
- int *status);
-int ffgcfj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long *array, char *nularray, int *anynul, int *status);
-int ffgcfuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int *array, char *nularray, int *anynul,
- int *status);
-int ffgcfk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *array, char *nularray, int *anynul, int *status);
-int ffgcfe(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, char *nularray, int *anynul, int *status);
-int ffgcfd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, char *nularray, int *anynul, int *status);
-int ffgcfc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, char *nularray, int *anynul, int *status);
-int ffgcfm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, char *nularray, int *anynul, int *status);
-
-int ffgdes(fitsfile *fptr, int colnum, long rownum, long *length,
- long *heapaddr, int *status);
-
-int ffgdess(fitsfile *fptr, int colnum, long firstrow, long nrows, long *length,
- long *heapaddr, int *status);
-
-int ffgtbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
- unsigned char *values, int *status);
-
-/*------------ write primary array or image elements -------------*/
-int ffppr(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *array, int *status);
-int ffpprb(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned char *array, int *status);
-int ffpprui(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned short *array, int *status);
-int ffppri(fitsfile *fptr, long group, long firstelem,
- long nelem, short *array, int *status);
-int ffppruj(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned long *array, int *status);
-int ffpprj(fitsfile *fptr, long group, long firstelem,
- long nelem, long *array, int *status);
-int ffppruk(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned int *array, int *status);
-int ffpprk(fitsfile *fptr, long group, long firstelem,
- long nelem, int *array, int *status);
-int ffppre(fitsfile *fptr, long group, long firstelem,
- long nelem, float *array, int *status);
-int ffpprd(fitsfile *fptr, long group, long firstelem,
- long nelem, double *array, int *status);
-
-int ffppru(fitsfile *fptr, long group, long firstelem, long nelem,
- int *status);
-int ffpprn(fitsfile *fptr, long firstelem, long nelem, int *status);
-
-int ffppn(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *array, void *nulval, int *status);
-int ffppnb(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned char *array, unsigned char nulval, int *status);
-int ffppnui(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned short *array, unsigned short nulval,
- int *status);
-int ffppni(fitsfile *fptr, long group, long firstelem,
- long nelem, short *array, short nulval, int *status);
-int ffppnj(fitsfile *fptr, long group, long firstelem,
- long nelem, long *array, long nulval, int *status);
-int ffppnuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long *array, unsigned long nulval, int *status);
-int ffppnuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int *array, unsigned int nulval, int *status);
-int ffppnk(fitsfile *fptr, long group, long firstelem,
- long nelem, int *array, int nulval, int *status);
-int ffppne(fitsfile *fptr, long group, long firstelem,
- long nelem, float *array, float nulval, int *status);
-int ffppnd(fitsfile *fptr, long group, long firstelem,
- long nelem, double *array, double nulval, int *status);
-
-int ffp2db(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned char *array, int *status);
-int ffp2dui(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned short *array, int *status);
-int ffp2di(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, short *array, int *status);
-int ffp2duj(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned long *array, int *status);
-int ffp2dj(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, long *array, int *status);
-int ffp2duk(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned int *array, int *status);
-int ffp2dk(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, int *array, int *status);
-int ffp2de(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, float *array, int *status);
-int ffp2dd(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, double *array, int *status);
-
-int ffp3db(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned char *array, int *status);
-int ffp3dui(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned short *array, int *status);
-int ffp3di(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, short *array, int *status);
-int ffp3duj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned long *array, int *status);
-int ffp3dj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, long *array, int *status);
-int ffp3duk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned int *array, int *status);
-int ffp3dk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, int *array, int *status);
-int ffp3de(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, float *array, int *status);
-int ffp3dd(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, double *array, int *status);
-
-int ffpssb(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned char *array, int *status);
-int ffpssui(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned short *array, int *status);
-int ffpssi(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, short *array, int *status);
-int ffpssuj(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned long *array, int *status);
-int ffpssj(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, long *array, int *status);
-int ffpssuk(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned int *array, int *status);
-int ffpssk(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, int *array, int *status);
-int ffpsse(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, float *array, int *status);
-int ffpssd(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, double *array, int *status);
-
-int ffpgpb(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned char *array, int *status);
-int ffpgpui(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned short *array, int *status);
-int ffpgpi(fitsfile *fptr, long group, long firstelem,
- long nelem, short *array, int *status);
-int ffpgpuj(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned long *array, int *status);
-int ffpgpj(fitsfile *fptr, long group, long firstelem,
- long nelem, long *array, int *status);
-int ffpgpuk(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned int *array, int *status);
-int ffpgpk(fitsfile *fptr, long group, long firstelem,
- long nelem, int *array, int *status);
-int ffpgpe(fitsfile *fptr, long group, long firstelem,
- long nelem, float *array, int *status);
-int ffpgpd(fitsfile *fptr, long group, long firstelem,
- long nelem, double *array, int *status);
-
-/*--------------------- iterator functions -------------*/
-int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, char *colname,
- int datatype, int iotype);
-int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, int colnum,
- int datatype, int iotype);
-int fits_iter_set_file(iteratorCol *col, fitsfile *fptr);
-int fits_iter_set_colname(iteratorCol *col, char *colname);
-int fits_iter_set_colnum(iteratorCol *col, int colnum);
-int fits_iter_set_datatype(iteratorCol *col, int datatype);
-int fits_iter_set_iotype(iteratorCol *col, int iotype);
-
-fitsfile * fits_iter_get_file(iteratorCol *col);
-char * fits_iter_get_colname(iteratorCol *col);
-int fits_iter_get_colnum(iteratorCol *col);
-int fits_iter_get_datatype(iteratorCol *col);
-int fits_iter_get_iotype(iteratorCol *col);
-void * fits_iter_get_array(iteratorCol *col);
-long fits_iter_get_tlmin(iteratorCol *col);
-long fits_iter_get_tlmax(iteratorCol *col);
-long fits_iter_get_repeat(iteratorCol *col);
-char * fits_iter_get_tunit(iteratorCol *col);
-char * fits_iter_get_tdisp(iteratorCol *col);
-
-int ffiter(int ncols, iteratorCol *data, long offset, long nPerLoop,
- int (*workFn)( long totaln, long offset, long firstn,
- long nvalues, int narrays, iteratorCol *data, void *userPointer),
- void *userPointer, int *status);
-
-/*--------------------- write column elements -------------*/
-int ffpcl(fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *array, int *status);
-int ffpcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char **array, int *status);
-int ffpcll(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *array, int *status);
-int ffpclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned char *array, int *status);
-int ffpclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short *array, int *status);
-int ffpcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short *array, int *status);
-int ffpcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long *array, int *status);
-int ffpclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long *array, int *status);
-int ffpcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int *array, int *status);
-int ffpclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *array, int *status);
-int ffpcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, int *status);
-int ffpcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, int *status);
-int ffpclc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, int *status);
-int ffpclm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, int *status);
-int ffpclu(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *status);
-int ffpclx(fitsfile *fptr, int colnum, long frow, long fbit, long nbit,
- char *larray, int *status);
-
-int ffpcn(fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *array, void *nulval, int *status);
-int ffpcns( fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char **array, char *nulvalue, int *status);
-int ffpcnl( fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *array, char nulvalue, int *status);
-int ffpcnb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned char *array, unsigned char nulvalue,
- int *status);
-int ffpcnui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short *array, unsigned short nulvalue,
- int *status);
-int ffpcni(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short *array, short nulvalue, int *status);
-int ffpcnuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long *array, unsigned long nulvalue,
- int *status);
-int ffpcnj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long *array, long nulvalue, int *status);
-int ffpcnuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int *array, unsigned int nulvalue,
- int *status);
-int ffpcnk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *array, int nulvalue, int *status);
-int ffpcne(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, float nulvalue, int *status);
-int ffpcnd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, double nulvalue, int *status);
-
-int ffpdes(fitsfile *fptr, int colnum, long rownum, long length,
- long heapaddr, int *status);
-
-int ffptbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
- unsigned char *values, int *status);
-
-int ffirow(fitsfile *fptr, long firstrow, long nrows, int *status);
-int ffdrow(fitsfile *fptr, long firstrow, long nrows, int *status);
-int ffdrws(fitsfile *fptr, long *rownum, long nrows, int *status);
-int fficol(fitsfile *fptr, int numcol, char *ttype, char *tform, int *status);
-int fficls(fitsfile *fptr, int firstcol, int ncols, char **ttype,
- char **tform, int *status);
-int ffmvec(fitsfile *fptr, int colnum, long newveclen, int *status);
-int ffdcol(fitsfile *fptr, int numcol, int *status);
-int ffcpcl(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
- int create_col, int *status);
-
-/*--------------------- WCS Utilities ------------------*/
-int ffgics(fitsfile *fptr, double *xrval, double *yrval, double *xrpix,
- double *yrpix, double *xinc, double *yinc, double *rot,
- char *type, int *status);
-int ffgtcs(fitsfile *fptr, int xcol, int ycol, double *xrval,
- double *yrval, double *xrpix, double *yrpix, double *xinc,
- double *yinc, double *rot, char *type, int *status);
-int ffwldp(double xpix, double ypix, double xref, double yref,
- double xrefpix, double yrefpix, double xinc, double yinc,
- double rot, char *type, double *xpos, double *ypos, int *status);
-int ffxypx(double xpos, double ypos, double xref, double yref,
- double xrefpix, double yrefpix, double xinc, double yinc,
- double rot, char *type, double *xpix, double *ypix, int *status);
-
-/* WCS support routines (provide interface to Doug Mink's WCS library */
-int ffgiwcs(fitsfile *fptr, char **header, int *status);
-int ffgtwcs(fitsfile *fptr, int xcol, int ycol, char **header, int *status);
-
-/*--------------------- lexical parsing routines ------------------*/
-int fftexp( fitsfile *fptr, char *expr, int maxdim,
- int *datatype, long *nelem, int *naxis,
- long *naxes, int *status );
-
-int fffrow( fitsfile *infptr, char *expr,
- long firstrow, long nrows,
- long *n_good_rows, char *row_status, int *status);
-
-int ffffrw( fitsfile *fptr, char *expr, long *rownum, int *status);
-
-int fffrwc( fitsfile *fptr, char *expr, char *timeCol,
- char *parCol, char *valCol, long ntimes,
- double *times, char *time_status, int *status );
-
-int ffsrow( fitsfile *infptr, fitsfile *outfptr, char *expr,
- int *status);
-
-int ffcrow( fitsfile *fptr, int datatype, char *expr,
- long firstrow, long nelements, void *nulval,
- void *array, int *anynul, int *status );
-
-int ffcalc_rng( fitsfile *infptr, char *expr, fitsfile *outfptr,
- char *parName, char *parInfo, int nRngs,
- long *start, long *end, int *status );
-
-int ffcalc( fitsfile *infptr, char *expr, fitsfile *outfptr,
- char *parName, char *parInfo, int *status );
-
- /* ffhist is not really intended as a user-callable routine */
- /* but it may be useful for some specialized applications */
-
-int ffhist(fitsfile **fptr, char *outfile, int imagetype, int naxis,
- char colname[4][FLEN_VALUE],
- double *minin, double *maxin, double *binsizein,
- char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
- char binname[4][FLEN_VALUE],
- double weightin, char wtcol[FLEN_VALUE],
- int recip, char *rowselect, int *status);
-
-int fits_select_image_section(fitsfile **fptr, char *outfile,
- char *imagesection, int *status);
-int fits_select_section( fitsfile *infptr, fitsfile *outfptr,
- char *imagesection, int *status);
-
-/*--------------------- grouping routines ------------------*/
-
-int ffgtcr(fitsfile *fptr, char *grpname, int grouptype, int *status);
-int ffgtis(fitsfile *fptr, char *grpname, int grouptype, int *status);
-int ffgtch(fitsfile *gfptr, int grouptype, int *status);
-int ffgtrm(fitsfile *gfptr, int rmopt, int *status);
-int ffgtcp(fitsfile *infptr, fitsfile *outfptr, int cpopt, int *status);
-int ffgtmg(fitsfile *infptr, fitsfile *outfptr, int mgopt, int *status);
-int ffgtcm(fitsfile *gfptr, int cmopt, int *status);
-int ffgtvf(fitsfile *gfptr, long *firstfailed, int *status);
-int ffgtop(fitsfile *mfptr,int group,fitsfile **gfptr,int *status);
-int ffgtam(fitsfile *gfptr, fitsfile *mfptr, int hdupos, int *status);
-int ffgtnm(fitsfile *gfptr, long *nmembers, int *status);
-int ffgmng(fitsfile *mfptr, long *nmembers, int *status);
-int ffgmop(fitsfile *gfptr, long member, fitsfile **mfptr, int *status);
-int ffgmcp(fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt,
- int *status);
-int ffgmtf(fitsfile *infptr, fitsfile *outfptr, long member, int tfopt,
- int *status);
-int ffgmrm(fitsfile *fptr, long member, int rmopt, int *status);
-
-/*--------------------- group template parser routines ------------------*/
-
-int fits_execute_template(fitsfile *ff, char *ngp_template, int *status);
-
-/*--------------------- image compression routines ------------------*/
-
-int fits_comp_img(fitsfile *infptr, fitsfile *outfptr, int compress_type,
- long *tilesize, int parm1, int parm2, int *status);
-int fits_is_compressed_image(fitsfile *fptr, int *status);
-int fits_decomp_img (fitsfile *infptr, fitsfile *outfptr, int *status);
-int fits_read_compressed_img(fitsfile *fptr,
- int datatype, long *fpixel,long *lpixel,long *inc,
- int nullcheck, void *nulval, void *array, char *nullarray,
- int *anynul, int *status);
-
-int fits_read_compressed_pixels(fitsfile *fptr,
- int datatype, long fpixel, long npixels,
- int nullcheck, void *nulval, void *array, char *nullarray,
- int *anynul, int *status);
-
-int fits_quantize_float (float fdata[], int nx, float in_null_value,
- int noise_bits, int idata[], double *bscale, double *bzero,
- int *iminval, int *imaxval);
-int fits_quantize_double (double fdata[], int nx, double in_null_value,
- int noise_bits, int idata[], double *bscale, double *bzero,
- int *iminval, int *imaxval);
-int fits_rcomp(int a[], int nx, unsigned char *c, int clen,int nblock);
-int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx,
- int nblock);
-
-/* The following exclusion if __CINT__ is defined is needed for ROOT */
-#ifndef __CINT__
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-#endif
-
diff --git a/include/cfitsio/fitsio2.h b/include/cfitsio/fitsio2.h
deleted file mode 100644
index 5636cc3..0000000
--- a/include/cfitsio/fitsio2.h
+++ /dev/null
@@ -1,870 +0,0 @@
-#ifndef _FITSIO2_H
-#define _FITSIO2_H
-
-#include "fitsio.h"
-
-#define DBUFFSIZE 28800 /* size of data buffer in bytes */
-
-#define NIOBUF 25 /* number of IO buffers to create */
-#define IOBUFLEN 2880 /* size in bytes of each IO buffer */
-#define MINDIRECT 8640 /* minimum size for direct reads and writes */
- /* MINDIRECT must have a value >= 8640 */
-
-#define NATIVE 0 /* a generic machine that uses IEEE formats */
-#define ULTRIX 1
-#define ALPHA_OSF 2
-#define VAXVMS 3
-#define ALPHAVMS 4
-#define IBMPC 5
-#define CRAY 6
-
-#define GFLOAT 1
-#define IEEEFLOAT 2
-
-/* the following are used to determine what type machine we are running on */
-
-/* the following block determines the size of longs on SGI IRIX machines */
-#if defined(_MIPS_SZLONG)
-# if _MIPS_SZLONG == 32
-# define LONGSIZE 32
-# elif _MIPS_SZLONG == 64
-# define LONGSIZE 64
-# else
-# error "can't handle long size given by _MIPS_SZLONG"
-# endif
-#endif
-
-#if defined(vax) && defined(VMS)
-
-#define MACHINE VAXVMS
-#define BYTESWAPPED TRUE
-
-#elif defined(__alpha) && defined(__VMS)
-
-#if (__D_FLOAT == TRUE)
-
-/* this float option is the same as for VAX/VMS machines. */
-#define MACHINE VAXVMS
-#define BYTESWAPPED TRUE
-
-#elif (__G_FLOAT == TRUE)
-
-/* G_FLOAT is the default for ALPHA VMS systems */
-#define MACHINE ALPHAVMS
-#define BYTESWAPPED TRUE
-#define FLOATTYPE GFLOAT
-
-#elif (__IEEE_FLOAT == TRUE)
-
-#define MACHINE ALPHAVMS
-#define BYTESWAPPED TRUE
-#define FLOATTYPE IEEEFLOAT
-
-#endif
-
-#elif defined(__alpha) && defined(__unix__)
-
-#define MACHINE ALPHA_OSF
-#define BYTESWAPPED TRUE
-#define LONGSIZE 64
-
-#elif defined(ultrix) && defined(unix)
-
-#define MACHINE ULTRIX
-#define BYTESWAPPED TRUE
-
-#elif defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__)
-
-/* IBM PC */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TURBOC__)
-
-/* IBM PC running DOS or Windows */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(_NI_mswin_)
-
-/* LabWindows/CVI with Windows 3.x, 95, or NT */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(__EMX__)
-
-/* IBM PC running OS/2 */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(__sparcv9)
-
-/* SUN Solaris7 in 64-bit mode */
-#define BYTESWAPPED FALSE
-#define MACHINE NATIVE
-#define LONGSIZE 64
-
-#else
-
-/* assume machine uses the same IEEE formats as used in FITS files */
-#define MACHINE NATIVE
-#define BYTESWAPPED FALSE
-
-#endif
-
-/* assume longs are 4 bytes long, unless previously set otherwise */
-#ifndef LONGSIZE
-#define LONGSIZE 32
-#endif
-
-#define IGNORE_EOF 1
-#define REPORT_EOF 0
-#define DATA_UNDEFINED -1
-#define NULL_UNDEFINED 1234554321
-#define ASCII_NULL_UNDEFINED 1 /* indicate no defined null value */
-
-#define maxvalue(A,B) ((A) > (B) ? (A) : (B))
-#define minvalue(A,B) ((A) < (B) ? (A) : (B))
-
-#define FSTRCMP(a,b) ((a)[0]<(b)[0]? -1:(a)[0]>(b)[0]?1:strcmp((a),(b)))
-#define FSTRNCMP(a,b,n) ((a)[0]<(b)[0]?-1:(a)[0]>(b)[0]?1:strncmp((a),(b),(n)))
-
-#if defined(__VMS) || defined(VMS)
-
-#define FNANMASK 0xFFFF /* mask all bits */
-#define DNANMASK 0xFFFF /* mask all bits */
-
-#else
-
-#define FNANMASK 0x7F80 /* mask bits 1 - 8; all set on NaNs */
- /* all 0 on underflow or 0. */
-
-#define DNANMASK 0x7FF0 /* mask bits 1 - 11; all set on NaNs */
- /* all 0 on underflow or 0. */
-
-#endif
-
-#if MACHINE == CRAY
- /*
- Cray machines: the large negative integer corresponds
- to the 3 most sig digits set to 1. If these
- 3 bits are set in a floating point number (64 bits), then it represents
- a reserved value (i.e., a NaN)
- */
-#define fnan(L) ( (L) >= 0xE000000000000000 ? 1 : 0) )
-
-#else
- /* these functions work for both big and little endian machines */
- /* that use the IEEE floating point format for internal numbers */
-
- /* These functions tests whether the float value is a reserved IEEE */
- /* value such as a Not-a-Number (NaN), or underflow, overflow, or */
- /* infinity. The functions returns 1 if the value is a NaN, overflow */
- /* or infinity; it returns 2 if the value is an denormalized underflow */
- /* value; otherwise it returns 0. fnan tests floats, dnan tests doubles */
-
-#define fnan(L) \
- ( (L & FNANMASK) == FNANMASK ? 1 : (L & FNANMASK) == 0 ? 2 : 0)
-
-#define dnan(L) \
- ( (L & DNANMASK) == DNANMASK ? 1 : (L & DNANMASK) == 0 ? 2 : 0)
-
-#endif
-
-#define DUCHAR_MAX 255.49 /* max double value that fits in an unsigned char */
-#define DUCHAR_MIN -0.49 /* min double value that fits in an unsigned char */
-#define DUSHRT_MAX 65535.49 /* max double value that fits in a unsigned short*/
-#define DUSHRT_MIN -0.49 /* min double value that fits in an unsigned short */
-#define DSHRT_MAX 32767.49 /* max double value that fits in a short */
-#define DSHRT_MIN -32768.49 /* min double value that fits in a short */
-#define DULONG_MAX 4294967295.49 /* max double that fits in a unsigned long */
-#define DULONG_MIN -0.49 /* min double value that fits in an unsigned long */
-#define DLONG_MAX 2147483647.49 /* max double value that fits in a long */
-#define DLONG_MIN -2147483648.49 /* min double value that fits in a long */
-#define DUINT_MAX 4294967295.49 /* max dbl that fits in a unsigned 4-byte int */
-#define DUINT_MIN -0.49 /* min dbl that fits in an unsigned 4-byte int */
-#define DINT_MAX 2147483647.49 /* max double value that fits in a 4-byte int */
-#define DINT_MIN -2147483648.49 /* min double value that fits in a 4-byte int */
-
-#ifndef UINT32_MAX
-#define UINT32_MAX 4294967295U /* max unsigned 32-bit integer */
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX 2147483647 /* max 32-bit integer */
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN -2147483647 /* min 32-bit integer */
-#endif
-
-#define COMPRESS_NULL_VALUE -2147483647
-
-int ffmkky(char *keyname, char *keyval, char *comm, char *card, int *status);
-int ffgnky(fitsfile *fptr, char *card, int *status);
-void ffcfmt(char *tform, char *cform);
-void ffcdsp(char *tform, char *cform);
-void ffswap2(short *values, long nvalues);
-void ffswap4(INT32BIT *values, long nvalues);
-void ffswap8(double *values, long nvalues);
-int ffi2c(long ival, char *cval, int *status);
-int ffl2c(int lval, char *cval, int *status);
-int ffs2c(char *instr, char *outstr, int *status);
-int ffr2f(float fval, int decim, char *cval, int *status);
-int ffr2e(float fval, int decim, char *cval, int *status);
-int ffd2f(double dval, int decim, char *cval, int *status);
-int ffd2e(double dval, int decim, char *cval, int *status);
-int ffc2ii(char *cval, long *ival, int *status);
-int ffc2ll(char *cval, int *lval, int *status);
-int ffc2rr(char *cval, float *fval, int *status);
-int ffc2dd(char *cval, double *dval, int *status);
-int ffc2x(char *cval, char *dtype, long *ival, int *lval, char *sval,
- double *dval, int *status);
-int ffc2s(char *instr, char *outstr, int *status);
-int ffc2i(char *cval, long *ival, int *status);
-int ffc2r(char *cval, float *fval, int *status);
-int ffc2d(char *cval, double *dval, int *status);
-int ffc2l(char *cval, int *lval, int *status);
-void ffxmsg(int action, char *err_message);
-int ffgcnt(fitsfile *fptr, char *value, int *status);
-int ffgtkn(fitsfile *fptr, int numkey, char *keyname, long *value, int *status);
-int fftkyn(fitsfile *fptr, int numkey, char *keyname, char *value, int *status);
-int ffgphd(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
- long naxes[], long *pcount, long *gcount, int *extend, double *bscale,
- double *bzero, long *blank, int *nspace, int *status);
-int ffgttb(fitsfile *fptr, long *rowlen, long *nrows, long *pcount,
- long *tfield, int *status);
-
-int ffmkey(fitsfile *fptr, char *card, int *status);
-int ffikey(fitsfile *fptr, char *card, int *status);
-
-int ffmbyt(fitsfile *fptr, long bytpos, int ignore_err, int *status);
-int ffgbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
-int ffpbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
-int ffgbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
- void *buffer, int *status);
-int ffpbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
- void *buffer, int *status);
-int ffldrc(fitsfile *fptr, long record, int err_mode, int *status);
-int ffwhbf(fitsfile *fptr, int *nbuff);
-int ffcurbuf(int nbuff, FITSfile **Fptr);
-int ffflsh(fitsfile *fptr, int clearbuf, int *status);
-int ffbfeof(fitsfile *fptr, int *status);
-int ffbfwt(int nbuff, int *status);
-int fits_get_num_files(void);
-int ffpxsz(int datatype);
-
-int ffoptplt(fitsfile *fptr, const char *tempname, int *status);
-int fits_is_this_a_copy(char *urltype);
-int fits_already_open(fitsfile **fptr, char *url,
- char *urltype, char *infile, char *extspec, char *rowfilter,
- char *binspec, char *colspec, int mode,int *isopen, int *status);
-int ffedit_columns(fitsfile **fptr, char *outfile, char *expr, int *status);
-int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin,
- float *datamax, int *status);
-int ffwritehisto(long totaln, long offset, long firstn, long nvalues,
- int narrays, iteratorCol *imagepars, void *userPointer);
-int ffcalchist(long totalrows, long offset, long firstrow, long nrows,
- int ncols, iteratorCol *colpars, void *userPointer);
-int fits_copy_image_cell(fitsfile **fptr, char *outfile, char *colname,
- long rownum, int *status);
-int fits_copy_image_keywords(fitsfile *infptr, fitsfile *outfptr, int *status);
-int fits_get_section_range(char **ptr,long *secmin,long *secmax,long *incre,
- int *status);
-int ffrhdu(fitsfile *fptr, int *hdutype, int *status);
-int ffpinit(fitsfile *fptr, int *status);
-int ffainit(fitsfile *fptr, int *status);
-int ffbinit(fitsfile *fptr, int *status);
-int ffchdu(fitsfile *fptr, int *status);
-int ffwend(fitsfile *fptr, int *status);
-int ffpdfl(fitsfile *fptr, int *status);
-int ffuptf(fitsfile *fptr, int *status);
-
-int ffdblk(fitsfile *fptr, long nblocks, int *status);
-int ffgext(fitsfile *fptr, int moveto, int *exttype, int *status);
-int ffgtbc(fitsfile *fptr, long *totalwidth, int *status);
-int ffgtbp(fitsfile *fptr, char *name, char *value, int *status);
-int ffiblk(fitsfile *fptr, long nblock, int headdata, int *status);
-int ffshft(fitsfile *fptr, long firstbyte, long nbytes, long nshift,
- int *status);
-
-int ffgcpr(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int writemode, double *scale, double *zero, char *tform,
- long *twidth, int *tcode, int *maxelem, long *startpos,
- long *elemnum, long *incre, long *repeat,long *rowlen,
- int *hdutype, long *tnull, char *snull, int *status);
-
-int ffflushx(FITSfile *fptr);
-int ffseek(FITSfile *fptr, long position);
-int ffread(FITSfile *fptr, long nbytes, void *buffer,
- int *status);
-int ffwrite(FITSfile *fptr, long nbytes, void *buffer,
- int *status);
-int fftrun(fitsfile *fptr, long filesize, int *status);
-
-int ffgcll(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, int nultyp, char nulval, char *array, char *nularray,
- int *anynul, int *status);
-int ffgcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int nultyp, char *nulval,
- char **array, char *nularray, int *anynul, int *status);
-int ffgcls2(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int nultyp, char *nulval,
- char **array, char *nularray, int *anynul, int *status);
-int ffgclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned char nulval,
- unsigned char *array, char *nularray, int *anynul, int *status);
-int ffgclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned short nulval,
- unsigned short *array, char *nularray, int *anynul, int *status);
-int ffgcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, short nulval,
- short *array, char *nularray, int *anynul, int *status);
-int ffgcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned long nulval,
- unsigned long *array, char *nularray, int *anynul, int *status);
-int ffgclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, long nulval, long *array,
- char *nularray, int *anynul, int *status);
-int ffgcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned int nulval,
- unsigned int *array, char *nularray, int *anynul, int *status);
-int ffgclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, int nulval, int *array,
- char *nularray, int *anynul, int *status);
-int ffgcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, float nulval, float *array,
- char *nularray, int *anynul, int *status);
-int ffgcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, double nulval,
- double *array, char *nularray, int *anynul, int *status);
-
-int ffpi1b(fitsfile *fptr, long nelem, long incre, unsigned char *buffer,
- int *status);
-int ffpi2b(fitsfile *fptr, long nelem, long incre, short *buffer, int *status);
-int ffpi4b(fitsfile *fptr, long nelem, long incre, INT32BIT *buffer,
- int *status);
-int ffpr4b(fitsfile *fptr, long nelem, long incre, float *buffer, int *status);
-int ffpr8b(fitsfile *fptr, long nelem, long incre, double *buffer, int *status);
-
-int ffgi1b(fitsfile *fptr, long pos, long nelem, long incre,
- unsigned char *buffer, int *status);
-int ffgi2b(fitsfile *fptr, long pos, long nelem, long incre, short *buffer,
- int *status);
-int ffgi4b(fitsfile *fptr, long pos, long nelem, long incre, INT32BIT *buffer,
- int *status);
-int ffgr4b(fitsfile *fptr, long pos, long nelem, long incre, float *buffer,
- int *status);
-int ffgr8b(fitsfile *fptr, long pos, long nelem, long incre, double *buffer,
- int *status);
-
-int ffcins(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
- long bytepos, int *status);
-int ffcdel(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
- long bytepos, int *status);
-int ffkshf(fitsfile *fptr, int firstcol, int tfields, int nshift, int *status);
-
-int fffi1i1(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned char nullval, char
- *nullarray, int *anynull, unsigned char *output, int *status);
-int fffi2i1(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffi4i1(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffr4i1(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffr8i1(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffstri1(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned char nullval, char *nullarray, int *anynull,
- unsigned char *output, int *status);
-
-int fffi1u2(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned short nullval,
- char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffi2u2(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffi4u2(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffr4u2(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffr8u2(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffstru2(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned short nullval, char *nullarray, int *anynull,
- unsigned short *output, int *status);
-
-int fffi1i2(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffi2i2(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffi4i2(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffr4i2(float *input, long ntodo, double scale, double zero,
- int nullcheck, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffr8i2(double *input, long ntodo, double scale, double zero,
- int nullcheck, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffstri2(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- short nullval, char *nullarray, int *anynull, short *output,
- int *status);
-
-int fffi1u4(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned long nullval,
- char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffi2u4(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffi4u4(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffr4u4(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffr8u4(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffstru4(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned long nullval, char *nullarray, int *anynull,
- unsigned long *output, int *status);
-
-int fffi1i4(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffi2i4(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffi4i4(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffr4i4(float *input, long ntodo, double scale, double zero,
- int nullcheck, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffr8i4(double *input, long ntodo, double scale, double zero,
- int nullcheck, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffstri4(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- long nullval, char *nullarray, int *anynull, long *output,
- int *status);
-
-int fffi1int(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffi2int(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffi4int(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffr4int(float *input, long ntodo, double scale, double zero,
- int nullcheck, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffr8int(double *input, long ntodo, double scale, double zero,
- int nullcheck, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffstrint(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- int nullval, char *nullarray, int *anynull, int *output,
- int *status);
-
-int fffi1uint(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned int nullval,
- char *nullarray, int *anynull, unsigned int *output, int *status);
-int fffi2uint(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffi4uint(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffr4uint(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffr8uint(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffstruint(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned int nullval, char *nullarray, int *anynull,
- unsigned int *output, int *status);
-
-int fffi1r4(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffi2r4(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffi4r4(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffr4r4(float *input, long ntodo, double scale, double zero,
- int nullcheck, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffr8r4(double *input, long ntodo, double scale, double zero,
- int nullcheck, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffstrr4(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- float nullval, char *nullarray, int *anynull, float *output,
- int *status);
-
-int fffi1r8(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffi2r8(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffi4r8(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffr4r8(float *input, long ntodo, double scale, double zero,
- int nullcheck, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffr8r8(double *input, long ntodo, double scale, double zero,
- int nullcheck, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffstrr8(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- double nullval, char *nullarray, int *anynull, double *output,
- int *status);
-
-int ffi1fi1(unsigned char *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffu2fi1(unsigned short *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffi2fi1(short *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffu4fi1(unsigned long *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffi4fi1(long *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffuintfi1(unsigned int *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffintfi1(int *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffr4fi1(float *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffr8fi1(double *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-
-int ffi1fi2(unsigned char *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffu2fi2(unsigned short *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffi2fi2(short *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffu4fi2(unsigned long *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffi4fi2(long *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffuintfi2(unsigned int *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffintfi2(int *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffr4fi2(float *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffr8fi2(double *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-
-int ffi1fi4(unsigned char *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffu2fi4(unsigned short *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffi2fi4(short *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffu4fi4(unsigned long *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffi4fi4(long *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffuintfi4(unsigned int *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffintfi4(int *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffr4fi4(float *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffr8fi4(double *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-
-int ffi1fr4(unsigned char *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffu2fr4(unsigned short *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffi2fr4(short *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffu4fr4(unsigned long *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffi4fr4(long *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffuintfr4(unsigned int *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffintfr4(int *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffr4fr4(float *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffr8fr4(double *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-
-int ffi1fr8(unsigned char *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffu2fr8(unsigned short *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffi2fr8(short *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffu4fr8(unsigned long *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffi4fr8(long *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffuintfr8(unsigned int *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffintfr8(int *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffr4fr8(float *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffr8fr8(double *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-
-int ffi1fstr(unsigned char *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffu2fstr(unsigned short *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffi2fstr(short *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffu4fstr(unsigned long *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffi4fstr(long *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffintfstr(int *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffuintfstr(unsigned int *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffr4fstr(float *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffr8fstr(double *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-
-/* the following 4 routines are VMS macros used on VAX or Alpha VMS */
-void ieevpd(double *inarray, double *outarray, long *nvals);
-void ieevud(double *inarray, double *outarray, long *nvals);
-void ieevpr(float *inarray, float *outarray, long *nvals);
-void ieevur(float *inarray, float *outarray, long *nvals);
-
-/* routines related to the lexical parser */
-int ffselect_table(fitsfile **fptr, char *outfile, char *expr, int *status);
-int ffiprs( fitsfile *fptr, int compressed, char *expr, int maxdim,
- int *datatype, long *nelem, int *naxis, long *naxes,
- int *status );
-void ffcprs( void );
-int ffcvtn( int inputType, void *input, char *undef, long ntodo,
- int outputType, void *nulval, void *output,
- int *anynull, int *status );
-int parse_data( long totalrows, long offset, long firstrow,
- long nrows, int nCols, iteratorCol *colData,
- void *userPtr );
-int uncompress_hkdata( fitsfile *fptr, long ntimes,
- double *times, int *status );
-int ffffrw_work( long totalrows, long offset, long firstrow,
- long nrows, int nCols, iteratorCol *colData,
- void *userPtr );
-
-
-/* image compression routines */
-int imcomp_init_table(fitsfile *outfptr, int compress_type,
- int bitpix, int naxis,long *naxes,long *tilesize,
- int rice_blocksize,int rice_nbits,int *status);
-int imcomp_calc_max_elem (int comptype, int nx, int blocksize);
-int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
- int *status);
-int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
- int *status);
-int imcomp_compress_tile (fitsfile *outfptr, long row,
- int datatype, void *tiledata, long tilelen, int *status);
-
-/* image decompression routines */
-int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
- int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
- long *inc, long *naxes, int nullcheck, void *nullval,
- void *array, char *nullarray, int *anynul, long *nread, int *status);
-int imcomp_get_compressed_image_par(fitsfile *infptr, int *status);
-int imcomp_decompress_tile (fitsfile *infptr,
- int nrow, int tilesize, int datatype, int nullcheck,
- void *nulval, void *buffer, char *bnullarray, int *anynul,
- int *status);
-int imcomp_copy_overlap (char *tile, int datatype, int ndim,
- long *tfpixel, long *tlpixel, char *bnullarray, char *image,
- long *fpixel, long *lpixel, int nullcheck, char *nullarray,
- int *status);
-
-int pl_p2li (int *pxsrc, int xs, short *lldst, int npix);
-int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix);
-
-/* general driver routines */
-
-int urltype2driver(char *urltype, int *driver);
-int fits_init_cfitsio(void);
-
-int fits_register_driver( char *prefix,
- int (*init)(void),
- int (*fitsshutdown)(void),
- int (*setoptions)(int option),
- int (*getoptions)(int *options),
- int (*getversion)(int *version),
- int (*checkfile) (char *urltype, char *infile, char *outfile),
- int (*fitsopen)(char *filename, int rwmode, int *driverhandle),
- int (*fitscreate)(char *filename, int *driverhandle),
- int (*fitstruncate)(int driverhandle, long filesize),
- int (*fitsclose)(int driverhandle),
- int (*fremove)(char *filename),
- int (*size)(int driverhandle, long *size),
- int (*flush)(int driverhandle),
- int (*seek)(int driverhandle, long offset),
- int (*fitsread) (int driverhandle, void *buffer, long nbytes),
- int (*fitswrite)(int driverhandle, void *buffer, long nbytes));
-
-/* file driver I/O routines */
-
-int file_init(void);
-int file_setoptions(int options);
-int file_getoptions(int *options);
-int file_getversion(int *version);
-int file_shutdown(void);
-int file_checkfile(char *urltype, char *infile, char *outfile);
-int file_open(char *filename, int rwmode, int *driverhandle);
-int file_compress_open(char *filename, int rwmode, int *hdl);
-int file_openfile(char *filename, int rwmode, FILE **diskfile);
-int file_create(char *filename, int *driverhandle);
-int file_truncate(int driverhandle, long filesize);
-int file_size(int driverhandle, long *filesize);
-int file_close(int driverhandle);
-int file_remove(char *filename);
-int file_flush(int driverhandle);
-int file_seek(int driverhandle, long offset);
-int file_read (int driverhandle, void *buffer, long nbytes);
-int file_write(int driverhandle, void *buffer, long nbytes);
-int file_is_compressed(char *filename);
-
-/* memory driver I/O routines */
-
-int mem_init(void);
-int mem_setoptions(int options);
-int mem_getoptions(int *options);
-int mem_getversion(int *version);
-int mem_shutdown(void);
-int mem_create(char *filename, int *handle);
-int mem_openmem(void **buffptr, size_t *buffsize, size_t deltasize,
- void *(*memrealloc)(void *p, size_t newsize), int *handle);
-int mem_createmem(size_t memsize, int *handle);
-int stdin_checkfile(char *urltype, char *infile, char *outfile);
-int stdin_open(char *filename, int rwmode, int *handle);
-int stdin2mem(int hd);
-int stdin2file(int hd);
-int stdout_close(int handle);
-int mem_compress_open(char *filename, int rwmode, int *hdl);
-int mem_iraf_open(char *filename, int rwmode, int *hdl);
-int mem_size(int handle, long *filesize);
-int mem_truncate(int handle, long filesize);
-int mem_close_free(int handle);
-int mem_close_keep(int handle);
-int mem_seek(int handle, long offset);
-int mem_read(int hdl, void *buffer, long nbytes);
-int mem_write(int hdl, void *buffer, long nbytes);
-int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl);
-
-int iraf2mem(char *filename, char **buffptr, size_t *buffsize,
- size_t *filesize, int *status);
-
-/* root driver I/O routines */
-
-int root_init(void);
-int root_setoptions(int options);
-int root_getoptions(int *options);
-int root_getversion(int *version);
-int root_shutdown(void);
-int root_open(char *filename, int rwmode, int *driverhandle);
-int root_create(char *filename, int *driverhandle);
-int root_close(int driverhandle);
-int root_flush(int driverhandle);
-int root_seek(int driverhandle, long offset);
-int root_read (int driverhandle, void *buffer, long nbytes);
-int root_write(int driverhandle, void *buffer, long nbytes);
-int root_size(int handle, long *filesize);
-
-/* http driver I/O routines */
-
-int http_checkfile(char *urltype, char *infile, char *outfile);
-int http_open(char *filename, int rwmode, int *driverhandle);
-int http_file_open(char *filename, int rwmode, int *driverhandle);
-int http_compress_open(char *filename, int rwmode, int *driverhandle);
-
-/* ftp driver I/O routines */
-
-int ftp_checkfile(char *urltype, char *infile, char *outfile);
-int ftp_open(char *filename, int rwmode, int *driverhandle);
-int ftp_file_open(char *filename, int rwmode, int *driverhandle);
-int ftp_compress_open(char *filename, int rwmode, int *driverhandle);
-
-
-int uncompress2mem(char *filename, FILE *diskfile,
- char **buffptr, size_t *buffsize,
- void *(*mem_realloc)(void *p, size_t newsize),
- size_t *filesize, int *status);
-
-int uncompress2mem_from_mem(
- char *inmemptr,
- size_t inmemsize,
- char **buffptr,
- size_t *buffsize,
- void *(*mem_realloc)(void *p, size_t newsize),
- size_t *filesize,
- int *status);
-
-int uncompress2file(char *filename,
- FILE *indiskfile,
- FILE *outdiskfile,
- int *status);
-
-int compress2mem_from_mem(
- char *inmemptr,
- size_t inmemsize,
- char **buffptr,
- size_t *buffsize,
- void *(*mem_realloc)(void *p, size_t newsize),
- size_t *filesize,
- int *status);
-
-/* ==================== SHARED MEMORY DRIVER SECTION ======================= */
-
-#ifdef HAVE_SHMEM_SERVICES
-#include "drvrsmem.h"
-#endif
-
-/* ==================== END OF SHARED MEMORY DRIVER SECTION ================ */
-
-#endif
-
-
-#if defined(vms) || defined(__vms) || defined(WIN32) || defined(__WIN32__) || defined(macintosh)
-
-/* ================================================================== */
-/* A hack for nonunix machines, which lack strcasecmp and strncasecmp */
-/* ================================================================== */
-
-int strcasecmp (const char *s1, const char *s2 );
-int strncasecmp(const char *s1, const char *s2, size_t n);
-
-#endif
diff --git a/include/cfitsio/group.h b/include/cfitsio/group.h
deleted file mode 100644
index f7aae5b..0000000
--- a/include/cfitsio/group.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#define MAX_HDU_TRACKER 1000
-
-typedef struct _HDUtracker HDUtracker;
-
-struct _HDUtracker
-{
- int nHDU;
-
- char *filename[MAX_HDU_TRACKER];
- int position[MAX_HDU_TRACKER];
-
- char *newFilename[MAX_HDU_TRACKER];
- int newPosition[MAX_HDU_TRACKER];
-};
-
-/* functions used internally in the grouping convention module */
-
-int ffgtdc(int grouptype, int xtensioncol, int extnamecol, int extvercol,
- int positioncol, int locationcol, int uricol, char *ttype[],
- char *tform[], int *ncols, int *status);
-
-int ffgtgc(fitsfile *gfptr, int *xtensionCol, int *extnameCol, int *extverCol,
- int *positionCol, int *locationCol, int *uriCol, int *grptype,
- int *status);
-
-int ffgmul(fitsfile *mfptr, int rmopt, int *status);
-
-int ffgmf(fitsfile *gfptr, char *xtension, char *extname, int extver,
- int position, char *location, long *member, int *status);
-
-int ffgtrmr(fitsfile *gfptr, HDUtracker *HDU, int *status);
-
-int ffgtcpr(fitsfile *infptr, fitsfile *outfptr, int cpopt, HDUtracker *HDU,
- int *status);
-
-int fftsad(fitsfile *mfptr, HDUtracker *HDU, int *newPosition,
- char *newFileName);
-
-int fftsud(fitsfile *mfptr, HDUtracker *HDU, int newPosition,
- char *newFileName);
-
-void prepare_keyvalue(char *keyvalue);
-
-int fits_path2url(char *inpath, char *outpath, int *status);
-
-int fits_url2path(char *inpath, char *outpath, int *status);
-
-int fits_get_cwd(char *cwd, int *status);
-
-int fits_get_url(fitsfile *fptr, char *realURL, char *startURL,
- char *realAccess, char *startAccess, int *iostate,
- int *status);
-
-int fits_clean_url(char *inURL, char *outURL, int *status);
-
-int fits_relurl2url(char *refURL, char *relURL, char *absURL, int *status);
-
-int fits_url2relurl(char *refURL, char *absURL, char *relURL, int *status);
-
-int fits_encode_url(char *inpath, char *outpath, int *status);
-
-int fits_unencode_url(char *inpath, char *outpath, int *status);
-
-int fits_is_url_absolute(char *url);
-
diff --git a/include/cfitsio/grparser.h b/include/cfitsio/grparser.h
deleted file mode 100644
index 32a172b..0000000
--- a/include/cfitsio/grparser.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* T E M P L A T E P A R S E R H E A D E R F I L E
- =====================================================
-
- by Jerzy.Borkowski@obs.unige.ch
-
- Integral Science Data Center
- ch. d'Ecogia 16
- 1290 Versoix
- Switzerland
-
-14-Oct-98: initial release
-16-Oct-98: reference to fitsio.h removed, also removed strings after #endif
- directives to make gcc -Wall not to complain
-20-Oct-98: added declarations NGP_XTENSION_SIMPLE and NGP_XTENSION_FIRST
-24-Oct-98: prototype of ngp_read_line() function updated.
-22-Jan-99: prototype for ngp_set_extver() function added.
-*/
-
-#ifndef GRPARSER_H_INCLUDED
-#define GRPARSER_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /* error codes - now defined in fitsio.h */
-
- /* common constants definitions */
-
-#define NGP_ALLOCCHUNK (1000)
-#define NGP_MAX_INCLUDE (10) /* include file nesting limit */
-#define NGP_MAX_COMMENT (80) /* max size for comment */
-#define NGP_MAX_NAME (20) /* max size for KEYWORD (FITS limits it to 8 chars) */
-#define NGP_MAX_STRING (80) /* max size for various strings */
-#define NGP_MAX_ARRAY_DIM (999) /* max. number of dimensions in array */
-#define NGP_MAX_FNAME (1000) /* max size of combined path+fname */
-#define NGP_MAX_ENVFILES (10000) /* max size of CFITSIO_INCLUDE_FILES env. variable */
-
-#define NGP_TOKEN_UNKNOWN (-1) /* token type unknown */
-#define NGP_TOKEN_INCLUDE (0) /* \INCLUDE token */
-#define NGP_TOKEN_GROUP (1) /* \GROUP token */
-#define NGP_TOKEN_END (2) /* \END token */
-#define NGP_TOKEN_XTENSION (3) /* XTENSION token */
-#define NGP_TOKEN_SIMPLE (4) /* SIMPLE token */
-#define NGP_TOKEN_EOF (5) /* End Of File pseudo token */
-
-#define NGP_TTYPE_UNKNOWN (0) /* undef (yet) token type - invalid to print/write to disk */
-#define NGP_TTYPE_BOOL (1) /* boolean, it is 'T' or 'F' */
-#define NGP_TTYPE_STRING (2) /* something withing "" or starting with letter */
-#define NGP_TTYPE_INT (3) /* starting with digit and not with '.' */
-#define NGP_TTYPE_REAL (4) /* digits + '.' */
-#define NGP_TTYPE_COMPLEX (5) /* 2 reals, separated with ',' */
-#define NGP_TTYPE_NULL (6) /* NULL token, format is : NAME = / comment */
-#define NGP_TTYPE_RAW (7) /* HISTORY/COMMENT/8SPACES + comment string without / */
-
-#define NGP_FOUND_EQUAL_SIGN (1) /* line contains '=' after keyword name */
-
-#define NGP_FORMAT_OK (0) /* line format OK */
-#define NGP_FORMAT_ERROR (1) /* line format error */
-
-#define NGP_NODE_INVALID (0) /* default node type - invalid (to catch errors) */
-#define NGP_NODE_IMAGE (1) /* IMAGE type */
-#define NGP_NODE_ATABLE (2) /* ASCII table type */
-#define NGP_NODE_BTABLE (3) /* BINARY table type */
-
-#define NGP_NON_SYSTEM_ONLY (0) /* save all keywords except NAXIS,BITPIX,etc.. */
-#define NGP_REALLY_ALL (1) /* save really all keywords */
-
-#define NGP_XTENSION_SIMPLE (1) /* HDU defined with SIMPLE T */
-#define NGP_XTENSION_FIRST (2) /* this is first extension in template */
-
-#define NGP_LINE_REREAD (1) /* reread line */
-
-#define NGP_BITPIX_INVALID (-12345) /* default BITPIX (to catch errors) */
-
- /* common macro definitions */
-
-#ifdef NGP_PARSER_DEBUG_MALLOC
-
-#define ngp_alloc(x) dal_malloc(x)
-#define ngp_free(x) dal_free(x)
-#define ngp_realloc(x,y) dal_realloc(x,y)
-
-#else
-
-#define ngp_alloc(x) malloc(x)
-#define ngp_free(x) free(x)
-#define ngp_realloc(x,y) realloc(x,y)
-
-#endif
-
- /* type definitions */
-
-typedef struct NGP_RAW_LINE_STRUCT
- { char *line;
- char *name;
- char *value;
- int type;
- char *comment;
- int format;
- int flags;
- } NGP_RAW_LINE;
-
-
-typedef union NGP_TOKVAL_UNION
- { char *s; /* space allocated separately, be careful !!! */
- char b;
- int i;
- double d;
- struct NGP_COMPLEX_STRUCT
- { double re;
- double im;
- } c; /* complex value */
- } NGP_TOKVAL;
-
-
-typedef struct NGP_TOKEN_STRUCT
- { int type;
- char name[NGP_MAX_NAME];
- NGP_TOKVAL value;
- char comment[NGP_MAX_COMMENT];
- } NGP_TOKEN;
-
-
-typedef struct NGP_HDU_STRUCT
- { int tokcnt;
- NGP_TOKEN *tok;
- } NGP_HDU;
-
-
-typedef struct NGP_TKDEF_STRUCT
- { char *name;
- int code;
- } NGP_TKDEF;
-
-
-typedef struct NGP_EXTVER_TAB_STRUCT
- { char *extname;
- int version;
- } NGP_EXTVER_TAB;
-
-
- /* globally visible variables declarations */
-
-extern NGP_RAW_LINE ngp_curline;
-extern NGP_RAW_LINE ngp_prevline;
-
-extern int ngp_extver_tab_size;
-extern NGP_EXTVER_TAB *ngp_extver_tab;
-
-
- /* globally visible functions declarations */
-
-int ngp_get_extver(char *extname, int *version);
-int ngp_set_extver(char *extname, int version);
-int ngp_delete_extver_tab(void);
-int ngp_strcasecmp(char *p1, char *p2);
-int ngp_line_from_file(FILE *fp, char **p);
-int ngp_free_line(void);
-int ngp_free_prevline(void);
-int ngp_read_line_buffered(FILE *fp);
-int ngp_unread_line(void);
-int ngp_extract_tokens(NGP_RAW_LINE *cl);
-int ngp_include_file(char *fname);
-int ngp_read_line(int ignore_blank_lines);
-int ngp_keyword_is_write(NGP_TOKEN *ngp_tok);
-int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode);
-int ngp_hdu_init(NGP_HDU *ngph);
-int ngp_hdu_clear(NGP_HDU *ngph);
-int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok);
-int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol);
-int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode);
-int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn);
-
- /* top level API function - now defined in fitsio.h */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/cfitsio/imcompress.h b/include/cfitsio/imcompress.h
deleted file mode 100644
index c5ba7d2..0000000
--- a/include/cfitsio/imcompress.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#define MAX_COMPRESS_DIM 6
-#define COMPRESS_NULL_VALUE -2147483647
-
-typedef struct {
- char zcmptype[12]; /* compression type string */
- int compress_type; /* type of compression algorithm */
- int bitpix; /* FITS data type of image (BITPIX) */
- int ndim; /* dimension of image */
- long naxis[MAX_COMPRESS_DIM]; /* length of each axis */
- int cn_compressed; /* column number for COMPRESSED_DATA column */
- int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
- int cn_zscale; /* column number for CSCALE column */
- int cn_zzero; /* column number for CZERO column */
- int cn_zblank; /* column number for the CBLANK column */
- double zscale; /* scaling value, if keyword and not column */
- double zzero; /* zero pt, if keyword and not column */
- int zblank; /* value for null pixels, if not a column */
- long nrows; /* number of rows in table */
- int ncols; /* number of columns in table */
- int rice_blocksize; /* first compression parameter */
- int rice_nbits; /* second compression parameter */
- long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
- long maxtilelen; /* max number of pixels in each image tile */
- long maxelem; /* maximum length of variable length arrays */
-} CompressImageInfo;
-
-/* image compression routines */
-static int imcomp_get_image_params(fitsfile *infptr, CompressImageInfo *otb,
- int *status);
-static int imcomp_init_table(fitsfile *outfptr,
- CompressImageInfo *otb, int *status);
-static int imcomp_calc_max_elem (int nx, int blocksize);
-static int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
- int *status);
-static int imcomp_img_to_tbl_special (char *card);
-static int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
- CompressImageInfo *otb, int *status);
-
-/* image decompression routines */
-int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
- int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
- long *inc, long *naxes, int nullcheck, void *nullval,
- void *array, char *nullarray, int *anynul, int *status);
-static int imcomp_get_table_params(fitsfile *infptr, CompressImageInfo *itb,
- int *status);
-static int imcomp_copy_tblheader(fitsfile *infptr, fitsfile *outfptr,
- int *status);
-static int imcomp_tbl_to_img_special (char *keyname);
-static int imcomp_decompress_tile (fitsfile *infptr, CompressImageInfo *itb,
- int nrow, int tilesize, int datatype, int nullcheck,
- void *nulval, void *buffer, char *bnullarray, int *anynul,
- int *status);
-static int imcomp_copy_overlap (char *tile, int datatype, int ndim,
- long *tfpixel, long *tlpixel, char *bnullarray, char *image,
- long *fpixel, long *lpixel, int nullcheck, char *nullarray,
- int *status);
diff --git a/include/cfitsio/longnam.h b/include/cfitsio/longnam.h
deleted file mode 100644
index ac083bc..0000000
--- a/include/cfitsio/longnam.h
+++ /dev/null
@@ -1,476 +0,0 @@
-#ifndef _LONGNAME_H
-#define _LONGNAME_H
-
-#define fits_parse_input_url ffiurl
-#define fits_parse_rootname ffrtnm
-#define fits_parse_output_url ffourl
-#define fits_parse_extspec ffexts
-#define fits_parse_extnum ffextn
-#define fits_parse_binspec ffbins
-#define fits_parse_binrange ffbinr
-#define fits_open_memfile ffomem
-#define fits_open_file ffopen
-#define fits_reopen_file ffreopen
-#define fits_create_file ffinit
-#define fits_create_template fftplt
-#define fits_flush_file ffflus
-#define fits_close_file ffclos
-#define fits_delete_file ffdelt
-#define fits_file_name ffflnm
-#define fits_file_mode ffflmd
-#define fits_url_type ffurlt
-
-#define fits_get_version ffvers
-#define fits_uppercase ffupch
-#define fits_get_errstatus ffgerr
-#define fits_write_errmsg ffpmsg
-#define fits_read_errmsg ffgmsg
-#define fits_clear_errmsg ffcmsg
-#define fits_report_error ffrprt
-#define fits_compare_str ffcmps
-#define fits_test_keyword fftkey
-#define fits_test_record fftrec
-#define fits_null_check ffnchk
-#define fits_make_keyn ffkeyn
-#define fits_make_nkey ffnkey
-#define fits_get_keyclass ffgkcl
-#define fits_get_keytype ffdtyp
-#define fits_parse_value ffpsvc
-#define fits_get_keyname ffgknm
-#define fits_parse_template ffgthd
-#define fits_ascii_tform ffasfm
-#define fits_binary_tform ffbnfm
-#define fits_get_tbcol ffgabc
-#define fits_get_rowsize ffgrsz
-#define fits_get_col_display_width ffgcdw
-
-#define fits_write_record ffprec
-#define fits_write_key ffpky
-#define fits_write_key_unit ffpunt
-#define fits_write_comment ffpcom
-#define fits_write_history ffphis
-#define fits_write_date ffpdat
-#define fits_get_system_time ffgstm
-#define fits_get_system_date ffgsdt
-#define fits_date2str ffdt2s
-#define fits_time2str fftm2s
-#define fits_str2date ffs2dt
-#define fits_str2time ffs2tm
-#define fits_write_key_longstr ffpkls
-#define fits_write_key_longwarn ffplsw
-#define fits_write_key_null ffpkyu
-#define fits_write_key_str ffpkys
-#define fits_write_key_log ffpkyl
-#define fits_write_key_lng ffpkyj
-#define fits_write_key_fixflt ffpkyf
-#define fits_write_key_flt ffpkye
-#define fits_write_key_fixdbl ffpkyg
-#define fits_write_key_dbl ffpkyd
-#define fits_write_key_fixcmp ffpkfc
-#define fits_write_key_cmp ffpkyc
-#define fits_write_key_fixdblcmp ffpkfm
-#define fits_write_key_dblcmp ffpkym
-#define fits_write_key_triple ffpkyt
-#define fits_write_tdim ffptdm
-#define fits_write_keys_str ffpkns
-#define fits_write_keys_log ffpknl
-#define fits_write_keys_lng ffpknj
-#define fits_write_keys_fixflt ffpknf
-#define fits_write_keys_flt ffpkne
-#define fits_write_keys_fixdbl ffpkng
-#define fits_write_keys_dbl ffpknd
-#define fits_copy_key ffcpky
-#define fits_write_imghdr ffphps
-#define fits_write_grphdr ffphpr
-#define fits_write_atblhdr ffphtb
-#define fits_write_btblhdr ffphbn
-#define fits_write_key_template ffpktp
-
-#define fits_get_hdrspace ffghsp
-#define fits_get_hdrpos ffghps
-#define fits_movabs_key ffmaky
-#define fits_movrel_key ffmrky
-#define fits_find_nextkey ffgnxk
-
-#define fits_read_record ffgrec
-#define fits_read_card ffgcrd
-#define fits_read_key_unit ffgunt
-#define fits_read_keyn ffgkyn
-#define fits_read_key ffgky
-#define fits_read_keyword ffgkey
-#define fits_read_key_str ffgkys
-#define fits_read_key_log ffgkyl
-#define fits_read_key_lng ffgkyj
-#define fits_read_key_flt ffgkye
-#define fits_read_key_dbl ffgkyd
-#define fits_read_key_cmp ffgkyc
-#define fits_read_key_dblcmp ffgkym
-#define fits_read_key_triple ffgkyt
-#define fits_read_key_longstr ffgkls
-#define fits_read_tdim ffgtdm
-#define fits_decode_tdim ffdtdm
-#define fits_read_keys_str ffgkns
-#define fits_read_keys_log ffgknl
-#define fits_read_keys_lng ffgknj
-#define fits_read_keys_flt ffgkne
-#define fits_read_keys_dbl ffgknd
-#define fits_read_imghdr ffghpr
-#define fits_read_atblhdr ffghtb
-#define fits_read_btblhdr ffghbn
-#define fits_header2str ffh2st
-
-#define fits_update_card ffucrd
-#define fits_update_key ffuky
-#define fits_update_key_null ffukyu
-#define fits_update_key_str ffukys
-#define fits_update_key_longstr ffukls
-#define fits_update_key_log ffukyl
-#define fits_update_key_lng ffukyj
-#define fits_update_key_fixflt ffukyf
-#define fits_update_key_flt ffukye
-#define fits_update_key_fixdbl ffukyg
-#define fits_update_key_dbl ffukyd
-#define fits_update_key_fixcmp ffukfc
-#define fits_update_key_cmp ffukyc
-#define fits_update_key_fixdblcmp ffukfm
-#define fits_update_key_dblcmp ffukym
-
-#define fits_modify_record ffmrec
-#define fits_modify_card ffmcrd
-#define fits_modify_name ffmnam
-#define fits_modify_comment ffmcom
-#define fits_modify_key_null ffmkyu
-#define fits_modify_key_str ffmkys
-#define fits_modify_key_longstr ffmkls
-#define fits_modify_key_log ffmkyl
-#define fits_modify_key_lng ffmkyj
-#define fits_modify_key_fixflt ffmkyf
-#define fits_modify_key_flt ffmkye
-#define fits_modify_key_fixdbl ffmkyg
-#define fits_modify_key_dbl ffmkyd
-#define fits_modify_key_fixcmp ffmkfc
-#define fits_modify_key_cmp ffmkyc
-#define fits_modify_key_fixdblcmp ffmkfm
-#define fits_modify_key_dblcmp ffmkym
-
-#define fits_insert_record ffirec
-#define fits_insert_key_null ffikyu
-#define fits_insert_key_str ffikys
-#define fits_insert_key_longstr ffikls
-#define fits_insert_key_log ffikyl
-#define fits_insert_key_lng ffikyj
-#define fits_insert_key_fixflt ffikyf
-#define fits_insert_key_flt ffikye
-#define fits_insert_key_fixdbl ffikyg
-#define fits_insert_key_dbl ffikyd
-#define fits_insert_key_fixcmp ffikfc
-#define fits_insert_key_cmp ffikyc
-#define fits_insert_key_fixdblcmp ffikfm
-#define fits_insert_key_dblcmp ffikym
-
-#define fits_delete_key ffdkey
-#define fits_delete_record ffdrec
-#define fits_get_hdu_num ffghdn
-#define fits_get_hdu_type ffghdt
-#define fits_get_hduaddr ffghad
-
-#define fits_get_img_param ffgipr
-#define fits_get_img_type ffgidt
-#define fits_get_img_dim ffgidm
-#define fits_get_img_size ffgisz
-
-#define fits_movabs_hdu ffmahd
-#define fits_movrel_hdu ffmrhd
-#define fits_movnam_hdu ffmnhd
-#define fits_get_num_hdus ffthdu
-#define fits_create_img ffcrim
-#define fits_create_tbl ffcrtb
-#define fits_create_hdu ffcrhd
-#define fits_insert_img ffiimg
-#define fits_insert_atbl ffitab
-#define fits_insert_btbl ffibin
-#define fits_resize_img ffrsim
-#define fits_delete_hdu ffdhdu
-#define fits_copy_hdu ffcopy
-#define fits_copy_header ffcphd
-#define fits_copy_data ffcpdt
-
-#define fits_set_hdustruc ffrdef
-#define fits_set_hdrsize ffhdef
-#define fits_write_theap ffpthp
-
-#define fits_encode_chksum ffesum
-#define fits_decode_chksum ffdsum
-#define fits_write_chksum ffpcks
-#define fits_update_chksum ffupck
-#define fits_verify_chksum ffvcks
-#define fits_get_chksum ffgcks
-
-#define fits_set_bscale ffpscl
-#define fits_set_tscale fftscl
-#define fits_set_imgnull ffpnul
-#define fits_set_btblnull fftnul
-#define fits_set_atblnull ffsnul
-
-#define fits_get_colnum ffgcno
-#define fits_get_colname ffgcnn
-#define fits_get_coltype ffgtcl
-#define fits_get_num_rows ffgnrw
-#define fits_get_num_cols ffgncl
-#define fits_get_acolparms ffgacl
-#define fits_get_bcolparms ffgbcl
-
-#define fits_iterate_data ffiter
-
-#define fits_read_grppar_byt ffggpb
-#define fits_read_grppar_usht ffggpui
-#define fits_read_grppar_ulng ffggpuj
-#define fits_read_grppar_sht ffggpi
-#define fits_read_grppar_lng ffggpj
-#define fits_read_grppar_int ffggpk
-#define fits_read_grppar_uint ffggpuk
-#define fits_read_grppar_flt ffggpe
-#define fits_read_grppar_dbl ffggpd
-
-#define fits_read_img ffgpv
-#define fits_read_imgnull ffgpf
-#define fits_read_img_byt ffgpvb
-#define fits_read_img_usht ffgpvui
-#define fits_read_img_ulng ffgpvuj
-#define fits_read_img_sht ffgpvi
-#define fits_read_img_lng ffgpvj
-#define fits_read_img_uint ffgpvuk
-#define fits_read_img_int ffgpvk
-#define fits_read_img_flt ffgpve
-#define fits_read_img_dbl ffgpvd
-
-#define fits_read_imgnull_byt ffgpfb
-#define fits_read_imgnull_usht ffgpfui
-#define fits_read_imgnull_ulng ffgpfuj
-#define fits_read_imgnull_sht ffgpfi
-#define fits_read_imgnull_lng ffgpfj
-#define fits_read_imgnull_uint ffgpfuk
-#define fits_read_imgnull_int ffgpfk
-#define fits_read_imgnull_flt ffgpfe
-#define fits_read_imgnull_dbl ffgpfd
-
-#define fits_read_2d_byt ffg2db
-#define fits_read_2d_usht ffg2dui
-#define fits_read_2d_ulng ffg2duj
-#define fits_read_2d_sht ffg2di
-#define fits_read_2d_lng ffg2dj
-#define fits_read_2d_uint ffg2duk
-#define fits_read_2d_int ffg2dk
-#define fits_read_2d_flt ffg2de
-#define fits_read_2d_dbl ffg2dd
-
-#define fits_read_3d_byt ffg3db
-#define fits_read_3d_usht ffg3dui
-#define fits_read_3d_ulng ffg3duj
-#define fits_read_3d_sht ffg3di
-#define fits_read_3d_lng ffg3dj
-#define fits_read_3d_uint ffg3duk
-#define fits_read_3d_int ffg3dk
-#define fits_read_3d_flt ffg3de
-#define fits_read_3d_dbl ffg3dd
-
-#define fits_read_subset_byt ffgsvb
-#define fits_read_subset_usht ffgsvui
-#define fits_read_subset_ulng ffgsvuj
-#define fits_read_subset_sht ffgsvi
-#define fits_read_subset_lng ffgsvj
-#define fits_read_subset_uint ffgsvuk
-#define fits_read_subset_int ffgsvk
-#define fits_read_subset_flt ffgsve
-#define fits_read_subset_dbl ffgsvd
-
-#define fits_read_subsetnull_byt ffgsfb
-#define fits_read_subsetnull_usht ffgsfui
-#define fits_read_subsetnull_ulng ffgsfuj
-#define fits_read_subsetnull_sht ffgsfi
-#define fits_read_subsetnull_lng ffgsfj
-#define fits_read_subsetnull_uint ffgsfuk
-#define fits_read_subsetnull_int ffgsfk
-#define fits_read_subsetnull_flt ffgsfe
-#define fits_read_subsetnull_dbl ffgsfd
-
-#define fits_read_col ffgcv
-#define fits_read_colnull ffgcf
-#define fits_read_col_str ffgcvs
-#define fits_read_col_log ffgcvl
-#define fits_read_col_byt ffgcvb
-#define fits_read_col_usht ffgcvui
-#define fits_read_col_ulng ffgcvuj
-#define fits_read_col_sht ffgcvi
-#define fits_read_col_lng ffgcvj
-#define fits_read_col_uint ffgcvuk
-#define fits_read_col_int ffgcvk
-#define fits_read_col_flt ffgcve
-#define fits_read_col_dbl ffgcvd
-#define fits_read_col_cmp ffgcvc
-#define fits_read_col_dblcmp ffgcvm
-#define fits_read_col_bit ffgcx
-#define fits_read_col_bit_usht ffgcxui
-#define fits_read_col_bit_uint ffgcxuk
-
-#define fits_read_colnull_str ffgcfs
-#define fits_read_colnull_log ffgcfl
-#define fits_read_colnull_byt ffgcfb
-#define fits_read_colnull_usht ffgcfui
-#define fits_read_colnull_ulng ffgcfuj
-#define fits_read_colnull_sht ffgcfi
-#define fits_read_colnull_lng ffgcfj
-#define fits_read_colnull_uint ffgcfuk
-#define fits_read_colnull_int ffgcfk
-#define fits_read_colnull_flt ffgcfe
-#define fits_read_colnull_dbl ffgcfd
-#define fits_read_colnull_cmp ffgcfc
-#define fits_read_colnull_dblcmp ffgcfm
-
-#define fits_read_descript ffgdes
-#define fits_read_descripts ffgdess
-#define fits_read_tblbytes ffgtbb
-
-#define fits_write_grppar_byt ffpgpb
-#define fits_write_grppar_usht ffpgpui
-#define fits_write_grppar_ulng ffpgpuj
-#define fits_write_grppar_sht ffpgpi
-#define fits_write_grppar_lng ffpgpj
-#define fits_write_grppar_uint ffpgpuk
-#define fits_write_grppar_int ffpgpk
-#define fits_write_grppar_flt ffpgpe
-#define fits_write_grppar_dbl ffpgpd
-
-#define fits_write_img ffppr
-#define fits_write_img_byt ffpprb
-#define fits_write_img_usht ffpprui
-#define fits_write_img_ulng ffppruj
-#define fits_write_img_sht ffppri
-#define fits_write_img_lng ffpprj
-#define fits_write_img_uint ffppruk
-#define fits_write_img_int ffpprk
-#define fits_write_img_flt ffppre
-#define fits_write_img_dbl ffpprd
-
-#define fits_write_imgnull ffppn
-#define fits_write_imgnull_byt ffppnb
-#define fits_write_imgnull_usht ffppnui
-#define fits_write_imgnull_ulng ffppnuj
-#define fits_write_imgnull_sht ffppni
-#define fits_write_imgnull_lng ffppnj
-#define fits_write_imgnull_uint ffppnuk
-#define fits_write_imgnull_int ffppnk
-#define fits_write_imgnull_flt ffppne
-#define fits_write_imgnull_dbl ffppnd
-
-#define fits_write_img_null ffppru
-#define fits_write_null_img ffpprn
-
-#define fits_write_2d_byt ffp2db
-#define fits_write_2d_usht ffp2dui
-#define fits_write_2d_ulng ffp2duj
-#define fits_write_2d_sht ffp2di
-#define fits_write_2d_lng ffp2dj
-#define fits_write_2d_uint ffp2duk
-#define fits_write_2d_int ffp2dk
-#define fits_write_2d_flt ffp2de
-#define fits_write_2d_dbl ffp2dd
-
-#define fits_write_3d_byt ffp3db
-#define fits_write_3d_usht ffp3dui
-#define fits_write_3d_ulng ffp3duj
-#define fits_write_3d_sht ffp3di
-#define fits_write_3d_lng ffp3dj
-#define fits_write_3d_uint ffp3duk
-#define fits_write_3d_int ffp3dk
-#define fits_write_3d_flt ffp3de
-#define fits_write_3d_dbl ffp3dd
-
-#define fits_write_subset_byt ffpssb
-#define fits_write_subset_usht ffpssui
-#define fits_write_subset_ulng ffpssuj
-#define fits_write_subset_sht ffpssi
-#define fits_write_subset_lng ffpssj
-#define fits_write_subset_uint ffpssuk
-#define fits_write_subset_int ffpssk
-#define fits_write_subset_flt ffpsse
-#define fits_write_subset_dbl ffpssd
-
-#define fits_write_col ffpcl
-#define fits_write_col_str ffpcls
-#define fits_write_col_log ffpcll
-#define fits_write_col_byt ffpclb
-#define fits_write_col_usht ffpclui
-#define fits_write_col_ulng ffpcluj
-#define fits_write_col_sht ffpcli
-#define fits_write_col_lng ffpclj
-#define fits_write_col_uint ffpcluk
-#define fits_write_col_int ffpclk
-#define fits_write_col_flt ffpcle
-#define fits_write_col_dbl ffpcld
-#define fits_write_col_cmp ffpclc
-#define fits_write_col_dblcmp ffpclm
-#define fits_write_col_null ffpclu
-#define fits_write_col_bit ffpclx
-
-#define fits_write_colnull ffpcn
-#define fits_write_colnull_str ffpcns
-#define fits_write_colnull_log ffpcnl
-#define fits_write_colnull_byt ffpcnb
-#define fits_write_colnull_usht ffpcnui
-#define fits_write_colnull_ulng ffpcnuj
-#define fits_write_colnull_sht ffpcni
-#define fits_write_colnull_lng ffpcnj
-#define fits_write_colnull_uint ffpcnuk
-#define fits_write_colnull_int ffpcnk
-#define fits_write_colnull_flt ffpcne
-#define fits_write_colnull_dbl ffpcnd
-
-#define fits_write_descript ffpdes
-
-#define fits_write_tblbytes ffptbb
-#define fits_insert_rows ffirow
-#define fits_delete_rows ffdrow
-#define fits_delete_rowlist ffdrws
-#define fits_insert_col fficol
-#define fits_insert_cols fficls
-#define fits_delete_col ffdcol
-#define fits_copy_col ffcpcl
-#define fits_modify_vector_len ffmvec
-
-#define fits_read_img_coord ffgics
-#define fits_read_tbl_coord ffgtcs
-#define fits_pix_to_world ffwldp
-#define fits_world_to_pix ffxypx
-
-#define fits_get_image_wcs_keys ffgiwcs
-#define fits_get_table_wcs_keys ffgtwcs
-
-#define fits_find_rows fffrow
-#define fits_find_first_row ffffrw
-#define fits_find_rows_cmp fffrwc
-#define fits_select_rows ffsrow
-#define fits_calc_rows ffcrow
-#define fits_calculator ffcalc
-#define fits_calculator_rng ffcalc_rng
-#define fits_test_expr fftexp
-
-#define fits_create_group ffgtcr
-#define fits_insert_group ffgtis
-#define fits_change_group ffgtch
-#define fits_remove_group ffgtrm
-#define fits_copy_group ffgtcp
-#define fits_merge_groups ffgtmg
-#define fits_compact_group ffgtcm
-#define fits_verify_group ffgtvf
-#define fits_open_group ffgtop
-#define fits_add_group_member ffgtam
-#define fits_get_num_members ffgtnm
-
-#define fits_get_num_groups ffgmng
-#define fits_open_member ffgmop
-#define fits_copy_member ffgmcp
-#define fits_transfer_member ffgmtf
-#define fits_remove_member ffgmrm
-
-#endif
diff --git a/include/cfitsio/pctype.h b/include/cfitsio/pctype.h
deleted file mode 100644
index 2ef4a67..0000000
--- a/include/cfitsio/pctype.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * These ones are necessary to override the behaviour of
- * PINT_cfB, which puts the & on before getting to the
- * TYPE specific PCINT_cfPP...
- * The only way to do this is to introduce PCDOUBLE_cfINT,
- * which means we use PCINT for alot of the generic macros.
- */
-
-#define PCINT_cfAA PINT_cfAA
-#define PCINT_cfN PINT_cfN
-#define PCINT_cfV PINT_cfV
-#define PCINT_cfZ(T,I,A) (__cfztringv[I]= (int ) *A),
-#define PCINT_cfSEP INT_cfSEP
-#define PCINT_cfCC PINT_cfCC
-#define PCINT_cfB(T,A) _(T,_cfPP) A
-#define PCINT_cfU PINT_cfU
-
-/* These are the real TYPE specific ones, and will need to be
- * duplicated for FLOAT,...
- */
-#define PCINT_cfINT PCDOUBLE_cfINT
-#define PCINT_cfAAP(A, B) A
-#define PCINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PCINT_cfTYPE int
-#define PCINT_cfVP(A,B) int B = (int) *A; /* For ZSTRINGV_ARGS */
-#define PCINT_cfPP
-#define PCINT_cfCCC(A,B) A
-
-#define PCFLOAT_cfINT PCDOUBLE_cfINT
-#define PCFLOAT_cfAAP(A, B) A
-#define PCFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PCFLOAT_cfTYPE float
-#define PCFLOAT_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
-#define PCFLOAT_cfPP
-#define PCFLOAT_cfCCC(A,B) A
-
-#define PCDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PCINT,B,X,Y,Z,0)
-#define PCDOUBLE_cfAAP(A, B) A
-#define PCDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PCDOUBLE_cfTYPE double
-#define PCDOUBLE_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
-#define PCDOUBLE_cfPP
-#define PCDOUBLE_cfCCC(A,B) A
-
-#define PCLOGICAL_cfINT PCDOUBLE_cfINT
-#define PCLOGICAL_cfA(M,I,A,B) *A=C2FLOGICAL(*A);
-#define PCLOGICAL_cfAAP(A,B) B = A
-#define PCLOGICAL_cfC(A,B,C) *A=C2FLOGICAL(*A);
-#define PCLOGICAL_cfH(S,U,B)
-#define PCLOGICAL_cfJ(B)
-#define PCLOGICAL_cfW(A,B) PLOGICAL_cfW(A,B)
-#define PCLOGICAL_cfS(M,I,A)
-#define PCLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PCLOGICAL,A,B,C,D,E)
-#define PCLOGICAL_cfTYPE int
-#define PCLOGICAL_cfVP PLOGICAL_cfVP /* For ZSTRINGV_ARGS */
-#define PCLOGICAL_cfPP
-#define PCLOGICAL_cfKK PLOGICAL_cfKK
-#define PCLOGICAL_cfCCC(A,B) B = A
-
-/*
- * I can't find where the following three defines are used...
- * So they may well be wrong.
- */
-
-#define PCLOGICAL_cfQ(B)
-#define PCLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
-#define PCLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
-
-/* This is to get PZTRINGS to work for dynamically allocated
- * Contiguous arrays... The problem was that the array is massaged
- * coming in with the call: c2fstrv( A[0], A[0],... )
- * and coming out with: f2cstrv( (char *) A, (char *) A,... )
- *
- * If you dynamically allocate an array with the trick:
- *
- * char ** A;
- * A = (char **) malloc ( nelements * sizeof(char *) );
- * A[0] = (char *) malloc (nelements * elemSize * sizeof (char) );
- * for ( i = 1; i < nelements; i++) A[i] = A[0] + i * elemSize;
- *
- * Then the coming in call will kill you if you pass in A, and the
- * coming out call will kill you if you pass in A[0]...
- * So, I change the coming in call to (char *)A, and you must then
- * pass in A[0].
- *
- */
-
-
-#undef PZTRINGV_cfA
-#define PZTRINGV_cfA(M,I,A,B) APAZTRINGV_cfA(M,I,A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-#ifdef vmsFortran
-#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- initfstr(B,malloc((sA)-(filA)),(filA),(silA)-1), \ c2fstrv((char *) A,B.dsc$a_pointer,(silA),(sA));
-#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- initfstr(B,(char *) A,(filA),(silA)-1),c2fstrv((char *) A,(char *)A,(silA),(sA));
-#else
-#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- (B.s=malloc((sA)-(filA)),B.fs=c2fstrv((char *)A,B.s,(B.flen=(silA)-1)+1,(sA)));
-#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- B.fs=c2fstrv((char *) A,(char *) A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
-#endif
-
-
-/*
- * This allows for character arrays longer than an unsigned short...
- */
-
-#ifndef vmsFortran
-#undef STRING_cfV
-#undef PSTRINGV_cfV
-#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
-#define PSTRINGV_cfV(T,A,B,F) struct {char *fs; unsigned int sizeofA, flen;} B;
-#endif
-
-/*
- * This is to introduce a PZTRING ( NO V ) type
- */
-
-
-#ifdef vmsFortran
-#define PZTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
-#define APATRING_cfA(M,I,A,B,silA) \
- (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
- B.dsc$w_length >= silA?0:(memset((A)+B.dsc$w_length,' ',silA-B.dsc$w_length-1), \
- A[B.dsc$w_length=silA-1]='\0'));
-#define PZTRING_cfC(A,B,C) \
- (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
- B.dsc$w_length >= C?0:(memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), \
- A[B.dsc$w_length=C-1]='\0'));
-#else
-#define PZTRING_cfV(T,A,B,F) int B;
-#define APATRING_cfA(M,I,A,B,silA) \
- (B=strlen(A),B >= silA?0:(memset((A)+B,' ',silA-B-1)),A[B = silA - 1]='\0');
-#define PZTRING_cfC(A,B,C) \
- (B=strlen(A),B > C?0:(memset((A)+B,' ',(C - 1)-B-1)),A[B = C - 1]='\0');
-#endif
-
-#define PZTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRING,A,B,C,D,E)
-#define PZTRING_cfINT PVOID_cfINT
-#define PZTRING_cfA(M,I,A,B) APATRING_cfA(M,I,A,B,(_3(M,_ELEMLEN_,I))+1)
-#define PZTRING_cfAA PSTRING_cfCC
-#define PZTRING_cfB PSTRING_cfB
-
-#define PZTRING_cfCC PSTRING_cfCC
-#define PZTRING_cfJ PSTRING_cfJ
-#define PZTRING_cfH STRING_cfH
-#define PZTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PZTRING_cfS(M,I,A) ,( _3(M,_ELEMLEN_,I) + 1 )
-#define PZTRING_cfU(T,A) char *A
-#define PZTRING_cfW(A,B) kill_trailing(A,' ');
-#define PZTRING_cfZ(T,I,A)
-#define PZTRING_cfSEP INT_cfSEP
-#define PZTRING_cfKK STRING_cfKK
diff --git a/include/cfitsio/region.h b/include/cfitsio/region.h
deleted file mode 100644
index 4d7c96c..0000000
--- a/include/cfitsio/region.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************/
-/* REGION STUFF */
-/***************************************************************/
-
-#define myPI 3.1415926535897932385
-
-typedef struct {
- int exists;
- double xrefval, yrefval;
- double xrefpix, yrefpix;
- double xinc, yinc;
- double rot;
- char type[6];
-} WCSdata;
-
-typedef enum {
- point_rgn,
- line_rgn,
- circle_rgn,
- annulus_rgn,
- ellipse_rgn,
- elliptannulus_rgn,
- box_rgn,
- rectangle_rgn,
- diamond_rgn,
- sector_rgn,
- poly_rgn
-} shapeType;
-
-typedef enum { pixel_fmt, degree_fmt, hhmmss_fmt } coordFmt;
-
-typedef struct {
- char sign; /* Include or exclude? */
- shapeType shape; /* Shape of this region */
-
- union { /* Parameters - In pixels */
-
- /**** Generic Shape Data ****/
-
- struct {
- double p[8]; /* Region parameters */
- double sinT, cosT; /* For rotated shapes */
- double a, b; /* Extra scratch area */
- } gen;
-
- /**** Polygon Data ****/
-
- struct {
- int nPts; /* Number of Polygon pts */
- double *Pts; /* Polygon points */
- double xmin,xmax; /* Polygon bounding box */
- double ymin,ymax;
- } poly;
-
- } param;
-
-} RgnShape;
-
-typedef struct {
- int nShapes;
- RgnShape *Shapes;
- WCSdata wcs;
-} SAORegion;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int ffrrgn( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status );
-int fftrgn( double X, double Y, SAORegion *Rgn );
-void fffrgn( SAORegion *Rgn );
-
-#ifdef __cplusplus
- }
-#endif
-
-#define fits_read_rgnfile ffrrgn
-#define fits_in_region fftrgn
-#define fits_free_region fffrgn
-
diff --git a/include/cfitsio/ricecomp.h b/include/cfitsio/ricecomp.h
deleted file mode 100644
index 4a48328..0000000
--- a/include/cfitsio/ricecomp.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* @(#) buffer.h 1.1 98/07/21 12:34:27 */
-/* buffer.h: structure for compression to buffer rather than to a file, including
- * bit I/O buffer
- *
- * R. White, 19 June 1998
- */
-
-
-typedef unsigned char Buffer_t;
-
-typedef struct {
- int bitbuffer; /* bit buffer */
- int bits_to_go; /* bits to go in buffer */
- Buffer_t *start; /* start of buffer */
- Buffer_t *current; /* current position in buffer */
- Buffer_t *end; /* end of buffer */
-} Buffer;
-
-#define buffree(mf) (free(mf->start), free(mf))
-#define bufused(mf) (mf->current - mf->start)
-#define bufreset(mf) (mf->current = mf->start)
-
-/*
- * getcbuf, putcbuf macros for character IO to buffer
- * putcbuf returns EOF on end of buffer, else returns 0
- */
-#define getcbuf(mf) ((mf->current >= mf->end) ? EOF : *(mf->current)++)
-#define putcbuf(c,mf) \
- ((mf->current >= mf->end) ? \
- EOF :\
- ((*(mf->current)++ = c), 0))
-
-/*
- * bufalloc sets up buffer of length n
- */
-
-/* not needed by CFITSIO
-
-static Buffer *bufalloc(int n)
-{
-Buffer *mf;
-
- mf = (Buffer *) malloc(sizeof(Buffer));
- if (mf == (Buffer *)NULL) return((Buffer *)NULL);
-
- mf->start = (Buffer_t *) malloc(n*sizeof(Buffer_t));
- if (mf->start == (Buffer_t *)NULL) {
- free(mf);
- return((Buffer *)NULL);
- }
- mf->bits_to_go = 8;
- mf->end = mf->start + n;
- mf->current = mf->start;
- return(mf);
-}
-*/
-
-/*
- * bufrealloc extends buffer (or truncates it) by
- * reallocating memory
- */
-
-/* not needed by CFITSIO
-static int bufrealloc(Buffer *mf, int n)
-{
-int len;
-
- len = mf->current - mf->start;
-
- * silently throw away data if buffer is already longer than n *
- if (len>n) len = n;
- if (len<0) len = 0;
-
- mf->start = (Buffer_t *) realloc(mf->start, n*sizeof(Buffer_t));
- if (mf->start == (Buffer_t *)NULL) return(0);
-
- mf->end = mf->start + n;
- mf->current = mf->start + len;
- return(n);
-}
-*/
-
-/*
- * bufdump dumps contents of buffer to outfile and resets
- * it to be empty. Returns number of bytes written.
- *
- * Note we don't write out the bit buffer -- you must call
- * done_outputing_bits() first to ensure that the bit buffer
- * is written out. I do it this way to allow incremental
- * buffer dumps while bit IO is still going on.
- */
-
-/* not needed by CFITSIO
-
-static int bufdump(FILE *outfile, Buffer *buffer)
-{
-int ndump;
-
- ndump = bufused(buffer);
- if (fwrite(buffer->start, 1, ndump, outfile) != ndump) {
- fprintf(stderr, "bufdump: error in write\n");
- exit(1);
- }
- bufreset(buffer);
- return(ndump);
-}
-*/
diff --git a/include/cfortran.doc b/include/cfortran.doc
deleted file mode 100644
index 6c6f4b3..0000000
--- a/include/cfortran.doc
+++ /dev/null
@@ -1,2051 +0,0 @@
-/* cfortran.doc 4.3 */
-/* www-zeus.desy.de/~burow OR anonymous ftp@zebra.desy.de */
-/* Burkhard Burow burow@desy.de 1990 - 1998. */
-
-
- cfortran.h : Interfacing C or C++ and FORTRAN
-
-Supports: Alpha and VAX VMS, Alpha OSF, DECstation and VAX Ultrix, IBM RS/6000,
- Silicon Graphics, Sun, CRAY, Apollo, HP9000, LynxOS, Convex, Absoft,
- f2c, g77, NAG f90, PowerStation Fortran with Visual C++, NEC SX-4,
- Portland Group.
-
-C and C++ are generally equivalent as far as cfortran.h is concerned.
-Unless explicitly noted otherwise, mention of C implicitly includes C++.
-C++ compilers tested include:
- SunOS> CC +p +w # Clean compiles.
- IRIX> CC # Clean compiles.
- IRIX> CC -fullwarn # Still some warnings to be overcome.
- GNU> g++ -Wall # Compiles are clean, other than warnings for unused
- # cfortran.h static routines.
-
-N.B.: The best documentation on interfacing C or C++ and Fortran is in
- the chapter named something like 'Interfacing C and Fortran'
- to be found in the user's guide of almost every Fortran compiler.
- Understanding this information for one or more Fortran compilers
- greatly clarifies the aims and actions of cfortran.h.
- Such a chapter generally also addresses issues orthogonal to cfortran.h,
- for example the order of array indices, the index of the first element,
- as well as compiling and linking issues.
-
-
-0 Short Summary of the Syntax Required to Create the Interface
---------------------------------------------------------------
-
-e.g. Prototyping a FORTRAN subroutine for C:
-
-/* PROTOCCALLSFSUBn is optional for C, but mandatory for C++. */
-
- PROTOCCALLSFSUB2(SUB_NAME,sub_name,STRING,PINT)
-#define SUB_NAME(A,B) CCALLSFSUB2(SUB_NAME,sub_name,STRING,PINT, A,B)
-
- ^ - -
- number of arguments _____| | STRING BYTE PBYTE BYTEV(..)|
- / | STRINGV DOUBLE PDOUBLE DOUBLEV(..)|
- / | PSTRING FLOAT PFLOAT FLOATV(..)|
- types of arguments ____ / | PNSTRING INT PINT INTV(..)|
- \ | PPSTRING LOGICAL PLOGICAL LOGICALV(..)|
- \ | PSTRINGV LONG PLONG LONGV(..)|
- \ | ZTRINGV SHORT PSHORT SHORTV(..)|
- | PZTRINGV ROUTINE PVOID SIMPLE |
- - -
-
-
-e.g. Prototyping a FORTRAN function for C:
-/* PROTOCCALLSFFUNn is mandatory for both C and C++. */
-PROTOCCALLSFFUN1(INT,FUN_NAME,fun_name,STRING)
-#define FUN_NAME(A) CCALLSFFUN1(FUN_NAME,fun_name,STRING, A)
-
-e.g. calling FUN_NAME from C: {int a; a = FUN_NAME("hello");}
-
-
-e.g. Creating a FORTRAN-callable wrapper for
- a C function returning void, with a 7 dimensional integer array argument:
- [Not supported from C++.]
-FCALLSCSUB1(csub_name,CSUB_NAME,csub_name,INTVVVVVVV)
-
-
-e.g. Creating a FORTRAN-callable wrapper for other C functions:
-FCALLSCFUN1(STRING,cfun_name,CFUN_NAME,cfun_name,INT)
- [ ^-- BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, VOID
- are other types returned by functions. ]
-
-
-e.g. COMMON BLOCKs:
-FORTRAN: common /fcb/ v,w,x
- character *(13) v, w(4), x(3,2)
-C:
-typedef struct { char v[13],w[4][13],x[2][3][13]; } FCB_DEF;
-#define FCB COMMON_BLOCK(FCB,fcb)
-COMMON_BLOCK_DEF(FCB_DEF,FCB);
-FCB_DEF FCB; /* Define, i.e. allocate memory, in exactly one *.c file. */
-
-e.g. accessing FCB in C: printf("%.13s",FCB.v);
-
-
-
-I Introduction
---------------
-
-cfortran.h is an easy-to-use powerful bridge between C and FORTRAN.
-It provides a completely transparent, machine independent interface between
-C and FORTRAN routines (= subroutines and/or functions) and global data,
-i.e. structures and COMMON blocks.
-
-The complete cfortran.h package consists of 4 files: the documentation in
-cfortran.doc, the engine cfortran.h, examples in cfortest.c and
-cfortex.f/or. [cfortex.for under VMS, cfortex.f on other machines.]
-
-The cfortran.h package continues to be developed. The most recent version is
-available via www at http://www-zeus.desy.de/~burow
-or via anonymous ftp at zebra.desy.de (131.169.2.244).
-
-The examples may be run using one of the following sets of instructions:
-
-N.B. Unlike earlier versions, cfortran.h 3.0 and later versions
- automatically uses the correct ANSI ## or pre-ANSI /**/
- preprocessor operator as required by the C compiler.
-
-N.B. As a general rule when trying to determine how to link C and Fortran,
- link a trivial Fortran program using the Fortran compilers verbose option,
- in order to see how the Fortran compiler drives the linker. e.g.
- unix> cat f.f
- END
- unix> f77 -v f.f
- .. lots of info. follows ...
-
-N.B. If using a C main(), i.e. Fortran PROGRAM is not entry of the executable,
- and if the link bombs with a complaint about
- a missing "MAIN" (e.g. MAIN__, MAIN_, f90_main or similar),
- then Fortran has hijacked the entry point to the executable
- and wishes to call the rest of the executable via "MAIN".
- This can usually be satisfied by doing e.g. 'cc -Dmain=MAIN__ ...'
- but often kills the command line arguments in argv and argc.
- The f77 verbose option, usually -v, may point to a solution.
-
-
-RS/6000> # Users are strongly urged to use f77 -qextname and cc -Dextname
-RS/6000> # Use -Dextname=extname if extname is a symbol used in the C code.
-RS/6000> xlf -c -qextname cfortex.f
-RS/6000> cc -c -Dextname cfortest.c
-RS/6000> xlf -o cfortest cfortest.o cfortex.o && cfortest
-
-DECFortran> #Only DECstations with DECFortran for Ultrix RISC Systems.
-DECFortran> cc -c -DDECFortran cfortest.c
-DECFortran> f77 -o cfortest cfortest.o cfortex.f && cfortest
-
-IRIX xxxxxx 5.2 02282015 IP20 mips
-MIPS> # DECstations and Silicon Graphics using the MIPS compilers.
-MIPS> cc -o cfortest cfortest.c cfortex.f -lI77 -lU77 -lF77 && cfortest
-MIPS> # Can also let f77 drive linking, e.g.
-MIPS> cc -c cfortest.c
-MIPS> f77 -o cfortest cfortest.o cfortex.f && cfortest
-
-Apollo> # Some 'C compiler 68K Rev6.8' break. [See Section II o) Notes: Apollo]
-Apollo> f77 -c cfortex.f && cc -o cfortest cfortest.c cfortex.o && cfortest
-
-VMS> define lnk$library sys$library:vaxcrtl
-VMS> cc cfortest.c
-VMS> fortran cfortex.for
-VMS> link/exec=cfortest cfortest,cfortex
-VMS> run cfortest
-
-OSF1 xxxxxx V3.0 347 alpha
-Alpha/OSF> # Probably better to let cc drive linking, e.g.
-Alpha/OSF> f77 -c cfortex.f
-Alpha/OSF> cc -o cfortest cfortest.c cfortex.o -lUfor -lfor -lFutil -lots -lm
-Alpha/OSF> cfortest
-Alpha/OSF> # Else may need 'cc -Dmain=MAIN__' to let f77 drive linking.
-
-Sun> # Some old cc(1) need a little help. [See Section II o) Notes: Sun]
-Sun> f77 -o cfortest cfortest.c cfortex.f -lc -lm && cfortest
-Sun> # Some older f77 may require 'cc -Dmain=MAIN_'.
-
-CRAY> cft77 cfortex.f
-CRAY> cc -c cfortest.c
-CRAY> segldr -o cfortest.e cfortest.o cfortex.o
-CRAY> ./cfortest.e
-
-NEC> cc -c -Xa cfortest.c
-NEC> f77 -o cfortest cfortest.o cfortex.f && cfortest
-
-VAX/Ultrix/cc> # For cc on VAX Ultrix only, do the following once to cfortran.h.
-VAX/Ultrix/cc> mv cfortran.h cftmp.h && grep -v "^#pragma" <cftmp.h >cfortran.h
-
-VAX/Ultrix/f77> # In the following, 'CC' is either 'cc' or 'gcc -ansi'. NOT'vcc'
-VAX/Ultrix/f77> CC -c -Dmain=MAIN_ cfortest.c
-VAX/Ultrix/f77> f77 -o cfortest cfortex.f cfortest.o && cfortest
-
-LynxOS> # In the following, 'CC' is either 'cc' or 'gcc -ansi'.
-LynxOS> # Unfortunately cc is easily overwhelmed by cfortran.h,
-LynxOS> # and won't compile some of the cfortest.c demos.
-LynxOS> f2c -R cfortex.f
-LynxOS> CC -Dlynx -o cfortest cfortest.c cfortex.c -lf2c && cfortest
-
-HP9000> # Tested with HP-UX 7.05 B 9000/380 and with A.08.07 A 9000/730
-HP9000> # CC may be either 'c89 -Aa' or 'cc -Aa'
-HP9000> # Depending on the compiler version, you may need to include the
-HP9000> # option '-tp,/lib/cpp' or worse, you'll have to stick to the K&R C.
-HP9000> # [See Section II o) Notes: HP9000]
-HP9000> # Users are strongly urged to use f77 +ppu and cc -Dextname
-HP9000> # Use -Dextname=extname if extname is a symbol used in the C code.
-HP9000> CC -Dextname -c cfortest.c
-HP9000> f77 +ppu cfortex.f -o cfortest cfortest.o && cfortest
-HP9000> # Older f77 may need
-HP9000> f77 -c cfortex.f
-HP9000> CC -o cfortest cfortest.c cfortex.o -lI77 -lF77 && cfortest
-
-HP0000> # If old-style f77 +800 compiled objects are required:
-HP9000> # #define hpuxFortran800
-HP9000> cc -c -Aa -DhpuxFortran800 cfortest.c
-HP9000> f77 +800 -o cfortest cfortest.o cfortex.f
-
-f2c> # In the following, 'CC' is any C compiler.
-f2c> f2c -R cfortex.f
-f2c> CC -o cfortest -Df2cFortran cfortest.c cfortex.c -lf2c && cfortest
-
-Portland Group $ # Presumably other C compilers also work.
-Portland Group $ pgcc -DpgiFortran -c cfortest.c
-Portland Group $ pgf77 -o cfortest cfortex.f cfortest.o && cfortest
-
-NAGf90> # cfortex.f is distributed with Fortran 77 style comments.
-NAGf90> # To convert to f90 style comments do the following once to cfortex.f:
-NAGf90> mv cfortex.f cf_temp.f && sed 's/^C/\!/g' cf_temp.f > cfortex.f
-NAGf90> # In the following, 'CC' is any C compiler.
-NAGf90> CC -c -DNAGf90Fortran cfortest.c
-NAGf90> f90 -o cfortest cfortest.o cfortex.f && cfortest
-
-PC> # On a PC with PowerStation Fortran and Visual_C++
-PC> cl /c cftest.c
-PC> fl32 cftest.obj cftex.for
-
-GNU> # GNU Fortran
-GNU> # See Section VI caveat on using 'gcc -traditional'.
-GNU> gcc -ansi -Wall -O -c -Df2cFortran cfortest.c
-GNU> g77 -ff2c -o cfortest cfortest.o cfortex.f && cfortest
-
-AbsoftUNIX> # Absoft Fortran for all UNIX based operating systems.
-AbsoftUNIX> # e.g. Linux or Next on Intel or Motorola68000.
-AbsoftUNIX> # Absoft f77 -k allows Fortran routines to be safely called from C.
-AbsoftUNIX> gcc -ansi -Wall -O -c -DAbsoftUNIXFortran cfortest.c
-AbsoftUNIX> f77 -k -o cfortest cfortest.o cfortex.f && cfortest
-
-AbsoftPro> # Absoft Pro Fortran for MacOS
-AbsoftPro> # Use #define AbsoftProFortran
-
-CLIPPER> # INTERGRAPH CLIX using CLIPPER C and Fortran compilers.
-CLIPPER> # N.B. - User, not cfortran.h, is responsible for
-CLIPPER> # f77initio() and f77uninitio() if required.
-CLIPPER> # - LOGICAL values are not mentioned in CLIPPER doc.s,
-CLIPPER> # so they may not yet be correct in cfortran.h.
-CLIPPER> # - K&R mode (-knr or Ac=knr) breaks FLOAT functions
-CLIPPER> # (see CLIPPER doc.s) and cfortran.h does not fix it up.
-CLIPPER> # [cfortran.h ok for old sun C which made the same mistake.]
-CLIPPER> acc cfortest.c -c -DCLIPPERFortran
-CLIPPER> af77 cfortex.f cfortest.o -o cfortest
-
-
-By changing the SELECTion ifdef of cfortest.c and recompiling one can try out
-a few dozen different few-line examples.
-
-
-
-The benefits of using cfortran.h include:
-1. Machine/OS/compiler independent mixing of C and FORTRAN.
-
-2. Identical (within syntax) calls across languages, e.g.
-C FORTRAN
- CALL HBOOK1(1,'pT spectrum of pi+',100,0.,5.,0.)
-/* C*/
- HBOOK1(1,"pT spectrum of pi+",100,0.,5.,0.);
-
-3. Each routine need only be set up once in its lifetime. e.g.
-/* Setting up a FORTRAN routine to be called by C.
- ID,...,VMX are merely the names of arguments.
- These tags must be unique w.r.t. each other but are otherwise arbitrary. */
-PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT)
-#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \
- CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \
- ID,CHTITLE,NX,XMI,XMA,VMX)
-
-4. Source code is NOT required for the C routines exported to FORTRAN, nor for
- the FORTRAN routines imported to C. In fact, routines are most easily
- prototyped using the information in the routines' documentation.
-
-5. Routines, and the code calling them, can be coded naturally in the language
- of choice. C routines may be coded with the natural assumption of being
- called only by C code. cfortran.h does all the required work for FORTRAN
- code to call C routines. Similarly it also does all the work required for C
- to call FORTRAN routines. Therefore:
- - C programmers need not embed FORTRAN argument passing mechanisms into
- their code.
- - FORTRAN code need not be converted into C code. i.e. The honed and
- time-honored FORTRAN routines are called by C.
-
-6. cfortran.h is a single ~1700 line C include file; portable to most
- remaining, if not all, platforms.
-
-7. STRINGS and VECTORS of STRINGS along with the usual simple arguments to
- routines are supported as are functions returning STRINGS or numbers. Arrays
- of pointers to strings and values of structures as C arguments, will soon be
- implemented. After learning the machinery of cfortran.h, users can expand
- it to create custom types of arguments. [This requires no modification to
- cfortran.h, all the preprocessor directives required to implement the
- custom types can be defined outside cfortran.h]
-
-8. cfortran.h requires each routine to be exported to be explicitly set up.
- While is usually only be done once in a header file it would be best if
- applications were required to do no work at all in order to cross languages.
- cfortran.h's simple syntax could be a convenient back-end for a program
- which would export FORTRAN or C routines directly from the source code.
-
-
- -----
-
-Example 1 - cfortran.h has been used to make the C header file hbook.h,
- which then gives any C programmer, e.g. example.c, full and
- completely transparent access to CERN's HBOOK library of routines.
- Each HBOOK routine required about 3 lines of simple code in
- hbook.h. The example also demonstrates how FORTRAN common blocks
- are defined and used.
-
-/* hbook.h */
-#include "cfortran.h"
- :
-PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT)
-#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \
- CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \
- ID,CHTITLE,NX,XMI,XMA,VMX)
- :
-/* end hbook.h */
-
-/* example.c */
-#include "hbook.h"
- :
-typedef struct {
- int lines;
- int status[SIZE];
- float p[SIZE]; /* momentum */
-} FAKE_DEF;
-#define FAKE COMMON_BLOCK(FAKE,fake)
-COMMON_BLOCK_DEF(FAKE_DEF,FAKE);
- :
-main ()
-{
- :
- HBOOK1(1,"pT spectrum of pi+",100,0.,5.,0.);
-/* c.f. the call in FORTRAN:
- CALL HBOOK1(1,'pT spectrum of pi+',100,0.,5.,0.)
-*/
- :
- FAKE.p[7]=1.0;
- :
-}
-
-N.B. i) The routine is language independent.
- ii) hbook.h is machine independent.
- iii) Applications using routines via cfortran.h are machine independent.
-
- -----
-
-Example 2 - Many VMS System calls are most easily called from FORTRAN, but
- cfortran.h now gives that ease in C.
-
-#include "cfortran.h"
-
-PROTOCCALLSFSUB3(LIB$SPAWN,lib$spawn,STRING,STRING,STRING)
-#define LIB$SPAWN(command,input_file,output_file) \
- CCALLSFSUB3(LIB$SPAWN,lib$spawn,STRING,STRING,STRING, \
- command,input_file,output_file)
-
-main ()
-{
-LIB$SPAWN("set term/width=132","","");
-}
-
-Obviously the cfortran.h command above could be put into a header file along
-with the description of the other system calls, but as this example shows, it's
-not much hassle to set up cfortran.h for even a single call.
-
- -----
-
-Example 3 - cfortran.h and the source cstring.c create the cstring.obj library
- which gives FORTRAN access to all the functions in C's system
- library described by the system's C header file string.h.
-
-C EXAMPLE.FOR
- PROGRAM EXAMPLE
- DIMENSION I(20), J(30)
- :
- CALL MEMCPY(I,J,7)
- :
- END
-
-/* cstring.c */
-#include <string.h> /* string.h prototypes memcpy() */
-#include "cfortran.h"
-
- :
-FCALLSCSUB3(memcpy,MEMCPY,memcpy,PVOID,PVOID,INT)
- :
-
-
-The simplicity exhibited in the above example exists for many but not all
-machines. Note 4. of Section II ii) details the limitations and describes tools
-which try to maintain the best possible interface when FORTRAN calls C
-routines.
-
- -----
-
-
-II Using cfortran.h
--------------------
-
-The user is asked to look at the source files cfortest.c and cfortex.f
-for clarification by example.
-
-o) Notes:
-
-o Specifying the Fortran compiler
- cfortran.h generates interfaces for the default Fortran compiler. The default
-can be overridden by defining,
- . in the code, e.g.: #define NAGf90Fortran
- OR . in the compile directive, e.g.: unix> cc -DNAGf90Fortran
-one of the following before including cfortran.h:
- NAGf90Fortran f2cFortran hpuxFortran apolloFortran sunFortran
- IBMR2Fortran CRAYFortran mipsFortran DECFortran vmsFortran
- CONVEXFortran PowerStationFortran AbsoftUNIXFortran
- SXFortran pgiFortran AbsoftProFortran
-This also allows crosscompilation.
-If wanted, NAGf90Fortran, f2cFortran, DECFortran, AbsoftUNIXFortran,
-AbsoftProFortran and pgiFortran must be requested by the user.
-
-o /**/
- cfortran.h (ab)uses the comment kludge /**/ when the ANSI C preprocessor
-catenation operator ## doesn't exist. In at least MIPS C, this kludge is
-sensitive to blanks surrounding arguments to macros.
- Therefore, for applications using non-ANSI C compilers, the argtype_i,
-routine_name, routine_type and common_block_name arguments to the
-PROTOCCALLSFFUNn, CCALLSFSUB/FUNn, FCALLSCSUB/FUNn and COMMON_BLOCK macros
---- MUST NOT --- be followed by any white space characters such as
-blanks, tabs or newlines.
-
-o LOGICAL
- FORTRAN LOGICAL values of .TRUE. and .FALSE. do not agree with the C
-representation of TRUE and FALSE on all machines. cfortran.h does the
-conversion for LOGICAL and PLOGICAL arguments and for functions returning
-LOGICAL. Users must convert arrays of LOGICALs from C to FORTRAN with the
-C2FLOGICALV(array_name, elements_in_array); macro. Similarly, arrays of LOGICAL
-values may be converted from the FORTRAN into C representation by using
-F2CLOGICALV(array_name, elements_in_array);
-
- When C passes or returns LOGICAL values to FORTRAN, by default cfortran.h
-only makes the minimal changes required to the value. [e.g. Set/Unset the
-single relevant bit or do nothing for FORTRAN compilers which use 0 as FALSE
-and treat all other values as TRUE.] Therefore cfortran.h will pass LOGICALs
-to FORTRAN which do not have an identical representation to .TRUE. or .FALSE.
-This is fine except for abuses of FORTRAN/77 in the style of:
- logical l
- if (l .eq. .TRUE.) ! (1)
-instead of the correct:
- if (l .eqv. .TRUE.) ! (2)
-or:
- if (l) ! (3)
-For FORTRAN code which treats LOGICALs from C in the method of (1),
-LOGICAL_STRICT must be defined before including cfortran.h, either in the
-code, "#define LOGICAL_STRICT", or compile with "cc -DLOGICAL_STRICT".
-There is no reason to use LOGICAL_STRICT for FORTRAN code which does not do (1).
-At least the IBM's xlf and the Apollo's f77 do not even allow code along the
-lines of (1).
-
- DECstations' DECFortran and MIPS FORTRAN compilers use different internal
-representations for LOGICAL values. [Both compilers are usually called f77,
-although when both are installed on a single machine the MIPS' one is usually
-renamed. (e.g. f772.1 for version 2.10.)] cc doesn't know which FORTRAN
-compiler is present, so cfortran.h assumes MIPS f77. To use cc with DECFortran
-define the preprocessor constant 'DECFortran'.
-e.g. i) cc -DDECFortran -c the_code.c
- or ii) #define DECFortran /* in the C code or add to cfortran.h. */
-
- MIPS f77 [SGI and DECstations], f2c, and f77 on VAX Ultrix treat
-.eqv./.neqv. as .eq./.ne.. Therefore, for these compilers, LOGICAL_STRICT is
-defined by default in cfortran.h. [The Sun and HP compilers have not been
-tested, so they may also require LOGICAL_STRICT as the default.]
-
-o SHORT and BYTE
- They are irrelevant for the CRAY where FORTRAN has no equivalent to C's short.
-Similarly BYTE is irrelevant for f2c and for VAX Ultrix f77 and fort. The
-author has tested SHORT and BYTE with a modified cfortest.c/cfortex.f on all
-machines supported except for the HP9000 and the Sun.
-
- BYTE is a signed 8-bit quantity, i.e. values are -128 to 127, on all machines
-except for the SGI [at least for MIPS Computer Systems 2.0.] On the SGI it is
-an unsigned 8-bit quantity, i.e. values are 0 to 255, although the SGI 'FORTRAN
-77 Programmers Guide' claims BYTE is signed. Perhaps MIPS 2.0 is dated, since
-the DECstations using MIPS 2.10 f77 have a signed BYTE.
-
- To minimize the difficulties of signed and unsigned BYTE, cfortran.h creates
-the type 'INTEGER_BYTE' to agree with FORTRAN's BYTE. Users may define
-SIGNED_BYTE or UNSIGNED_BYTE, before including cfortran.h, to specify FORTRAN's
-BYTE. If neither is defined, cfortran.h assumes SIGNED_BYTE.
-
-o CRAY
- The type DOUBLE in cfortran.h corresponds to FORTRAN's DOUBLE PRECISION.
- The type FLOAT in cfortran.h corresponds to FORTRAN's REAL.
-
-On a classic CRAY [i.e. all models except for the t3e]:
-( 64 bit) C float == C double == Fortran REAL
-(128 bit) C long double == Fortran DOUBLE PRECISION
-Therefore when moving a mixed C and FORTRAN app. to/from a classic CRAY,
-either the C code will have to change,
-or the FORTRAN code and cfortran.h declarations will have to change.
-DOUBLE_PRECISION is a cfortran.h macro which provides the former option,
-i.e. the C code is automatically changed.
-DOUBLE_PRECISION is 'long double' on classic CRAY and 'double' elsewhere.
-DOUBLE_PRECISION thus corresponds to FORTRAN's DOUBLE PRECISION
-on all machines, including classic CRAY.
-
-On a classic CRAY with the fortran compiler flag '-dp':
-Fortran DOUBLE PRECISION thus is also the faster 64bit type.
-(This switch is often used since the application is usually satisfied by
- 64 bit precision and the application needs the speed.)
-DOUBLE_PRECISION is thus not required in this case,
-since the classic CRAY behaves like all other machines.
-If DOUBLE_PRECISION is used nonetheless, then on the classic CRAY
-the default cfortran.h behavior must be overridden,
-for example by the C compiler option '-DDOUBLE_PRECISION=double'.
-
-On a CRAY t3e:
-(32 bit) C float == Fortran Unavailable
-(64 bit) C double == C long double == Fortran REAL == Fortran DOUBLE PRECISION
-Notes:
-- (32 bit) is available as Fortran REAL*4 and
- (64 bit) is available as Fortran REAL*8.
- Since cfortran.h is all about more portability, not about less portability,
- the use of the nonstandard REAL*4 and REAL*8 is strongly discouraged.
-- Fortran DOUBLE PRECISION is folded to REAL with the following warning:
- 'DOUBLE PRECISION is not supported on this platform. REAL will be used.'
- Similarly, Fortran REAL*16 is mapped to REAL*8 with a warning.
-This behavior differs from that of other machines, including the classic CRAY.
-FORTRAN_REAL is thus introduced for the t3e,
-just as DOUBLE_PRECISION is introduced for the classic CRAY.
-FORTRAN_REAL is 'double' on t3e and 'float' elsewhere.
-FORTRAN_REAL thus corresponds to FORTRAN's REAL on all machines, including t3e.
-
-
-o f2c
- f2c, by default promotes REAL functions to double. cfortran.h does not (yet)
-support this, so the f2c -R option must be used to turn this promotion off.
-
-o f2c
-[Thanks to Dario Autiero for pointing out the following.]
-f2c has a strange feature in that either one or two underscores are appended
-to a Fortran name of a routine or common block,
-depending on whether or not the original name contains an underscore.
-
- S.I. Feldman et al., "A fortran to C converter",
- Computing Science Technical Report No. 149.
-
- page 2, chapter 2: INTERLANGUAGE conventions
- ...........
- To avoid conflict with the names of library routines and with names that
- f2c generates,
- Fortran names may have one or two underscores appended. Fortran names are
- forced to lower case (unless the -U option described in Appendix B is in
- effect); external names, i.e. the names of fortran procedures and common
- blocks, have a single underscore appended if they do not contain any
- underscore and have a pair of underscores appended if they do contain
- underscores. Thus fortran subroutines names ABC, A_B_C and A_B_C_ result
- in C functions named abc_, a_b_c__ and a_b_c___.
- ...........
-
-cfortran.h is unable to change the naming convention on a name by name basis.
-Fortran routine and common block names which do not contain an underscore
-are unaffected by this feature.
-Names which do contain an underscore may use the following work-around:
-
-/* First 2 lines are a completely standard cfortran.h interface
- to the Fortran routine E_ASY . */
- PROTOCCALLSFSUB2(E_ASY,e_asy, PINT, INT)
-#define E_ASY(A,B) CCALLSFSUB2(E_ASY,e_asy, PINT, INT, A, B)
-#ifdef f2cFortran
-#define e_asy_ e_asy__
-#endif
-/* Last three lines are a work-around for the strange f2c naming feature. */
-
-o NAG f90
- The Fortran 77 subset of Fortran 90 is supported. Extending cfortran.h to
-interface C with all of Fortran 90 has not yet been examined.
- The NAG f90 library hijacks the main() of any program and starts the user's
-program with a call to: void f90_main(void);
-While this in itself is only a minor hassle, a major problem arises because
-NAG f90 provides no mechanism to access command line arguments.
- At least version 'NAGWare f90 compiler Version 1.1(334)' appended _CB to
-common block names instead of the usual _. To fix, add this to cfortran.h:
-#ifdef old_NAG_f90_CB_COMMON
-#define COMMON_BLOCK CFC_ /* for all other Fortran compilers */
-#else
-#define COMMON_BLOCK(UN,LN) _(LN,_CB)
-#endif
-
-o RS/6000
- Using "xlf -qextname ...", which appends an underscore, '_', to all FORTRAN
-external references, requires "cc -Dextname ..." so that cfortran.h also
-generates these underscores.
-Use -Dextname=extname if extname is a symbol used in the C code.
-The use of "xlf -qextname" is STRONGLY ENCOURAGED, since it allows for
-transparent naming schemes when mixing C and Fortran.
-
-o HP9000
- Using "f77 +ppu ...", which appends an underscore, '_', to all FORTRAN
-external references, requires "cc -Dextname ..." so that cfortran.h also
-generates these underscores.
-Use -Dextname=extname if extname is a symbol used in the C code.
-The use of "f77 +ppu" is STRONGLY ENCOURAGED, since it allows for
-transparent naming schemes when mixing C and Fortran.
-
- At least one release of the HP /lib/cpp.ansi preprocessor is broken and will
-go into an infinite loop when trying to process cfortran.h with the
-## catenation operator. The K&R version of cfortran.h must then be used and the
-K&R preprocessor must be specified. e.g.
- HP9000> cc -Aa -tp,/lib/cpp -c source.c
-The same problem with a similar solution exists on the Apollo.
-An irrelevant error message '0: extraneous name /usr/include' will appear for
-each source file due to another HP bug, and can be safely ignored.
-e.g. 'cc -v -c -Aa -tp,/lib/cpp cfortest.c' will show that the driver passes
-'-I /usr/include' instead of '-I/usr/include' to /lib/cpp
-
-On some machines the above error causes compilation to stop; one must then use
-K&R C, as with old HP compilers which don't support function prototyping.
-cfortran.h has to be informed that K&R C is to being used, e.g.
-HP9000> cc -D__CF__KnR -c source.c
-
-o AbsoftUNIXFortran
-By default, cfortran.h follows the default AbsoftUNIX/ProFortran and prepends _C
-to each COMMON BLOCK name. To override the cfortran.h behavior
-#define COMMON_BLOCK(UN,LN) before #including cfortran.h.
-[Search for COMMON_BLOCK in cfortran.h for examples.]
-
-o Apollo
-On at least one release, 'C compiler 68K Rev6.8(168)', the default C
-preprocessor, from cc -A xansi or cc -A ansi, enters an infinite loop when
-using cfortran.h. This Apollo bug can be circumvented by using:
- . cc -DANSI_C_preprocessor=0 to force use of /**/, instead of '##'.
- AND . The pre-ANSI preprocessor, i.e. use cc -Yp,/usr/lib
-The same problem with a similar solution exists on the HP.
-
-o Sun
-Old versions of cc(1), say <~1986, may require help for cfortran.h applications:
- . #pragma may not be understood, hence cfortran.h and cfortest.c may require
- sun> mv cfortran.h cftmp.h && grep -v "^#pragma" <cftmp.h >cfortran.h
- sun> mv cfortest.c cftmp.c && grep -v "^#pragma" <cftmp.c >cfortest.c
- . Old copies of math.h may not include the following from a newer math.h.
- [For an ancient math.h on a 386 or sparc, get similar from a new math.h.]
- #ifdef mc68000 /* 5 lines Copyright (c) 1988 by Sun Microsystems, Inc. */
- #define FLOATFUNCTIONTYPE int
- #define RETURNFLOAT(x) return (*(int *)(&(x)))
- #define ASSIGNFLOAT(x,y) *(int *)(&x) = y
- #endif
-
-o CRAY, Sun, Apollo [pre 6.8 cc], VAX Ultrix and HP9000
- Only FORTRAN routines with less than 15 arguments can be prototyped for C,
-since these compilers don't allow more than 31 arguments to a C macro. This can
-be overcome, [see Section IV], with access to any C compiler without this
-limitation, e.g. gcc, on ANY machine.
-
-o VAX Ultrix
- vcc (1) with f77 is not supported. Although:
-VAXUltrix> f77 -c cfortex.f
-VAXUltrix> vcc -o cfortest cfortest.c cfortex.o -lI77 -lU77 -lF77 && cfortest
-will link and run. However, the FORTRAN standard I/O is NOT merged with the
-stdin and stdout of C, and instead uses the files fort.6 and fort.5. For vcc,
-f77 can't drive the linking, as for gcc and cc, since vcc objects must be
-linked using lk (1). f77 -v doesn't tell much, and without VAX Ultrix manuals,
-the author can only wait for the info. required.
-
- fort (1) is not supported. Without VAX Ultrix manuals the author cannot
-convince vcc/gcc/cc and fort to generate names of routines and COMMON blocks
-that match at the linker, lk (1). i.e. vcc/gcc/cc prepend a single underscore
-to external references, e.g. NAME becomes _NAME, while fort does not modify the
-references. So ... either fort has prepend an underscore to external
-references, or vcc/gcc/cc have to generate unmodified names. man 1 fort
-mentions JBL, is JBL the only way?
-
-o VAX VMS C
- The compiler 'easily' exhausts its table space and generates:
-%CC-F-BUGCHECK, Compiler bug check during parser phase .
- Submit an SPR with a problem description.
- At line number 777 in DISK:[DIR]FILE.C;1.
-where the line given, '777', includes a call across C and FORTRAN via
-cfortran.h, usually with >7 arguments and/or very long argument expressions.
-This SPR can be staved off, with the simple modification to cfortran.h, such
-that the relevant CCALLSFSUBn (or CCALLSFFUNn or FCALLSCFUNn) is not
-cascaded up to CCALLSFSUB14, and instead has its own copy of the contents of
-CCALLSFSUB14. [If these instructions are not obvious after examining cfortran.h
-please contact the author.]
-[Thanks go to Mark Kyprianou (kyp@stsci.edu) for this solution.]
-
-o Mips compilers
- e.g. DECstations and SGI, require applications with a C main() and calls to
-GETARG(3F), i.e. FORTRAN routines returning the command line arguments, to use
-two macros as shown:
- :
-CF_DECLARE_GETARG; /* This must be external to all routines. */
- :
-main(int argc, char *argv[])
-{
- :
-CF_SET_GETARG(argc,argv); /* This must precede any calls to GETARG(3F). */
- :
-}
-The macros are null and benign on all other systems. Sun's GETARG(3F) also
-doesn't work with a generic C main() and perhaps a workaround similar to the
-Mips' one exists.
-
-o Alpha/OSF
-Using the DEC Fortran and the DEC C compilers of DEC OSF/1 [RT] V1.2 (Rev. 10),
-Fortran, when called from C, has occasional trouble using a routine received as
-a dummy argument.
-
-e.g. In the following the Fortran routine 'e' will crash when it tries to use
- the C routine 'c' or the Fortran routine 'f'.
- The example works on other systems.
-
-C FORTRAN /* C */
- integer function f() #include <stdio.h>
- f = 2 int f_();
- return int e_(int (*u)());
- end
- int c(){ return 1;}
- integer function e(u) int d (int (*u)()) { return u();}
- integer u
- external u main()
- e=u() { /* Calls to d work. */
- return printf("d (c ) returns %d.\n",d (c ));
- end printf("d (f_) returns %d.\n",d (f_));
- /* Calls to e_ crash. */
- printf("e_(c ) returns %d.\n",e_(c ));
- printf("e_(f_) returns %d.\n",e_(f_));
- }
-
-Solutions to the problem are welcomed!
-A kludge which allows the above example to work correctly, requires an extra
-argument to be given when calling the dummy argument function.
-i.e. Replacing 'e=u()' by 'e=u(1)' allows the above example to work.
-
-
-o The FORTRAN routines are called using macro expansions, therefore the usual
-caveats for expressions in arguments apply. The expressions to the routines may
-be evaluated more than once, leading to lower performance and in the worst case
-bizarre bugs.
-
-o For those who wish to use cfortran.h in large applications. [See Section IV.]
-This release is intended to make it easy to get applications up and running.
-This implies that applications are not as efficient as they could be:
-- The current mechanism is inefficient if a single header file is used to
- describe a large library of FORTRAN functions. Code for a static wrapper fn.
- is generated in each piece of C source code for each FORTRAN function
- specified with the CCALLSFFUNn statement, irrespective of whether or not the
- function is ever called.
-- Code for several static utility routines internal to cfortran.h is placed
- into any source code which #includes cfortran.h. These routines should
- probably be in a library.
-
-
-i) Calling FORTRAN routines from C:
- --------------------------------
-
-The FORTRAN routines are defined by one of the following two instructions:
-
-for a SUBROUTINE:
-/* PROTOCCALLSFSUBn is optional for C, but mandatory for C++. */
-PROTOCCALLSFSUBn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
-#define Routine_name(argname_1,..,argname_n) \
-CCALLSFSUBn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n, \
- argname_1,..,argname_n)
-
-for a FUNCTION:
-PROTOCCALLSFFUNn(routine_type,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
-#define Routine_name(argname_1,..,argname_n) \
-CCALLSFFUNn(ROUTINE_NAME,routine_name,argtype_1,...,argtype_n, \
- argname_1,..,argname_n)
-
-Where:
-'n' = 0->14 [SUBROUTINE's ->27] (easily expanded in cfortran.h to > 14 [27]) is
- the number of arguments to the routine.
-Routine_name = C name of the routine (IN UPPER CASE LETTERS).[see 2.below]
-ROUTINE_NAME = FORTRAN name of the routine (IN UPPER CASE LETTERS).
-routine_name = FORTRAN name of the routine (IN lower case LETTERS).
-routine_type = the type of argument returned by FORTRAN functions.
- = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING, VOID.
- [Instead of VOID one would usually use CCALLSFSUBn.
- VOID forces a wrapper function to be used.]
-argtype_i = the type of argument passed to the FORTRAN routine and must be
- consistent in the definition and prototyping of the routine s.a.
- = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING.
- For vectors, i.e. 1 dim. arrays use
- = BYTEV, DOUBLEV, FLOATV, INTV, LOGICALV, LONGV, SHORTV,
- STRINGV, ZTRINGV.
- For vectors of vectors, i.e. 2 dim. arrays use
- = BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV.
- For n-dim. arrays, 1<=n<=7 [7 is the maximum in Fortran 77],
- = BYTEV..nV's..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V,
- LONGV..V, SHORTV..V.
- N.B. Array dimensions and types are checked by the C compiler.
- For routines changing the values of an argument, the keyword is
- prepended by a 'P'.
- = PBYTE, PDOUBLE, PFLOAT, PINT, PLOGICAL, PLONG, PSHORT,
- PSTRING, PSTRINGV, PZTRINGV.
- For EXTERNAL procedures passed as arguments use
- = ROUTINE.
- For exceptional arguments which require no massaging to fit the
- argument passing mechanisms use
- = PVOID.
- The argument is cast and passed as (void *).
- Although PVOID could be used to describe all array arguments on
- most (all?) machines , it shouldn't be because the C compiler
- can no longer check the type and dimension of the array.
-argname_i = any valid unique C tag, but must be consistent in the definition
- as shown.
-
-Notes:
-
-1. cfortran.h may be expanded to handle a more argument type. To suppport new
-arguments requiring complicated massaging when passed between Fortran and C,
-the user will have to understand cfortran.h and follow its code and mechanisms.
-
-To define types requiring little or no massaging when passed between Fortran
-and C, the pseudo argument type SIMPLE may be used.
-For a user defined type called 'newtype', the definitions required are:
-
-/* The following 7 lines are required verbatim.
- 'newtype' is the name of the new user defined argument type.
-*/
-#define newtype_cfV( T,A,B,F) SIMPLE_cfV(T,A,B,F)
-#define newtype_cfSEP(T, B) SIMPLE_cfSEP(T,B)
-#define newtype_cfINT(N,A,B,X,Y,Z) SIMPLE_cfINT(N,A,B,X,Y,Z)
-#define newtype_cfSTR(N,T,A,B,C,D,E) SIMPLE_cfSTR(N,T,A,B,C,D,E)
-#define newtype_cfCC( T,A,B) SIMPLE_cfCC(T,A,B)
-#define newtype_cfAA( T,A,B) newtype_cfB(T,A) /* Argument B not used. */
-#define newtype_cfU( T,A) newtype_cfN(T,A)
-
-/* 'parameter_type(A)' is a declaration for 'A' and describes the type of the
-parameter expected by the Fortran function. This type will be used in the
-prototype for the function, if using ANSI C, and to declare the argument used
-by the intermediate function if calling a Fortran FUNCTION.
-Valid 'parameter_type(A)' include: int A
- void (*A)()
- double A[17]
-*/
-#define newtype_cfN( T,A) parameter_type(A) /* Argument T not used. */
-
-/* Before any argument of the new type is passed to the Fortran routine, it may
-be massaged as given by 'massage(A)'.
-*/
-#define newtype_cfB( T,A) massage(A) /* Argument T not used. */
-
-An example of a simple user defined type is given cfortex.f and cfortest.c.
-Two uses of SIMPLE user defined types are [don't show the 7 verbatim #defines]:
-
-/* Pass the address of a structure, using a type called PSTRUCT */
-#define PSTRUCT_cfN( T,A) void *A
-#define PSTRUCT_cfB( T,A) (void *) &(A)
-
-/* Pass an integer by value, (not standard F77 ), using a type called INTVAL */
-#define INTVAL_cfN( T,A) int A
-#define INTVAL_cfB( T,A) (A)
-
-[If using VAX VMS, surrounding the #defines with "#pragma (no)standard" allows
- the %CC-I-PARAMNOTUSED messages to be avoided.]
-
-Upgrades to cfortran.h try to be, and have been, backwards compatible. This
-compatibility cannot be offered to user defined types. SIMPLE user defined
-types are less of a risk since they require so little effort in their creation.
-If a user defined type is required in more than one C header file of interfaces
-to libraries of Fortran routines, good programming practice, and ease of code
-maintenance, suggests keeping any user defined type within a single file which
-is #included as required. To date, changes to the SIMPLE macros were introduced
-in versions 2.6, 3.0 and 3.2 of cfortran.h.
-
-
-2. Routine_name is the name of the macro which the C programmer will use in
-order to call a FORTRAN routine. In theory Routine_name could be any valid and
-unique name, but in practice, the name of the FORTRAN routine in UPPER CASE
-works everywhere and would seem to be an obvious choice.
-
-
-3. <BYTE|DOUBLE|BYTE|DOUBLE|FLOAT|INT|LOGICAL|LONG|SHORT><V|VV|VVV|...>
-
-cfortran.h encourages the exact specification of the type and dimension of
-array parameters because it allows the C compiler to detect errors in the
-arguments when calling the routine.
-
-cfortran.h does not strictly require the exact specification since the argument
-is merely the address of the array and is passed on to the calling routine.
-Any array parameter could be declared as PVOID, but this circumvents
-C's compiletime ability to check the correctness of arguments and is therefore
-discouraged.
-
-Passing the address of these arguments implies that PBYTEV, PFLOATV, ... ,
-PDOUBLEVV, ... don't exist in cfortran.h, since by default the routine and the
-calling code share the same array, i.e. the same values at the same memory
-location.
-
-These comments do NOT apply to arrays of (P)S/ZTRINGV. For these parameters,
-cfortran.h passes a massaged copy of the array to the routine. When the routine
-returns, S/ZTRINGV ignores the copy, while PS/ZTRINGV replaces the calling
-code's original array with copy, which may have been modified by the called
-routine.
-
-
-4. (P)STRING(V):
-- STRING - If the argument is a fixed length character array, e.g. char ar[8];,
-the string is blank, ' ', padded on the right to fill out the array before
-being passed to the FORTRAN routine. The useful size of the string is the same
-in both languages, e.g. ar[8] is passed as character*7. If the argument is a
-pointer, the string cannot be blank padded, so the length is passed as
-strlen(argument). On return from the FORTRAN routine, pointer arguments are not
-disturbed, but arrays have the terminating '\0' replaced to its original
-position. i.e. The padding blanks are never visible to the C code.
-
-- PSTRING - The argument is massaged as with STRING before being passed to the
-FORTRAN routine. On return, the argument has all trailing blanks removed,
-regardless of whether the argument was a pointer or an array.
-
-- (P)STRINGV - Passes a 1- or 2-dimensional char array. e.g. char a[7],b[6][8];
-STRINGV may thus also pass a string constant, e.g. "hiho".
-(P)STRINGV does NOT pass a pointer, e.g. char *, to either a 1- or a
-2-dimensional array, since it cannot determine the array dimensions.
-A pointer can only be passed using (P)ZTRINGV.
-N.B. If a C routine receives a character array argument, e.g. char a[2][3],
- such an argument is actually a pointer and my thus not be passed by
- (P)STRINGV. Instead (P)ZTRINGV must be used.
-
-- STRINGV - The elements of the argument are copied into space malloc'd, and
-each element is padded with blanks. The useful size of each element is the same
-in both languages. Therefore char bb[6][8]; is equivalent to character*7 bb(6).
-On return from the routine the malloc'd space is simply released.
-
-- PSTRINGV - Since FORTRAN has no trailing '\0', elements in an array of
-strings are contiguous. Therefore each element of the C array is padded with
-blanks and strip out C's trailing '\0'. After returning from the routine, the
-trailing '\0' is reinserted and kill the trailing blanks in each element.
-
-- SUMMARY: STRING(V) arguments are blank padded during the call to the FORTRAN
-routine, but remain original in the C code. (P)STRINGV arguments are blank
-padded for the FORTRAN call, and after returning from FORTRAN trailing blanks
-are stripped off.
-
-
-5. (P)ZTRINGV:
-- (P)ZTRINGV - is identical to (P)STRINGV,
-except that the dimensions of the array of strings is explicitly specified,
-which thus also allows a pointer to be passed.
-(P)ZTRINGV can thus pass a 1- or 2-dimensional char array, e.g. char b[6][8],
-or it can pass a pointer to such an array, e.g. char *p;.
-ZTRINGV may thus also pass a string constant, e.g. "hiho".
-If passing a 1-dimensional array, routine_name_ELEMS_j (see below) must be 1.
-[Users of (P)ZTRINGV should examine cfortest.c for examples.]:
-
-- (P)ZTRINGV must thus be used instead of (P)STRINGV whenever sizeof()
-can't be used to determine the dimensions of the array of string or strings.
-e.g. when calling FORTRAN from C with a char * received by C as an argument.
-
-- There is no (P)ZTRING type, since (P)ZTRINGV can pass a 1-dimensional
-array or a pointer to such an array, e.g. char a[7], *b;
-If passing a 1-dimensional array, routine_name_ELEMS_j (see below) must be 1.
-
-- To specify the numbers of elements,
-routine_name_ELEMS_j and routine_name_ELEMLEN_j must be defined as shown below
-before interfacing the routine with CCALLSFSUBn, PROTOCCALLSFFUNn, etc.
-
-#define routine_name_ELEMS_j ZTRINGV_ARGS(k)
- [..ARGS for subroutines, ..ARGF for functions.]
-or
-#define routine_name_ELEMS_j ZTRINGV_NUM(l)
-Where: routine_name is as above.
- j [1-n], is the argument being specifying.
- k [1-n], the value of the k'th argument is the dynamic number
- of elements for argument j. The k'th argument must be
- of type BYTE, DOUBLE, FLOAT, INT, LONG or SHORT.
- l the number of elements for argument j. This must be an
- integer constant available at compile time.
- i.e. it is static.
-
-- Similarly to specify the useful length, [i.e. don't count C's trailing '\0',]
-of each element:
-#define routine_name_ELEMLEN_j ZTRINGV_ARGS(m)
- [..ARGS for subroutines, ..ARGF for functions.]
-or
-#define routine_name_ELEMLEN_j ZTRINGV_NUM(q)
-Where: m [1-n], as for k but this is the length of each element.
- q as for l but this is the length of each element.
-
-
-6. ROUTINE
-The argument is an EXTERNAL procedure.
-
-When C passes a routine to Fortran, the language of the function must be
-specified as follows: [The case of some_*_function must be given as shown.]
-
-When C passes a C routine to a Fortran:
- FORTRAN_ROUTINE(arg1, .... ,
- C_FUNCTION(SOME_C_FUNCTION,some_c_function),
- ...., argn);
-
-and similarly when C passes a Fortran routine to Fortran:
- FORTRAN_ROUTINE(arg1, .... ,
- FORTRAN_FUNCTION(SOME_FORT_FUNCTION,some_fort_function),
- ...., argn);
-
-If fcallsc has been redefined; the same definition of fcallsc used when creating
-the wrapper for 'some_c_function' must also be defined when C_FUNCTION is used.
-See ii) 4. of this section for when and how to redefine fcallsc.
-
-ROUTINE was introduced with cfortran.h version 2.6. Earlier versions of
-cfortran.h used PVOID to pass external procedures as arguments. Using PVOID for
-this purpose is no longer recommended since it won't work 'as is' for
-apolloFortran, hpuxFortran800, AbsoftUNIXFortran, AbsoftProFortran.
-
-7. CRAY only:
-In a given piece of source code, where FFUNC is any FORTRAN routine,
-FORTRAN_FUNCTION(FFUNC,ffunc)
-disallows a previous
-#define FFUNC(..) CCALLSFSUBn(FFUNC,ffunc,...) [ or CCALLSFFUNn]
-in order to make the UPPER CASE FFUNC callable from C.
-#define Ffunc(..) ... is OK though, as are obviously any other names.
-
-
-ii) Calling C routines from FORTRAN:
- --------------------------------
-
-Each of the following two statements to export a C routine to FORTRAN create
-FORTRAN 'wrappers', written in C, which must be compiled and linked along with
-the original C routines and with the FORTRAN calling code.
-
-FORTRAN callable 'wrappers' may also be created for C macros. i.e. in this
-section, the term 'C function' may be replaced by 'C macro'.
-
-for C functions returning void:
-FCALLSCSUBn( Routine_name,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
-
-for all other C functions:
-FCALLSCFUNn(routine_type,Routine_name,ROUTINE_NAME,routine_name,argtype_1,...,argtype_n)
-
-Where:
-'n' = 0->27 (easily expanded to > 27) stands for the number of arguments to the
- routine.
-Routine_name = the C name of the routine. [see 9. below]
-ROUTINE_NAME = the FORTRAN name of the routine (IN UPPER CASE LETTERS).
-routine_name = the FORTRAN name of the routine (IN lower case LETTERS).
-routine_type = the type of argument returned by C functions.
- = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING, VOID.
- [Instead of VOID, FCALLSCSUBn is recommended.]
-argtype_i = the type of argument passed to the FORTRAN routine and must be
- consistent in the definition and prototyping of the routine
- = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG, SHORT, STRING.
- For vectors, i.e. 1 dim. arrays use
- = BYTEV, DOUBLEV, FLOATV, INTV, LOGICALV, LONGV, SHORTV, STRINGV.
- For vectors of vectors, 2 dim. arrays use
- = BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV.
- For n-dim. arrays use
- = BYTEV..nV's..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V,
- LONGV..V, SHORTV..V.
- For routines changing the values of an argument, the keyword is
- prepended by a 'P'.
- = PBYTE, PDOUBLE, PFLOAT, PINT, PLOGICAL, PLONG, PSHORT,
- PSTRING, PNSTRING, PPSTRING, PSTRINGV.
- For EXTERNAL procedures passed as arguments use
- = ROUTINE.
- For exceptional arguments which require no massaging to fit the
- argument passing mechanisms use
- = PVOID.
- The argument is cast and passed as (void *).
-
-
-Notes:
-
-0. For Fortran calling C++ routines, C++ does NOT easily allow support for:
- STRINGV.
- BYTEVV, DOUBLEVV, FLOATVV, INTVV, LOGICALVV, LONGVV, SHORTVV.
- BYTEV..V, DOUBLEV..V, FLOATV..V, INTV..V, LOGICALV..V, LONGV..V, SHORTV..V.
-Though there are ways to get around this restriction,
-the restriction is not serious since these types are unlikely to be used as
-arguments for a C++ routine.
-
-1. FCALLSCSUB/FUNn expect that the routine to be 'wrapped' has been properly
-prototyped, or at least declared.
-
-
-2. cfortran.h may be expanded to handle a new argument type not already among
-the above.
-
-
-3. <BYTE|DOUBLE|BYTE|DOUBLE|FLOAT|INT|LOGICAL|LONG|SHORT><V|VV|VVV|...>
-
-cfortran.h encourages the exact specification of the type and dimension of
-array parameters because it allows the C compiler to detect errors in the
-arguments when declaring the routine using FCALLSCSUB/FUNn, assuming the
-routine to be 'wrapped' has been properly prototyped.
-
-cfortran.h does not strictly require the exact specification since the argument
-is merely the address of the array and is passed on to the calling routine.
-Any array parameter could be declared as PVOID, but this circumvents
-C's compiletime ability to check the correctness of arguments and is therefore
-discouraged.
-
-Passing the address of these arguments implies that PBYTEV, PFLOATV, ... ,
-PDOUBLEVV, ... don't exist in cfortran.h, since by default the routine and the
-calling code share the same array, i.e. the same values at the same memory
-location.
-
-These comments do NOT apply to arrays of (P)STRINGV. For these parameters,
-cfortran.h passes a massaged copy of the array to the routine. When the routine
-returns, STRINGV ignores the copy, while PSTRINGV replaces the calling
-code's original array with copy, which may have been modified by the called
-routine.
-
-
-4. (P(N))STRING arguments have any trailing blanks removed before being passed
-to C, the same holds true for each element in (P)STRINGV. Space is malloc'd in
-all cases big enough to hold the original string (elements) as well as C's
-terminating '\0'. i.e. The useful size of the string (elements) is the same in
-both languages. P(N)STRING(V) => the string (elements) will be copied from the
-malloc'd space back into the FORTRAN bytes. If one of the two escape mechanisms
-mentioned below for PNSTRING has been used, the copying back to FORTRAN is
-obviously not relevant.
-
-
-5. (PN)STRING's, [NOT PSTRING's nor (P)STRINGV's,] behavior may be overridden
-in two cases. In both cases PNSTRING and STRING behave identically.
-
-a) If a (PN)STRING argument's first 4 bytes are all the NUL character,
-i.e. '\0\0\0\0' the NULL pointer is passed to the C routine.
-
-b) If the characters of a (PN)STRING argument contain at least one HEX-00, i.e.
-the NUL character, i.e. C strings' terminating '\0', the address of the string
-is simply passed to the C routine. i.e. The argument is treated in this case as
-it would be with PPSTRING, to which we refer the reader for more detail.
-
-Mechanism a) overrides b). Therefore, to use this mechanism to pass the NULL
-string, "", to C, the first character of the string must obviously be the NUL
-character, but of the first 4 characters in the string, at least one must not
-be HEX-00.
-
-Example:
-C FORTRAN /* C */
- character*40 str #include "cfortran.h"
-C Set up a NULL as : void cs(char *s) {if (s) printf("%s.\n",s);}
-C i) 4 NUL characters. FCALLSCSUB1(cs,CS,cs,STRING)
-C ii) NULL pointer.
- character*4 NULL
- NULL = CHAR(0)//CHAR(0)//CHAR(0)//CHAR(0)
-
- data str/'just some string'/
-
-C Passing the NULL pointer to cs.
- call cs(NULL)
-C Passing a copy of 'str' to cs.
- call cs(str)
-C Passing address of 'str' to cs. Trailing blanks NOT killed.
- str(40:) = NULL
- call cs(str)
- end
-
-Strings passed from Fortran to C via (PN)STRING must not have undefined
-contents, otherwise undefined behavior will result, since one of the above two
-escape mechanisms may occur depending on the contents of the string.
-
-This is not be a problem for STRING arguments, which are read-only in the C
-routine and hence must have a well defined value when being passed in.
-
-PNSTRING arguments require special care. Even if they are write-only in the C
-routine, PNSTRING's above two escape mechanisms require that the value of the
-argument be well defined when being passed in from Fortran to C. Therefore,
-unless one or both of PNSTRING's escape mechanisms are required, PSTRING should
-be used instead of PNSTRING.
-Prior to version 2.8, PSTRING did have the above two escape mechanisms,
-but they were removed from PSTRING to allow strings with undefined contents to
-be passed in. PNSTRING behaves like the old PSTRING.
-[Thanks go to Paul Dubois (dubios@icf.llnl.gov) for pointing out that PSTRING
- must allow for strings with undefined contents to be passed in.]
-
-Example:
-C FORTRAN /* C */
- character*10 s,sn #include "cfortran.h"
- void ps(char *s) {strcpy(s,"hello");}
-C Can call ps with undef. s. FCALLSCSUB1(ps,PS,ps,PSTRING)
- call ps(s) FCALLSCSUB1(ps,PNS,pns,PNSTRING)
- print *,s,'=s'
-
-C Can't call pns with undef. s.
-C e.g. If first 4 bytes of s were
-C "\0\0\0\0", ps would try
-C to copy to NULL because
-C of PNSTRING mechanism.
- sn = ""
- call pns(sn)
- print *,sn,'=sn'
-
- end
-
-
-6. PPSTRING
-The address of the string argument is simply passed to the C routine. Therefore
-the C routine and the FORTRAN calling code share the same string at the same
-memory location. If the C routine modifies the string, the string will also be
-modified for the FORTRAN calling code.
-The user is responsible for negociating the differences in representation of a
-string in Fortran and in C, i.e. the differences are not automatically resolved
-as they are for (P(N)STRING(V).
-This mechanism is provided for two reasons:
- - Some C routines require the string to exist at the given memory location,
- after the C routine has exited. Recall that for the usual (P(N)STRING(V)
- mechanism, a copy of the FORTRAN string is given to the C routine, and this
- copy ceases to exist after returning to the FORTRAN calling code.
- - This mechanism can save runtime CPU cycles over (P(N)STRING(V), since it
- does not perform their malloc, copy and kill trailing blanks of the string
- to be passed.
- Only in a small minority of cases does the potential benefit of the saved
- CPU cycles outweigh the programming effort required to manually resolve
- the differences in representation of a string in Fortran and in C.
-
-For arguments passed via PPSTRING, the argument passed may also be an array of
-strings.
-
-
-7. ROUTINE
-ANSI C requires that the type of the value returned by the routine be known,
-For all ROUTINE arguments passed from Fortran to C, the type of ROUTINE is
-specified by defining a cast as follows:
-
-#undef ROUTINE_j
-#define ROUTINE_j (cast)
-where:
- j [1-n], is the argument being specifying.
- (cast) is a cast matching that of the argument expected by the C
- function protoytpe for which a wrapper is being defined.
-
-e.g. To create a Fortran wrapper for qsort(3C):
-#undef ROUTINE_4
-#define ROUTINE_4 (int (*)(void *,void *))
-FCALLSCSUB4(qsort,FQSORT,fqsort,PVOID,INT,INT,ROUTINE)
-
-In order to maintain backward compatibility, cfortran.h defines a generic cast
-for ROUTINE_1, ROUTINE_2, ..., ROUTINE_27. The user's definition is therefore
-strictly required only for DEC C, which at the moment is the only compiler
-which insists on the correct cast for pointers to functions.
-
-When using the ROUTINE argument inside some Fortran code:
-- it is difficult to pass a C routine as the parameter,
- since in many Fortran implementations,
- Fortran has no access to the normal C namespace.
- e.g. For most UNIX,
- Fortran implicitly only has access to C routines ending in _.
- If the calling Fortran code receives the routine as a parameter
- it can of course easily pass it along.
-- if a Fortran routine is passed directly as the parameter,
- the called C routine must call the parameter routine
- using the Fortran argument passing conventions.
-- if a Fortran routine is to be passed as the parameter,
- but if Fortran can be made to pass a C routine as the parameter,
- then it may be best to pass a C-callable wrapper for the Fortran routine.
- The called C routine is thus spared all Fortran argument passing conventions.
- cfortran.h can be used to create such a C-callable wrapper
- to the parameter Fortran routine.
-
-ONLY PowerStationFortran:
-This Fortran provides no easy way to pass a Fortran routine as an argument to a
-C routine. The problem arises because in Fortran the stack is cleared by the
-called routine, while in C/C++ it is cleared by the caller.
-The C/C++ stack clearing behavior can be changed to that of Fortran by using
-stdcall__ in the function prototype. The stdcall__ cannot be applied in this
-case since the called C routine expects the ROUTINE parameter to be a C routine
-and does not know that it should apply stdcall__.
-In principle the cfortran.h generated Fortran callable wrapper for the called C
-routine should be able to massage the ROUTINE argument such that stdcall__ is
-performed, but it is not yet known how this could be easily done.
-
-
-8. THE FOLLOWING INSTRUCTIONS ARE NOT REQUIRED FOR VAX VMS
- ------------
-(P)STRINGV information [NOT required for VAX VMS]: cfortran.h cannot convert
-the FORTRAN vector of STRINGS to the required C vector of STRINGS without
-explicitly knowing the number of elements in the vector. The application must
-do one of the following for each (P)STRINGV argument in a routine before that
-routine's FCALLSCFUNn/SUBn is called:
-
-#define routine_name_STRV_Ai NUM_ELEMS(j)
- or
-#define routine_name_STRV_Ai NUM_ELEM_ARG(k)
- or
-#define routine_name_STRV_Ai TERM_CHARS(l,m)
-
-where: routine_name is as above.
- i [i=1->n.] specifies the argument number of a STRING VECTOR.
- j would specify a fixed number of elements.
- k [k=1->n. k!=i] would specify an integer argument which specifies the
- number of elements.
- l [char] the terminating character at the beginning of an
- element, indicating to cfortran.h that the preceding
- elements in the vector are the valid ones.
- m [m=1-...] the number of terminating characters required to appear
- at the beginning of the terminating string element.
- The terminating element is NOT passed on to
- the C routine.
-
-e.g. #define ce_STRV_A1 TERM_CHARS(' ',2)
- FCALLSCSUB1(ce,CE,ce,STRINGV)
-
-cfortran.h will pass on all elements, in the 1st and only argument to the C
-routine ce, of the STRING VECTOR until, but not including, the first string
-element beginning with 2 blank, ' ', characters.
-
-
-9. INSTRUCTIONS REQUIRED ONLY FOR FORTRAN COMPILERS WHICH GENERATE
- -------------
- ROUTINE NAMES WHICH ARE UNDISTINGUISHABLE FROM C ROUTINE NAMES
- i.e. VAX VMS
- AbsoftUNIXFortran (AbsoftProFortran ok, since it uses Uppercase names.)
- HP9000 if not using the +ppu option of f77
- IBM RS/6000 if not using the -qextname option of xlf
- Call them the same_namespace compilers.
-
-FCALLSCSUBn(...) and FCALLSCFUNn(...), when compiled, are expanded into
-'wrapper' functions, so called because they wrap around the original C
-functions and interface the format of the original C functions' arguments and
-return values with the format of the FORTRAN call.
-
-Ideally one wants to be able to call the C routine from FORTRAN using the same
-name as the original C name. This is not a problem for FORTRAN compilers which
-append an underscore, '_', to the names of routines, since the original C
-routine has the name 'name', and the FORTRAN wrapper is called 'name_'.
-Similarly, if the FORTRAN compiler generates upper case names for routines, the
-original C routine 'name' can have a wrapper called 'NAME', [Assuming the C
-routine name is not in upper case.] For these compilers, e.g. Mips, CRAY, IBM
-RS/6000 'xlf -qextname', HP-UX 'f77 +ppu', the naming of the wrappers is done
-automatically.
-
-For same_namespace compilers things are not as simple, but cfortran.h tries to
-provide tools and guidelines to minimize the costs involved in meeting their
-constraints. The following two options can provide same_namespace compilers
-with distinct names for the wrapper and the original C function.
-
-These compilers are flagged by cfortran.h with the CF_SAME_NAMESPACE constant,
-so that the change in the C name occurs only when required.
-
-For the remainder of the discussion, routine names generated by FORTRAN
-compilers are referred to in lower case, these names should be read as upper
-case for the appropriate compilers.
-
-
-HP9000: (When f77 +ppu is not used.)
-f77 has a -U option which forces uppercase external names to be generated.
-Unfortunately, cc does not handle recursive macros. Hence, if one wished to use
--U for separate C and FORTRAN namespaces, one would have to adopt a different
-convention of naming the macros which allow C to call FORTRAN subroutines.
-(Functions are not a problem.) The macros are currently the uppercase of the
-original FORTRAN name, and would have to be changed to lower case or mixed
-case, or to a different name. (Lower case would of course cause conflicts on
-many other machines.) Therefore, it is suggested that f77 -U not be used, and
-instead that Option a) or Option b) outlined below be used.
-
-
-VAX/VMS:
-For the name used by FORTRAN in calling a C routine to be the same as that of
-the C routine, the source code of the C routine is required. A preprocessor
-directive can then force the C compiler to generate a different name for the C
-routine.
-e.g. #if defined(vms)
- #define name name_
- #endif
- void name() {printf("name: was called.\n");}
- FCALLSCSUB0(name,NAME,name)
-
-In the above, the C compiler generates the original routine with the name
-'name_' and a wrapper called 'NAME'. This assumes that the name of the routine,
-as seen by the C programmer, is not in upper case. The VAX VMS linker is not
-case sensitive, allowing cfortran.h to export the upper case name as the
-wrapper, which then doesn't conflict with the routine name in C. Since the IBM,
-HP and AbsoftUNIXFortran platforms have case sensitive linkers
-this technique is not available to them.
-
-The above technique is required even if the C name is in mixed case, see
-Option a) for the other compilers, but is obviously not required when
-Option b) is used.
-
-
-Option a) Mixed Case names for the C routines to be called by FORTRAN.
-
-If the original C routines have mixed case names, there are no name space
-conflicts.
-
-Nevertheless for VAX/VMS, the technique outlined above must also used.
-
-
-Option b) Modifying the names of C routines when used by FORTRAN:
-
-The more robust naming mechanism, which guarantees portability to all machines,
-'renames' C routines when called by FORTRAN. Indeed, one must change the names
-on same_namespace compilers when FORTRAN calls C routines for which the source
-is unavailable. [Even when the source is available, renaming may be preferable
-to Option a) for large libraries of C routines.]
-
-Obviously, if done for a single type of machine, it must be done for all
-machines since the names of routines used in FORTRAN code cannot be easily
-redefined for different machines.
-
-The simplest way to achieve this end is to do explicitly give the modified
-FORTRAN name in the FCALLSCSUBn(...) and FCALLSCFUNn(...) declarations. e.g.
-
-FCALLSCSUB0(name,CFNAME,cfname)
-
-This allows FORTRAN to call the C routine 'name' as 'cfname'. Any name can of
-course be used for a given routine when it is called from FORTRAN, although
-this is discouraged due to the confusion it is sure to cause. e.g. Bizarre,
-but valid and allowing C's 'call_back' routine to be called from FORTRAN as
-'abcd':
-
-FCALLSCSUB0(call_back,ABCD,abcd)
-
-
-cfortran.h also provides preprocessor directives for a systematic 'renaming' of
-the C routines when they are called from FORTRAN. This is done by redefining
-the fcallsc macro before the FCALLSCSUB/FUN/n declarations as follows:
-
-#undef fcallsc
-#define fcallsc(UN,LN) preface_fcallsc(CF,cf,UN,LN)
-
-FCALLSCSUB0(hello,HELLO,hello)
-
-Will cause C's routine 'hello' to be known in FORTRAN as 'cfhello'. Similarly
-all subsequent FCALLSCSUB/FUN/n declarations will generate wrappers to allow
-FORTRAN to call C with the C routine's name prefaced by 'cf'. The following has
-the same effect, with subsequent FCALLSCSUB/FUN/n's appending the modifier to
-the original C routines name.
-
-#undef fcallsc
-#define fcallsc(UN,LN) append_fcallsc(Y,y,UN,LN)
-
-FCALLSCSUB0(Xroutine,ROUTINE,routine)
-
-Hence, C's Xroutine is called from FORTRAN as:
- CALL XROUTINEY()
-
-The original behavior of FCALLSCSUB/FUN/n, where FORTRAN routine names are left
-identical to those of C, is returned using:
-
-#undef fcallsc
-#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
-
-
-In C, when passing a C routine, i.e. its wrapper, as an argument to a FORTRAN
-routine, the FORTRAN name declared is used and the correct fcallsc must be in
-effect. E.g. Passing 'name' and 'routine' of the above examples to the FORTRAN
-routines, FT1 and FT2, respectively:
-
-/* This might not be needed if fcallsc is already orig_fcallsc. */
-#undef fcallsc
-#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
-FT1(C_FUNCTION(CFNAME,cfname));
-
-#undef fcallsc
-#define fcallsc(UN,LN) append_fcallsc(Y,y,UN,LN)
-FT1(C_FUNCTION(XROUTINE,xroutine));
-
-If the names of C routines are modified when used by FORTRAN, fcallsc would
-usually be defined once in a header_file.h for the application. This definition
-would then be used and be valid for the entire application and fcallsc would at
-no point need to be redefined.
-
-
-ONCE AGAIN: THE DEFINITIONS, INSTRUCTIONS, DECLARATIONS AND DIFFICULTIES
-DESCRIBED HERE, NOTE 9. of II ii),
-APPLY ONLY FOR VAX VMS,
- IBM RS/6000 WITHOUT THE -qextname OPTION FOR xlf, OR
- HP-UX WITHOUT THE +ppu OPTION FOR f77
- AbsoftUNIXFortran
-AND APPLY ONLY WHEN CREATING WRAPPERS WHICH ENABLE FORTRAN TO CALL C ROUTINES.
-
-
-
-iii) Using C to manipulate FORTRAN COMMON BLOCKS:
- -------------------------------------------------------
-
-FORTRAN common blocks are set up with the following three constructs:
-
-1.
-#define Common_block_name COMMON_BLOCK(COMMON_BLOCK_NAME,common_block_name)
-
-Common_block_name is in UPPER CASE.
-COMMON_BLOCK_NAME is in UPPER CASE.
-common_block_name is in lower case.
-[Common_block_name actually follows the same 'rules' as Routine_name in Note 2.
- of II i).] This construct exists to ensure that C code accessing the common
-block is machine independent.
-
-2.
-COMMON_BLOCK_DEF(TYPEDEF_OF_STRUCT, Common_block_name);
-
-where
-typedef { ... } TYPEDEF_OF_STRUCT;
-declares the structure which maps on to the common block. The #define of
-Common_block_name must come before the use of COMMON_BLOCK_DEF.
-
-3.
-In exactly one of the C source files, storage should be set aside for the
-common block with the definition:
-
-TYPEDEF_OF_STRUCT Common_block_name;
-
-The above definition may have to be omitted on some machines for a common block
-which is initialized by Fortran BLOCK DATA or is declared with a smaller size
-in the C routines than in the Fortran routines.
-
-The rules for common blocks are not well defined when linking/loading a mixture
-of C and Fortran, but the following information may help resolve problems.
-
-From the 2nd or ANSI ed. of K&R C, p.31, last paragraph:
-i)
- An external variable must be defined, exactly once, outside of any function;
- this sets aside storage for it.
-ii)
- The variable must also be declared in each function that wants to access it;
- ...
- The declaration ... may be implicit from context.
-
-In Fortran, every routine says 'common /bar/ foo',
-i.e. part ii) of the above, but there's no part i) requirement.
-cc/ld on some machines don't require i) either.
-Therefore, when handling Fortran, and sometimes C,
-the loader/linker must automagically set aside storage for common blocks.
-
-Some loaders, including at least one for the CRAY, turn off the
-'automagically set aside storage' capability for Fortran common blocks,
-if any C object declares that common block.
-Therefore, C code should define, i.e. set aside storage,
-for the the common block as shown above.
-
-e.g.
-C Fortran
- common /fcb/ v,w,x
- character *(13) v, w(4), x(3,2)
-
-/* C */
-typedef struct { char v[13],w[4][13],x[2][3][13]; } FCB_DEF;
-#define Fcb COMMON_BLOCK(FCB,fcb)
-COMMON_BLOCK_DEF(FCB_DEF,Fcb);
-FCB_DEF Fcb; /* Definition, which sets aside storage for Fcb, */
- /* may appear in at most one C source file. */
-
-
-C programs can place a string (or a multidimensional array of strings) into a
-FORTRAN common block using the following call:
-
-C2FCBSTR( CSTR, FSTR,DIMENSIONS);
-
-where:
-
-CSTR is a pointer to the first element of C's copy of the string (array).
- The C code must use a duplicate of, not the original, common block string,
- because the FORTRAN common block does not allocate space for C strings'
- terminating '\0'.
-
-FSTR is a pointer to the first element of the string (array) in the common
- block.
-
-DIMENSIONS is the number of dimensions of string array.
- e.g. char a[10] has DIMENSIONS=0.
- char aa[10][17] has DIMENSIONS=1.
- etc...
-
-C2FCBSTR will copy the string (array) from CSTR to FSTR, padding with blanks,
-' ', the trailing characters as required. C2FCBSTR uses DIMENSIONS and FSTR to
-determine the lengths of the individual string elements and the total number of
-elements in the string array.
-
-Note that:
-- the number of string elements in CSTR and FSTR are identical.
-- for arrays of strings, the useful lengths of strings in CSTR and FSTR must be
- the same. i.e. CSTR elements each have 1 extra character to accommodate the
- terminating '\0'.
-- On most non-ANSI compilers, the DIMENSION argument cannot be prepended by any
- blanks.
-
-
-FCB2CSTR( FSTR, CSTR,DIMENSIONS)
-
-is the inverse of C2FCBSTR, and shares the same arguments and caveats.
-FCB2CSTR copies each string element of FSTR to CSTR, minus FORTRAN strings'
-trailing blanks.
-
-
-cfortran.h USERS ARE STRONGLY URGED TO EXAMINE THE COMMON BLOCK EXAMPLES IN
-cfortest.c AND cfortex.f. The use of strings in common blocks is
-demonstrated, along with a suggested way for C to imitate FORTRAN EQUIVALENCE'd
-variables.
-
-
- ===> USERS OF CFORTRAN.H NEED READ NO FURTHER <===
-
-
-III Some Musings
-----------------
-
-cfortran.h is simple enough to be used by the most basic of applications, i.e.
-making a single C/FORTRAN routine available to the FORTRAN/C programmers. Yet
-cfortran.h is powerful enough to easily make entire C/FORTRAN libraries
-available to FORTRAN/C programmers.
-
-
-cfortran.h is the ideal tool for FORTRAN libraries which are being (re)written
-in C, but are to (continue to) support FORTRAN users. It allows the routines to
-be written in 'natural C', without having to consider the FORTRAN argument
-passing mechanisms of any machine. It also allows C code accessing these
-rewritten routines, to use the C entry point. Without cfortran.h, one risks the
-perverse practice of C code calling a C function using FORTRAN argument passing
-mechanisms!
-
-
-Perhaps the philosophy and mechanisms of cfortran.h could be used and extended
-to create other language bridges such as ADAFORTRAN, CPASCAL, COCCAM, etc.
-
-
-The code generation machinery inside cfortran.h, i.e. the global structure is
-quite good, being clean and workable as seen by its ability to meet the needs
-and constraints of many different compilers. Though the individual instructions
-of the A..., C..., T..., R... and K... tables deserve to be cleaned up.
-
-
-
-IV Getting Serious with cfortran.h
------------------------------------
-
-cfortran.h is set up to be as simple as possible for the casual user. While
-this ease of use will always be present, 'hooks', i.e. preprocessor directives,
-are required in cfortran.h so that some of the following 'inefficiencies' can
-be eliminated if they cause difficulties:
-
-o cfortran.h contains a few small routines for string manipulation. These
-routines are declared static and are included and compiled in all source code
-which uses cfortran.h. Hooks should be provided in cfortran.h to create an
-object file of these routines, allowing cfortran.h to merely prototypes
-these routines in the application source code. This is the only 'problem' which
-afflicts both halves of cfortran.h. The remaining discussion refers to the C
-calls FORTRAN half only.
-
-o Similar to the above routines, cfortran.h generates code for a 'wrapper'
-routine for each FUNCTION exported from FORTRAN. Again cfortran.h needs
-preprocessor directives to create a single object file of these routines,
-and to merely prototype them in the applications.
-
-o Libraries often contain hundreds of routines. While the preprocessor makes
-quick work of generating the required interface code from cfortran.h and the
-application.h's, it may be convenient for very large stable libraries to have
-final_application.h's which already contain the interface code, i.e. these
-final_application.h's would not require cfortran.h. [The convenience can be
-imagined for the VAX VMS CC compiler which has a fixed amount of memory for
-preprocessor directives. Not requiring cfortran.h, with its hundreds of
-directives, could help prevent this compiler from choking on its internal
-limits quite so often.]
-
-With a similar goal in mind, cfortran.h defines 100's of preprocessor
-directives. There is always the potential that these will clash with other tags
-in the users code, so final_applications.h, which don't require cfortran.h,
-also provide the solution.
-
-In the same vein, routines with more than 14 arguments can not be interfaced by
-cfortran.h with compilers which limit C macros to 31 arguments. To resolve this
-difficulty, final_application.h's can be created on a compiler without this
-limitation.
-
-Therefore, new machinery is required to do:
-
-application.h + cfortran.h => final_application.h
-
-The following example may help clarify the means and ends:
-
-If the following definition of the HBOOK1 routine, the /*commented_out_part*/,
-is passed through the preprocessor [perhaps #undefing and #defining preprocessor
-constants if creating an application.h for compiler other than that of the
-preprocessor being used, e.g. cpp -Umips -DCRAY ... ] :
-
-#include "cfortran.h"
-PROTOCCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT)
-/*#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \*/
- CCALLSFSUB6(HBOOK1,hbook1,INT,STRING,INT,FLOAT,FLOAT,FLOAT, \
- ID,CHTITLE,NX,XMI,XMA,VMX)
-
-A function prototype is produced by the PROTOCCALLSFSUB6(...).
-Interface code is produced, based on the 'variables',
-ID,CHTITLE,NX,XMI,XMA,VMX, which will correctly massage a HBOOK1 call.
-Therefore, adding the #define line:
-
-'prototype code'
-#define HBOOK1(ID,CHTITLE,NX,XMI,XMA,VMX) \
- 'interface code'(ID,CHTITLE,NX,XMI,XMA,VMX)
-
-which is placed into final_application.h.
-
-The only known limitation of the above method does not allow the 'variable'
-names to include B1,B2,...,B9,BA,BB,...
-
-Obviously the machinery to automatically generate final_applications.h from
-cfortran.h and applications.h needs more than just some preprocessor
-directives, but a fairly simple unix shell script should be sufficient. Any
-takers?
-
-
-
-V Machine Dependencies of cfortran.h
-------------------------------------
-
-Porting cfortran.h applications, e.g. the hbook.h and cstring.c mentioned
-above, to other machines is trivial since they are machine independent. Porting
-cfortran.h requires a solid knowledge of the new machines C preprocessor, and
-its FORTRAN argument passing mechanisms. Logically cfortran.h exists as two
-halves, a "C CALLS FORTRAN" and a "FORTRAN CALLS C" utility. In some cases it
-may be perfectly reasonable to port only 'one half' of cfortran.h onto a new
-system.
-
-
-The lucky programmer porting cfortran.h to a new machine, must discover the
-FORTRAN argument passing mechanisms. A safe starting point is to assume that
-variables and arrays are simply passed by reference, but nothing is guaranteed.
-Strings, and n-dimensional arrays of strings are a different story. It is
-doubtful that any systems do it quite like VAX VMS does it, so that a UNIX or
-f2c versions may provide an easier starting point.
-
-
-cfortran.h uses and abuses the preprocessor's ## operator. Although the ##
-operator does not exist in many compilers, many kludges do. cfortran.h uses
-/**/ with no space allowed between the slashes, '/', and the macros or tags
-to be concatenated. e.g.
-#define concat(a,b) a/**/b /* works*/
-main()
-{
- concat(pri,ntf)("hello"); /* e.g. */
-}
-N.B. On some compilers without ##, /**/ may also not work. The author may be
-able to offer alternate kludges.
-
-
-
-VI Bugs in vendors C compilers and other curiosities
-----------------------------------------------------
-
-1. ULTRIX xxxxxx 4.3 1 RISC
-
-Condolences to long suffering ultrix users!
-DEC supplies a working C front end for alpha/OSF, but not for ultrix.
-
-From K&R ANSI C p. 231:
- ultrix> cat cat.c
- #define cat(x, y) x ## y
- #define xcat(x,y) cat(x,y)
- cat(cat(1,2),3)
- xcat(xcat(1,2),3)
- ultrix> cc -E cat.c
- 123 <---- Should be: cat(1,2)3
- 123 <---- Correct.
- ultrix>
-
-The problem for cfortran.h, preventing use of -std and -std1:
- ultrix> cat c.c
- #define cat(x, y) x ## y
- #define xcat(x,y) cat(x,y)
- #define AB(X) X+X
- #define C(E,F,G) cat(E,F)(G)
- #define X(E,F,G) xcat(E,F)(G)
- C(A,B,2)
- X(A,B,2)
- ultrix> cc -std1 -E c.c
- 2+2
- AB (2) <---- ?????????????
- ultrix>
- ultrix> cc -std0 -E c.c
- 2+2
- AB(2) <---- ?????????????
- ultrix>
-
-Due to further ultrix preprocessor problems,
-for all definitions of definitions with arguments,
-cfortran.h >= 3.0 includes the arguments and recommends the same,
-even though it is not required by ANSI C.
-e.g. Users are advised to do
- #define fcallsc(UN,LN) orig_fcallsc(UN,LN)
-instead of
- #define fcallsc orig_fcallsc
-since ultrix fails to properly preprocess the latter example.
-CRAY used to (still does?) occasionally trip up on this problem.
-
-
-2. ConvexOS convex C210 11.0 convex
-
-In a program with a C main, output to LUN=6=* from Fortran goes into
-$pwd/fort.6 instead of stdout. Presumably, a magic incantation can be called
-from the C main in order to properly initialize the Fortran I/O.
-
-
-3. SunOS 5.3 Generic_101318-69 sun4m sparc
-
-The default data and code alignments produced by cc, gcc and f77 are compatible.
-If deviating from the defaults, consistent alignment options must be used
-across all objects compiled by cc and f77. [Does gcc provide such options?]
-
-
-4. SunOS 5.3 Generic_101318-69 sun4m sparc with cc: SC3.0.1 13 Jul 1994
- or equivalently
- ULTRIX 4.4 0 RISC using cc -oldc
- are K&R C preprocessors that suffer from infinite loop macros, e.g.
-
- zedy03> cat src.c
- #include "cfortran.h"
- PROTOCCALLSFFUN1(INT,FREV,frev, INTV)
- #define FREV(A1) CCALLSFFUN1( FREV,frev, INTV, A1)
- /* To avoid the problem, deletete these ---^^^^--- spaces. */
- main() { static int a[] = {1,2}; FREV(a); return EXIT_SUCCESS; }
-
- zedy03> cc -c -Xs -v -DMAX_PREPRO_ARGS=31 -D__CF__KnR src.c
- "src.c", line 4: FREV: actuals too long
- "src.c", line 4: FREV: actuals too long
- .... 3427 more lines of the same message
- "src.c", line 4: FREV: actuals too long
- cc : Fatal error in /usr/ccs/lib/cpp
- Segmentation fault (core dumped)
-
-
-5. Older sun C compilers
-
-To link to f77 objects, older sun C compilers require the math.h macros:
-
-#define RETURNFLOAT(x) { union {double _d; float _f; } _kluge; \
- _kluge._f = (x); return _kluge._d; }
-#define ASSIGNFLOAT(x,y) { union {double _d; float _f; } _kluge; \
- _kluge._d = (y); x = _kluge._f; }
-
-Unfortunately, in at least some copies of the sun math.h, the semi-colon
-for 'float _f;' is left out, leading to compiler warnings.
-
-The solution is to correct math.h, or to change cfortran.h to #define
-RETURNFLOAT(x) and ASSIGNFLOAT(x,y) instead of including math.h.
-
-
-6. gcc version 2.6.3 and probably all other versions as well
-
-Unlike all other C compilers supported by cfortran.h,
-'gcc -traditional' promotes to double all functions returning float
-as demonstrated bu the following example.
-
-/* m.c */
-#include <stdio.h>
-int main() { FLOAT_FUNCTION d(); float f; f = d(); printf("%f\n",f); return 0; }
-
-/* d.c */
-float d() { return -123.124; }
-
-burow[29] gcc -c -traditional d.c
-burow[30] gcc -DFLOAT_FUNCTION=float m.c d.o && a.out
-0.000000
-burow[31] gcc -DFLOAT_FUNCTION=double m.c d.o && a.out
--123.124001
-burow[32]
-
-Thus, 'gcc -traditional' is not supported by cfortran.h.
-Support would require the same RETURNFLOAT, etc. macro machinery
-present in old sun math.h, before sun gave up the same promotion.
-
-
-7. CRAY
-
-At least some versions of the t3e and t3d C preprocessor are broken
-in the fashion described below.
-At least some versions of the t90 C preprocessor do not have this problem.
-
-On the CRAY, all Fortran names are converted to uppercase.
-Generally the uppercase name is also used for the macro interface
-created by cfortran.h.
-
-For example, in the following interface,
-EASY is both the name of the macro in the original C code
-and EASY is the name of the resulting function to be called.
-
-#define EASY(A,B) CCALLSFSUB2(EASY,easy, PINT, INTV, A, B)
-
-The fact that a macro called EASY() expands to a function called EASY()
-is not a problem for a working C preprocessor.
-From Kernighan and Ritchie, 2nd edition, p.230:
-
- In both kinds of macro, the replacement token sequence is repeatedly
- rescanned for more identifiers. However, once a given identifier has been
- replaced in a given expansion, it is not replaced if it turns up again during
- rescanning; instead it is left unchanged.
-
-Unfortunately, some CRAY preprocessors are broken and don't obey the above rule.
-A work-around is for the user to NOT use the uppercase name
-of the name of the macro interface provided by cfortran.h. For example:
-
-#define Easy(A,B) CCALLSFSUB2(EASY,easy, PINT, INTV, A, B)
-
-Luckily, the above work-around is not required since the following
-work-around within cfortran.h also circumvents the bug:
-
- /* (UN), not UN, is required in order to get around CRAY preprocessor bug.*/
- #define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
-
-Aside: The Visual C++ compiler is happy with UN, but barfs on (UN),
- so either (UN) causes nonstandard C/C++ or Visual C++ is broken.
-
-
-VII History and Acknowledgements
---------------------------------
-
-1.0 - Supports VAX VMS using C 3.1 and FORTRAN 5.4. Oct. '90.
-1.0 - Supports Silicon Graphics w. Mips Computer 2.0 f77 and cc. Feb. '91.
- [Port of C calls FORTRAN half only.]
-1.1 - Supports Mips Computer System 2.0 f77 and cc. Mar. '91.
- [Runs on at least: Silicon Graphics IRIX 3.3.1
- DECstations with Ultrix V4.1]
-1.2 - Internals made simpler, smaller, faster, stronger. May '91.
- - Mips version works on IBM RS/6000, this is now called the unix version.
-1.3 - UNIX and VAX VMS versions are merged into a single cfortran.h. July '91.
- - C can help manipulate (arrays of) strings in FORTRAN common blocks.
- - Dimensions of string arrays arguments can be explicit.
- - Supports Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7.
-
-2.0 - Improved code generation machinery creates K&R or ANSI C. Aug. '91.
- - Supports Sun, CRAY. f2c with vcc on VAX Ultrix.
- - cfortran.h macros now require routine and COMMON block names in both
- upper and lower case. No changes required to applications though.
- - PROTOCCALLSFSUBn is eliminated, with no loss to cfortran.h performance.
- - Improved tools and guidelines for naming C routines called by FORTRAN.
-2.1 - LOGICAL correctly supported across all machines. Oct. '91.
- - Improved support for DOUBLE PRECISION on the CRAY.
- - HP9000 fully supported.
- - VAX Ultrix cc or gcc with f77 now supported.
-2.2 - SHORT, i.e. INTEGER*2, and BYTE now supported. Dec. '91.
- - LOGICAL_STRICT introduced. More compact and robust internal tables.
- - typeV and typeVV for type = BYTE, DOUBLE, FLOAT, INT, LOGICAL, LONG,SHORT.
- - FORTRAN passing strings and NULL pointer to C routines improved.
-2.3 - Extraneous arguments removed from many internal tables. May '92.
- - Introduce pseudo argument type SIMPLE for user defined types.
- - LynxOS using f2c supported. (Tested with LynxOS 2.0 386/AT.)
-2.4 - Separation of internal C and Fortran compilation directives. Oct. '92.
- - f2c and NAG f90 supported on all machines.
-2.5 - Minor mod.s to source and/or doc for HP9000, f2c, and NAG f90. Nov. '92.
-2.6 - Support external procedures as arguments with type ROUTINE. Dec. '92.
-2.7 - Support Alpha VMS. Support HP9000 f77 +ppu Jan. '93.
- - Support arrays with up to 7 dimensions.
- - Minor mod. of Fortran NULL to C via (P)STRING.
- - Specify the type of ROUTINE passed from Fortran to C [ANSI C requirement.]
- - Macros never receive a null parameter [RS/6000 requirement.]
-2.8 - PSTRING for Fortran calls C no longer provides escape to pass April'93.
- NULL pointer nor to pass address of original string.
- PNSTRING introduced with old PSTRING's behavior.
- PPSTRING introduced to always pass original address of string.
- - Support Alpha/OSF.
- - Document that common blocks used in C should be declared AND defined.
-
-3.0 - Automagic handling of ANSI ## versus K&R /**/ preprocessor op. March'95.
- - Less chance of name space collisions between cfortran.h and other codes.
- - SIMPLE macros, supporting user defined types, have changed names.
-3.1 - Internal macro name _INT not used. Conflicted with IRIX 5.3. May '95.
- - SunOS, all versions, should work out of the box.
- - ZTRINGV_ARGS|F(k) may no longer point to a PDOUBLE or PFLOAT argument.
- - ConvexOS 11.0 supported.
-3.2 - __hpux no longer needs to be restricted to MAX_PREPRO_ARGS=31. Oct. '95.
- - PSTRING bug fixed.
- - ZTRINGV_ARGS|F(k) may not point to a PBYTE,PINT,PLONG or PSHORT argument.
- - (P)ZTRINGV machinery improved. Should lead to fewer compiler warnings.
- (P)ZTRINGV no longer limits recursion or the nesting of routines.
- - SIMPLE macros, supporting user defined types, have changed slightly.
-3.3 - Supports PowerStation Fortran with Visual C++. Nov. '95.
- - g77 should work using f2cFortran, though no changes made for it.
- - (PROTO)CCALLSFFUN10 extended to (PROTO)CCALLSFFUN14.
- - FCALLSCFUN10 and SUB10 extended to FCALLSCFUN14 and SUB14.
-3.4 - C++ supported, Dec. '95.
- but it required the reintroduction of PROTOCCALLSFSUBn for users.
- - HP-UX f77 +800 supported.
-3.5 - Absoft UNIX Fortran supported. Sept.'96.
-3.6 - Minor corrections to cfortran.doc. Oct. '96.
- - Fixed bug for 15th argument. [Thanks to Tom Epperly at Aspen Tech.]
- - For AbsoftUNIXFortran, obey default of prepending _C to COMMON BLOCK name.
- - Fortran calling C with ROUTINE argument fixed and cleaned up.
-3.7 - Circumvent IBM and HP "null argument" preprocessor warning. Oct. '96
-3.8 - (P)STRINGV and (P)ZTRINGV can pass a 1- or 2-dim. char array. Feb. '97
- (P)ZTRINGV thus effectively also provides (P)ZTRING.
- - (P)ZTRINGV accepts a (char *) pointer.
-3.9 - Bug fixed for *VVVVV. May '97
- - f2c: Work-around for strange underscore-dependent naming feature.
- - NEC SX-4 supported.
- - CRAY: LOGICAL conversion uses _btol and _ltob from CRAY's fortran.h.
- - CRAY: Avoid bug of some versions of the C preprocessor.
- - CRAY T3E: FORTRAN_REAL introduced.
-
-4.0 - new/delete now used for C++. malloc/free still used for C. Jan. '98
- - FALSE no longer is defined by cfortran.h .
- - Absoft Pro Fortran for MacOS supported.
-4.1 - COMMA and COLON no longer are defined by cfortran.h . April'98
- - Bug fixed when 10th arg. or beyond is a string.
- [Rob Lucchesi of NASA-Goddard pointed out this bug.]
- - CCALLSFSUB/FUN extended from 14 to 27 arguments.
- - Workaround SunOS CC 4.2 cast bug. [Thanks to Savrak SAR of CERN.]
-4.2 - Portland Group needs -DpgiFortran . [Thank George Lai of NASA.] June '98
-4.3 - (PROTO)CCALLSFSUB extended from 20 to 27 arguments. July '98
-
-
-['Support' implies these and more recent releases of the respective
- OS/compilers/linkers can be used with cfortran.h.
- Earlier releases may also work.]
-
-
-Acknowledgements:
-- CERN very generously sponsored a week in 1994 for me to work on cfortran.h.
-- M.L.Luvisetto (Istituto Nazionale Fisica Nucleare - Centro Nazionale
- Analisi Fotogrammi, Bologna, Italy) provided all the support for the port to
- the CRAY. Marisa's encouragement and enthusiasm was also much appreciated.
-- J.Bunn (CERN) supported the port to PowerStation Fortran with Visual C++.
-- Paul Schenk (UC Riverside, CERN PPE/OPAL) in June 1993 extended cfortran.h 2.7
- to have C++ call Fortran. This was the starting point for full C++ in 3.4.
-- Glenn P.Davis of University Corp. for Atmospheric Research (UCAR) / Unidata
- supported the NEC SX-4 port and helped understand the CRAY.
-- Tony Goelz of Absoft Corporation ported cfortran.h to Absoft.
-- Though cfortran.h has been created in my 'copious' free time, I thank
- NSERC for their generous support of my grad. student and postdoc years.
-- Univ.Toronto, DESY, CERN and others have provided time on their computers.
-
-
-THIS PACKAGE, I.E. CFORTRAN.H, THIS DOCUMENT, AND THE CFORTRAN.H EXAMPLE
-PROGRAMS ARE PROPERTY OF THE AUTHOR WHO RESERVES ALL RIGHTS. THIS PACKAGE AND
-THE CODE IT PRODUCES MAY BE FREELY DISTRIBUTED WITHOUT FEES, SUBJECT TO THE
-FOLLOWING RESTRICTIONS:
-- YOU MUST ACCOMPANY ANY COPIES OR DISTRIBUTION WITH THIS (UNALTERED) NOTICE.
-- YOU MAY NOT RECEIVE MONEY FOR THE DISTRIBUTION OR FOR ITS MEDIA
- (E.G. TAPE, DISK, COMPUTER, PAPER.)
-- YOU MAY NOT PREVENT OTHERS FROM COPYING IT FREELY.
-- YOU MAY NOT DISTRIBUTE MODIFIED VERSIONS WITHOUT CLEARLY DOCUMENTING YOUR
- CHANGES AND NOTIFYING THE AUTHOR.
-- YOU MAY NOT MISREPRESENTED THE ORIGIN OF THIS SOFTWARE, EITHER BY EXPLICIT
- CLAIM OR BY OMISSION.
-
-THE INTENT OF THE ABOVE TERMS IS TO ENSURE THAT THE CFORTRAN.H PACKAGE NOT BE
-USED FOR PROFIT MAKING ACTIVITIES UNLESS SOME ROYALTY ARRANGEMENT IS ENTERED
-INTO WITH ITS AUTHOR.
-
-THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
-EXPRESSED OR IMPLIED. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST
-OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. THE AUTHOR IS NOT RESPONSIBLE
-FOR ANY SUPPORT OR SERVICE OF THE CFORTRAN.H PACKAGE.
-
- Burkhard Burow
- burow@desy.de
-
-P.S. Your comments and questions are welcomed and usually promptly answered.
-
-VAX VMS and Ultrix, Alpha, OSF, Silicon Graphics (SGI), DECstation, Mips RISC,
-Sun, CRAY, Convex, IBM RS/6000, Apollo DomainOS, HP, LynxOS, f2c, NAG, Absoft,
-NEC SX-4, PowerStation and Visual C++ are registered trademarks of their
-respective owners.
-
-/* end: cfortran.doc */
diff --git a/include/cfortran.h b/include/cfortran.h
deleted file mode 100644
index ed23011..0000000
--- a/include/cfortran.h
+++ /dev/null
@@ -1,2363 +0,0 @@
-/* cfortran.h 4.3 */
-/* http://www-zeus.desy.de/~burow/cfortran/ */
-/* Burkhard Burow burow@desy.de 1990 - 2001. */
-
-#ifndef __CFORTRAN_LOADED
-#define __CFORTRAN_LOADED
-
-/*
- THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU
- SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING,
- MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
-*/
-
-/*
- Avoid symbols already used by compilers and system *.h:
- __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c
-
- */
-
-
-/* First prepare for the C compiler. */
-
-#ifndef ANSI_C_preprocessor /* i.e. user can override. */
-#ifdef __CF__KnR
-#define ANSI_C_preprocessor 0
-#else
-#ifdef __STDC__
-#define ANSI_C_preprocessor 1
-#else
-#define _cfleft 1
-#define _cfright
-#define _cfleft_cfright 0
-#define ANSI_C_preprocessor _cfleft/**/_cfright
-#endif
-#endif
-#endif
-
-#if ANSI_C_preprocessor
-#define _0(A,B) A##B
-#define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */
-#define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */
-#define _3(A,B,C) _(A,_(B,C))
-#else /* if it turns up again during rescanning. */
-#define _(A,B) A/**/B
-#define _2(A,B) A/**/B
-#define _3(A,B,C) A/**/B/**/C
-#endif
-
-#if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__))
-#define VAXUltrix
-#endif
-
-#include <stdio.h> /* NULL [in all machines stdio.h] */
-#include <string.h> /* strlen, memset, memcpy, memchr. */
-#if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) )
-#include <stdlib.h> /* malloc,free */
-#else
-#include <malloc.h> /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/
-#ifdef apollo
-#define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */
-#endif
-#endif
-
-#if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx))
-#define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */
- /* Manually define __CF__KnR for HP if desired/required.*/
-#endif /* i.e. We will generate Kernighan and Ritchie C. */
-/* Note that you may define __CF__KnR before #include cfortran.h, in order to
-generate K&R C instead of the default ANSI C. The differences are mainly in the
-function prototypes and declarations. All machines, except the Apollo, work
-with either style. The Apollo's argument promotion rules require ANSI or use of
-the obsolete std_$call which we have not implemented here. Hence on the Apollo,
-only C calling FORTRAN subroutines will work using K&R style.*/
-
-
-/* Remainder of cfortran.h depends on the Fortran compiler. */
-
-#if defined(CLIPPERFortran) || defined(pgiFortran)
-#define f2cFortran
-#endif
-
-/* VAX/VMS does not let us \-split long #if lines. */
-/* Split #if into 2 because some HP-UX can't handle long #if */
-#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
-#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran))
-/* If no Fortran compiler is given, we choose one for the machines we know. */
-#if defined(lynx) || defined(VAXUltrix)
-#define f2cFortran /* Lynx: Only support f2c at the moment.
- VAXUltrix: f77 behaves like f2c.
- Support f2c or f77 with gcc, vcc with f2c.
- f77 with vcc works, missing link magic for f77 I/O.*/
-#endif
-#if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */
-#define hpuxFortran /* Should also allow hp9000s7/800 use.*/
-#endif
-#if defined(apollo)
-#define apolloFortran /* __CF__APOLLO67 also defines some behavior. */
-#endif
-#if defined(sun) || defined(__sun)
-#define sunFortran
-#endif
-#if defined(_IBMR2)
-#define IBMR2Fortran
-#endif
-#if defined(_CRAY)
-#define CRAYFortran /* _CRAYT3E also defines some behavior. */
-#endif
-#if defined(_SX)
-#define SXFortran
-#endif
-#if defined(mips) || defined(__mips)
-#define mipsFortran
-#endif
-#if defined(vms) || defined(__vms)
-#define vmsFortran
-#endif
-#if defined(__alpha) && defined(__unix__)
-#define DECFortran
-#endif
-#if defined(__convex__)
-#define CONVEXFortran
-#endif
-#if defined(VISUAL_CPLUSPLUS)
-#define PowerStationFortran
-#endif
-#endif /* ...Fortran */
-#endif /* ...Fortran */
-
-/* Split #if into 2 because some HP-UX can't handle long #if */
-#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
-#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(AbsoftProFortran)||defined(SXFortran))
-/* If your compiler barfs on ' #error', replace # with the trigraph for # */
- #error "cfortran.h: Can't find your environment among:\
- - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \
- - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \
- - VAX VMS CC 3.1 and FORTRAN 5.4. \
- - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \
- - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \
- - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \
- - CRAY \
- - NEC SX-4 SUPER-UX \
- - CONVEX \
- - Sun \
- - PowerStation Fortran with Visual C++ \
- - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \
- - LynxOS: cc or gcc with f2c. \
- - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \
- - f77 with vcc works; but missing link magic for f77 I/O. \
- - NO fort. None of gcc, cc or vcc generate required names.\
- - f2c : Use #define f2cFortran, or cc -Df2cFortran \
- - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \
- - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran \
- - Absoft Pro Fortran: Use #define AbsoftProFortran \
- - Portland Group Fortran: Use #define pgiFortran"
-/* Compiler must throw us out at this point! */
-#endif
-#endif
-
-
-#if defined(VAXC) && !defined(__VAXC)
-#define OLD_VAXC
-#pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */
-#endif
-
-/* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */
-
-#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(extname)
-#define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */
-#define orig_fcallsc(UN,LN) CFC_(UN,LN)
-#else
-#if defined(CRAYFortran) || defined(PowerStationFortran) || defined(AbsoftProFortran)
-#ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */
-#define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
-#else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */
-#define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */
-#endif
-#define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */
-#else /* For following machines one may wish to change the fcallsc default. */
-#define CF_SAME_NAMESPACE
-#ifdef vmsFortran
-#define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */
- /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/
- /* because VAX/VMS doesn't do recursive macros. */
-#define orig_fcallsc(UN,LN) UN
-#else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */
-#define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */
-#define orig_fcallsc(UN,LN) CFC_(UN,LN)
-#endif /* vmsFortran */
-#endif /* CRAYFortran PowerStationFortran */
-#endif /* ....Fortran */
-
-#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
-#define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN))
-#define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p))
-
-#define C_FUNCTION(UN,LN) fcallsc(UN,LN)
-#define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN)
-
-#ifndef COMMON_BLOCK
-#ifndef CONVEXFortran
-#ifndef CLIPPERFortran
-#if !(defined(AbsoftUNIXFortran)||defined(AbsoftProFortran))
-#define COMMON_BLOCK(UN,LN) CFC_(UN,LN)
-#else
-#define COMMON_BLOCK(UN,LN) _(_C,LN)
-#endif /* AbsoftUNIXFortran or AbsoftProFortran */
-#else
-#define COMMON_BLOCK(UN,LN) _(LN,__)
-#endif /* CLIPPERFortran */
-#else
-#define COMMON_BLOCK(UN,LN) _3(_,LN,_)
-#endif /* CONVEXFortran */
-#endif /* COMMON_BLOCK */
-
-#ifndef DOUBLE_PRECISION
-#if defined(CRAYFortran) && !defined(_CRAYT3E)
-#define DOUBLE_PRECISION long double
-#else
-#define DOUBLE_PRECISION double
-#endif
-#endif
-
-#ifndef FORTRAN_REAL
-#if defined(CRAYFortran) && defined(_CRAYT3E)
-#define FORTRAN_REAL double
-#else
-#define FORTRAN_REAL float
-#endif
-#endif
-
-#ifdef CRAYFortran
-#ifdef _CRAY
-#include <fortran.h>
-#else
-#include "fortran.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-#define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */
-/* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/
-#define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine
- arg.'s have been declared float *, or double *. */
-#else
-#define FLOATVVVVVVV_cfPP
-#define VOIDP
-#endif
-
-#ifdef vmsFortran
-#if defined(vms) || defined(__vms)
-#include <descrip.h>
-#else
-#include "descrip.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-#endif
-
-#ifdef sunFortran
-#if defined(sun) || defined(__sun)
-#include <math.h> /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */
-#else
-#include "math.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-/* At least starting with the default C compiler SC3.0.1 of SunOS 5.3,
- * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in
- * <math.h>, since sun C no longer promotes C float return values to doubles.
- * Therefore, only use them if defined.
- * Even if gcc is being used, assume that it exhibits the Sun C compiler
- * behavior in order to be able to use *.o from the Sun C compiler.
- * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc.
- */
-#endif
-
-#ifndef apolloFortran
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) extern DEFINITION NAME
-#define CF_NULL_PROTO
-#else /* HP doesn't understand #elif. */
-/* Without ANSI prototyping, Apollo promotes float functions to double. */
-/* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */
-#define CF_NULL_PROTO ...
-#ifndef __CF__APOLLO67
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
- DEFINITION NAME __attribute((__section(NAME)))
-#else
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
- DEFINITION NAME #attribute[section(NAME)]
-#endif
-#endif
-
-#ifdef __cplusplus
-#undef CF_NULL_PROTO
-#define CF_NULL_PROTO ...
-#endif
-
-
-#ifndef USE_NEW_DELETE
-#ifdef __cplusplus
-#define USE_NEW_DELETE 1
-#else
-#define USE_NEW_DELETE 0
-#endif
-#endif
-#if USE_NEW_DELETE
-#define _cf_malloc(N) new char[N]
-#define _cf_free(P) delete[] P
-#else
-#define _cf_malloc(N) (char *)malloc(N)
-#define _cf_free(P) free(P)
-#endif
-
-#ifdef mipsFortran
-#define CF_DECLARE_GETARG int f77argc; char **f77argv
-#define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV
-#else
-#define CF_DECLARE_GETARG
-#define CF_SET_GETARG(ARGC,ARGV)
-#endif
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define AcfCOMMA ,
-#define AcfCOLON ;
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES USED WITHIN CFORTRAN.H */
-
-#define _cfMIN(A,B) (A<B?A:B)
-
-/* 970211 - XIX.145:
- firstindexlength - better name is all_but_last_index_lengths
- secondindexlength - better name is last_index_length
- */
-#define firstindexlength(A) (sizeof(A[0])==1 ? 1 : (sizeof(A) / sizeof(A[0])) )
-#define secondindexlength(A) (sizeof(A[0])==1 ? sizeof(A) : sizeof(A[0]) )
-
-/* Behavior of FORTRAN LOGICAL. All machines' LOGICAL is same size as C's int.
-Conversion is automatic except for arrays which require F2CLOGICALV/C2FLOGICALV.
-f2c, MIPS f77 [DECstation, SGI], VAX Ultrix f77,
-HP-UX f77 : as in C.
-VAX/VMS FORTRAN, VAX Ultrix fort,
-Absoft Unix Fortran, IBM RS/6000 xlf : LS Bit = 0/1 = TRUE/FALSE.
-Apollo : neg. = TRUE, else FALSE.
-[Apollo accepts -1 as TRUE for function values, but NOT all other neg. values.]
-[DECFortran for Ultrix RISC is also called f77 but is the same as VAX/VMS.]
-[MIPS f77 treats .eqv./.neqv. as .eq./.ne. and hence requires LOGICAL_STRICT.]*/
-
-#if defined(NAGf90Fortran) || defined(f2cFortran) || defined(mipsFortran) || defined(PowerStationFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran) || defined(SXFortran)
-/* SX/PowerStationFortran have 0 and 1 defined, others are neither T nor F. */
-/* hpuxFortran800 has 0 and 0x01000000 defined. Others are unknown. */
-#define LOGICAL_STRICT /* Other Fortran have .eqv./.neqv. == .eq./.ne. */
-#endif
-
-#define C2FLOGICALV(A,I) \
- do {int __i; for(__i=0;__i<I;__i++) A[__i]=C2FLOGICAL(A[__i]); } while (0)
-#define F2CLOGICALV(A,I) \
- do {int __i; for(__i=0;__i<I;__i++) A[__i]=F2CLOGICAL(A[__i]); } while (0)
-
-#if defined(apolloFortran)
-#define C2FLOGICAL(L) ((L)?-1:(L)&~((unsigned)1<<sizeof(int)*8-1))
-#define F2CLOGICAL(L) ((L)<0?(L):0)
-#else
-#if defined(CRAYFortran)
-#define C2FLOGICAL(L) _btol(L)
-#define F2CLOGICAL(L) _ltob(&(L)) /* Strangely _ltob() expects a pointer. */
-#else
-#if defined(IBMR2Fortran) || defined(vmsFortran) || defined(DECFortran) || defined(AbsoftUNIXFortran)
-/* How come no AbsoftProFortran ? */
-#define C2FLOGICAL(L) ((L)?(L)|1:(L)&~(int)1)
-#define F2CLOGICAL(L) ((L)&1?(L):0)
-#else
-#if defined(CONVEXFortran)
-#define C2FLOGICAL(L) ((L) ? ~0 : 0 )
-#define F2CLOGICAL(L) (L)
-#else /* others evaluate LOGICALs as for C. */
-#define C2FLOGICAL(L) (L)
-#define F2CLOGICAL(L) (L)
-#ifndef LOGICAL_STRICT
-#undef C2FLOGICALV
-#undef F2CLOGICALV
-#define C2FLOGICALV(A,I)
-#define F2CLOGICALV(A,I)
-#endif /* LOGICAL_STRICT */
-#endif /* CONVEXFortran || All Others */
-#endif /* IBMR2Fortran vmsFortran DECFortran AbsoftUNIXFortran */
-#endif /* CRAYFortran */
-#endif /* apolloFortran */
-
-/* 970514 - In addition to CRAY, there may be other machines
- for which LOGICAL_STRICT makes no sense. */
-#if defined(LOGICAL_STRICT) && !defined(CRAYFortran)
-/* Force C2FLOGICAL to generate only the values for either .TRUE. or .FALSE.
- SX/PowerStationFortran only have 0 and 1 defined.
- Elsewhere, only needed if you want to do:
- logical lvariable
- if (lvariable .eq. .true.) then ! (1)
- instead of
- if (lvariable .eqv. .true.) then ! (2)
- - (1) may not even be FORTRAN/77 and that Apollo's f77 and IBM's xlf
- refuse to compile (1), so you are probably well advised to stay away from
- (1) and from LOGICAL_STRICT.
- - You pay a (slight) performance penalty for using LOGICAL_STRICT. */
-#undef C2FLOGICAL
-#ifdef hpuxFortran800
-#define C2FLOGICAL(L) ((L)?0x01000000:0)
-#else
-#if defined(apolloFortran) || defined(vmsFortran) || defined(DECFortran)
-#define C2FLOGICAL(L) ((L)?-1:0) /* These machines use -1/0 for .true./.false.*/
-#else
-#define C2FLOGICAL(L) ((L)? 1:0) /* All others use +1/0 for .true./.false.*/
-#endif
-#endif
-#endif /* LOGICAL_STRICT */
-
-/* Convert a vector of C strings into FORTRAN strings. */
-#ifndef __CF__KnR
-static char *c2fstrv(char* cstr, char *fstr, int elem_len, int sizeofcstr)
-#else
-static char *c2fstrv( cstr, fstr, elem_len, sizeofcstr)
- char* cstr; char *fstr; int elem_len; int sizeofcstr;
-#endif
-{ int i,j;
-/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
- Useful size of string must be the same in both languages. */
-for (i=0; i<sizeofcstr/elem_len; i++) {
- for (j=1; j<elem_len && *cstr; j++) *fstr++ = *cstr++;
- cstr += 1+elem_len-j;
- for (; j<elem_len; j++) *fstr++ = ' ';
-} /* 95109 - Seems to be returning the original fstr. */
-return fstr-sizeofcstr+sizeofcstr/elem_len; }
-
-/* Convert a vector of FORTRAN strings into C strings. */
-#ifndef __CF__KnR
-static char *f2cstrv(char *fstr, char* cstr, int elem_len, int sizeofcstr)
-#else
-static char *f2cstrv( fstr, cstr, elem_len, sizeofcstr)
- char *fstr; char* cstr; int elem_len; int sizeofcstr;
-#endif
-{ int i,j;
-/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
- Useful size of string must be the same in both languages. */
-cstr += sizeofcstr;
-fstr += sizeofcstr - sizeofcstr/elem_len;
-for (i=0; i<sizeofcstr/elem_len; i++) {
- *--cstr = '\0';
- for (j=1; j<elem_len; j++) *--cstr = *--fstr;
-} return cstr; }
-
-/* kill the trailing char t's in string s. */
-#ifndef __CF__KnR
-static char *kill_trailing(char *s, char t)
-#else
-static char *kill_trailing( s, t) char *s; char t;
-#endif
-{char *e;
-e = s + strlen(s);
-if (e>s) { /* Need this to handle NULL string.*/
- while (e>s && *--e==t); /* Don't follow t's past beginning. */
- e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
-} return s; }
-
-/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally
-points to the terminating '\0' of s, but may actually point to anywhere in s.
-s's new '\0' will be placed at e or earlier in order to remove any trailing t's.
-If e<s string s is left unchanged. */
-#ifndef __CF__KnR
-static char *kill_trailingn(char *s, char t, char *e)
-#else
-static char *kill_trailingn( s, t, e) char *s; char t; char *e;
-#endif
-{
-if (e==s) *e = '\0'; /* Kill the string makes sense here.*/
-else if (e>s) { /* Watch out for neg. length string.*/
- while (e>s && *--e==t); /* Don't follow t's past beginning. */
- e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
-} return s; }
-
-/* Note the following assumes that any element which has t's to be chopped off,
-does indeed fill the entire element. */
-#ifndef __CF__KnR
-static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t)
-#else
-static char *vkill_trailing( cstr, elem_len, sizeofcstr, t)
- char* cstr; int elem_len; int sizeofcstr; char t;
-#endif
-{ int i;
-for (i=0; i<sizeofcstr/elem_len; i++) /* elem_len includes \0 for C strings. */
- kill_trailingn(cstr+elem_len*i,t,cstr+elem_len*(i+1)-1);
-return cstr; }
-
-#ifdef vmsFortran
-typedef struct dsc$descriptor_s fstring;
-#define DSC$DESCRIPTOR_A(DIMCT) \
-struct { \
- unsigned short dsc$w_length; unsigned char dsc$b_dtype; \
- unsigned char dsc$b_class; char *dsc$a_pointer; \
- char dsc$b_scale; unsigned char dsc$b_digits; \
- struct { \
- unsigned : 3; unsigned dsc$v_fl_binscale : 1; \
- unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; \
- unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; \
- } dsc$b_aflags; \
- unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; \
- char *dsc$a_a0; long dsc$l_m [DIMCT]; \
- struct { \
- long dsc$l_l; long dsc$l_u; \
- } dsc$bounds [DIMCT]; \
-}
-typedef DSC$DESCRIPTOR_A(1) fstringvector;
-/*typedef DSC$DESCRIPTOR_A(2) fstringarrarr;
- typedef DSC$DESCRIPTOR_A(3) fstringarrarrarr;*/
-#define initfstr(F,C,ELEMNO,ELEMLEN) \
-( (F).dsc$l_arsize= ( (F).dsc$w_length =(ELEMLEN) ) \
- *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO) ), \
- (F).dsc$a_a0 = ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length ,(F))
-
-#else
-#define _NUM_ELEMS -1
-#define _NUM_ELEM_ARG -2
-#define NUM_ELEMS(A) A,_NUM_ELEMS
-#define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG
-#define TERM_CHARS(A,B) A,B
-#ifndef __CF__KnR
-static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term)
-#else
-static int num_elem( strv, elem_len, term_char, num_term)
- char *strv; unsigned elem_len; int term_char; int num_term;
-#endif
-/* elem_len is the number of characters in each element of strv, the FORTRAN
-vector of strings. The last element of the vector must begin with at least
-num_term term_char characters, so that this routine can determine how
-many elements are in the vector. */
-{
-unsigned num,i;
-if (num_term == _NUM_ELEMS || num_term == _NUM_ELEM_ARG)
- return term_char;
-if (num_term <=0) num_term = (int)elem_len;
-for (num=0; ; num++) {
- for (i=0; i<(unsigned)num_term && *strv==term_char; i++,strv++);
- if (i==(unsigned)num_term) break;
- else strv += elem_len-i;
-}
-return (int)num;
-}
-#endif
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS */
-
-/* C string TO Fortran Common Block STRing. */
-/* DIM is the number of DIMensions of the array in terms of strings, not
- characters. e.g. char a[12] has DIM = 0, char a[12][4] has DIM = 1, etc. */
-#define C2FCBSTR(CSTR,FSTR,DIM) \
- c2fstrv((char *)CSTR, (char *)FSTR, sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM))
-
-/* Fortran Common Block string TO C STRing. */
-#define FCB2CSTR(FSTR,CSTR,DIM) \
- vkill_trailing(f2cstrv((char *)FSTR, (char *)CSTR, \
- sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM)), \
- sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM), ' ')
-
-#define cfDEREFERENCE0
-#define cfDEREFERENCE1 *
-#define cfDEREFERENCE2 **
-#define cfDEREFERENCE3 ***
-#define cfDEREFERENCE4 ****
-#define cfDEREFERENCE5 *****
-#define cfelementsof(A,D) (sizeof(A)/sizeof(_(cfDEREFERENCE,D)(A)))
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO CALL FORTRAN SUBROUTINES */
-
-/* Define lookup tables for how to handle the various types of variables. */
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#define ZTRINGV_NUM(I) I
-#define ZTRINGV_ARGFP(I) (*(_2(A,I))) /* Undocumented. For PINT, etc. */
-#define ZTRINGV_ARGF(I) _2(A,I)
-#ifdef CFSUBASFUN
-#define ZTRINGV_ARGS(I) ZTRINGV_ARGF(I)
-#else
-#define ZTRINGV_ARGS(I) _2(B,I)
-#endif
-
-#define PBYTE_cfVP(A,B) PINT_cfVP(A,B)
-#define PDOUBLE_cfVP(A,B)
-#define PFLOAT_cfVP(A,B)
-#ifdef ZTRINGV_ARGS_allows_Pvariables
-/* This allows Pvariables for ARGS. ARGF machinery is above ARGFP.
- * B is not needed because the variable may be changed by the Fortran routine,
- * but because B is the only way to access an arbitrary macro argument. */
-#define PINT_cfVP(A,B) int B = (int)A; /* For ZSTRINGV_ARGS */
-#else
-#define PINT_cfVP(A,B)
-#endif
-#define PLOGICAL_cfVP(A,B) int *B; /* Returning LOGICAL in FUNn and SUBn */
-#define PLONG_cfVP(A,B) PINT_cfVP(A,B)
-#define PSHORT_cfVP(A,B) PINT_cfVP(A,B)
-
-#define VCF_INT_S(T,A,B) _(T,VVVVVVV_cfTYPE) B = A;
-#define VCF_INT_F(T,A,B) _(T,_cfVCF)(A,B)
-/* _cfVCF table is directly mapped to _cfCCC table. */
-#define BYTE_cfVCF(A,B)
-#define DOUBLE_cfVCF(A,B)
-#if !defined(__CF__KnR)
-#define FLOAT_cfVCF(A,B)
-#else
-#define FLOAT_cfVCF(A,B) FORTRAN_REAL B = A;
-#endif
-#define INT_cfVCF(A,B)
-#define LOGICAL_cfVCF(A,B)
-#define LONG_cfVCF(A,B)
-#define SHORT_cfVCF(A,B)
-
-/* 980416
- Cast (void (*)(CF_NULL_PROTO)) causes SunOS CC 4.2 occasionally to barf,
- while the following equivalent typedef is fine.
- For consistency use the typedef on all machines.
- */
-typedef void (*cfCAST_FUNCTION)(CF_NULL_PROTO);
-
-#define VCF(TN,I) _Icf4(4,V,TN,_(A,I),_(B,I),F)
-#define VVCF(TN,AI,BI) _Icf4(4,V,TN,AI,BI,S)
-#define INT_cfV(T,A,B,F) _(VCF_INT_,F)(T,A,B)
-#define INTV_cfV(T,A,B,F)
-#define INTVV_cfV(T,A,B,F)
-#define INTVVV_cfV(T,A,B,F)
-#define INTVVVV_cfV(T,A,B,F)
-#define INTVVVVV_cfV(T,A,B,F)
-#define INTVVVVVV_cfV(T,A,B,F)
-#define INTVVVVVVV_cfV(T,A,B,F)
-#define PINT_cfV( T,A,B,F) _(T,_cfVP)(A,B)
-#define PVOID_cfV( T,A,B,F)
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
-#define ROUTINE_cfV(T,A,B,F) void (*B)(CF_NULL_PROTO) = (cfCAST_FUNCTION)A;
-#else
-#define ROUTINE_cfV(T,A,B,F)
-#endif
-#define SIMPLE_cfV(T,A,B,F)
-#ifdef vmsFortran
-#define STRING_cfV(T,A,B,F) static struct {fstring f; unsigned clen;} B = \
- {{0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL},0};
-#define PSTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
-#define STRINGV_cfV(T,A,B,F) static fstringvector B = \
- {sizeof(A),DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
-#define PSTRINGV_cfV(T,A,B,F) static fstringvector B = \
- {0,DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
-#else
-#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
-#define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen;} B;
-#define PSTRING_cfV(T,A,B,F) int B;
-#define PSTRINGV_cfV(T,A,B,F) struct{char *fs; unsigned int sizeofA,flen;}B;
-#endif
-#define ZTRINGV_cfV(T,A,B,F) STRINGV_cfV(T,A,B,F)
-#define PZTRINGV_cfV(T,A,B,F) PSTRINGV_cfV(T,A,B,F)
-
-/* Note that the actions of the A table were performed inside the AA table.
- VAX Ultrix vcc, and HP-UX cc, didn't evaluate arguments to functions left to
- right, so we had to split the original table into the current robust two. */
-#define ACF(NAME,TN,AI,I) _(TN,_cfSTR)(4,A,NAME,I,AI,_(B,I),0)
-#define DEFAULT_cfA(M,I,A,B)
-#define LOGICAL_cfA(M,I,A,B) B=C2FLOGICAL(B);
-#define PLOGICAL_cfA(M,I,A,B) A=C2FLOGICAL(A);
-#define STRING_cfA(M,I,A,B) STRING_cfC(M,I,A,B,sizeof(A))
-#define PSTRING_cfA(M,I,A,B) PSTRING_cfC(M,I,A,B,sizeof(A))
-#ifdef vmsFortran
-#define AATRINGV_cfA( A,B, sA,filA,silA) \
- initfstr(B,_cf_malloc((sA)-(filA)),(filA),(silA)-1), \
- c2fstrv(A,B.dsc$a_pointer,(silA),(sA));
-#define APATRINGV_cfA( A,B, sA,filA,silA) \
- initfstr(B,A,(filA),(silA)-1),c2fstrv(A,A,(silA),(sA));
-#else
-#define AATRINGV_cfA( A,B, sA,filA,silA) \
- (B.s=_cf_malloc((sA)-(filA)),B.fs=c2fstrv(A,B.s,(B.flen=(silA)-1)+1,(sA)));
-#define APATRINGV_cfA( A,B, sA,filA,silA) \
- B.fs=c2fstrv(A,A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
-#endif
-#define STRINGV_cfA(M,I,A,B) \
- AATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
-#define PSTRINGV_cfA(M,I,A,B) \
- APATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
-#define ZTRINGV_cfA(M,I,A,B) AATRINGV_cfA( (char *)A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-#define PZTRINGV_cfA(M,I,A,B) APATRINGV_cfA( (char *)A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-
-#define PBYTE_cfAAP(A,B) &A
-#define PDOUBLE_cfAAP(A,B) &A
-#define PFLOAT_cfAAP(A,B) FLOATVVVVVVV_cfPP &A
-#define PINT_cfAAP(A,B) &A
-#define PLOGICAL_cfAAP(A,B) B= &A /* B used to keep a common W table. */
-#define PLONG_cfAAP(A,B) &A
-#define PSHORT_cfAAP(A,B) &A
-
-#define AACF(TN,AI,I,C) _SEP_(TN,C,cfCOMMA) _Icf(3,AA,TN,AI,_(B,I))
-#define INT_cfAA(T,A,B) &B
-#define INTV_cfAA(T,A,B) _(T,VVVVVV_cfPP) A
-#define INTVV_cfAA(T,A,B) _(T,VVVVV_cfPP) A[0]
-#define INTVVV_cfAA(T,A,B) _(T,VVVV_cfPP) A[0][0]
-#define INTVVVV_cfAA(T,A,B) _(T,VVV_cfPP) A[0][0][0]
-#define INTVVVVV_cfAA(T,A,B) _(T,VV_cfPP) A[0][0][0][0]
-#define INTVVVVVV_cfAA(T,A,B) _(T,V_cfPP) A[0][0][0][0][0]
-#define INTVVVVVVV_cfAA(T,A,B) _(T,_cfPP) A[0][0][0][0][0][0]
-#define PINT_cfAA(T,A,B) _(T,_cfAAP)(A,B)
-#define PVOID_cfAA(T,A,B) (void *) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfAA(T,A,B) &B
-#else
-#define ROUTINE_cfAA(T,A,B) (cfCAST_FUNCTION)A
-#endif
-#define STRING_cfAA(T,A,B) STRING_cfCC(T,A,B)
-#define PSTRING_cfAA(T,A,B) PSTRING_cfCC(T,A,B)
-#ifdef vmsFortran
-#define STRINGV_cfAA(T,A,B) &B
-#else
-#ifdef CRAYFortran
-#define STRINGV_cfAA(T,A,B) _cptofcd(B.fs,B.flen)
-#else
-#define STRINGV_cfAA(T,A,B) B.fs
-#endif
-#endif
-#define PSTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-#define ZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-#define PZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define JCF(TN,I)
-#define KCF(TN,I)
-#else
-#define JCF(TN,I) _(TN,_cfSTR)(1,J,_(B,I), 0,0,0,0)
-#if defined(AbsoftUNIXFortran)
-#define DEFAULT_cfJ(B) ,0
-#else
-#define DEFAULT_cfJ(B)
-#endif
-#define LOGICAL_cfJ(B) DEFAULT_cfJ(B)
-#define PLOGICAL_cfJ(B) DEFAULT_cfJ(B)
-#define STRING_cfJ(B) ,B.flen
-#define PSTRING_cfJ(B) ,B
-#define STRINGV_cfJ(B) STRING_cfJ(B)
-#define PSTRINGV_cfJ(B) STRING_cfJ(B)
-#define ZTRINGV_cfJ(B) STRING_cfJ(B)
-#define PZTRINGV_cfJ(B) STRING_cfJ(B)
-
-/* KCF is identical to DCF, except that KCF ZTRING is not empty. */
-#define KCF(TN,I) _(TN,_cfSTR)(1,KK,_(B,I), 0,0,0,0)
-#if defined(AbsoftUNIXFortran)
-#define DEFAULT_cfKK(B) , unsigned B
-#else
-#define DEFAULT_cfKK(B)
-#endif
-#define LOGICAL_cfKK(B) DEFAULT_cfKK(B)
-#define PLOGICAL_cfKK(B) DEFAULT_cfKK(B)
-#define STRING_cfKK(B) , unsigned B
-#define PSTRING_cfKK(B) STRING_cfKK(B)
-#define STRINGV_cfKK(B) STRING_cfKK(B)
-#define PSTRINGV_cfKK(B) STRING_cfKK(B)
-#define ZTRINGV_cfKK(B) STRING_cfKK(B)
-#define PZTRINGV_cfKK(B) STRING_cfKK(B)
-#endif
-
-#define WCF(TN,AN,I) _(TN,_cfSTR)(2,W,AN,_(B,I), 0,0,0)
-#define DEFAULT_cfW(A,B)
-#define LOGICAL_cfW(A,B)
-#define PLOGICAL_cfW(A,B) *B=F2CLOGICAL(*B);
-#define STRING_cfW(A,B) (A[B.clen]!='\0'?A[B.clen]='\0':0); /* A?="constnt"*/
-#define PSTRING_cfW(A,B) kill_trailing(A,' ');
-#ifdef vmsFortran
-#define STRINGV_cfW(A,B) _cf_free(B.dsc$a_pointer);
-#define PSTRINGV_cfW(A,B) \
- vkill_trailing(f2cstrv((char*)A, (char*)A, \
- B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0]), \
- B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0], ' ');
-#else
-#define STRINGV_cfW(A,B) _cf_free(B.s);
-#define PSTRINGV_cfW(A,B) vkill_trailing( \
- f2cstrv((char*)A,(char*)A,B.flen+1,B.sizeofA), B.flen+1,B.sizeofA,' ');
-#endif
-#define ZTRINGV_cfW(A,B) STRINGV_cfW(A,B)
-#define PZTRINGV_cfW(A,B) PSTRINGV_cfW(A,B)
-
-#define NCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _Icf(2,N,TN,_(A,I),0)
-#define NNCF(TN,I,C) UUCF(TN,I,C)
-#define NNNCF(TN,I,C) _SEP_(TN,C,cfCOLON) _Icf(2,N,TN,_(A,I),0)
-#define INT_cfN(T,A) _(T,VVVVVVV_cfTYPE) * A
-#define INTV_cfN(T,A) _(T,VVVVVV_cfTYPE) * A
-#define INTVV_cfN(T,A) _(T,VVVVV_cfTYPE) * A
-#define INTVVV_cfN(T,A) _(T,VVVV_cfTYPE) * A
-#define INTVVVV_cfN(T,A) _(T,VVV_cfTYPE) * A
-#define INTVVVVV_cfN(T,A) _(T,VV_cfTYPE) * A
-#define INTVVVVVV_cfN(T,A) _(T,V_cfTYPE) * A
-#define INTVVVVVVV_cfN(T,A) _(T,_cfTYPE) * A
-#define PINT_cfN(T,A) _(T,_cfTYPE) * A
-#define PVOID_cfN(T,A) void * A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfN(T,A) void (**A)(CF_NULL_PROTO)
-#else
-#define ROUTINE_cfN(T,A) void ( *A)(CF_NULL_PROTO)
-#endif
-#ifdef vmsFortran
-#define STRING_cfN(T,A) fstring * A
-#define STRINGV_cfN(T,A) fstringvector * A
-#else
-#ifdef CRAYFortran
-#define STRING_cfN(T,A) _fcd A
-#define STRINGV_cfN(T,A) _fcd A
-#else
-#define STRING_cfN(T,A) char * A
-#define STRINGV_cfN(T,A) char * A
-#endif
-#endif
-#define PSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PNSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PPSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PSTRINGV_cfN(T,A) STRINGV_cfN(T,A)
-#define ZTRINGV_cfN(T,A) STRINGV_cfN(T,A)
-#define PZTRINGV_cfN(T,A) PSTRINGV_cfN(T,A)
-
-
-/* Apollo 6.7, CRAY, old Sun, VAX/Ultrix vcc/cc and new ultrix
- can't hack more than 31 arg's.
- e.g. ultrix >= 4.3 gives message:
- zow35> cc -c -DDECFortran cfortest.c
- cfe: Fatal: Out of memory: cfortest.c
- zow35>
- Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine
- if using -Aa, otherwise we have a problem.
- */
-#ifndef MAX_PREPRO_ARGS
-#if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR)))
-#define MAX_PREPRO_ARGS 31
-#else
-#define MAX_PREPRO_ARGS 99
-#endif
-#endif
-
-#if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
-/* In addition to explicit Absoft stuff, only Absoft requires:
- - DEFAULT coming from _cfSTR.
- DEFAULT could have been called e.g. INT, but keep it for clarity.
- - M term in CFARGT14 and CFARGT14FS.
- */
-#define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0)
-#define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0)
-#define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0)
-#define DEFAULT_cfABSOFT1
-#define LOGICAL_cfABSOFT1
-#define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING
-#define DEFAULT_cfABSOFT2
-#define LOGICAL_cfABSOFT2
-#define STRING_cfABSOFT2 ,unsigned D0
-#define DEFAULT_cfABSOFT3
-#define LOGICAL_cfABSOFT3
-#define STRING_cfABSOFT3 ,D0
-#else
-#define ABSOFT_cf1(T0)
-#define ABSOFT_cf2(T0)
-#define ABSOFT_cf3(T0)
-#endif
-
-/* _Z introduced to cicumvent IBM and HP silly preprocessor warning.
- e.g. "Macro CFARGT14 invoked with a null argument."
- */
-#define _Z
-
-#define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
- S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14)
-#define CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
- S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \
- S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) S(TL,21) \
- S(TM,22) S(TN,23) S(TO,24) S(TP,25) S(TQ,26) S(TR,27)
-
-#define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
- M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CFARGT27FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
- F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \
- F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \
- M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
-
-#if !(defined(PowerStationFortran)||defined(hpuxFortran800))
-/* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields:
- SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c
- "c.c", line 406: warning: argument mismatch
- Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok.
- Behavior is most clearly seen in example:
- #define A 1 , 2
- #define C(X,Y,Z) x=X. y=Y. z=Z.
- #define D(X,Y,Z) C(X,Y,Z)
- D(x,A,z)
- Output from preprocessor is: x = x . y = 1 . z = 2 .
- #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-*/
-#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
- M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
- F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) F(TL,21,1) \
- F(TM,22,1) F(TN,23,1) F(TO,24,1) F(TP,25,1) F(TQ,26,1) F(TR,27,1) \
- M CFARGT27S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
-
-#define CFARGT20(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,10,1) F(TB,11,1) F(TC,12,1) F(TD,13,1) F(TE,14,1) \
- F(TF,15,1) F(TG,16,1) F(TH,17,1) F(TI,18,1) F(TJ,19,1) F(TK,20,1) \
- S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
- S(T8,8) S(T9,9) S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) \
- S(TF,15) S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20)
-#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
- F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
- F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \
- F(TD,AD,13,1) F(TE,AE,14,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
- S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \
- S(TB,11) S(TC,12) S(TD,13) S(TE,14)
-#if MAX_PREPRO_ARGS>31
-#define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
- F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \
- F(TD,AD,13,1) F(TE,AE,14,1) F(TF,AF,15,1) F(TG,AG,16,1) F(TH,AH,17,1) F(TI,AI,18,1) \
- F(TJ,AJ,19,1) F(TK,AK,20,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
- S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,10) \
- S(TB,11) S(TC,12) S(TD,13) S(TE,14) S(TF,15) S(TG,16) \
- S(TH,17) S(TI,18) S(TJ,19) S(TK,20)
-#define CFARGTA27(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
- F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
- F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,10,1) F(TB,AB,11,1) F(TC,AC,12,1) \
- F(TD,AD,13,1) F(TE,AE,14,1) F(TF,AF,15,1) F(TG,AG,16,1) F(TH,AH,17,1) F(TI,AI,18,1) \
- F(TJ,AJ,19,1) F(TK,AK,20,1) F(TL,AL,21,1) F(TM,AM,22,1) F(TN,AN,23,1) F(TO,AO,24,1) \
- F(TP,AP,25,1) F(TQ,AQ,26,1) F(TR,AR,27,1) S(T1,1) S(T2,2) S(T3,3) \
- S(T4,4) S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) \
- S(TA,10) S(TB,11) S(TC,12) S(TD,13) S(TE,14) S(TF,15) \
- S(TG,16) S(TH,17) S(TI,18) S(TJ,19) S(TK,20) S(TL,21) \
- S(TM,22) S(TN,23) S(TO,24) S(TP,25) S(TQ,26) S(TR,27)
-#endif
-#else
-#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
- F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
- F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \
- F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14)
-#define CFARGT27(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
- F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
- F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \
- F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \
- F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20) \
- F(TL,21,1) S(TL,21) F(TM,22,1) S(TM,22) F(TN,23,1) S(TN,23) F(TO,24,1) S(TO,24) \
- F(TP,25,1) S(TP,25) F(TQ,26,1) S(TQ,26) F(TR,27,1) S(TR,27)
-
-#define CFARGT20(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
- F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
- F(T9,9,1) S(T9,9) F(TA,10,1) S(TA,10) F(TB,11,1) S(TB,11) F(TC,12,1) S(TC,12) \
- F(TD,13,1) S(TD,13) F(TE,14,1) S(TE,14) F(TF,15,1) S(TF,15) F(TG,16,1) S(TG,16) \
- F(TH,17,1) S(TH,17) F(TI,18,1) S(TI,18) F(TJ,19,1) S(TJ,19) F(TK,20,1) S(TK,20)
-#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
- F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
- F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
- F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
- F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \
- F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14)
-#if MAX_PREPRO_ARGS>31
-#define CFARGTA20(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
- F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
- F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
- F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \
- F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) F(TF,AF,15,1) S(TF,15) \
- F(TG,AG,16,1) S(TG,16) F(TH,AH,17,1) S(TH,17) F(TI,AI,18,1) S(TI,18) \
- F(TJ,AJ,19,1) S(TJ,19) F(TK,AK,20,1) S(TK,20)
-#define CFARGTA27(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
- F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
- F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
- F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
- F(TA,AA,10,1) S(TA,10) F(TB,AB,11,1) S(TB,11) F(TC,AC,12,1) S(TC,12) \
- F(TD,AD,13,1) S(TD,13) F(TE,AE,14,1) S(TE,14) F(TF,AF,15,1) S(TF,15) \
- F(TG,AG,16,1) S(TG,16) F(TH,AH,17,1) S(TH,17) F(TI,AI,18,1) S(TI,18) \
- F(TJ,AJ,19,1) S(TJ,19) F(TK,AK,20,1) S(TK,20) F(TL,AL,21,1) S(TL,21) \
- F(TM,AM,22,1) S(TM,22) F(TN,AN,23,1) S(TN,23) F(TO,AO,24,1) S(TO,24) \
- F(TP,AP,25,1) S(TP,25) F(TQ,AQ,26,1) S(TQ,26) F(TR,AR,27,1) S(TR,27)
-#endif
-#endif
-
-
-#define PROTOCCALLSFSUB1( UN,LN,T1) \
- PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB2( UN,LN,T1,T2) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-
-#define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
-#define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
-
-#define PROTOCCALLSFSUB21(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \
- PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB22(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \
- PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB23(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \
- PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB24(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \
- PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB25(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \
- PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0)
-#define PROTOCCALLSFSUB26(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \
- PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0)
-
-
-#ifndef FCALLSC_QUALIFIER
-#ifdef VISUAL_CPLUSPLUS
-#define FCALLSC_QUALIFIER __stdcall
-#else
-#define FCALLSC_QUALIFIER
-#endif
-#endif
-
-#ifdef __cplusplus
-#define CFextern extern "C"
-#else
-#define CFextern extern
-#endif
-
-
-#ifdef CFSUBASFUN
-#define PROTOCCALLSFSUB0(UN,LN) \
- PROTOCCALLSFFUN0( VOID,UN,LN)
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
- PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)\
- PROTOCCALLSFFUN27(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
-#else
-/* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after
- #include-ing cfortran.h if calling the FORTRAN wrapper within the same
- source code where the wrapper is created. */
-#define PROTOCCALLSFSUB0(UN,LN) _(VOID,_cfPU)(CFC_(UN,LN))();
-#ifndef __CF__KnR
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) );
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
- _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT20(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) );
-#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)\
- _(VOID,_cfPU)(CFC_(UN,LN))( CFARGT27(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) );
-#else
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFSUB0(UN,LN)
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- PROTOCCALLSFSUB0(UN,LN)
-#define PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- PROTOCCALLSFSUB0(UN,LN)
-#endif
-#endif
-
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-
-#define CCALLSFSUB1( UN,LN,T1, A1) \
- CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
-#define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \
- CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
-#define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \
- CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
-#define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
- CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
-#define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
-#define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
-#define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
-#define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
-#define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
-#define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
-#define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
-#define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
-#define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
-
-#ifdef __cplusplus
-#define CPPPROTOCLSFSUB0( UN,LN)
-#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#define CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
-#else
-#define CPPPROTOCLSFSUB0(UN,LN) \
- PROTOCCALLSFSUB0(UN,LN)
-#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#define CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- PROTOCCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
-#endif
-
-#ifdef CFSUBASFUN
-#define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN)
-#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)
-#else
-/* do{...}while(0) allows if(a==b) FORT(); else BORT(); */
-#define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(0)
-#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
-do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
- VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \
- VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) \
- CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \
- ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \
- ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) \
- ACF(LN,TC,AC,12) ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) \
- CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) \
- WCF(TB,AB,11) WCF(TC,AC,12) WCF(TD,AD,13) WCF(TE,AE,14) }while(0)
-#endif
-
-
-#if MAX_PREPRO_ARGS>31
-#define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0)
-#define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0)
-#define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0)
-#define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0)
-#define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0)
-
-#ifdef CFSUBASFUN
-#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK)
-#else
-#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
-do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
- VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \
- VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) VVCF(TF,AF,B15) \
- VVCF(TG,AG,B16) VVCF(TH,AH,B17) VVCF(TI,AI,B18) VVCF(TJ,AJ,B19) VVCF(TK,AK,B20) \
- CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
- ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
- ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) ACF(LN,TC,AC,12) \
- ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) ACF(LN,TF,AF,15) ACF(LN,TG,AG,16) \
- ACF(LN,TH,AH,17) ACF(LN,TI,AI,18) ACF(LN,TJ,AJ,19) ACF(LN,TK,AK,20) \
- CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
- WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) WCF(TB,AB,11) WCF(TC,AC,12) \
- WCF(TD,AD,13) WCF(TE,AE,14) WCF(TF,AF,15) WCF(TG,AG,16) WCF(TH,AH,17) WCF(TI,AI,18) \
- WCF(TJ,AJ,19) WCF(TK,AK,20) }while(0)
-#endif
-#endif /* MAX_PREPRO_ARGS */
-
-#if MAX_PREPRO_ARGS>31
-#define CCALLSFSUB21(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL)\
- CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,0,0,0,0,0,0)
-#define CCALLSFSUB22(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM)\
- CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,0,0,0,0,0)
-#define CCALLSFSUB23(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN)\
- CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,0,0,0,0)
-#define CCALLSFSUB24(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO)\
- CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,0,0,0)
-#define CCALLSFSUB25(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP)\
- CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,0,0)
-#define CCALLSFSUB26(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ)\
- CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,0)
-
-#ifdef CFSUBASFUN
-#define CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \
- A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
- CCALLSFFUN27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \
- A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR)
-#else
-#define CCALLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR, \
- A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) \
-do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
- VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,B10) \
- VVCF(TB,AB,B11) VVCF(TC,AC,B12) VVCF(TD,AD,B13) VVCF(TE,AE,B14) VVCF(TF,AF,B15) \
- VVCF(TG,AG,B16) VVCF(TH,AH,B17) VVCF(TI,AI,B18) VVCF(TJ,AJ,B19) VVCF(TK,AK,B20) \
- VVCF(TL,AL,B21) VVCF(TM,AM,B22) VVCF(TN,AN,B23) VVCF(TO,AO,B24) VVCF(TP,AP,B25) \
- VVCF(TQ,AQ,B26) VVCF(TR,AR,B27) \
- CPPPROTOCLSFSUB27(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
- ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
- ACF(LN,T9,A9,9) ACF(LN,TA,AA,10) ACF(LN,TB,AB,11) ACF(LN,TC,AC,12) \
- ACF(LN,TD,AD,13) ACF(LN,TE,AE,14) ACF(LN,TF,AF,15) ACF(LN,TG,AG,16) \
- ACF(LN,TH,AH,17) ACF(LN,TI,AI,18) ACF(LN,TJ,AJ,19) ACF(LN,TK,AK,20) \
- ACF(LN,TL,AL,21) ACF(LN,TM,AM,22) ACF(LN,TN,AN,23) ACF(LN,TO,AO,24) \
- ACF(LN,TP,AP,25) ACF(LN,TQ,AQ,26) ACF(LN,TR,AR,27) \
- CFC_(UN,LN)( CFARGTA27(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR,\
- A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR) ); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
- WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,10) WCF(TB,AB,11) WCF(TC,AC,12) \
- WCF(TD,AD,13) WCF(TE,AE,14) WCF(TF,AF,15) WCF(TG,AG,16) WCF(TH,AH,17) WCF(TI,AI,18) \
- WCF(TJ,AJ,19) WCF(TK,AK,20) WCF(TL,AL,21) WCF(TM,AM,22) WCF(TN,AN,23) WCF(TO,AO,24) \
- WCF(TP,AP,25) WCF(TQ,AQ,26) WCF(TR,AR,27) }while(0)
-#endif
-#endif /* MAX_PREPRO_ARGS */
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */
-
-/*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN
- function is called. Therefore, especially for creator's of C header files
- for large FORTRAN libraries which include many functions, to reduce
- compile time and object code size, it may be desirable to create
- preprocessor directives to allow users to create code for only those
- functions which they use. */
-
-/* The following defines the maximum length string that a function can return.
- Of course it may be undefine-d and re-define-d before individual
- PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived
- from the individual machines' limits. */
-#define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE
-
-/* The following defines a character used by CFORTRAN.H to flag the end of a
- string coming out of a FORTRAN routine. */
-#define CFORTRAN_NON_CHAR 0x7F
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#define _SEP_(TN,C,cfCOMMA) _(__SEP_,C)(TN,cfCOMMA)
-#define __SEP_0(TN,cfCOMMA)
-#define __SEP_1(TN,cfCOMMA) _Icf(2,SEP,TN,cfCOMMA,0)
-#define INT_cfSEP(T,B) _(A,B)
-#define INTV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PINT_cfSEP(T,B) INT_cfSEP(T,B)
-#define PVOID_cfSEP(T,B) INT_cfSEP(T,B)
-#define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B)
-#define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B)
-#define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/
-#define STRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define STRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-
-#if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE)
-#ifdef OLD_VAXC
-#define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */
-#else
-#define INTEGER_BYTE signed char /* default */
-#endif
-#else
-#define INTEGER_BYTE unsigned char
-#endif
-#define BYTEVVVVVVV_cfTYPE INTEGER_BYTE
-#define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION
-#define FLOATVVVVVVV_cfTYPE FORTRAN_REAL
-#define INTVVVVVVV_cfTYPE int
-#define LOGICALVVVVVVV_cfTYPE int
-#define LONGVVVVVVV_cfTYPE long
-#define SHORTVVVVVVV_cfTYPE short
-#define PBYTE_cfTYPE INTEGER_BYTE
-#define PDOUBLE_cfTYPE DOUBLE_PRECISION
-#define PFLOAT_cfTYPE FORTRAN_REAL
-#define PINT_cfTYPE int
-#define PLOGICAL_cfTYPE int
-#define PLONG_cfTYPE long
-#define PSHORT_cfTYPE short
-
-#define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A)
-#define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V)
-#define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W)
-#define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X)
-#define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y)
-#define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z)
-
-#define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0)
-#define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z)
-#define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0)
-#define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0)
-#define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0)
-#define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0)
-#define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0)
-#define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0)
-#define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0)
-#define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-/*CRAY coughs on the first,
- i.e. the usual trouble of not being able to
- define macros to macros with arguments.
- New ultrix is worse, it coughs on all such uses.
- */
-/*#define SIMPLE_cfINT PVOID_cfINT*/
-#define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define CF_0_cfINT(N,A,B,X,Y,Z)
-
-
-#define UCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _Icf(2,U,TN,_(A,I),0)
-#define UUCF(TN,I,C) _SEP_(TN,C,cfCOMMA) _SEP_(TN,1,I)
-#define UUUCF(TN,I,C) _SEP_(TN,C,cfCOLON) _Icf(2,U,TN,_(A,I),0)
-#define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A
-#define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A
-#define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A
-#define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A
-#define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A
-#define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A
-#define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A
-#define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A
-#define PINT_cfU(T,A) _(T,_cfTYPE) * A
-#define PVOID_cfU(T,A) void *A
-#define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO)
-#define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */
-#define STRING_cfU(T,A) char *A /* via VOID and wrapper. */
-#define STRINGV_cfU(T,A) char *A
-#define PSTRING_cfU(T,A) char *A
-#define PSTRINGV_cfU(T,A) char *A
-#define ZTRINGV_cfU(T,A) char *A
-#define PZTRINGV_cfU(T,A) char *A
-
-/* VOID breaks U into U and UU. */
-#define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
-#define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */
-#define STRING_cfUU(T,A) char *A
-
-
-#define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A
-#define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A
-#else
-#define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
-#endif
-#define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A
-#define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A
-#define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A
-#define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A
-#define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A
-#define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A
-
-#define BYTE_cfE INTEGER_BYTE A0;
-#define DOUBLE_cfE DOUBLE_PRECISION A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfE FORTRAN_REAL A0;
-#else
-#define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0;
-#endif
-#define INT_cfE int A0;
-#define LOGICAL_cfE int A0;
-#define LONG_cfE long A0;
-#define SHORT_cfE short A0;
-#define VOID_cfE
-#ifdef vmsFortran
-#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- static fstring A0 = \
- {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\
- memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
- *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
-#else
-#ifdef CRAYFortran
-#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\
- memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
- A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING);
-#else
-/* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1];
- * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */
-#define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- memset(A0, CFORTRAN_NON_CHAR, \
- MAX_LEN_FORTRAN_FUNCTION_STRING); \
- *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
-#endif
-#endif
-/* ESTRING must use static char. array which is guaranteed to exist after
- function returns. */
-
-/* N.B.i) The diff. for 0 (Zero) and >=1 arguments.
- ii)That the following create an unmatched bracket, i.e. '(', which
- must of course be matched in the call.
- iii)Commas must be handled very carefully */
-#define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)(
-#define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)(
-#ifdef vmsFortran
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0
-#else
-#if defined(CRAYFortran) || defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0
-#else
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING
-#endif
-#endif
-
-#define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN)
-#define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN)
-#define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/
-
-#define BYTEVVVVVVV_cfPP
-#define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */
-#define DOUBLEVVVVVVV_cfPP
-#define LOGICALVVVVVVV_cfPP
-#define LONGVVVVVVV_cfPP
-#define SHORTVVVVVVV_cfPP
-#define PBYTE_cfPP
-#define PINT_cfPP
-#define PDOUBLE_cfPP
-#define PLOGICAL_cfPP
-#define PLONG_cfPP
-#define PSHORT_cfPP
-#define PFLOAT_cfPP FLOATVVVVVVV_cfPP
-
-#define BCF(TN,AN,C) _SEP_(TN,C,cfCOMMA) _Icf(2,B,TN,AN,0)
-#define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A
-#define INTV_cfB(T,A) A
-#define INTVV_cfB(T,A) (A)[0]
-#define INTVVV_cfB(T,A) (A)[0][0]
-#define INTVVVV_cfB(T,A) (A)[0][0][0]
-#define INTVVVVV_cfB(T,A) (A)[0][0][0][0]
-#define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0]
-#define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0]
-#define PINT_cfB(T,A) _(T,_cfPP)&A
-#define STRING_cfB(T,A) (char *) A
-#define STRINGV_cfB(T,A) (char *) A
-#define PSTRING_cfB(T,A) (char *) A
-#define PSTRINGV_cfB(T,A) (char *) A
-#define PVOID_cfB(T,A) (void *) A
-#define ROUTINE_cfB(T,A) (cfCAST_FUNCTION)A
-#define ZTRINGV_cfB(T,A) (char *) A
-#define PZTRINGV_cfB(T,A) (char *) A
-
-#define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0)
-#define DEFAULT_cfS(M,I,A)
-#define LOGICAL_cfS(M,I,A)
-#define PLOGICAL_cfS(M,I,A)
-#define STRING_cfS(M,I,A) ,sizeof(A)
-#define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \
- +secondindexlength(A))
-#define PSTRING_cfS(M,I,A) ,sizeof(A)
-#define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A)
-#define ZTRINGV_cfS(M,I,A)
-#define PZTRINGV_cfS(M,I,A)
-
-#define HCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA, H,_(C,I),0,0)
-#define HHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOMMA,HH,_(C,I),0,0)
-#define HHHCF(TN,I) _(TN,_cfSTR)(3,H,cfCOLON, H,_(C,I),0,0)
-#define H_CF_SPECIAL unsigned
-#define HH_CF_SPECIAL
-#define DEFAULT_cfH(M,I,A)
-#define LOGICAL_cfH(S,U,B)
-#define PLOGICAL_cfH(S,U,B)
-#define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B
-#define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define ZTRINGV_cfH(S,U,B)
-#define PZTRINGV_cfH(S,U,B)
-
-/* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */
-/* No spaces inside expansion. They screws up macro catenation kludge. */
-#define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E)
-#define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E)
-#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E)
-#define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E)
-#define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E)
-#define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E)
-#define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E)
-#define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E)
-#define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E)
-#define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E)
-#define CF_0_cfSTR(N,T,A,B,C,D,E)
-
-/* See ACF table comments, which explain why CCF was split into two. */
-#define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I))
-#define DEFAULT_cfC(M,I,A,B,C)
-#define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A);
-#define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A);
-#ifdef vmsFortran
-#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \
- C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \
- (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0'));
- /* PSTRING_cfC to beware of array A which does not contain any \0. */
-#define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \
- B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \
- memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1));
-#else
-#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A), \
- C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \
- (memset((A)+B.clen,' ',C-B.clen-1),A[B.flen=C-1]='\0'));
-#define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \
- (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1));
-#endif
- /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */
-#define STRINGV_cfC(M,I,A,B,C) \
- AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
-#define PSTRINGV_cfC(M,I,A,B,C) \
- APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
-#define ZTRINGV_cfC(M,I,A,B,C) \
- AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
-#define PZTRINGV_cfC(M,I,A,B,C) \
- APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
-
-#define BYTE_cfCCC(A,B) &A
-#define DOUBLE_cfCCC(A,B) &A
-#if !defined(__CF__KnR)
-#define FLOAT_cfCCC(A,B) &A
- /* Although the VAX doesn't, at least the */
-#else /* HP and K&R mips promote float arg.'s of */
-#define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */
-#endif /* use A here to pass the argument to FORTRAN. */
-#define INT_cfCCC(A,B) &A
-#define LOGICAL_cfCCC(A,B) &A
-#define LONG_cfCCC(A,B) &A
-#define SHORT_cfCCC(A,B) &A
-#define PBYTE_cfCCC(A,B) A
-#define PDOUBLE_cfCCC(A,B) A
-#define PFLOAT_cfCCC(A,B) A
-#define PINT_cfCCC(A,B) A
-#define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */
-#define PLONG_cfCCC(A,B) A
-#define PSHORT_cfCCC(A,B) A
-
-#define CCCF(TN,I,M) _SEP_(TN,M,cfCOMMA) _Icf(3,CC,TN,_(A,I),_(B,I))
-#define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
-#define INTV_cfCC(T,A,B) A
-#define INTVV_cfCC(T,A,B) A
-#define INTVVV_cfCC(T,A,B) A
-#define INTVVVV_cfCC(T,A,B) A
-#define INTVVVVV_cfCC(T,A,B) A
-#define INTVVVVVV_cfCC(T,A,B) A
-#define INTVVVVVVV_cfCC(T,A,B) A
-#define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
-#define PVOID_cfCC(T,A,B) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfCC(T,A,B) &A
-#else
-#define ROUTINE_cfCC(T,A,B) A
-#endif
-#define SIMPLE_cfCC(T,A,B) A
-#ifdef vmsFortran
-#define STRING_cfCC(T,A,B) &B.f
-#define STRINGV_cfCC(T,A,B) &B
-#define PSTRING_cfCC(T,A,B) &B
-#define PSTRINGV_cfCC(T,A,B) &B
-#else
-#ifdef CRAYFortran
-#define STRING_cfCC(T,A,B) _cptofcd(A,B.flen)
-#define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen)
-#define PSTRING_cfCC(T,A,B) _cptofcd(A,B)
-#define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen)
-#else
-#define STRING_cfCC(T,A,B) A
-#define STRINGV_cfCC(T,A,B) B.fs
-#define PSTRING_cfCC(T,A,B) A
-#define PSTRINGV_cfCC(T,A,B) B.fs
-#endif
-#endif
-#define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B)
-#define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B)
-
-#define BYTE_cfX return A0;
-#define DOUBLE_cfX return A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfX return A0;
-#else
-#define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0;
-#endif
-#define INT_cfX return A0;
-#define LOGICAL_cfX return F2CLOGICAL(A0);
-#define LONG_cfX return A0;
-#define SHORT_cfX return A0;
-#define VOID_cfX return ;
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define STRING_cfX return kill_trailing( \
- kill_trailing(AA0,CFORTRAN_NON_CHAR),' ');
-#else
-#define STRING_cfX return kill_trailing( \
- kill_trailing( A0,CFORTRAN_NON_CHAR),' ');
-#endif
-
-#define CFFUN(NAME) _(__cf__,NAME)
-
-/* Note that we don't use LN here, but we keep it for consistency. */
-#define CCALLSFFUN0(UN,LN) CFFUN(UN)()
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define CCALLSFFUN1( UN,LN,T1, A1) \
- CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
-#define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \
- CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
-#define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \
- CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
-#define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
- CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
-#define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
-#define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
-#define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
-#define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
-#define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
-#define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
-#define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
-#define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
-#define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
-
-#define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
-((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \
- BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \
- BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \
- SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \
- SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \
- SCF(T9,LN,9,A9) SCF(TA,LN,10,AA) SCF(TB,LN,11,AB) SCF(TC,LN,12,AC) \
- SCF(TD,LN,13,AD) SCF(TE,LN,14,AE))))
-
-/* N.B. Create a separate function instead of using (call function, function
-value here) because in order to create the variables needed for the input
-arg.'s which may be const.'s one has to do the creation within {}, but these
-can never be placed within ()'s. Therefore one must create wrapper functions.
-gcc, on the other hand may be able to avoid the wrapper functions. */
-
-/* Prototypes are needed to correctly handle the value returned correctly. N.B.
-Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN
-functions returning strings have extra arg.'s. Don't bother, since this only
-causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn
-for the same function in the same source code. Something done by the experts in
-debugging only.*/
-
-#define PROTOCCALLSFFUN0(F,UN,LN) \
-_(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \
-static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)}
-
-#define PROTOCCALLSFFUN1( T0,UN,LN,T1) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0)
-#define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0)
-#define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
-#define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
-#define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-/* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */
-
-#ifndef __CF__KnR
-#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
- CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
-{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
- CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
- CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \
- CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \
- CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \
- WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)}
-#else
-#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
- CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
- CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \
-{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
- CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
- CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,10) \
- CCF(LN,TB,11) CCF(LN,TC,12) CCF(LN,TD,13) CCF(LN,TE,14) _Icf(3,G,T0,UN,LN) \
- CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,A10,10) \
- WCF(TB,A11,11) WCF(TC,A12,12) WCF(TD,A13,13) WCF(TE,A14,14) _(T0,_cfX)}
-#endif
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR FORTRAN TO CALL C ROUTINES */
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define DCF(TN,I)
-#define DDCF(TN,I)
-#define DDDCF(TN,I)
-#else
-#define DCF(TN,I) HCF(TN,I)
-#define DDCF(TN,I) HHCF(TN,I)
-#define DDDCF(TN,I) HHHCF(TN,I)
-#endif
-
-#define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0)
-#define DEFAULT_cfQ(B)
-#define LOGICAL_cfQ(B)
-#define PLOGICAL_cfQ(B)
-#define STRINGV_cfQ(B) char *B; unsigned int _(B,N);
-#define STRING_cfQ(B) char *B=NULL;
-#define PSTRING_cfQ(B) char *B=NULL;
-#define PSTRINGV_cfQ(B) STRINGV_cfQ(B)
-#define PNSTRING_cfQ(B) char *B=NULL;
-#define PPSTRING_cfQ(B)
-
-#ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */
-#define ROUTINE_orig *(void**)&
-#else
-#define ROUTINE_orig (void *)
-#endif
-
-#define ROUTINE_1 ROUTINE_orig
-#define ROUTINE_2 ROUTINE_orig
-#define ROUTINE_3 ROUTINE_orig
-#define ROUTINE_4 ROUTINE_orig
-#define ROUTINE_5 ROUTINE_orig
-#define ROUTINE_6 ROUTINE_orig
-#define ROUTINE_7 ROUTINE_orig
-#define ROUTINE_8 ROUTINE_orig
-#define ROUTINE_9 ROUTINE_orig
-#define ROUTINE_10 ROUTINE_orig
-#define ROUTINE_11 ROUTINE_orig
-#define ROUTINE_12 ROUTINE_orig
-#define ROUTINE_13 ROUTINE_orig
-#define ROUTINE_14 ROUTINE_orig
-#define ROUTINE_15 ROUTINE_orig
-#define ROUTINE_16 ROUTINE_orig
-#define ROUTINE_17 ROUTINE_orig
-#define ROUTINE_18 ROUTINE_orig
-#define ROUTINE_19 ROUTINE_orig
-#define ROUTINE_20 ROUTINE_orig
-#define ROUTINE_21 ROUTINE_orig
-#define ROUTINE_22 ROUTINE_orig
-#define ROUTINE_23 ROUTINE_orig
-#define ROUTINE_24 ROUTINE_orig
-#define ROUTINE_25 ROUTINE_orig
-#define ROUTINE_26 ROUTINE_orig
-#define ROUTINE_27 ROUTINE_orig
-
-#define TCF(NAME,TN,I,M) _SEP_(TN,M,cfCOMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I))
-#define BYTE_cfT(M,I,A,B,D) *A
-#define DOUBLE_cfT(M,I,A,B,D) *A
-#define FLOAT_cfT(M,I,A,B,D) *A
-#define INT_cfT(M,I,A,B,D) *A
-#define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A)
-#define LONG_cfT(M,I,A,B,D) *A
-#define SHORT_cfT(M,I,A,B,D) *A
-#define BYTEV_cfT(M,I,A,B,D) A
-#define DOUBLEV_cfT(M,I,A,B,D) A
-#define FLOATV_cfT(M,I,A,B,D) VOIDP A
-#define INTV_cfT(M,I,A,B,D) A
-#define LOGICALV_cfT(M,I,A,B,D) A
-#define LONGV_cfT(M,I,A,B,D) A
-#define SHORTV_cfT(M,I,A,B,D) A
-#define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/
-#define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */
-#define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */
-#define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */
-#define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */
-#define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */
-#define DOUBLEVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define PBYTE_cfT(M,I,A,B,D) A
-#define PDOUBLE_cfT(M,I,A,B,D) A
-#define PFLOAT_cfT(M,I,A,B,D) VOIDP A
-#define PINT_cfT(M,I,A,B,D) A
-#define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
-#define PLONG_cfT(M,I,A,B,D) A
-#define PSHORT_cfT(M,I,A,B,D) A
-#define PVOID_cfT(M,I,A,B,D) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A)
-#else
-#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A
-#endif
-/* A == pointer to the characters
- D == length of the string, or of an element in an array of strings
- E == number of elements in an array of strings */
-#define TTSTR( A,B,D) \
- ((B=_cf_malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' '))
-#define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \
- memchr(A,'\0',D) ?A : TTSTR(A,B,D)
-#define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=_cf_malloc(_(B,N)*(D+1)), (void *) \
- vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' '))
-#ifdef vmsFortran
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
- A->dsc$w_length , A->dsc$l_m[0])
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer
-#else
-#ifdef CRAYFortran
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A))
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \
- num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I)))
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A))
-#define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A)
-#else
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D)
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I)))
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D)
-#define PPSTRING_cfT(M,I,A,B,D) A
-#endif
-#endif
-#define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D)
-#define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D)
-#define CF_0_cfT(M,I,A,B,D)
-
-#define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0)
-#define DEFAULT_cfR(A,B,D)
-#define LOGICAL_cfR(A,B,D)
-#define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
-#define STRING_cfR(A,B,D) if (B) _cf_free(B);
-#define STRINGV_cfR(A,B,D) _cf_free(B);
-/* A and D as defined above for TSTRING(V) */
-#define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \
- (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), _cf_free(B);
-#define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), _cf_free(B);
-#ifdef vmsFortran
-#define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length)
-#else
-#ifdef CRAYFortran
-#define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A))
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A))
-#else
-#define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D)
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D)
-#endif
-#endif
-#define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D)
-#define PPSTRING_cfR(A,B,D)
-
-#define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#ifndef __CF__KnR
-/* The void is req'd by the Apollo, to make this an ANSI function declaration.
- The Apollo promotes K&R float functions to double. */
-#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
-#ifdef vmsFortran
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
-#else
-#ifdef CRAYFortran
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS
-#else
-#if defined(AbsoftUNIXFortran) || defined(AbsoftProFortran)
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS
-#else
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0
-#endif
-#endif
-#endif
-#else
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#else
-#define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#endif
-#if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran)
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS
-#else
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0
-#endif
-#endif
-
-#define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN)
-#define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN)
-#ifndef __CF_KnR
-#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#else
-#define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN)
-#endif
-#define INT_cfF(UN,LN) INT_cfFZ(UN,LN)
-#define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN)
-#define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN)
-#define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN)
-#define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN)
-#define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN),
-
-#define INT_cfFF
-#define VOID_cfFF
-#ifdef vmsFortran
-#define STRING_cfFF fstring *AS;
-#else
-#ifdef CRAYFortran
-#define STRING_cfFF _fcd AS;
-#else
-#define STRING_cfFF char *AS; unsigned D0;
-#endif
-#endif
-
-#define INT_cfL A0=
-#define STRING_cfL A0=
-#define VOID_cfL
-
-#define INT_cfK
-#define VOID_cfK
-/* KSTRING copies the string into the position provided by the caller. */
-#ifdef vmsFortran
-#define STRING_cfK \
- memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\
- AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \
- memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \
- AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0;
-#else
-#ifdef CRAYFortran
-#define STRING_cfK \
- memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \
- _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \
- memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \
- _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0;
-#else
-#define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \
- D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \
- ' ', D0-(A0==NULL?0:strlen(A0))):0;
-#endif
-#endif
-
-/* Note that K.. and I.. can't be combined since K.. has to access data before
-R.., in order for functions returning strings which are also passed in as
-arguments to work correctly. Note that R.. frees and hence may corrupt the
-string. */
-#define BYTE_cfI return A0;
-#define DOUBLE_cfI return A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfI return A0;
-#else
-#define FLOAT_cfI RETURNFLOAT(A0);
-#endif
-#define INT_cfI return A0;
-#ifdef hpuxFortran800
-/* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */
-#define LOGICAL_cfI return ((A0)?1:0);
-#else
-#define LOGICAL_cfI return C2FLOGICAL(A0);
-#endif
-#define LONG_cfI return A0;
-#define SHORT_cfI return A0;
-#define STRING_cfI return ;
-#define VOID_cfI return ;
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN)
-#define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1)
-#define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2)
-#define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3)
-#define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \
- FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4)
-#define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \
- FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5)
-#define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \
- FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6)
-#define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7)
-#define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8)
-#define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9)
-#define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA)
-#define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB)
-#define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC)
-#define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD)
-#define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define FCALLSCSUB15(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
- FCALLSCFUN15(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF)
-#define FCALLSCSUB16(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
- FCALLSCFUN16(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG)
-#define FCALLSCSUB17(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
- FCALLSCFUN17(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH)
-#define FCALLSCSUB18(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
- FCALLSCFUN18(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI)
-#define FCALLSCSUB19(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
- FCALLSCFUN19(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ)
-#define FCALLSCSUB20(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- FCALLSCFUN20(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#define FCALLSCSUB21(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \
- FCALLSCFUN21(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL)
-#define FCALLSCSUB22(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \
- FCALLSCFUN22(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM)
-#define FCALLSCSUB23(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \
- FCALLSCFUN23(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN)
-#define FCALLSCSUB24(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \
- FCALLSCFUN24(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO)
-#define FCALLSCSUB25(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \
- FCALLSCFUN25(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP)
-#define FCALLSCSUB26(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \
- FCALLSCFUN26(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ)
-#define FCALLSCSUB27(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- FCALLSCFUN27(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)
-
-
-#define FCALLSCFUN1( T0,CN,UN,LN,T1) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0)
-#define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0)
-#define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0)
-#define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
-#define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
-#define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
-#define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-
-#define FCALLSCFUN15(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
- FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN16(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
- FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN17(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
- FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
-#define FCALLSCFUN18(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
- FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
-#define FCALLSCFUN19(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
- FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
-#define FCALLSCFUN20(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN21(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL) \
- FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN22(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM) \
- FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN23(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN) \
- FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN24(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO) \
- FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,CF_0,CF_0,CF_0)
-#define FCALLSCFUN25(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP) \
- FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,CF_0,CF_0)
-#define FCALLSCFUN26(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ) \
- FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,CF_0)
-
-
-#ifndef __CF__KnR
-#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
- TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) }
-
-#define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT27(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) ) \
- { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
- TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \
- TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \
- TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \
- CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI) }
-
-#else
-#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \
- CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
- TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)}
-
-#define FCALLSCFUN27(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT27(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR)) _Icf(0,FF,T0,0,0) \
- CFARGT27FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR); \
- { CFARGT27S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \
- TCF(LN,TD,13,1) TCF(LN,TE,14,1) TCF(LN,TF,15,1) TCF(LN,TG,16,1) TCF(LN,TH,17,1) \
- TCF(LN,TI,18,1) TCF(LN,TJ,19,1) TCF(LN,TK,20,1) TCF(LN,TL,21,1) TCF(LN,TM,22,1) \
- TCF(LN,TN,23,1) TCF(LN,TO,24,1) TCF(LN,TP,25,1) TCF(LN,TQ,26,1) TCF(LN,TR,27,1) ); _Icf(0,K,T0,0,0) \
- CFARGT27S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,TL,TM,TN,TO,TP,TQ,TR) _(T0,_cfI)}
-
-#endif
-
-
-#endif /* __CFORTRAN_LOADED */
diff --git a/include/cfortran.h.3.9 b/include/cfortran.h.3.9
deleted file mode 100644
index 0688224..0000000
--- a/include/cfortran.h.3.9
+++ /dev/null
@@ -1,2149 +0,0 @@
-/* cfortran.h 3.9 */ /* anonymous ftp@zebra.desy.de */
-/* Burkhard Burow burow@desy.de 1990 - 1997. */
-
-#ifndef __CFORTRAN_LOADED
-#define __CFORTRAN_LOADED
-
-/*
- THIS FILE IS PROPERTY OF BURKHARD BUROW. IF YOU ARE USING THIS FILE YOU
- SHOULD ALSO HAVE ACCESS TO CFORTRAN.DOC WHICH PROVIDES TERMS FOR USING,
- MODIFYING, COPYING AND DISTRIBUTING THE CFORTRAN.H PACKAGE.
-*/
-
-/*******
- Modifications:
- Oct 1997: Changed symbol name extname to appendus (PDW/HSTX)
- (Conflicted with a common variable name in FTOOLS)
- Nov 1997: If g77Fortran defined, also define f2cFortran (PDW/HSTX)
- Nov 1997: Define MIN(A,B) as _cfMIN(A,B)
- Feb 1998: Let VMS see the NUM_ELEMS code. Lets programs treat
- single strings as vectors with single elements
- *******/
-#define MIN(A,B) _cfMIN(A,B)
-
-/*
- Avoid symbols already used by compilers and system *.h:
- __ - OSF1 zukal06 V3.0 347 alpha, cc -c -std1 cfortest.c
-
- */
-
-
-/* First prepare for the C compiler. */
-
-#ifndef ANSI_C_preprocessor /* i.e. user can override. */
-#ifdef __CF__KnR
-#define ANSI_C_preprocessor 0
-#else
-#ifdef __STDC__
-#define ANSI_C_preprocessor 1
-#else
-#define _cfleft 1
-#define _cfright
-#define _cfleft_cfright 0
-#define ANSI_C_preprocessor _cfleft/**/_cfright
-#endif
-#endif
-#endif
-
-#if ANSI_C_preprocessor
-#define _0(A,B) A##B
-#define _(A,B) _0(A,B) /* see cat,xcat of K&R ANSI C p. 231 */
-#define _2(A,B) A##B /* K&R ANSI C p.230: .. identifier is not replaced */
-#define _3(A,B,C) _(A,_(B,C))
-#else /* if it turns up again during rescanning. */
-#define _(A,B) A/**/B
-#define _2(A,B) A/**/B
-#define _3(A,B,C) A/**/B/**/C
-#endif
-
-#if (defined(vax)&&defined(unix)) || (defined(__vax__)&&defined(__unix__))
-#define VAXUltrix
-#endif
-
-#include <stdio.h> /* NULL [in all machines stdio.h] */
-#include <string.h> /* strlen, memset, memcpy, memchr. */
-#if !( defined(VAXUltrix) || defined(sun) || (defined(apollo)&&!defined(__STDCPP__)) )
-#include <stdlib.h> /* malloc,free */
-#else
-#include <malloc.h> /* Had to be removed for DomainOS h105 10.4 sys5.3 425t*/
-#ifdef apollo
-#define __CF__APOLLO67 /* __STDCPP__ is in Apollo 6.8 (i.e. ANSI) and onwards */
-#endif
-#endif
-
-#if !defined(__GNUC__) && !defined(__sun) && (defined(sun)||defined(VAXUltrix)||defined(lynx))
-#define __CF__KnR /* Sun, LynxOS and VAX Ultrix cc only supports K&R. */
- /* Manually define __CF__KnR for HP if desired/required.*/
-#endif /* i.e. We will generate Kernighan and Ritchie C. */
-/* Note that you may define __CF__KnR before #include cfortran.h, in order to
-generate K&R C instead of the default ANSI C. The differences are mainly in the
-function prototypes and declarations. All machines, except the Apollo, work
-with either style. The Apollo's argument promotion rules require ANSI or use of
-the obsolete std_$call which we have not implemented here. Hence on the Apollo,
-only C calling FORTRAN subroutines will work using K&R style.*/
-
-
-/* Remainder of cfortran.h depends on the Fortran compiler. */
-
-#if defined(CLIPPERFortran) || defined(g77Fortran) /* 11/3/97 PDW */
-#define f2cFortran
-#endif
-
-/* VAX/VMS does not let us \-split long #if lines. */
-/* Split #if into 2 because some HP-UX can't handle long #if */
-#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
-#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
-/* If no Fortran compiler is given, we choose one for the machines we know. */
-#if defined(lynx) || defined(VAXUltrix)
-#define f2cFortran /* Lynx: Only support f2c at the moment.
- VAXUltrix: f77 behaves like f2c.
- Support f2c or f77 with gcc, vcc with f2c.
- f77 with vcc works, missing link magic for f77 I/O.*/
-#endif
-#if defined(WIN32) || defined(macintosh)
-#define f2cFortran
-#endif
-#if defined(__hpux) /* 921107: Use __hpux instead of __hp9000s300 */
-#define hpuxFortran /* Should also allow hp9000s7/800 use.*/
-#endif
-#if defined(apollo)
-#define apolloFortran /* __CF__APOLLO67 also defines some behavior. */
-#endif
-#if defined(sun) || defined(__sun)
-#define sunFortran
-#endif
-#if defined(_IBMR2)
-#define IBMR2Fortran
-#endif
-#if defined(_CRAY)
-#define CRAYFortran /* _CRAYT3E also defines some behavior. */
-#endif
-#if defined(_SX)
-#define SXFortran
-#endif
-#if defined(mips) || defined(__mips)
-#define mipsFortran
-#endif
-#if defined(vms) || defined(__vms)
-#define vmsFortran
-#endif
-#if defined(__alpha) && defined(__unix__)
-#define DECFortran
-#endif
-#if defined(__convex__)
-#define CONVEXFortran
-#endif
-#if defined(VISUAL_CPLUSPLUS)
-#define PowerStationFortran
-#endif
-#endif /* ...Fortran */
-#endif /* ...Fortran */
-
-/* Split #if into 2 because some HP-UX can't handle long #if */
-#if !(defined(NAGf90Fortran)||defined(f2cFortran)||defined(hpuxFortran)||defined(apolloFortran)||defined(sunFortran)||defined(IBMR2Fortran)||defined(CRAYFortran))
-#if !(defined(mipsFortran)||defined(DECFortran)||defined(vmsFortran)||defined(CONVEXFortran)||defined(PowerStationFortran)||defined(AbsoftUNIXFortran)||defined(SXFortran))
-/* If your compiler barfs on ' #error', replace # with the trigraph for # */
- #error "cfortran.h: Can't find your environment among:\
- - MIPS cc and f77 2.0. (e.g. Silicon Graphics, DECstations, ...) \
- - IBM AIX XL C and FORTRAN Compiler/6000 Version 01.01.0000.0000 \
- - VAX VMS CC 3.1 and FORTRAN 5.4. \
- - Alpha VMS DEC C 1.3 and DEC FORTRAN 6.0. \
- - Alpha OSF DEC C and DEC Fortran for OSF/1 AXP Version 1.2 \
- - Apollo DomainOS 10.2 (sys5.3) with f77 10.7 and cc 6.7. \
- - CRAY \
- - NEC SX-4 SUPER-UX \
- - CONVEX \
- - Sun \
- - PowerStation Fortran with Visual C++ \
- - HP9000s300/s700/s800 Latest test with: HP-UX A.08.07 A 9000/730 \
- - LynxOS: cc or gcc with f2c. \
- - VAXUltrix: vcc,cc or gcc with f2c. gcc or cc with f77. \
- - f77 with vcc works; but missing link magic for f77 I/O. \
- - NO fort. None of gcc, cc or vcc generate required names.\
- - f2c : Use #define f2cFortran, or cc -Df2cFortran \
- - NAG f90: Use #define NAGf90Fortran, or cc -DNAGf90Fortran \
- - g77 v0.5.18 for linux \
- - Absoft UNIX F77: Use #define AbsoftUNIXFortran or cc -DAbsoftUNIXFortran"
-/* Compiler must throw us out at this point! */
-#endif
-#endif
-
-
-#if defined(VAXC) && !defined(__VAXC)
-#define OLD_VAXC
-#pragma nostandard /* Prevent %CC-I-PARAMNOTUSED. */
-#endif
-
-/* Throughout cfortran.h we use: UN = Uppercase Name. LN = Lowercase Name. */
-
-#if defined(f2cFortran) || defined(NAGf90Fortran) || defined(DECFortran) || defined(mipsFortran) || defined(apolloFortran) || defined(sunFortran) || defined(CONVEXFortran) || defined(SXFortran) || defined(appendus) /* 10/31/97 PDW */
-#define CFC_(UN,LN) _(LN,_) /* Lowercase FORTRAN symbols. */
-#define orig_fcallsc(UN,LN) CFC_(UN,LN)
-#else
-#if defined(CRAYFortran) || defined(PowerStationFortran)
-#ifdef _CRAY /* (UN), not UN, circumvents CRAY preprocessor bug. */
-#define CFC_(UN,LN) (UN) /* Uppercase FORTRAN symbols. */
-#else /* At least VISUAL_CPLUSPLUS barfs on (UN), so need UN. */
-#define CFC_(UN,LN) UN /* Uppercase FORTRAN symbols. */
-#endif
-#define orig_fcallsc(UN,LN) CFC_(UN,LN) /* CRAY insists on arg.'s here. */
-#else /* For following machines one may wish to change the fcallsc default. */
-#define CF_SAME_NAMESPACE
-#ifdef vmsFortran
-#define CFC_(UN,LN) LN /* Either case FORTRAN symbols. */
- /* BUT we usually use UN for C macro to FORTRAN routines, so use LN here,*/
- /* because VAX/VMS doesn't do recursive macros. */
-#define orig_fcallsc(UN,LN) UN
-#else /* HP-UX without +ppu or IBMR2 without -qextname. NOT reccomended. */
-#define CFC_(UN,LN) LN /* Lowercase FORTRAN symbols. */
-#define orig_fcallsc(UN,LN) CFC_(UN,LN)
-#endif /* vmsFortran */
-#endif /* CRAYFortran PowerStationFortran */
-#endif /* ....Fortran */
-
-#define fcallsc(UN,LN) orig_fcallsc(UN,LN)
-#define preface_fcallsc(P,p,UN,LN) CFC_(_(P,UN),_(p,LN))
-#define append_fcallsc(P,p,UN,LN) CFC_(_(UN,P),_(LN,p))
-
-#define C_FUNCTION(UN,LN) fcallsc(UN,LN)
-#define FORTRAN_FUNCTION(UN,LN) CFC_(UN,LN)
-
-#ifndef COMMON_BLOCK
-#ifndef CONVEXFortran
-#ifndef CLIPPERFortran
-#ifndef AbsoftUNIXFortran
-#define COMMON_BLOCK(UN,LN) CFC_(UN,LN)
-#else
-#define COMMON_BLOCK(UN,LN) _(_C,LN)
-#endif
-#else
-#define COMMON_BLOCK(UN,LN) _(LN,__)
-#endif
-#else
-#define COMMON_BLOCK(UN,LN) _3(_,LN,_)
-#endif
-#endif
-
-#ifndef DOUBLE_PRECISION
-#if defined(CRAYFortran) && !defined(_CRAYT3E)
-#define DOUBLE_PRECISION long double
-#else
-#define DOUBLE_PRECISION double
-#endif
-#endif
-
-#ifndef FORTRAN_REAL
-#if defined(CRAYFortran) && defined(_CRAYT3E)
-#define FORTRAN_REAL double
-#else
-#define FORTRAN_REAL float
-#endif
-#endif
-
-#ifdef CRAYFortran
-#ifdef _CRAY
-#include <fortran.h>
-#else
-#include "fortran.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-#define FLOATVVVVVVV_cfPP (FORTRAN_REAL *) /* Used for C calls FORTRAN. */
-/* CRAY's double==float but CRAY says pointers to doubles and floats are diff.*/
-#define VOIDP (void *) /* When FORTRAN calls C, we don't know if C routine
- arg.'s have been declared float *, or double *. */
-#else
-#define FLOATVVVVVVV_cfPP
-#define VOIDP
-#endif
-
-#ifdef vmsFortran
-#if defined(vms) || defined(__vms)
-#include <descrip.h>
-#else
-#include "descrip.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-#endif
-
-#ifdef sunFortran
-#if defined(sun) || defined(__sun)
-#include <math.h> /* Sun's FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT. */
-#else
-#include "math.h" /* i.e. if crosscompiling assume user has file. */
-#endif
-/* At least starting with the default C compiler SC3.0.1 of SunOS 5.3,
- * FLOATFUNCTIONTYPE, ASSIGNFLOAT, RETURNFLOAT are not required and not in
- * <math.h>, since sun C no longer promotes C float return values to doubles.
- * Therefore, only use them if defined.
- * Even if gcc is being used, assume that it exhibits the Sun C compiler
- * behavior in order to be able to use *.o from the Sun C compiler.
- * i.e. If FLOATFUNCTIONTYPE, etc. are in math.h, they required by gcc.
- */
-#endif
-
-#ifndef apolloFortran
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) extern DEFINITION NAME
-#define CF_NULL_PROTO
-#else /* HP doesn't understand #elif. */
-/* Without ANSI prototyping, Apollo promotes float functions to double. */
-/* Note that VAX/VMS, IBM, Mips choke on 'type function(...);' prototypes. */
-#define CF_NULL_PROTO ...
-#ifndef __CF__APOLLO67
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
- DEFINITION NAME __attribute((__section(NAME)))
-#else
-#define COMMON_BLOCK_DEF(DEFINITION, NAME) \
- DEFINITION NAME #attribute[section(NAME)]
-#endif
-#endif
-
-#ifdef __cplusplus
-#undef CF_NULL_PROTO
-#define CF_NULL_PROTO ...
-#endif
-
-#ifdef mipsFortran
-#define CF_DECLARE_GETARG int f77argc; char **f77argv
-#define CF_SET_GETARG(ARGC,ARGV) f77argc = ARGC; f77argv = ARGV
-#else
-#define CF_DECLARE_GETARG
-#define CF_SET_GETARG(ARGC,ARGV)
-#endif
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define ACOMMA ,
-#define ACOLON ;
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES USED WITHIN CFORTRAN.H */
-
-#define _cfMIN(A,B) (A<B?A:B)
-#ifndef FALSE
-#define FALSE (1==0)
-#endif
-
-/* 970211 - XIX.145:
- firstindexlength - better name is all_but_last_index_lengths
- secondindexlength - better name is last_index_length
- */
-#define firstindexlength(A) (sizeof(A[0])==1 ? 1 : (sizeof(A) / sizeof(A[0])) )
-#define secondindexlength(A) (sizeof(A[0])==1 ? sizeof(A) : sizeof(A[0]) )
-
-/* Behavior of FORTRAN LOGICAL. All machines' LOGICAL is same size as C's int.
-Conversion is automatic except for arrays which require F2CLOGICALV/C2FLOGICALV.
-f2c, MIPS f77 [DECstation, SGI], VAX Ultrix f77,
-HP-UX f77 : as in C.
-VAX/VMS FORTRAN, VAX Ultrix fort,
-Absoft Unix Fortran, IBM RS/6000 xlf : LS Bit = 0/1 = TRUE/FALSE.
-Apollo : neg. = TRUE, else FALSE.
-[Apollo accepts -1 as TRUE for function values, but NOT all other neg. values.]
-[DECFortran for Ultrix RISC is also called f77 but is the same as VAX/VMS.]
-[MIPS f77 treats .eqv./.neqv. as .eq./.ne. and hence requires LOGICAL_STRICT.]*/
-
-#if defined(NAGf90Fortran) || defined(f2cFortran) || defined(mipsFortran) || defined(PowerStationFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran) || defined(SXFortran)
-/* SX/PowerStationFortran have 0 and 1 defined, others are neither T nor F. */
-/* hpuxFortran800 has 0 and 0x01000000 defined. Others are unknown. */
-#define LOGICAL_STRICT /* Other Fortran have .eqv./.neqv. == .eq./.ne. */
-#endif
-
-#define C2FLOGICALV(A,I) \
- do {int __i; for(__i=0;__i<I;__i++) A[__i]=C2FLOGICAL(A[__i]); } while (FALSE)
-#define F2CLOGICALV(A,I) \
- do {int __i; for(__i=0;__i<I;__i++) A[__i]=F2CLOGICAL(A[__i]); } while (FALSE)
-
-#if defined(apolloFortran)
-#define C2FLOGICAL(L) ((L)?-1:(L)&~((unsigned)1<<sizeof(int)*8-1))
-#define F2CLOGICAL(L) ((L)<0?(L):0)
-#else
-#if defined(CRAYFortran)
-#define C2FLOGICAL(L) _btol(L)
-#define F2CLOGICAL(L) _ltob(&(L)) /* Strangely _ltob() expects a pointer. */
-#else
-#if defined(IBMR2Fortran) || defined(vmsFortran) || defined(DECFortran) || defined(AbsoftUNIXFortran)
-#define C2FLOGICAL(L) ((L)?(L)|1:(L)&~(int)1)
-#define F2CLOGICAL(L) ((L)&1?(L):0)
-#else
-#if defined(CONVEXFortran)
-#define C2FLOGICAL(L) ((L) ? ~0 : 0 )
-#define F2CLOGICAL(L) (L)
-#else /* others evaluate LOGICALs as for C. */
-#define C2FLOGICAL(L) (L)
-#define F2CLOGICAL(L) (L)
-#ifndef LOGICAL_STRICT
-#undef C2FLOGICALV
-#undef F2CLOGICALV
-#define C2FLOGICALV(A,I)
-#define F2CLOGICALV(A,I)
-#endif /* LOGICAL_STRICT */
-#endif /* CONVEXFortran || All Others */
-#endif /* IBMR2Fortran vmsFortran DECFortran AbsoftUNIXFortran */
-#endif /* CRAYFortran */
-#endif /* apolloFortran */
-
-/* 970514 - In addition to CRAY, there may be other machines
- for which LOGICAL_STRICT makes no sense. */
-#if defined(LOGICAL_STRICT) && !defined(CRAYFortran)
-/* Force C2FLOGICAL to generate only the values for either .TRUE. or .FALSE.
- SX/PowerStationFortran only have 0 and 1 defined.
- Elsewhere, only needed if you want to do:
- logical lvariable
- if (lvariable .eq. .true.) then ! (1)
- instead of
- if (lvariable .eqv. .true.) then ! (2)
- - (1) may not even be FORTRAN/77 and that Apollo's f77 and IBM's xlf
- refuse to compile (1), so you are probably well advised to stay away from
- (1) and from LOGICAL_STRICT.
- - You pay a (slight) performance penalty for using LOGICAL_STRICT. */
-#undef C2FLOGICAL
-#ifdef hpuxFortran800
-#define C2FLOGICAL(L) ((L)?0x01000000:0)
-#else
-#if defined(apolloFortran) || defined(vmsFortran) || defined(DECFortran)
-#define C2FLOGICAL(L) ((L)?-1:0) /* These machines use -1/0 for .true./.false.*/
-#else
-#define C2FLOGICAL(L) ((L)? 1:0) /* All others use +1/0 for .true./.false.*/
-#endif
-#endif
-#endif /* LOGICAL_STRICT */
-
-/* Convert a vector of C strings into FORTRAN strings. */
-#ifndef __CF__KnR
-static char *c2fstrv(char* cstr, char *fstr, int elem_len, int sizeofcstr)
-#else
-static char *c2fstrv( cstr, fstr, elem_len, sizeofcstr)
- char* cstr; char *fstr; int elem_len; int sizeofcstr;
-#endif
-{ int i,j;
-/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
- Useful size of string must be the same in both languages. */
-for (i=0; i<sizeofcstr/elem_len; i++) {
- for (j=1; j<elem_len && *cstr; j++) *fstr++ = *cstr++;
- cstr += 1+elem_len-j;
- for (; j<elem_len; j++) *fstr++ = ' ';
-} /* 95109 - Seems to be returning the original fstr. */
-return fstr-sizeofcstr+sizeofcstr/elem_len; }
-
-/* Convert a vector of FORTRAN strings into C strings. */
-#ifndef __CF__KnR
-static char *f2cstrv(char *fstr, char* cstr, int elem_len, int sizeofcstr)
-#else
-static char *f2cstrv( fstr, cstr, elem_len, sizeofcstr)
- char *fstr; char* cstr; int elem_len; int sizeofcstr;
-#endif
-{ int i,j;
-/* elem_len includes \0 for C strings. Fortran strings don't have term. \0.
- Useful size of string must be the same in both languages. */
-cstr += sizeofcstr;
-fstr += sizeofcstr - sizeofcstr/elem_len;
-for (i=0; i<sizeofcstr/elem_len; i++) {
- *--cstr = '\0';
- for (j=1; j<elem_len; j++) *--cstr = *--fstr;
-} return cstr; }
-
-/* kill the trailing char t's in string s. */
-#ifndef __CF__KnR
-static char *kill_trailing(char *s, char t)
-#else
-static char *kill_trailing( s, t) char *s; char t;
-#endif
-{char *e;
-e = s + strlen(s);
-if (e>s) { /* Need this to handle NULL string.*/
- while (e>s && *--e==t); /* Don't follow t's past beginning. */
- e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
-} return s; }
-
-/* kill_trailingn(s,t,e) will kill the trailing t's in string s. e normally
-points to the terminating '\0' of s, but may actually point to anywhere in s.
-s's new '\0' will be placed at e or earlier in order to remove any trailing t's.
-If e<s string s is left unchanged. */
-#ifndef __CF__KnR
-static char *kill_trailingn(char *s, char t, char *e)
-#else
-static char *kill_trailingn( s, t, e) char *s; char t; char *e;
-#endif
-{
-if (e==s) *e = '\0'; /* Kill the string makes sense here.*/
-else if (e>s) { /* Watch out for neg. length string.*/
- while (e>s && *--e==t); /* Don't follow t's past beginning. */
- e[*e==t?0:1] = '\0'; /* Handle s[0]=t correctly. */
-} return s; }
-
-/* Note the following assumes that any element which has t's to be chopped off,
-does indeed fill the entire element. */
-#ifndef __CF__KnR
-static char *vkill_trailing(char* cstr, int elem_len, int sizeofcstr, char t)
-#else
-static char *vkill_trailing( cstr, elem_len, sizeofcstr, t)
- char* cstr; int elem_len; int sizeofcstr; char t;
-#endif
-{ int i;
-for (i=0; i<sizeofcstr/elem_len; i++) /* elem_len includes \0 for C strings. */
- kill_trailingn(cstr+elem_len*i,t,cstr+elem_len*(i+1)-1);
-return cstr; }
-
-#ifdef vmsFortran
-typedef struct dsc$descriptor_s fstring;
-#define DSC$DESCRIPTOR_A(DIMCT) \
-struct { \
- unsigned short dsc$w_length; unsigned char dsc$b_dtype; \
- unsigned char dsc$b_class; char *dsc$a_pointer; \
- char dsc$b_scale; unsigned char dsc$b_digits; \
- struct { \
- unsigned : 3; unsigned dsc$v_fl_binscale : 1; \
- unsigned dsc$v_fl_redim : 1; unsigned dsc$v_fl_column : 1; \
- unsigned dsc$v_fl_coeff : 1; unsigned dsc$v_fl_bounds : 1; \
- } dsc$b_aflags; \
- unsigned char dsc$b_dimct; unsigned long dsc$l_arsize; \
- char *dsc$a_a0; long dsc$l_m [DIMCT]; \
- struct { \
- long dsc$l_l; long dsc$l_u; \
- } dsc$bounds [DIMCT]; \
-}
-
-typedef DSC$DESCRIPTOR_A(1) fstringvector;
-/*typedef DSC$DESCRIPTOR_A(2) fstringarrarr;
- typedef DSC$DESCRIPTOR_A(3) fstringarrarrarr;*/
-#define initfstr(F,C,ELEMNO,ELEMLEN) \
-( (F).dsc$l_arsize= ( (F).dsc$w_length =(ELEMLEN) ) \
- *( (F).dsc$l_m[0]=(F).dsc$bounds[0].dsc$l_u=(ELEMNO) ), \
- (F).dsc$a_a0 = ( (F).dsc$a_pointer=(C) ) - (F).dsc$w_length ,(F))
-
-#endif /* PDW: 2/10/98 -- Let VMS see NUM_ELEMS definitions */
-#define _NUM_ELEMS -1
-#define _NUM_ELEM_ARG -2
-#define NUM_ELEMS(A) A,_NUM_ELEMS
-#define NUM_ELEM_ARG(B) *_2(A,B),_NUM_ELEM_ARG
-#define TERM_CHARS(A,B) A,B
-#ifndef __CF__KnR
-static int num_elem(char *strv, unsigned elem_len, int term_char, int num_term)
-#else
-static int num_elem( strv, elem_len, term_char, num_term)
- char *strv; unsigned elem_len; int term_char; int num_term;
-#endif
-/* elem_len is the number of characters in each element of strv, the FORTRAN
-vector of strings. The last element of the vector must begin with at least
-num_term term_char characters, so that this routine can determine how
-many elements are in the vector. */
-{
-unsigned num,i;
-if (num_term == _NUM_ELEMS || num_term == _NUM_ELEM_ARG)
- return term_char;
-if (num_term <=0) num_term = (int)elem_len;
-for (num=0; ; num++) {
- for (i=0; i<(unsigned)num_term && *strv==term_char; i++,strv++);
- if (i==(unsigned)num_term) break;
- else strv += elem_len-i;
-}
-return (int)num;
-}
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO USE STRINGS IN FORTRAN COMMON BLOCKS */
-
-/* C string TO Fortran Common Block STRing. */
-/* DIM is the number of DIMensions of the array in terms of strings, not
- characters. e.g. char a[12] has DIM = 0, char a[12][4] has DIM = 1, etc. */
-#define C2FCBSTR(CSTR,FSTR,DIM) \
- c2fstrv((char *)CSTR, (char *)FSTR, sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM))
-
-/* Fortran Common Block string TO C STRing. */
-#define FCB2CSTR(FSTR,CSTR,DIM) \
- vkill_trailing(f2cstrv((char *)FSTR, (char *)CSTR, \
- sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM)), \
- sizeof(FSTR)/cfelementsof(FSTR,DIM)+1, \
- sizeof(FSTR)+cfelementsof(FSTR,DIM), ' ')
-
-#define cfDEREFERENCE0
-#define cfDEREFERENCE1 *
-#define cfDEREFERENCE2 **
-#define cfDEREFERENCE3 ***
-#define cfDEREFERENCE4 ****
-#define cfDEREFERENCE5 *****
-#define cfelementsof(A,D) (sizeof(A)/sizeof(_(cfDEREFERENCE,D)(A)))
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO CALL FORTRAN SUBROUTINES */
-
-/* Define lookup tables for how to handle the various types of variables. */
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#define ZTRINGV_NUM(I) I
-#define ZTRINGV_ARGFP(I) (*(_2(A,I))) /* Undocumented. For PINT, etc. */
-#define ZTRINGV_ARGF(I) _2(A,I)
-#ifdef CFSUBASFUN
-#define ZTRINGV_ARGS(I) ZTRINGV_ARGF(I)
-#else
-#define ZTRINGV_ARGS(I) _2(B,I)
-#endif
-
-#define PBYTE_cfVP(A,B) PINT_cfVP(A,B)
-#define PDOUBLE_cfVP(A,B)
-#define PFLOAT_cfVP(A,B)
-#ifdef ZTRINGV_ARGS_allows_Pvariables
-/* This allows Pvariables for ARGS. ARGF machinery is above ARGFP.
- * B is not needed because the variable may be changed by the Fortran routine,
- * but because B is the only way to access an arbitrary macro argument. */
-#define PINT_cfVP(A,B) int B = (int)A; /* For ZSTRINGV_ARGS */
-#else
-#define PINT_cfVP(A,B)
-#endif
-#define PLOGICAL_cfVP(A,B) int *B; /* Returning LOGICAL in FUNn and SUBn */
-#define PLONG_cfVP(A,B) PINT_cfVP(A,B)
-#define PSHORT_cfVP(A,B) PINT_cfVP(A,B)
-
-#define VCF_INT_S(T,A,B) _(T,VVVVVVV_cfTYPE) B = A;
-#define VCF_INT_F(T,A,B) _(T,_cfVCF)(A,B)
-/* _cfVCF table is directly mapped to _cfCCC table. */
-#define BYTE_cfVCF(A,B)
-#define DOUBLE_cfVCF(A,B)
-#if !defined(__CF__KnR)
-#define FLOAT_cfVCF(A,B)
-#else
-#define FLOAT_cfVCF(A,B) FORTRAN_REAL B = A;
-#endif
-#define INT_cfVCF(A,B)
-#define LOGICAL_cfVCF(A,B)
-#define LONG_cfVCF(A,B)
-#define SHORT_cfVCF(A,B)
-
-#define VCF(TN,I) _Icf4(4,V,TN,_(A,I),_(B,I),F)
-#define VVCF(TN,AI,BI) _Icf4(4,V,TN,AI,BI,S)
-#define INT_cfV(T,A,B,F) _(VCF_INT_,F)(T,A,B)
-#define INTV_cfV(T,A,B,F)
-#define INTVV_cfV(T,A,B,F)
-#define INTVVV_cfV(T,A,B,F)
-#define INTVVVV_cfV(T,A,B,F)
-#define INTVVVVV_cfV(T,A,B,F)
-#define INTVVVVVV_cfV(T,A,B,F)
-#define INTVVVVVVV_cfV(T,A,B,F)
-#define PINT_cfV( T,A,B,F) _(T,_cfVP)(A,B)
-#define PVOID_cfV( T,A,B,F)
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfV(T,A,B,F) void (*B)(CF_NULL_PROTO) = (void (*)(CF_NULL_PROTO))A;
-#else
-#define ROUTINE_cfV(T,A,B,F)
-#endif
-#define SIMPLE_cfV(T,A,B,F)
-#ifdef vmsFortran
-#define STRING_cfV(T,A,B,F) static struct {fstring f; unsigned clen;} B = \
- {{0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL},0};
-#define PSTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
-#define STRINGV_cfV(T,A,B,F) static fstringvector B = \
- {sizeof(A),DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
-#define PSTRINGV_cfV(T,A,B,F) static fstringvector B = \
- {0,DSC$K_DTYPE_T,DSC$K_CLASS_A,NULL,0,0,{0,0,1,1,1},1,0,NULL,0,{1,0}};
-#else
-#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
-#define STRINGV_cfV(T,A,B,F) struct {char *s, *fs; unsigned flen;} B;
-#define PSTRING_cfV(T,A,B,F) int B;
-#define PSTRINGV_cfV(T,A,B,F) struct{char *fs; unsigned int sizeofA,flen;}B;
-#endif
-#define ZTRINGV_cfV(T,A,B,F) STRINGV_cfV(T,A,B,F)
-#define PZTRINGV_cfV(T,A,B,F) PSTRINGV_cfV(T,A,B,F)
-
-/* Note that the actions of the A table were performed inside the AA table.
- VAX Ultrix vcc, and HP-UX cc, didn't evaluate arguments to functions left to
- right, so we had to split the original table into the current robust two. */
-#define ACF(NAME,TN,AI,I) _(TN,_cfSTR)(4,A,NAME,I,AI,_(B,I),0)
-#define DEFAULT_cfA(M,I,A,B)
-#define LOGICAL_cfA(M,I,A,B) B=C2FLOGICAL(B);
-#define PLOGICAL_cfA(M,I,A,B) A=C2FLOGICAL(A);
-#define STRING_cfA(M,I,A,B) STRING_cfC(M,I,A,B,sizeof(A))
-#define PSTRING_cfA(M,I,A,B) PSTRING_cfC(M,I,A,B,sizeof(A))
-#ifdef vmsFortran
-#define AATRINGV_cfA( A,B, sA,filA,silA) \
- initfstr(B,(char *)malloc((sA)-(filA)),(filA),(silA)-1), \
- c2fstrv(A,B.dsc$a_pointer,(silA),(sA));
-#define APATRINGV_cfA( A,B, sA,filA,silA) \
- initfstr(B,A,(filA),(silA)-1),c2fstrv(A,A,(silA),(sA));
-#else
-#define AATRINGV_cfA( A,B, sA,filA,silA) \
- (B.s=(char *)malloc((sA)-(filA)),B.fs=c2fstrv(A,B.s,(B.flen=(silA)-1)+1,(sA)));
-#define APATRINGV_cfA( A,B, sA,filA,silA) \
- B.fs=c2fstrv(A,A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
-#endif
-#define STRINGV_cfA(M,I,A,B) \
- AATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
-#define PSTRINGV_cfA(M,I,A,B) \
- APATRINGV_cfA((char *)A,B,sizeof(A),firstindexlength(A),secondindexlength(A))
-#define ZTRINGV_cfA(M,I,A,B) AATRINGV_cfA( (char *)A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-#define PZTRINGV_cfA(M,I,A,B) APATRINGV_cfA( (char *)A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-
-#define PBYTE_cfAAP(A,B) &A
-#define PDOUBLE_cfAAP(A,B) &A
-#define PFLOAT_cfAAP(A,B) FLOATVVVVVVV_cfPP &A
-#define PINT_cfAAP(A,B) &A
-#define PLOGICAL_cfAAP(A,B) B= &A /* B used to keep a common W table. */
-#define PLONG_cfAAP(A,B) &A
-#define PSHORT_cfAAP(A,B) &A
-
-#define AACF(TN,AI,I,C) _SEP_(TN,C,COMMA) _Icf(3,AA,TN,AI,_(B,I))
-#define INT_cfAA(T,A,B) &B
-#define INTV_cfAA(T,A,B) _(T,VVVVVV_cfPP) A
-#define INTVV_cfAA(T,A,B) _(T,VVVVV_cfPP) A[0]
-#define INTVVV_cfAA(T,A,B) _(T,VVVV_cfPP) A[0][0]
-#define INTVVVV_cfAA(T,A,B) _(T,VVV_cfPP) A[0][0][0]
-#define INTVVVVV_cfAA(T,A,B) _(T,VV_cfPP) A[0][0][0][0]
-#define INTVVVVVV_cfAA(T,A,B) _(T,V_cfPP) A[0][0][0][0][0]
-#define INTVVVVVVV_cfAA(T,A,B) _(T,_cfPP) A[0][0][0][0][0][0]
-#define PINT_cfAA(T,A,B) _(T,_cfAAP)(A,B)
-#define PVOID_cfAA(T,A,B) (void *) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfAA(T,A,B) &B
-#else
-#define ROUTINE_cfAA(T,A,B) (void(*)(CF_NULL_PROTO))A
-#endif
-#define STRING_cfAA(T,A,B) STRING_cfCC(T,A,B)
-#define PSTRING_cfAA(T,A,B) PSTRING_cfCC(T,A,B)
-#ifdef vmsFortran
-#define STRINGV_cfAA(T,A,B) &B
-#else
-#ifdef CRAYFortran
-#define STRINGV_cfAA(T,A,B) _cptofcd(B.fs,B.flen)
-#else
-#define STRINGV_cfAA(T,A,B) B.fs
-#endif
-#endif
-#define PSTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-#define ZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-#define PZTRINGV_cfAA(T,A,B) STRINGV_cfAA(T,A,B)
-
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define JCF(TN,I)
-#define KCF(TN,I)
-#else
-#define JCF(TN,I) _(TN,_cfSTR)(1,J,_(B,I), 0,0,0,0)
-#if defined(AbsoftUNIXFortran)
-#define DEFAULT_cfJ(B) ,0
-#else
-#define DEFAULT_cfJ(B)
-#endif
-#define LOGICAL_cfJ(B) DEFAULT_cfJ(B)
-#define PLOGICAL_cfJ(B) DEFAULT_cfJ(B)
-#define STRING_cfJ(B) ,B.flen
-#define PSTRING_cfJ(B) ,B
-#define STRINGV_cfJ(B) STRING_cfJ(B)
-#define PSTRINGV_cfJ(B) STRING_cfJ(B)
-#define ZTRINGV_cfJ(B) STRING_cfJ(B)
-#define PZTRINGV_cfJ(B) STRING_cfJ(B)
-
-/* KCF is identical to DCF, except that KCF ZTRING is not empty. */
-#define KCF(TN,I) _(TN,_cfSTR)(1,KK,_(B,I), 0,0,0,0)
-#if defined(AbsoftUNIXFortran)
-#define DEFAULT_cfKK(B) , unsigned B
-#else
-#define DEFAULT_cfKK(B)
-#endif
-#define LOGICAL_cfKK(B) DEFAULT_cfKK(B)
-#define PLOGICAL_cfKK(B) DEFAULT_cfKK(B)
-#define STRING_cfKK(B) , unsigned B
-#define PSTRING_cfKK(B) STRING_cfKK(B)
-#define STRINGV_cfKK(B) STRING_cfKK(B)
-#define PSTRINGV_cfKK(B) STRING_cfKK(B)
-#define ZTRINGV_cfKK(B) STRING_cfKK(B)
-#define PZTRINGV_cfKK(B) STRING_cfKK(B)
-#endif
-
-#define WCF(TN,AN,I) _(TN,_cfSTR)(2,W,AN,_(B,I), 0,0,0)
-#define DEFAULT_cfW(A,B)
-#define LOGICAL_cfW(A,B)
-#define PLOGICAL_cfW(A,B) *B=F2CLOGICAL(*B);
-#define STRING_cfW(A,B) (A[B.clen]!='\0'?A[B.clen]='\0':0); /* A?="constnt"*/
-#define PSTRING_cfW(A,B) kill_trailing(A,' ');
-#ifdef vmsFortran
-#define STRINGV_cfW(A,B) free(B.dsc$a_pointer);
-#define PSTRINGV_cfW(A,B) \
- vkill_trailing(f2cstrv((char*)A, (char*)A, \
- B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0]), \
- B.dsc$w_length+1, B.dsc$l_arsize+B.dsc$l_m[0], ' ');
-#else
-#define STRINGV_cfW(A,B) free(B.s);
-#define PSTRINGV_cfW(A,B) vkill_trailing( \
- f2cstrv((char*)A,(char*)A,B.flen+1,B.sizeofA), B.flen+1,B.sizeofA,' ');
-#endif
-#define ZTRINGV_cfW(A,B) STRINGV_cfW(A,B)
-#define PZTRINGV_cfW(A,B) PSTRINGV_cfW(A,B)
-
-#define NCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,N,TN,_(A,I),0)
-#define NNCF(TN,I,C) UUCF(TN,I,C)
-#define NNNCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,N,TN,_(A,I),0)
-#define INT_cfN(T,A) _(T,VVVVVVV_cfTYPE) * A
-#define INTV_cfN(T,A) _(T,VVVVVV_cfTYPE) * A
-#define INTVV_cfN(T,A) _(T,VVVVV_cfTYPE) * A
-#define INTVVV_cfN(T,A) _(T,VVVV_cfTYPE) * A
-#define INTVVVV_cfN(T,A) _(T,VVV_cfTYPE) * A
-#define INTVVVVV_cfN(T,A) _(T,VV_cfTYPE) * A
-#define INTVVVVVV_cfN(T,A) _(T,V_cfTYPE) * A
-#define INTVVVVVVV_cfN(T,A) _(T,_cfTYPE) * A
-#define PINT_cfN(T,A) _(T,_cfTYPE) * A
-#define PVOID_cfN(T,A) void * A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfN(T,A) void (**A)(CF_NULL_PROTO)
-#else
-#define ROUTINE_cfN(T,A) void ( *A)(CF_NULL_PROTO)
-#endif
-#ifdef vmsFortran
-#define STRING_cfN(T,A) fstring * A
-#define STRINGV_cfN(T,A) fstringvector * A
-#else
-#ifdef CRAYFortran
-#define STRING_cfN(T,A) _fcd A
-#define STRINGV_cfN(T,A) _fcd A
-#else
-#define STRING_cfN(T,A) char * A
-#define STRINGV_cfN(T,A) char * A
-#endif
-#endif
-#define PSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PNSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PPSTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PSTRINGV_cfN(T,A) STRINGV_cfN(T,A)
-#define ZTRINGV_cfN(T,A) STRINGV_cfN(T,A)
-#define PZTRINGV_cfN(T,A) PSTRINGV_cfN(T,A)
-
-
-/* Apollo 6.7, CRAY, old Sun, VAX/Ultrix vcc/cc and new ultrix
- can't hack more than 31 arg's.
- e.g. ultrix >= 4.3 gives message:
- zow35> cc -c -DDECFortran cfortest.c
- cfe: Fatal: Out of memory: cfortest.c
- zow35>
- Old __hpux had the problem, but new 'HP-UX A.09.03 A 9000/735' is fine
- if using -Aa, otherwise we have a problem.
- */
-#ifndef MAX_PREPRO_ARGS
-#if !defined(__GNUC__) && (defined(VAXUltrix) || defined(__CF__APOLLO67) || (defined(sun)&&!defined(__sun)) || defined(_CRAY) || defined(__ultrix__) || (defined(__hpux)&&defined(__CF__KnR)))
-#define MAX_PREPRO_ARGS 31
-#else
-#define MAX_PREPRO_ARGS 99
-#endif
-#endif
-
-#if defined(AbsoftUNIXFortran)
-/* In addition to explicit Absoft stuff, only Absoft requires:
- - DEFAULT coming from _cfSTR.
- DEFAULT could have been called e.g. INT, but keep it for clarity.
- - M term in CFARGT14 and CFARGT14FS.
- */
-#define ABSOFT_cf1(T0) _(T0,_cfSTR)(0,ABSOFT1,0,0,0,0,0)
-#define ABSOFT_cf2(T0) _(T0,_cfSTR)(0,ABSOFT2,0,0,0,0,0)
-#define ABSOFT_cf3(T0) _(T0,_cfSTR)(0,ABSOFT3,0,0,0,0,0)
-#define DEFAULT_cfABSOFT1
-#define LOGICAL_cfABSOFT1
-#define STRING_cfABSOFT1 ,MAX_LEN_FORTRAN_FUNCTION_STRING
-#define DEFAULT_cfABSOFT2
-#define LOGICAL_cfABSOFT2
-#define STRING_cfABSOFT2 ,unsigned D0
-#define DEFAULT_cfABSOFT3
-#define LOGICAL_cfABSOFT3
-#define STRING_cfABSOFT3 ,D0
-#else
-#define ABSOFT_cf1(T0)
-#define ABSOFT_cf2(T0)
-#define ABSOFT_cf3(T0)
-#endif
-
-/* _Z introduced to cicumvent IBM and HP silly preprocessor warning.
- e.g. "Macro CFARGT14 invoked with a null argument."
- */
-#define _Z
-
-#define CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
- S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E)
-#define CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
- M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-
-#if !(defined(PowerStationFortran)||defined(hpuxFortran800))
-/* Old CFARGT14 -> CFARGT14FS as seen below, for Absoft cross-compile yields:
- SunOS> cc -c -Xa -DAbsoftUNIXFortran c.c
- "c.c", line 406: warning: argument mismatch
- Haven't checked if this is ANSI C or a SunOS bug. SunOS -Xs works ok.
- Behavior is most clearly seen in example:
- #define A 1 , 2
- #define C(X,Y,Z) x=X. y=Y. z=Z.
- #define D(X,Y,Z) C(X,Y,Z)
- D(x,A,z)
- Output from preprocessor is: x = x . y = 1 . z = 2 .
- #define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFARGT14FS(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-*/
-#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) F(T2,2,1) F(T3,3,1) F(T4,4,1) F(T5,5,1) F(T6,6,1) F(T7,7,1) \
- F(T8,8,1) F(T9,9,1) F(TA,A,1) F(TB,B,1) F(TC,C,1) F(TD,D,1) F(TE,E,1) \
- M CFARGT14S(S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- Z(T1,1,0) Z(T2,2,1) Z(T3,3,1) Z(T4,4,1) Z(T5,5,1) Z(T6,6,1) Z(T7,7,1) \
- Z(T8,8,1) Z(T9,9,1) Z(TA,A,1) Z(TB,B,1) Z(TC,C,1) Z(TD,D,1) Z(TE,E,1) \
- Z(TF,F,1) Z(TG,G,1) Z(TH,H,1) Z(TI,I,1) Z(TJ,J,1) Z(TK,K,1) \
- S(T1,1) S(T2,2) S(T3,3) S(T4,4) S(T5,5) S(T6,6) S(T7,7) \
- S(T8,8) S(T9,9) S(TA,A) S(TB,B) S(TC,C) S(TD,D) S(TE,E) \
- S(TF,F) S(TG,G) S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
-#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
- F(T1,A1,1,0) F(T2,A2,2,1) F(T3,A3,3,1) F(T4,A4,4,1) F(T5,A5,5,1) F(T6,A6,6,1) \
- F(T7,A7,7,1) F(T8,A8,8,1) F(T9,A9,9,1) F(TA,AA,A,1) F(TB,AB,B,1) F(TC,AC,C,1) \
- F(TD,AD,D,1) F(TE,AE,E,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
- S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
- S(TB,B) S(TC,C) S(TD,D) S(TE,E)
-#if MAX_PREPRO_ARGS>31
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- Z(T1,A1,1,0) Z(T2,A2,2,1) Z(T3,A3,3,1) Z(T4,A4,4,1) Z(T5,A5,5,1) Z(T6,A6,6,1) \
- Z(T7,A7,7,1) Z(T8,A8,8,1) Z(T9,A9,9,1) Z(TA,AA,A,1) Z(TB,AB,B,1) Z(TC,AC,C,1) \
- Z(TD,AD,D,1) Z(TE,AE,E,1) Z(TF,AF,F,1) Z(TG,AG,G,1) Z(TH,AH,H,1) Z(TI,AI,I,1) \
- Z(TJ,AJ,J,1) Z(TK,AK,K,1) S(T1,1) S(T2,2) S(T3,3) S(T4,4) \
- S(T5,5) S(T6,6) S(T7,7) S(T8,8) S(T9,9) S(TA,A) \
- S(TB,B) S(TC,C) S(TD,D) S(TE,E) S(TF,F) S(TG,G) \
- S(TH,H) S(TI,I) S(TJ,J) S(TK,K)
-#endif
-#else
-#define CFARGT14(F,S,M,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- F(T1,1,0) S(T1,1) F(T2,2,1) S(T2,2) F(T3,3,1) S(T3,3) F(T4,4,1) S(T4,4) \
- F(T5,5,1) S(T5,5) F(T6,6,1) S(T6,6) F(T7,7,1) S(T7,7) F(T8,8,1) S(T8,8) \
- F(T9,9,1) S(T9,9) F(TA,A,1) S(TA,A) F(TB,B,1) S(TB,B) F(TC,C,1) S(TC,C) \
- F(TD,D,1) S(TD,D) F(TE,E,1) S(TE,E)
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGT20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- Z(T1,1,0) S(T1,1) Z(T2,2,1) S(T2,2) Z(T3,3,1) S(T3,3) Z(T4,4,1) S(T4,4) \
- Z(T5,5,1) S(T5,5) Z(T6,6,1) S(T6,6) Z(T7,7,1) S(T7,7) Z(T8,8,1) S(T8,8) \
- Z(T9,9,1) S(T9,9) Z(TA,A,1) S(TA,A) Z(TB,B,1) S(TB,B) Z(TC,C,1) S(TC,C) \
- Z(TD,D,1) S(TD,D) Z(TE,E,1) S(TE,E) Z(TF,F,1) S(TF,F) Z(TG,G,1) S(TG,G) \
- Z(TH,H,1) S(TH,H) Z(TI,I,1) S(TI,I) Z(TJ,J,1) S(TJ,J) Z(TK,K,1) S(TK,K)
-#define CFARGTA14(F,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) \
- F(T1,A1,1,0) S(T1,1) F(T2,A2,2,1) S(T2,2) F(T3,A3,3,1) S(T3,3) \
- F(T4,A4,4,1) S(T4,4) F(T5,A5,5,1) S(T5,5) F(T6,A6,6,1) S(T6,6) \
- F(T7,A7,7,1) S(T7,7) F(T8,A8,8,1) S(T8,8) F(T9,A9,9,1) S(T9,9) \
- F(TA,AA,A,1) S(TA,A) F(TB,AB,B,1) S(TB,B) F(TC,AC,C,1) S(TC,C) \
- F(TD,AD,D,1) S(TD,D) F(TE,AE,E,1) S(TE,E)
-#if MAX_PREPRO_ARGS>31
-/* F changed to Z for arg 15. Watch out if ever extend to S or Z arguments. */
-#define CFARGTA20(Z,S,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- Z(T1,A1,1,0) S(T1,1) Z(T2,A2,2,1) S(T2,2) Z(T3,A3,3,1) S(T3,3) \
- Z(T4,A4,4,1) S(T4,4) Z(T5,A5,5,1) S(T5,5) Z(T6,A6,6,1) S(T6,6) \
- Z(T7,A7,7,1) S(T7,7) Z(T8,A8,8,1) S(T8,8) Z(T9,A9,9,1) S(T9,9) \
- Z(TA,AA,A,1) S(TA,A) Z(TB,AB,B,1) S(TB,B) Z(TC,AC,C,1) S(TC,C) \
- Z(TD,AD,D,1) S(TD,D) Z(TE,AE,E,1) S(TE,E) Z(TF,AF,F,1) S(TF,F) \
- Z(TG,AG,G,1) S(TG,G) Z(TH,AH,H,1) S(TH,H) Z(TI,AI,I,1) S(TI,I) \
- Z(TJ,AJ,J,1) S(TJ,J) Z(TK,AK,K,1) S(TK,K)
-#endif
-#endif
-
-
-#define PROTOCCALLSFSUB1( UN,LN,T1) \
- PROTOCCALLSFSUB14(UN,LN,T1,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB2( UN,LN,T1,T2) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB3( UN,LN,T1,T2,T3) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB4( UN,LN,T1,T2,T3,T4) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define PROTOCCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-
-#define PROTOCCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0)
-#define PROTOCCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0)
-
-
-#ifndef FCALLSC_QUALIFIER
-#ifdef VISUAL_CPLUSPLUS
-#define FCALLSC_QUALIFIER __stdcall
-#else
-#define FCALLSC_QUALIFIER
-#endif
-#endif
-
-#ifdef __cplusplus
-#define CFextern extern "C"
-#else
-#define CFextern extern
-#endif
-
-
-#ifdef CFSUBASFUN
-#define PROTOCCALLSFSUB0(UN,LN) \
- PROTOCCALLSFFUN0( VOID,UN,LN)
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFFUN14(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
- PROTOCCALLSFFUN20(VOID,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#else
-/* Note: Prevent compiler warnings, null #define PROTOCCALLSFSUB14/20 after
- #include-ing cfortran.h if calling the FORTRAN wrapper within the same
- source code where the wrapper is created. */
-#define PROTOCCALLSFSUB0(UN,LN) CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)();
-#ifndef __CF__KnR
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT14(NCF,KCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) );
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)\
- CFextern void FCALLSC_QUALIFIER CFC_(UN,LN)( CFARGT20(NCF,KCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) );
-#else
-#define PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFSUB0(UN,LN)
-#define PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- PROTOCCALLSFSUB0(UN,LN)
-#endif
-#endif
-
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-
-#define CCALLSFSUB1( UN,LN,T1, A1) \
- CCALLSFSUB5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
-#define CCALLSFSUB2( UN,LN,T1,T2, A1,A2) \
- CCALLSFSUB5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
-#define CCALLSFSUB3( UN,LN,T1,T2,T3, A1,A2,A3) \
- CCALLSFSUB5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
-#define CCALLSFSUB4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
- CCALLSFSUB5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
-#define CCALLSFSUB5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
-#define CCALLSFSUB6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
-#define CCALLSFSUB7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
-#define CCALLSFSUB8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
-#define CCALLSFSUB9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
- CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
-#define CCALLSFSUB10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
-#define CCALLSFSUB11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
-#define CCALLSFSUB12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
-#define CCALLSFSUB13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
- CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
-
-#ifdef __cplusplus
-#define CPPPROTOCLSFSUB0( UN,LN)
-#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#else
-#define CPPPROTOCLSFSUB0(UN,LN) \
- PROTOCCALLSFSUB0(UN,LN)
-#define CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- PROTOCCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-#define CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- PROTOCCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK)
-#endif
-
-#ifdef CFSUBASFUN
-#define CCALLSFSUB0(UN,LN) CCALLSFFUN0(UN,LN)
-#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)
-#else
-/* do{...}while(FALSE) allows if(a==b) FORT(); else BORT(); */
-#define CCALLSFSUB0( UN,LN) do{CPPPROTOCLSFSUB0(UN,LN) CFC_(UN,LN)();}while(FALSE)
-#define CCALLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
-do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
- VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
- VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) \
- CPPPROTOCLSFSUB14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) \
- ACF(LN,T4,A4,4) ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) \
- ACF(LN,T8,A8,8) ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) \
- ACF(LN,TC,AC,C) ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) \
- CFC_(UN,LN)( CFARGTA14(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE) );\
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
- WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) }while(FALSE)
-#endif
-
-
-#if MAX_PREPRO_ARGS>31
-#define CCALLSFSUB15(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,0,0,0,0,0)
-#define CCALLSFSUB16(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,0,0,0,0)
-#define CCALLSFSUB17(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,0,0,0)
-#define CCALLSFSUB18(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,0,0)
-#define CCALLSFSUB19(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ)\
- CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,0)
-
-#ifdef CFSUBASFUN
-#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
- CCALLSFFUN20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK)
-#else
-#define CCALLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH, \
- TI,TJ,TK, A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) \
-do{VVCF(T1,A1,B1) VVCF(T2,A2,B2) VVCF(T3,A3,B3) VVCF(T4,A4,B4) VVCF(T5,A5,B5) \
- VVCF(T6,A6,B6) VVCF(T7,A7,B7) VVCF(T8,A8,B8) VVCF(T9,A9,B9) VVCF(TA,AA,BA) \
- VVCF(TB,AB,BB) VVCF(TC,AC,BC) VVCF(TD,AD,BD) VVCF(TE,AE,BE) VVCF(TF,AF,BF) \
- VVCF(TG,AG,BG) VVCF(TH,AH,BH) VVCF(TI,AI,BI) VVCF(TJ,AJ,BJ) VVCF(TK,AK,BK) \
- CPPPROTOCLSFSUB20(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK) \
- ACF(LN,T1,A1,1) ACF(LN,T2,A2,2) ACF(LN,T3,A3,3) ACF(LN,T4,A4,4) \
- ACF(LN,T5,A5,5) ACF(LN,T6,A6,6) ACF(LN,T7,A7,7) ACF(LN,T8,A8,8) \
- ACF(LN,T9,A9,9) ACF(LN,TA,AA,A) ACF(LN,TB,AB,B) ACF(LN,TC,AC,C) \
- ACF(LN,TD,AD,D) ACF(LN,TE,AE,E) ACF(LN,TF,AF,F) ACF(LN,TG,AG,G) \
- ACF(LN,TH,AH,H) ACF(LN,TI,AI,I) ACF(LN,TJ,AJ,J) ACF(LN,TK,AK,K) \
- CFC_(UN,LN)( CFARGTA20(AACF,JCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,TF,TG,TH,TI,TJ,TK,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK) ); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) WCF(T6,A6,6) \
- WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) WCF(TB,AB,B) WCF(TC,AC,C) \
- WCF(TD,AD,D) WCF(TE,AE,E) WCF(TF,AF,F) WCF(TG,AG,G) WCF(TH,AH,H) WCF(TI,AI,I) \
- WCF(TJ,AJ,J) WCF(TK,AK,K) }while(FALSE)
-#endif
-#endif /* MAX_PREPRO_ARGS */
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR C TO CALL FORTRAN FUNCTIONS */
-
-/*N.B. PROTOCCALLSFFUNn(..) generates code, whether or not the FORTRAN
- function is called. Therefore, especially for creator's of C header files
- for large FORTRAN libraries which include many functions, to reduce
- compile time and object code size, it may be desirable to create
- preprocessor directives to allow users to create code for only those
- functions which they use. */
-
-/* The following defines the maximum length string that a function can return.
- Of course it may be undefine-d and re-define-d before individual
- PROTOCCALLSFFUNn(..) as required. It would also be nice to have this derived
- from the individual machines' limits. */
-#define MAX_LEN_FORTRAN_FUNCTION_STRING 0x4FE
-
-/* The following defines a character used by CFORTRAN.H to flag the end of a
- string coming out of a FORTRAN routine. */
-#define CFORTRAN_NON_CHAR 0x7F
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#define _SEP_(TN,C,COMMA) _(__SEP_,C)(TN,COMMA)
-#define __SEP_0(TN,COMMA)
-#define __SEP_1(TN,COMMA) _Icf(2,SEP,TN,COMMA,0)
-#define INT_cfSEP(T,B) _(A,B)
-#define INTV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define INTVVVVVVV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PINT_cfSEP(T,B) INT_cfSEP(T,B)
-#define PVOID_cfSEP(T,B) INT_cfSEP(T,B)
-#define ROUTINE_cfSEP(T,B) INT_cfSEP(T,B)
-#define SIMPLE_cfSEP(T,B) INT_cfSEP(T,B)
-#define VOID_cfSEP(T,B) INT_cfSEP(T,B) /* For FORTRAN calls C subr.s.*/
-#define STRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define STRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define PSTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PNSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define PPSTRING_cfSEP(T,B) INT_cfSEP(T,B)
-#define ZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-#define PZTRINGV_cfSEP(T,B) INT_cfSEP(T,B)
-
-#if defined(SIGNED_BYTE) || !defined(UNSIGNED_BYTE)
-#ifdef OLD_VAXC
-#define INTEGER_BYTE char /* Old VAXC barfs on 'signed char' */
-#else
-#define INTEGER_BYTE signed char /* default */
-#endif
-#else
-#define INTEGER_BYTE unsigned char
-#endif
-#define BYTEVVVVVVV_cfTYPE INTEGER_BYTE
-#define DOUBLEVVVVVVV_cfTYPE DOUBLE_PRECISION
-#define FLOATVVVVVVV_cfTYPE FORTRAN_REAL
-#define INTVVVVVVV_cfTYPE int
-#define LOGICALVVVVVVV_cfTYPE int
-#define LONGVVVVVVV_cfTYPE long
-#define SHORTVVVVVVV_cfTYPE short
-#define PBYTE_cfTYPE INTEGER_BYTE
-#define PDOUBLE_cfTYPE DOUBLE_PRECISION
-#define PFLOAT_cfTYPE FORTRAN_REAL
-#define PINT_cfTYPE int
-#define PLOGICAL_cfTYPE int
-#define PLONG_cfTYPE long
-#define PSHORT_cfTYPE short
-
-#define CFARGS0(A,T,V,W,X,Y,Z) _3(T,_cf,A)
-#define CFARGS1(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V)
-#define CFARGS2(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W)
-#define CFARGS3(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X)
-#define CFARGS4(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y)
-#define CFARGS5(A,T,V,W,X,Y,Z) _3(T,_cf,A)(V,W,X,Y,Z)
-
-#define _Icf(N,T,I,X,Y) _(I,_cfINT)(N,T,I,X,Y,0)
-#define _Icf4(N,T,I,X,Y,Z) _(I,_cfINT)(N,T,I,X,Y,Z)
-#define BYTE_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define DOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INT,B,X,Y,Z,0)
-#define FLOAT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define INT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define LOGICAL_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define LONG_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define SHORT_cfINT(N,A,B,X,Y,Z) DOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PBYTE_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PINT,B,X,Y,Z,0)
-#define PFLOAT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PINT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PLOGICAL_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PLONG_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define PSHORT_cfINT(N,A,B,X,Y,Z) PDOUBLE_cfINT(N,A,B,X,Y,Z)
-#define BYTEV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define BYTEVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define DOUBLEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTV,B,X,Y,Z,0)
-#define DOUBLEVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVV,B,X,Y,Z,0)
-#define DOUBLEVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVV,B,X,Y,Z,0)
-#define DOUBLEVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVV,B,X,Y,Z,0)
-#define DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,INTVVVVVVV,B,X,Y,Z,0)
-#define FLOATV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define FLOATVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define INTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define INTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LOGICALVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define LONGVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define LONGVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTV_cfINT(N,A,B,X,Y,Z) DOUBLEV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVV_cfINT(N,A,B,X,Y,Z) DOUBLEVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define SHORTVVVVVVV_cfINT(N,A,B,X,Y,Z) DOUBLEVVVVVVV_cfINT(N,A,B,X,Y,Z)
-#define PVOID_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,B,B,X,Y,Z,0)
-#define ROUTINE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-/*CRAY coughs on the first,
- i.e. the usual trouble of not being able to
- define macros to macros with arguments.
- New ultrix is worse, it coughs on all such uses.
- */
-/*#define SIMPLE_cfINT PVOID_cfINT*/
-#define SIMPLE_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define VOID_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define STRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define STRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PSTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PNSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PPSTRING_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define ZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define PZTRINGV_cfINT(N,A,B,X,Y,Z) PVOID_cfINT(N,A,B,X,Y,Z)
-#define CF_0_cfINT(N,A,B,X,Y,Z)
-
-
-#define UCF(TN,I,C) _SEP_(TN,C,COMMA) _Icf(2,U,TN,_(A,I),0)
-#define UUCF(TN,I,C) _SEP_(TN,C,COMMA) _SEP_(TN,1,I)
-#define UUUCF(TN,I,C) _SEP_(TN,C,COLON) _Icf(2,U,TN,_(A,I),0)
-#define INT_cfU(T,A) _(T,VVVVVVV_cfTYPE) A
-#define INTV_cfU(T,A) _(T,VVVVVV_cfTYPE) * A
-#define INTVV_cfU(T,A) _(T,VVVVV_cfTYPE) * A
-#define INTVVV_cfU(T,A) _(T,VVVV_cfTYPE) * A
-#define INTVVVV_cfU(T,A) _(T,VVV_cfTYPE) * A
-#define INTVVVVV_cfU(T,A) _(T,VV_cfTYPE) * A
-#define INTVVVVVV_cfU(T,A) _(T,V_cfTYPE) * A
-#define INTVVVVVVV_cfU(T,A) _(T,_cfTYPE) * A
-#define PINT_cfU(T,A) _(T,_cfTYPE) * A
-#define PVOID_cfU(T,A) void *A
-#define ROUTINE_cfU(T,A) void (*A)(CF_NULL_PROTO)
-#define VOID_cfU(T,A) void A /* Needed for C calls FORTRAN sub.s. */
-#define STRING_cfU(T,A) char *A /* via VOID and wrapper. */
-#define STRINGV_cfU(T,A) char *A
-#define PSTRING_cfU(T,A) char *A
-#define PSTRINGV_cfU(T,A) char *A
-#define ZTRINGV_cfU(T,A) char *A
-#define PZTRINGV_cfU(T,A) char *A
-
-/* VOID breaks U into U and UU. */
-#define INT_cfUU(T,A) _(T,VVVVVVV_cfTYPE) A
-#define VOID_cfUU(T,A) /* Needed for FORTRAN calls C sub.s. */
-#define STRING_cfUU(T,A) char *A
-
-
-#define BYTE_cfPU(A) CFextern INTEGER_BYTE FCALLSC_QUALIFIER A
-#define DOUBLE_cfPU(A) CFextern DOUBLE_PRECISION FCALLSC_QUALIFIER A
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfPU(A) CFextern FORTRAN_REAL FCALLSC_QUALIFIER A
-#else
-#define FLOAT_cfPU(A) CFextern FLOATFUNCTIONTYPE FCALLSC_QUALIFIER A
-#endif
-#define INT_cfPU(A) CFextern int FCALLSC_QUALIFIER A
-#define LOGICAL_cfPU(A) CFextern int FCALLSC_QUALIFIER A
-#define LONG_cfPU(A) CFextern long FCALLSC_QUALIFIER A
-#define SHORT_cfPU(A) CFextern short FCALLSC_QUALIFIER A
-#define STRING_cfPU(A) CFextern void FCALLSC_QUALIFIER A
-#define VOID_cfPU(A) CFextern void FCALLSC_QUALIFIER A
-
-#define BYTE_cfE INTEGER_BYTE A0;
-#define DOUBLE_cfE DOUBLE_PRECISION A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfE FORTRAN_REAL A0;
-#else
-#define FLOAT_cfE FORTRAN_REAL AA0; FLOATFUNCTIONTYPE A0;
-#endif
-#define INT_cfE int A0;
-#define LOGICAL_cfE int A0;
-#define LONG_cfE long A0;
-#define SHORT_cfE short A0;
-#define VOID_cfE
-#ifdef vmsFortran
-#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- static fstring A0 = \
- {MAX_LEN_FORTRAN_FUNCTION_STRING,DSC$K_DTYPE_T,DSC$K_CLASS_S,AA0};\
- memset(AA0, CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
- *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
-#else
-#ifdef CRAYFortran
-#define STRING_cfE static char AA0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- static _fcd A0; *(AA0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';\
- memset(AA0,CFORTRAN_NON_CHAR, MAX_LEN_FORTRAN_FUNCTION_STRING);\
- A0 = _cptofcd(AA0,MAX_LEN_FORTRAN_FUNCTION_STRING);
-#else
-/* 'cc: SC3.0.1 13 Jul 1994' barfs on char A0[0x4FE+1];
- * char A0[0x4FE +1]; char A0[1+0x4FE]; are both OK. */
-#define STRING_cfE static char A0[1+MAX_LEN_FORTRAN_FUNCTION_STRING]; \
- memset(A0, CFORTRAN_NON_CHAR, \
- MAX_LEN_FORTRAN_FUNCTION_STRING); \
- *(A0+MAX_LEN_FORTRAN_FUNCTION_STRING)='\0';
-#endif
-#endif
-/* ESTRING must use static char. array which is guaranteed to exist after
- function returns. */
-
-/* N.B.i) The diff. for 0 (Zero) and >=1 arguments.
- ii)That the following create an unmatched bracket, i.e. '(', which
- must of course be matched in the call.
- iii)Commas must be handled very carefully */
-#define INT_cfGZ(T,UN,LN) A0=CFC_(UN,LN)(
-#define VOID_cfGZ(T,UN,LN) CFC_(UN,LN)(
-#ifdef vmsFortran
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)(&A0
-#else
-#if defined(CRAYFortran) || defined(AbsoftUNIXFortran)
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0
-#else
-#define STRING_cfGZ(T,UN,LN) CFC_(UN,LN)( A0,MAX_LEN_FORTRAN_FUNCTION_STRING
-#endif
-#endif
-
-#define INT_cfG(T,UN,LN) INT_cfGZ(T,UN,LN)
-#define VOID_cfG(T,UN,LN) VOID_cfGZ(T,UN,LN)
-#define STRING_cfG(T,UN,LN) STRING_cfGZ(T,UN,LN), /*, is only diff. from _cfG*/
-
-#define BYTEVVVVVVV_cfPP
-#define INTVVVVVVV_cfPP /* These complement FLOATVVVVVVV_cfPP. */
-#define DOUBLEVVVVVVV_cfPP
-#define LOGICALVVVVVVV_cfPP
-#define LONGVVVVVVV_cfPP
-#define SHORTVVVVVVV_cfPP
-#define PBYTE_cfPP
-#define PINT_cfPP
-#define PDOUBLE_cfPP
-#define PLOGICAL_cfPP
-#define PLONG_cfPP
-#define PSHORT_cfPP
-#define PFLOAT_cfPP FLOATVVVVVVV_cfPP
-
-#define BCF(TN,AN,C) _SEP_(TN,C,COMMA) _Icf(2,B,TN,AN,0)
-#define INT_cfB(T,A) (_(T,VVVVVVV_cfTYPE)) A
-#define INTV_cfB(T,A) A
-#define INTVV_cfB(T,A) (A)[0]
-#define INTVVV_cfB(T,A) (A)[0][0]
-#define INTVVVV_cfB(T,A) (A)[0][0][0]
-#define INTVVVVV_cfB(T,A) (A)[0][0][0][0]
-#define INTVVVVVV_cfB(T,A) (A)[0][0][0][0][0]
-#define INTVVVVVVV_cfB(T,A) (A)[0][0][0][0][0][0]
-#define PINT_cfB(T,A) _(T,_cfPP)&A
-#define STRING_cfB(T,A) (char *) A
-#define STRINGV_cfB(T,A) (char *) A
-#define PSTRING_cfB(T,A) (char *) A
-#define PSTRINGV_cfB(T,A) (char *) A
-#define PVOID_cfB(T,A) (void *) A
-#define ROUTINE_cfB(T,A) (void(*)(CF_NULL_PROTO))A
-#define ZTRINGV_cfB(T,A) (char *) A
-#define PZTRINGV_cfB(T,A) (char *) A
-
-#define SCF(TN,NAME,I,A) _(TN,_cfSTR)(3,S,NAME,I,A,0,0)
-#define DEFAULT_cfS(M,I,A)
-#define LOGICAL_cfS(M,I,A)
-#define PLOGICAL_cfS(M,I,A)
-#define STRING_cfS(M,I,A) ,sizeof(A)
-#define STRINGV_cfS(M,I,A) ,( (unsigned)0xFFFF*firstindexlength(A) \
- +secondindexlength(A))
-#define PSTRING_cfS(M,I,A) ,sizeof(A)
-#define PSTRINGV_cfS(M,I,A) STRINGV_cfS(M,I,A)
-#define ZTRINGV_cfS(M,I,A)
-#define PZTRINGV_cfS(M,I,A)
-
-#define HCF(TN,I) _(TN,_cfSTR)(3,H,COMMA, H,_(C,I),0,0)
-#define HHCF(TN,I) _(TN,_cfSTR)(3,H,COMMA,HH,_(C,I),0,0)
-#define HHHCF(TN,I) _(TN,_cfSTR)(3,H,COLON, H,_(C,I),0,0)
-#define H_CF_SPECIAL unsigned
-#define HH_CF_SPECIAL
-#define DEFAULT_cfH(M,I,A)
-#define LOGICAL_cfH(S,U,B)
-#define PLOGICAL_cfH(S,U,B)
-#define STRING_cfH(S,U,B) _(A,S) _(U,_CF_SPECIAL) B
-#define STRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PSTRINGV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PNSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define PPSTRING_cfH(S,U,B) STRING_cfH(S,U,B)
-#define ZTRINGV_cfH(S,U,B)
-#define PZTRINGV_cfH(S,U,B)
-
-/* Need VOID_cfSTR because Absoft forced function types go through _cfSTR. */
-/* No spaces inside expansion. They screws up macro catenation kludge. */
-#define VOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICAL,A,B,C,D,E)
-#define LONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define BYTEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define DOUBLEVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define FLOATVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define INTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LOGICALVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define LONGVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SHORTVVVVVVV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PBYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLOGICAL,A,B,C,D,E)
-#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PSHORT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define STRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRING,A,B,C,D,E)
-#define PSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRING,A,B,C,D,E)
-#define STRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,STRINGV,A,B,C,D,E)
-#define PSTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PSTRINGV,A,B,C,D,E)
-#define PNSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PNSTRING,A,B,C,D,E)
-#define PPSTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PPSTRING,A,B,C,D,E)
-#define PVOID_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define ROUTINE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define SIMPLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define ZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,ZTRINGV,A,B,C,D,E)
-#define PZTRINGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRINGV,A,B,C,D,E)
-#define CF_0_cfSTR(N,T,A,B,C,D,E)
-
-/* See ACF table comments, which explain why CCF was split into two. */
-#define CCF(NAME,TN,I) _(TN,_cfSTR)(5,C,NAME,I,_(A,I),_(B,I),_(C,I))
-#define DEFAULT_cfC(M,I,A,B,C)
-#define LOGICAL_cfC(M,I,A,B,C) A=C2FLOGICAL( A);
-#define PLOGICAL_cfC(M,I,A,B,C) *A=C2FLOGICAL(*A);
-#ifdef vmsFortran
-#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A),B.f.dsc$a_pointer=A, \
- C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.f.dsc$w_length=B.clen: \
- (memset((A)+B.clen,' ',C-B.clen-1),A[B.f.dsc$w_length=C-1]='\0'));
- /* PSTRING_cfC to beware of array A which does not contain any \0. */
-#define PSTRING_cfC(M,I,A,B,C) (B.dsc$a_pointer=A, C==sizeof(char*) ? \
- B.dsc$w_length=strlen(A): (A[C-1]='\0',B.dsc$w_length=strlen(A), \
- memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), B.dsc$w_length=C-1));
-#else
-#define STRING_cfC(M,I,A,B,C) (B.clen=strlen(A), \
- C==sizeof(char*)||C==(unsigned)(B.clen+1)?B.flen=B.clen: \
- (memset((A)+B.clen,' ',C-B.clen-1),A[B.flen=C-1]='\0'));
-#define PSTRING_cfC(M,I,A,B,C) (C==sizeof(char*)? B=strlen(A): \
- (A[C-1]='\0',B=strlen(A),memset((A)+B,' ',C-B-1),B=C-1));
-#endif
- /* For CRAYFortran for (P)STRINGV_cfC, B.fs is set, but irrelevant. */
-#define STRINGV_cfC(M,I,A,B,C) \
- AATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
-#define PSTRINGV_cfC(M,I,A,B,C) \
- APATRINGV_cfA( A,B,(C/0xFFFF)*(C%0xFFFF),C/0xFFFF,C%0xFFFF)
-#define ZTRINGV_cfC(M,I,A,B,C) \
- AATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
-#define PZTRINGV_cfC(M,I,A,B,C) \
- APATRINGV_cfA( A,B, (_3(M,_ELEMS_,I))*((_3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)), (_3(M,_ELEMLEN_,I))+1 )
-
-#define BYTE_cfCCC(A,B) &A
-#define DOUBLE_cfCCC(A,B) &A
-#if !defined(__CF__KnR)
-#define FLOAT_cfCCC(A,B) &A
- /* Although the VAX doesn't, at least the */
-#else /* HP and K&R mips promote float arg.'s of */
-#define FLOAT_cfCCC(A,B) &B /* unprototyped functions to double. Cannot */
-#endif /* use A here to pass the argument to FORTRAN. */
-#define INT_cfCCC(A,B) &A
-#define LOGICAL_cfCCC(A,B) &A
-#define LONG_cfCCC(A,B) &A
-#define SHORT_cfCCC(A,B) &A
-#define PBYTE_cfCCC(A,B) A
-#define PDOUBLE_cfCCC(A,B) A
-#define PFLOAT_cfCCC(A,B) A
-#define PINT_cfCCC(A,B) A
-#define PLOGICAL_cfCCC(A,B) B=A /* B used to keep a common W table. */
-#define PLONG_cfCCC(A,B) A
-#define PSHORT_cfCCC(A,B) A
-
-#define CCCF(TN,I,M) _SEP_(TN,M,COMMA) _Icf(3,CC,TN,_(A,I),_(B,I))
-#define INT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
-#define INTV_cfCC(T,A,B) A
-#define INTVV_cfCC(T,A,B) A
-#define INTVVV_cfCC(T,A,B) A
-#define INTVVVV_cfCC(T,A,B) A
-#define INTVVVVV_cfCC(T,A,B) A
-#define INTVVVVVV_cfCC(T,A,B) A
-#define INTVVVVVVV_cfCC(T,A,B) A
-#define PINT_cfCC(T,A,B) _(T,_cfCCC)(A,B)
-#define PVOID_cfCC(T,A,B) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfCC(T,A,B) &A
-#else
-#define ROUTINE_cfCC(T,A,B) A
-#endif
-#define SIMPLE_cfCC(T,A,B) A
-#ifdef vmsFortran
-#define STRING_cfCC(T,A,B) &B.f
-#define STRINGV_cfCC(T,A,B) &B
-#define PSTRING_cfCC(T,A,B) &B
-#define PSTRINGV_cfCC(T,A,B) &B
-#else
-#ifdef CRAYFortran
-#define STRING_cfCC(T,A,B) _cptofcd(A,B.flen)
-#define STRINGV_cfCC(T,A,B) _cptofcd(B.s,B.flen)
-#define PSTRING_cfCC(T,A,B) _cptofcd(A,B)
-#define PSTRINGV_cfCC(T,A,B) _cptofcd(A,B.flen)
-#else
-#define STRING_cfCC(T,A,B) A
-#define STRINGV_cfCC(T,A,B) B.fs
-#define PSTRING_cfCC(T,A,B) A
-#define PSTRINGV_cfCC(T,A,B) B.fs
-#endif
-#endif
-#define ZTRINGV_cfCC(T,A,B) STRINGV_cfCC(T,A,B)
-#define PZTRINGV_cfCC(T,A,B) PSTRINGV_cfCC(T,A,B)
-
-#define BYTE_cfX return A0;
-#define DOUBLE_cfX return A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfX return A0;
-#else
-#define FLOAT_cfX ASSIGNFLOAT(AA0,A0); return AA0;
-#endif
-#define INT_cfX return A0;
-#define LOGICAL_cfX return F2CLOGICAL(A0);
-#define LONG_cfX return A0;
-#define SHORT_cfX return A0;
-#define VOID_cfX return ;
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define STRING_cfX return kill_trailing( \
- kill_trailing(AA0,CFORTRAN_NON_CHAR),' ');
-#else
-#define STRING_cfX return kill_trailing( \
- kill_trailing( A0,CFORTRAN_NON_CHAR),' ');
-#endif
-
-#define CFFUN(NAME) _(__cf__,NAME)
-
-/* Note that we don't use LN here, but we keep it for consistency. */
-#define CCALLSFFUN0(UN,LN) CFFUN(UN)()
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define CCALLSFFUN1( UN,LN,T1, A1) \
- CCALLSFFUN5 (UN,LN,T1,CF_0,CF_0,CF_0,CF_0,A1,0,0,0,0)
-#define CCALLSFFUN2( UN,LN,T1,T2, A1,A2) \
- CCALLSFFUN5 (UN,LN,T1,T2,CF_0,CF_0,CF_0,A1,A2,0,0,0)
-#define CCALLSFFUN3( UN,LN,T1,T2,T3, A1,A2,A3) \
- CCALLSFFUN5 (UN,LN,T1,T2,T3,CF_0,CF_0,A1,A2,A3,0,0)
-#define CCALLSFFUN4( UN,LN,T1,T2,T3,T4, A1,A2,A3,A4)\
- CCALLSFFUN5 (UN,LN,T1,T2,T3,T4,CF_0,A1,A2,A3,A4,0)
-#define CCALLSFFUN5( UN,LN,T1,T2,T3,T4,T5, A1,A2,A3,A4,A5) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,0,0,0,0,0)
-#define CCALLSFFUN6( UN,LN,T1,T2,T3,T4,T5,T6, A1,A2,A3,A4,A5,A6) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,0,0,0,0)
-#define CCALLSFFUN7( UN,LN,T1,T2,T3,T4,T5,T6,T7, A1,A2,A3,A4,A5,A6,A7) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,0,0,0)
-#define CCALLSFFUN8( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8, A1,A2,A3,A4,A5,A6,A7,A8) \
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,0,0)
-#define CCALLSFFUN9( UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,A1,A2,A3,A4,A5,A6,A7,A8,A9)\
- CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,0)
-#define CCALLSFFUN10(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,0,0,0,0)
-#define CCALLSFFUN11(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,0,0,0)
-#define CCALLSFFUN12(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,0,0)
-#define CCALLSFFUN13(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD)\
- CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,0)
-
-#define CCALLSFFUN14(UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE,A1,A2,A3,A4,A5,A6,A7,A8,A9,AA,AB,AC,AD,AE)\
-((CFFUN(UN)( BCF(T1,A1,0) BCF(T2,A2,1) BCF(T3,A3,1) BCF(T4,A4,1) BCF(T5,A5,1) \
- BCF(T6,A6,1) BCF(T7,A7,1) BCF(T8,A8,1) BCF(T9,A9,1) BCF(TA,AA,1) \
- BCF(TB,AB,1) BCF(TC,AC,1) BCF(TD,AD,1) BCF(TE,AE,1) \
- SCF(T1,LN,1,A1) SCF(T2,LN,2,A2) SCF(T3,LN,3,A3) SCF(T4,LN,4,A4) \
- SCF(T5,LN,5,A5) SCF(T6,LN,6,A6) SCF(T7,LN,7,A7) SCF(T8,LN,8,A8) \
- SCF(T9,LN,9,A9) SCF(TA,LN,A,AA) SCF(TB,LN,B,AB) SCF(TC,LN,C,AC) \
- SCF(TD,LN,D,AD))))
-
-/* N.B. Create a separate function instead of using (call function, function
-value here) because in order to create the variables needed for the input
-arg.'s which may be const.'s one has to do the creation within {}, but these
-can never be placed within ()'s. Therefore one must create wrapper functions.
-gcc, on the other hand may be able to avoid the wrapper functions. */
-
-/* Prototypes are needed to correctly handle the value returned correctly. N.B.
-Can only have prototype arg.'s with difficulty, a la G... table since FORTRAN
-functions returning strings have extra arg.'s. Don't bother, since this only
-causes a compiler warning to come up when one uses FCALLSCFUNn and CCALLSFFUNn
-for the same function in the same source code. Something done by the experts in
-debugging only.*/
-
-#define PROTOCCALLSFFUN0(F,UN,LN) \
-_(F,_cfPU)( CFC_(UN,LN))(CF_NULL_PROTO); \
-static _Icf(2,U,F,CFFUN(UN),0)() {_(F,_cfE) _Icf(3,GZ,F,UN,LN) ABSOFT_cf1(F));_(F,_cfX)}
-
-#define PROTOCCALLSFFUN1( T0,UN,LN,T1) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN2( T0,UN,LN,T1,T2) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN3( T0,UN,LN,T1,T2,T3) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,CF_0,CF_0)
-#define PROTOCCALLSFFUN4( T0,UN,LN,T1,T2,T3,T4) \
- PROTOCCALLSFFUN5 (T0,UN,LN,T1,T2,T3,T4,CF_0)
-#define PROTOCCALLSFFUN5( T0,UN,LN,T1,T2,T3,T4,T5) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN6( T0,UN,LN,T1,T2,T3,T4,T5,T6) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN7( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN8( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
-#define PROTOCCALLSFFUN9( T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
-#define PROTOCCALLSFFUN10(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN11(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define PROTOCCALLSFFUN12(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define PROTOCCALLSFFUN13(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-/* HP/UX 9.01 cc requires the blank between '_Icf(3,G,T0,UN,LN) CCCF(T1,1,0)' */
-
-#ifndef __CF__KnR
-#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
- CFARGT14FS(UCF,HCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
-{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
- CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
- CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
- CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
- CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
- WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
-#else
-#define PROTOCCALLSFFUN14(T0,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _(T0,_cfPU)(CFC_(UN,LN))(CF_NULL_PROTO); static _Icf(2,U,T0,CFFUN(UN),0)( \
- CFARGT14FS(UUCF,HHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ) \
- CFARGT14FS(UUUCF,HHHCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) ; \
-{ CFARGT14S(VCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfE) \
- CCF(LN,T1,1) CCF(LN,T2,2) CCF(LN,T3,3) CCF(LN,T4,4) CCF(LN,T5,5) \
- CCF(LN,T6,6) CCF(LN,T7,7) CCF(LN,T8,8) CCF(LN,T9,9) CCF(LN,TA,A) \
- CCF(LN,TB,B) CCF(LN,TC,C) CCF(LN,TD,D) CCF(LN,TE,E) _Icf(3,G,T0,UN,LN) \
- CFARGT14(CCCF,JCF,ABSOFT_cf1(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- WCF(T1,A1,1) WCF(T2,A2,2) WCF(T3,A3,3) WCF(T4,A4,4) WCF(T5,A5,5) \
- WCF(T6,A6,6) WCF(T7,A7,7) WCF(T8,A8,8) WCF(T9,A9,9) WCF(TA,AA,A) \
- WCF(TB,AB,B) WCF(TC,AC,C) WCF(TD,AD,D) WCF(TE,AE,E) _(T0,_cfX)}
-#endif
-
-/*-------------------------------------------------------------------------*/
-
-/* UTILITIES FOR FORTRAN TO CALL C ROUTINES */
-
-#ifdef OLD_VAXC /* Prevent %CC-I-PARAMNOTUSED. */
-#pragma nostandard
-#endif
-
-#if defined(vmsFortran) || defined(CRAYFortran)
-#define DCF(TN,I)
-#define DDCF(TN,I)
-#define DDDCF(TN,I)
-#else
-#define DCF(TN,I) HCF(TN,I)
-#define DDCF(TN,I) HHCF(TN,I)
-#define DDDCF(TN,I) HHHCF(TN,I)
-#endif
-
-#define QCF(TN,I) _(TN,_cfSTR)(1,Q,_(B,I), 0,0,0,0)
-#define DEFAULT_cfQ(B)
-#define LOGICAL_cfQ(B)
-#define PLOGICAL_cfQ(B)
-#define STRINGV_cfQ(B) char *B; unsigned int _(B,N);
-#define STRING_cfQ(B) char *B=NULL;
-#define PSTRING_cfQ(B) char *B=NULL;
-#define PSTRINGV_cfQ(B) STRINGV_cfQ(B)
-#define PNSTRING_cfQ(B) char *B=NULL;
-#define PPSTRING_cfQ(B)
-
-#ifdef __sgi /* Else SGI gives warning 182 contrary to its C LRM A.17.7 */
-#define ROUTINE_orig *(void**)&
-#else
-#define ROUTINE_orig (void *)
-#endif
-
-#define ROUTINE_1 ROUTINE_orig
-#define ROUTINE_2 ROUTINE_orig
-#define ROUTINE_3 ROUTINE_orig
-#define ROUTINE_4 ROUTINE_orig
-#define ROUTINE_5 ROUTINE_orig
-#define ROUTINE_6 ROUTINE_orig
-#define ROUTINE_7 ROUTINE_orig
-#define ROUTINE_8 ROUTINE_orig
-#define ROUTINE_9 ROUTINE_orig
-#define ROUTINE_10 ROUTINE_orig
-#define ROUTINE_11 ROUTINE_orig
-#define ROUTINE_12 ROUTINE_orig
-#define ROUTINE_13 ROUTINE_orig
-#define ROUTINE_14 ROUTINE_orig
-
-#define TCF(NAME,TN,I,M) _SEP_(TN,M,COMMA) _(TN,_cfT)(NAME,I,_(A,I),_(B,I),_(C,I))
-#define BYTE_cfT(M,I,A,B,D) *A
-#define DOUBLE_cfT(M,I,A,B,D) *A
-#define FLOAT_cfT(M,I,A,B,D) *A
-#define INT_cfT(M,I,A,B,D) *A
-#define LOGICAL_cfT(M,I,A,B,D) F2CLOGICAL(*A)
-#define LONG_cfT(M,I,A,B,D) *A
-#define SHORT_cfT(M,I,A,B,D) *A
-#define BYTEV_cfT(M,I,A,B,D) A
-#define DOUBLEV_cfT(M,I,A,B,D) A
-#define FLOATV_cfT(M,I,A,B,D) VOIDP A
-#define INTV_cfT(M,I,A,B,D) A
-#define LOGICALV_cfT(M,I,A,B,D) A
-#define LONGV_cfT(M,I,A,B,D) A
-#define SHORTV_cfT(M,I,A,B,D) A
-#define BYTEVV_cfT(M,I,A,B,D) (void *)A /* We have to cast to void *,*/
-#define BYTEVVV_cfT(M,I,A,B,D) (void *)A /* since we don't know the */
-#define BYTEVVVV_cfT(M,I,A,B,D) (void *)A /* dimensions of the array. */
-#define BYTEVVVVV_cfT(M,I,A,B,D) (void *)A /* i.e. Unfortunately, can't */
-#define BYTEVVVVVV_cfT(M,I,A,B,D) (void *)A /* check that the type */
-#define BYTEVVVVVVV_cfT(M,I,A,B,D) (void *)A /* matches the prototype. */
-#define DOUBLEVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define DOUBLEVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define FLOATVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define INTVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LOGICALVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define LONGVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define SHORTVVVVVVV_cfT(M,I,A,B,D) (void *)A
-#define PBYTE_cfT(M,I,A,B,D) A
-#define PDOUBLE_cfT(M,I,A,B,D) A
-#define PFLOAT_cfT(M,I,A,B,D) VOIDP A
-#define PINT_cfT(M,I,A,B,D) A
-#define PLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
-#define PLONG_cfT(M,I,A,B,D) A
-#define PSHORT_cfT(M,I,A,B,D) A
-#define PVOID_cfT(M,I,A,B,D) A
-#if defined(apolloFortran) || defined(hpuxFortran800) || defined(AbsoftUNIXFortran)
-#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) (*A)
-#else
-#define ROUTINE_cfT(M,I,A,B,D) _(ROUTINE_,I) A
-#endif
-/* A == pointer to the characters
- D == length of the string, or of an element in an array of strings
- E == number of elements in an array of strings */
-#define TTSTR( A,B,D) \
- ((B=(char*)malloc(D+1))[D]='\0', memcpy(B,A,D), kill_trailing(B,' '))
-#define TTTTSTR( A,B,D) (!(D<4||A[0]||A[1]||A[2]||A[3]))?NULL: \
- memchr(A,'\0',D) ?A : TTSTR(A,B,D)
-#define TTTTSTRV( A,B,D,E) (_(B,N)=E,B=(char*)malloc(_(B,N)*(D+1)), (void *) \
- vkill_trailing(f2cstrv(A,B,D+1, _(B,N)*(D+1)), D+1,_(B,N)*(D+1),' '))
-#ifdef vmsFortran
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
- A->dsc$w_length , A->dsc$l_m[0])
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define PPSTRING_cfT(M,I,A,B,D) A->dsc$a_pointer
-#else
-#ifdef CRAYFortran
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( _fcdtocp(A),B,_fcdlen(A))
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(_fcdtocp(A),B,_fcdlen(A), \
- num_elem(_fcdtocp(A),_fcdlen(A),_3(M,_STRV_A,I)))
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( _fcdtocp(A),B,_fcdlen(A))
-#define PPSTRING_cfT(M,I,A,B,D) _fcdtocp(A)
-#else
-#define STRING_cfT(M,I,A,B,D) TTTTSTR( A,B,D)
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A,B,D, num_elem(A,D,_3(M,_STRV_A,I)))
-#define PSTRING_cfT(M,I,A,B,D) TTSTR( A,B,D)
-#define PPSTRING_cfT(M,I,A,B,D) A
-#endif
-#endif
-#define PNSTRING_cfT(M,I,A,B,D) STRING_cfT(M,I,A,B,D)
-#define PSTRINGV_cfT(M,I,A,B,D) STRINGV_cfT(M,I,A,B,D)
-#define CF_0_cfT(M,I,A,B,D)
-
-#define RCF(TN,I) _(TN,_cfSTR)(3,R,_(A,I),_(B,I),_(C,I),0,0)
-#define DEFAULT_cfR(A,B,D)
-#define LOGICAL_cfR(A,B,D)
-#define PLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
-#define STRING_cfR(A,B,D) if (B) free(B);
-#define STRINGV_cfR(A,B,D) free(B);
-/* A and D as defined above for TSTRING(V) */
-#define RRRRPSTR( A,B,D) if (B) memcpy(A,B, _cfMIN(strlen(B),D)), \
- (D>strlen(B)?memset(A+strlen(B),' ', D-strlen(B)):0), free(B);
-#define RRRRPSTRV(A,B,D) c2fstrv(B,A,D+1,(D+1)*_(B,N)), free(B);
-#ifdef vmsFortran
-#define PSTRING_cfR(A,B,D) RRRRPSTR( A->dsc$a_pointer,B,A->dsc$w_length)
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A->dsc$a_pointer,B,A->dsc$w_length)
-#else
-#ifdef CRAYFortran
-#define PSTRING_cfR(A,B,D) RRRRPSTR( _fcdtocp(A),B,_fcdlen(A))
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(_fcdtocp(A),B,_fcdlen(A))
-#else
-#define PSTRING_cfR(A,B,D) RRRRPSTR( A,B,D)
-#define PSTRINGV_cfR(A,B,D) RRRRPSTRV(A,B,D)
-#endif
-#endif
-#define PNSTRING_cfR(A,B,D) PSTRING_cfR(A,B,D)
-#define PPSTRING_cfR(A,B,D)
-
-#define BYTE_cfFZ(UN,LN) INTEGER_BYTE FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define DOUBLE_cfFZ(UN,LN) DOUBLE_PRECISION FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define INT_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define LOGICAL_cfFZ(UN,LN) int FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define LONG_cfFZ(UN,LN) long FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define SHORT_cfFZ(UN,LN) short FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#define VOID_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#ifndef __CF__KnR
-/* The void is req'd by the Apollo, to make this an ANSI function declaration.
- The Apollo promotes K&R float functions to double. */
-#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(void
-#ifdef vmsFortran
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(fstring *AS
-#else
-#ifdef CRAYFortran
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(_fcd AS
-#else
-#if defined(AbsoftUNIXFortran)
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS
-#else
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(char *AS, unsigned D0
-#endif
-#endif
-#endif
-#else
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfFZ(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#else
-#define FLOAT_cfFZ(UN,LN) FLOATFUNCTIONTYPE FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#endif
-#if defined(vmsFortran) || defined(CRAYFortran) || defined(AbsoftUNIXFortran)
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS
-#else
-#define STRING_cfFZ(UN,LN) void FCALLSC_QUALIFIER fcallsc(UN,LN)(AS, D0
-#endif
-#endif
-
-#define BYTE_cfF(UN,LN) BYTE_cfFZ(UN,LN)
-#define DOUBLE_cfF(UN,LN) DOUBLE_cfFZ(UN,LN)
-#ifndef __CF_KnR
-#define FLOAT_cfF(UN,LN) FORTRAN_REAL FCALLSC_QUALIFIER fcallsc(UN,LN)(
-#else
-#define FLOAT_cfF(UN,LN) FLOAT_cfFZ(UN,LN)
-#endif
-#define INT_cfF(UN,LN) INT_cfFZ(UN,LN)
-#define LOGICAL_cfF(UN,LN) LOGICAL_cfFZ(UN,LN)
-#define LONG_cfF(UN,LN) LONG_cfFZ(UN,LN)
-#define SHORT_cfF(UN,LN) SHORT_cfFZ(UN,LN)
-#define VOID_cfF(UN,LN) VOID_cfFZ(UN,LN)
-#define STRING_cfF(UN,LN) STRING_cfFZ(UN,LN),
-
-#define INT_cfFF
-#define VOID_cfFF
-#ifdef vmsFortran
-#define STRING_cfFF fstring *AS;
-#else
-#ifdef CRAYFortran
-#define STRING_cfFF _fcd AS;
-#else
-#define STRING_cfFF char *AS; unsigned D0;
-#endif
-#endif
-
-#define INT_cfL A0=
-#define STRING_cfL A0=
-#define VOID_cfL
-
-#define INT_cfK
-#define VOID_cfK
-/* KSTRING copies the string into the position provided by the caller. */
-#ifdef vmsFortran
-#define STRING_cfK \
- memcpy(AS->dsc$a_pointer,A0,_cfMIN(AS->dsc$w_length,(A0==NULL?0:strlen(A0))));\
- AS->dsc$w_length>(A0==NULL?0:strlen(A0))? \
- memset(AS->dsc$a_pointer+(A0==NULL?0:strlen(A0)),' ', \
- AS->dsc$w_length-(A0==NULL?0:strlen(A0))):0;
-#else
-#ifdef CRAYFortran
-#define STRING_cfK \
- memcpy(_fcdtocp(AS),A0, _cfMIN(_fcdlen(AS),(A0==NULL?0:strlen(A0))) ); \
- _fcdlen(AS)>(A0==NULL?0:strlen(A0))? \
- memset(_fcdtocp(AS)+(A0==NULL?0:strlen(A0)),' ', \
- _fcdlen(AS)-(A0==NULL?0:strlen(A0))):0;
-#else
-#define STRING_cfK memcpy(AS,A0, _cfMIN(D0,(A0==NULL?0:strlen(A0))) ); \
- D0>(A0==NULL?0:strlen(A0))?memset(AS+(A0==NULL?0:strlen(A0)), \
- ' ', D0-(A0==NULL?0:strlen(A0))):0;
-#endif
-#endif
-
-/* Note that K.. and I.. can't be combined since K.. has to access data before
-R.., in order for functions returning strings which are also passed in as
-arguments to work correctly. Note that R.. frees and hence may corrupt the
-string. */
-#define BYTE_cfI return A0;
-#define DOUBLE_cfI return A0;
-#if ! (defined(FLOATFUNCTIONTYPE)&&defined(ASSIGNFLOAT)&&defined(RETURNFLOAT))
-#define FLOAT_cfI return A0;
-#else
-#define FLOAT_cfI RETURNFLOAT(A0);
-#endif
-#define INT_cfI return A0;
-#ifdef hpuxFortran800
-/* Incredibly, functions must return true as 1, elsewhere .true.==0x01000000. */
-#define LOGICAL_cfI return ((A0)?1:0);
-#else
-#define LOGICAL_cfI return C2FLOGICAL(A0);
-#endif
-#define LONG_cfI return A0;
-#define SHORT_cfI return A0;
-#define STRING_cfI return ;
-#define VOID_cfI return ;
-
-#ifdef OLD_VAXC /* Allow %CC-I-PARAMNOTUSED. */
-#pragma standard
-#endif
-
-#define FCALLSCSUB0( CN,UN,LN) FCALLSCFUN0(VOID,CN,UN,LN)
-#define FCALLSCSUB1( CN,UN,LN,T1) FCALLSCFUN1(VOID,CN,UN,LN,T1)
-#define FCALLSCSUB2( CN,UN,LN,T1,T2) FCALLSCFUN2(VOID,CN,UN,LN,T1,T2)
-#define FCALLSCSUB3( CN,UN,LN,T1,T2,T3) FCALLSCFUN3(VOID,CN,UN,LN,T1,T2,T3)
-#define FCALLSCSUB4( CN,UN,LN,T1,T2,T3,T4) \
- FCALLSCFUN4(VOID,CN,UN,LN,T1,T2,T3,T4)
-#define FCALLSCSUB5( CN,UN,LN,T1,T2,T3,T4,T5) \
- FCALLSCFUN5(VOID,CN,UN,LN,T1,T2,T3,T4,T5)
-#define FCALLSCSUB6( CN,UN,LN,T1,T2,T3,T4,T5,T6) \
- FCALLSCFUN6(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6)
-#define FCALLSCSUB7( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- FCALLSCFUN7(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7)
-#define FCALLSCSUB8( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- FCALLSCFUN8(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8)
-#define FCALLSCSUB9( CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- FCALLSCFUN9(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9)
-#define FCALLSCSUB10(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- FCALLSCFUN10(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA)
-#define FCALLSCSUB11(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- FCALLSCFUN11(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB)
-#define FCALLSCSUB12(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- FCALLSCFUN12(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC)
-#define FCALLSCSUB13(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- FCALLSCFUN13(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD)
-#define FCALLSCSUB14(CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- FCALLSCFUN14(VOID,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)
-
-#define FCALLSCFUN1( T0,CN,UN,LN,T1) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN2( T0,CN,UN,LN,T1,T2) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,CF_0,CF_0,CF_0)
-#define FCALLSCFUN3( T0,CN,UN,LN,T1,T2,T3) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,CF_0,CF_0)
-#define FCALLSCFUN4( T0,CN,UN,LN,T1,T2,T3,T4) \
- FCALLSCFUN5 (T0,CN,UN,LN,T1,T2,T3,T4,CF_0)
-#define FCALLSCFUN5( T0,CN,UN,LN,T1,T2,T3,T4,T5) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,CF_0,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN6( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN7( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,CF_0,CF_0,CF_0)
-#define FCALLSCFUN8( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,CF_0,CF_0)
-#define FCALLSCFUN9( T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9) \
- FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,CF_0)
-#define FCALLSCFUN10(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,CF_0,CF_0,CF_0,CF_0)
-#define FCALLSCFUN11(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,CF_0,CF_0,CF_0)
-#define FCALLSCFUN12(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,CF_0,CF_0)
-#define FCALLSCFUN13(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD) \
- FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,CF_0)
-
-#ifndef __CF__KnR
-#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf2(T0)) \
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
- TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) }
-#else
-#define FCALLSCFUN0(T0,CN,UN,LN) CFextern _(T0,_cfFZ)(UN,LN) ABSOFT_cf3(T0)) _Icf(0,FF,T0,0,0)\
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NNCF,DDCF,ABSOFT_cf3(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) _Icf(0,FF,T0,0,0) \
- CFARGT14FS(NNNCF,DDDCF,_Z,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE); \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
- TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI)}
-#endif
-
-
-#endif /* __CFORTRAN_LOADED */
diff --git a/include/compress.h b/include/compress.h
deleted file mode 100644
index 7e3c406..0000000
--- a/include/compress.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/* compress.h -- definitions for the decompression routines used in CFITSIO */
-
-/* Blatantly copied and modified from the original gzip-1.2.4 source code. */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-/* 'near' is only relevant for 16-bit PC with small memory model */
-# define near
-
-#if defined(VAXC) || defined(VMS)
-# define RECORD_IO 1
-#else
-# define RECORD_IO 0
-#endif
-
-#define get_char() get_byte()
-
-/* gzip.h -- common declarations for all gzip modules */
-
-#define OF(args) args
-typedef void *voidp;
-
-#define memzero(s, n) memset ((voidp)(s), 0, (n))
-
-typedef unsigned char uch;
-typedef unsigned short ush;
-typedef unsigned long ulg;
-
-/* Return codes from gzip */
-#define OK 0
-#define ERROR 1
-#define WARNING 2
-
-/* Compression methods (see algorithm.doc) */
-#define STORED 0
-#define COMPRESSED 1
-#define PACKED 2
-#define LZHED 3
-/* methods 4 to 7 reserved */
-#define DEFLATED 8
-#define MAX_METHODS 9
-
-#define INBUFSIZ 0x8000 /* input buffer size */
-#define INBUF_EXTRA 64 /* required by unlzw() */
-#define OUTBUFSIZ 16384 /* output buffer size */
-#define OUTBUF_EXTRA 2048 /* required by unlzw() */
-#define DIST_BUFSIZE 0x8000 /* buffer for distances, see trees.c */
-#define WSIZE 0x8000 /* window size--must be a power of two, and */
-
-#define DECLARE(type, array, size) type array[size]
-
-#define tab_suffix window
-#define tab_prefix prev /* hash link (see deflate.c) */
-#define head (prev+WSIZE) /* hash head (see deflate.c) */
-
-#define PACK_MAGIC "\037\036" /* Magic header for packed files */
-#define GZIP_MAGIC "\037\213" /* Magic header for gzip files, 1F 8B */
-#define OLD_GZIP_MAGIC "\037\236" /* Magic header for gzip 0.5 = freeze 1.x */
-#define LZH_MAGIC "\037\240" /* Magic header for SCO LZH Compress files*/
-#define LZW_MAGIC "\037\235" /* Magic header for lzw files, 1F 9D */
-#define PKZIP_MAGIC "\120\113\003\004" /* Magic header for pkzip files */
-
-/* gzip flag byte */
-#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
-#define CONTINUATION 0x02 /* bit 1 set: continuation of multi-part gzip file */
-#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
-#define COMMENT 0x10 /* bit 4 set: file comment present */
-#define ENCRYPTED 0x20 /* bit 5 set: file is encrypted */
-#define RESERVED 0xC0 /* bit 6,7: reserved */
-
-#define MIN_MATCH 3
-#define MAX_MATCH 258
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-#define MAX_DIST (WSIZE-MIN_LOOKAHEAD)
-#define translate_eol 0 /* no option -a yet */
-
-#define get_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(0))
-#define try_byte() (inptr < insize ? inbuf[inptr++] : fill_inbuf(1))
-#define put_ubyte(c) {window[outcnt++]=(uch)(c); if (outcnt==WSIZE)\
- flush_window();}
-
-/* Macros for getting two-byte and four-byte header values */
-#define SH(p) ((ush)(uch)((p)[0]) | ((ush)(uch)((p)[1]) << 8))
-#define LG(p) ((ulg)(SH(p)) | ((ulg)(SH((p)+2)) << 16))
-
-/* Diagnostic functions */
-# define Assert(cond,msg)
-# define Trace(x)
-# define Tracev(x)
-# define Tracevv(x)
-# define Tracec(c,x)
-# define Tracecv(c,x)
-
-/* lzw.h -- define the lzw functions. */
-
-#ifndef BITS
-# define BITS 16
-#endif
-#define INIT_BITS 9 /* Initial number of bits per code */
-#define BIT_MASK 0x1f /* Mask for 'number of compression bits' */
-#define BLOCK_MODE 0x80
-#define LZW_RESERVED 0x60 /* reserved bits */
-#define CLEAR 256 /* flush the dictionary */
-#define FIRST (CLEAR+1) /* first free entry */
-
-/* prototypes */
-
-#define local static
-void ffpmsg(const char *err_message);
-
-local int get_method OF((FILE *in));
-
-local ulg updcrc OF((uch *s, unsigned n));
-local int fill_inbuf OF((int eof_ok));
-local void flush_outbuf OF((void));
-local void flush_window OF((void));
-local void write_buf OF((voidp buf, unsigned cnt));
-local void error OF((char *m));
-local ulg flush_block OF((char *buf, ulg stored_len, int eof));
-typedef int file_t; /* Do not use stdio */
-#define NO_FILE (-1) /* in memory compression */
-local int file_read OF((char *buf, unsigned size));
-local void send_bits OF((int value, int length));
-local unsigned bi_reverse OF((unsigned value, int length));
-local void bi_windup OF((void));
-local void copy_block OF((char *buf, unsigned len, int header));
-local int (*read_buf) OF((char *buf, unsigned size));
-local void lm_init OF((int pack_level, ush *flags));
-local ulg deflate OF((void));
-local void ct_init OF((ush *attr, int *method));
-local int ct_tally OF((int dist, int lc));
-local void bi_init OF((file_t zipfile));
-
-#define put_byte(c) {outbuf[outcnt++]=(uch)(c); if (outcnt==OUTBUFSIZ)\
- flush_outbuf();}
-
-/* Output a 16 bit value, lsb first */
-#define put_short(w) \
-{ if (outcnt < OUTBUFSIZ-2) { \
- outbuf[outcnt++] = (uch) ((w) & 0xff); \
- outbuf[outcnt++] = (uch) ((ush)(w) >> 8); \
- } else { \
- put_byte((uch)((w) & 0xff)); \
- put_byte((uch)((ush)(w) >> 8)); \
- } \
-}
-
-/* Output a 32 bit value to the bit stream, lsb first */
-#define put_long(n) { \
- put_short((n) & 0xffff); \
- put_short(((ulg)(n)) >> 16); \
-}
-
-#define seekable() 0 /* force sequential output */
-
-/* io.c */
-local void fillbuf OF((int n));
-local unsigned getbits OF((int n));
-local void init_getbits OF((void));
-
-/* maketbl.c */
-local void make_table OF((int nchar, uch bitlen[],
- int tablebits, ush table[]));
-
-/* huf.c */
-local void read_pt_len OF((int nn, int nbit, int i_special));
-local void read_c_len OF((void));
-local unsigned decode_c OF((void));
-local unsigned decode_p OF((void));
-local void huf_decode_start OF((void));
-
-/* decode.c */
-local void decode_start OF((void));
-local unsigned decode OF((unsigned count, uch buffer[]));
-
-local int unlzh OF((FILE *in, FILE *out));
-local int unlzw OF((FILE *in, FILE *out));
-
-local void read_tree OF((void));
-local void build_tree_unpack OF((void));
-
-local int unpack OF((FILE *in, FILE *out));
-local int check_zipfile OF((FILE *in));
-local int unzip OF((FILE *in, FILE *out));
-
-int (*work) OF((FILE *infile, FILE *outfile)) = unzip; /* function to call */
-
-/* inflate.c */
-struct huft {
- uch e; /* number of extra bits or operation */
- uch b; /* number of bits in this code or subcode */
- union {
- ush n; /* literal, length base, or distance base */
- struct huft *t; /* pointer to next level of table */
- } v;
-};
-
-local int huft_build OF((unsigned *, unsigned, unsigned, ush *, ush *,
- struct huft **, int *));
-local int huft_free OF((struct huft *));
-local int inflate_codes OF((struct huft *, struct huft *, int, int));
-local int inflate_stored OF((void));
-local int inflate_fixed OF((void));
-local int inflate_dynamic OF((void));
-local int inflate_block OF((int *));
-local int inflate OF((void));
-
-/* end of compress.h include file */
diff --git a/include/drvrsmem.h b/include/drvrsmem.h
deleted file mode 100644
index cd63810..0000000
--- a/include/drvrsmem.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/* S H A R E D M E M O R Y D R I V E R
- =======================================
-
- by Jerzy.Borkowski@obs.unige.ch
-
-09-Mar-98 : initial version 1.0 released
-23-Mar-98 : shared_malloc now accepts new handle as an argument
-*/
-
-
-#include <sys/ipc.h> /* this is necessary for Solaris/Linux */
-#include <sys/shm.h>
-#include <sys/sem.h>
-
-#ifdef _AIX
-#include <fcntl.h>
-#else
-#include <sys/fcntl.h>
-#endif
-
- /* configuration parameters */
-
-#define SHARED_MAXSEG (16) /* maximum number of shared memory blocks */
-
-#define SHARED_KEYBASE (14011963) /* base for shared memory keys, may be overriden by getenv */
-#define SHARED_FDNAME ("/tmp/.shmem-lockfile") /* template for lock file name */
-
-#define SHARED_ENV_KEYBASE ("SHMEM_LIB_KEYBASE") /* name of environment variable */
-#define SHARED_ENV_MAXSEG ("SHMEM_LIB_MAXSEG") /* name of environment variable */
-
- /* useful constants */
-
-#define SHARED_RDONLY (0) /* flag for shared_(un)lock, lock for read */
-#define SHARED_RDWRITE (1) /* flag for shared_(un)lock, lock for write */
-#define SHARED_WAIT (0) /* flag for shared_lock, block if cannot lock immediate */
-#define SHARED_NOWAIT (2) /* flag for shared_lock, fail if cannot lock immediate */
-#define SHARED_NOLOCK (0x100) /* flag for shared_validate function */
-
-#define SHARED_RESIZE (4) /* flag for shared_malloc, object is resizeable */
-#define SHARED_PERSIST (8) /* flag for shared_malloc, object is not deleted after last proc detaches */
-
-#define SHARED_INVALID (-1) /* invalid handle for semaphore/shared memory */
-
-#define SHARED_EMPTY (0) /* entries for shared_used table */
-#define SHARED_USED (1)
-
-#define SHARED_GRANUL (16384) /* granularity of shared_malloc allocation = phys page size, system dependent */
-
-
-
- /* checkpoints in shared memory segments - might be omitted */
-
-#define SHARED_ID_0 ('J') /* first byte of identifier in BLKHEAD */
-#define SHARED_ID_1 ('B') /* second byte of identifier in BLKHEAD */
-
-#define BLOCK_REG (0) /* value for tflag member of BLKHEAD */
-#define BLOCK_SHARED (1) /* value for tflag member of BLKHEAD */
-
- /* generic error codes */
-
-#define SHARED_OK (0)
-
-#define SHARED_ERR_MIN_IDX SHARED_BADARG
-#define SHARED_ERR_MAX_IDX SHARED_NORESIZE
-
-
-#define DAL_SHM_FREE (0)
-#define DAL_SHM_USED (1)
-
-#define DAL_SHM_ID0 ('D')
-#define DAL_SHM_ID1 ('S')
-#define DAL_SHM_ID2 ('M')
-
-#define DAL_SHM_SEGHEAD_ID (0x19630114)
-
-
-
- /* data types */
-
-/* BLKHEAD object is placed at the beginning of every memory segment (both
- shared and regular) to allow automatic recognition of segments type */
-
-typedef union
- { struct BLKHEADstruct
- { char ID[2]; /* ID = 'JB', just as a checkpoint */
- char tflag; /* is it shared memory or regular one ? */
- int handle; /* this is not necessary, used only for non-resizeable objects via ptr */
- } s;
- double d; /* for proper alignment on every machine */
- } BLKHEAD;
-
-typedef void *SHARED_P; /* generic type of shared memory pointer */
-
-typedef struct SHARED_GTABstruct /* data type used in global table */
- { int sem; /* access semaphore (1 field): process count */
- int semkey; /* key value used to generate semaphore handle */
- int key; /* key value used to generate shared memory handle (realloc changes it) */
- int handle; /* handle of shared memory segment */
- int size; /* size of shared memory segment */
- int nprocdebug; /* attached proc counter, helps remove zombie segments */
- char attr; /* attributes of shared memory object */
- } SHARED_GTAB;
-
-typedef struct SHARED_LTABstruct /* data type used in local table */
- { BLKHEAD *p; /* pointer to segment (may be null) */
- int tcnt; /* number of threads in this process attached to segment */
- int lkcnt; /* >=0 <- number of read locks, -1 - write lock */
- long seekpos; /* current pointer position, read/write/seek operations change it */
- } SHARED_LTAB;
-
-
- /* system dependent definitions */
-
-#ifndef HAVE_FLOCK_T
-typedef struct flock flock_t;
-#define HAVE_FLOCK_T
-#endif
-
-#ifndef HAVE_UNION_SEMUN
-union semun
- { int val;
- struct semid_ds *buf;
- unsigned short *array;
- };
-#define HAVE_UNION_SEMUN
-#endif
-
-
-typedef struct DAL_SHM_SEGHEAD_STRUCT DAL_SHM_SEGHEAD;
-
-struct DAL_SHM_SEGHEAD_STRUCT
- { int ID; /* ID for debugging */
- int h; /* handle of sh. mem */
- int size; /* size of data area */
- int nodeidx; /* offset of root object (node struct typically) */
- };
-
- /* API routines */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void shared_cleanup(void); /* must be called at exit/abort */
-int shared_init(int debug_msgs); /* must be called before any other shared memory routine */
-int shared_recover(int id); /* try to recover dormant segment(s) after applic crash */
-int shared_malloc(long size, int mode, int newhandle); /* allocate n-bytes of shared memory */
-int shared_attach(int idx); /* attach to segment given index to table */
-int shared_free(int idx); /* release shared memory */
-SHARED_P shared_lock(int idx, int mode); /* lock segment for reading */
-SHARED_P shared_realloc(int idx, long newsize); /* reallocate n-bytes of shared memory (ON LOCKED SEGMENT ONLY) */
-int shared_size(int idx); /* get size of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
-int shared_attr(int idx); /* get attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
-int shared_set_attr(int idx, int newattr); /* set attributes of attached shared memory segment (ON LOCKED SEGMENT ONLY) */
-int shared_unlock(int idx); /* unlock segment (ON LOCKED SEGMENT ONLY) */
-int shared_set_debug(int debug_msgs); /* set/reset debug mode */
-int shared_set_createmode(int mode); /* set/reset debug mode */
-int shared_list(int id); /* list segment(s) */
-int shared_uncond_delete(int id); /* uncondintionally delete (NOWAIT operation) segment(s) */
-
-int smem_init(void);
-int smem_shutdown(void);
-int smem_setoptions(int options);
-int smem_getoptions(int *options);
-int smem_getversion(int *version);
-int smem_open(char *filename, int rwmode, int *driverhandle);
-int smem_create(char *filename, int *driverhandle);
-int smem_close(int driverhandle);
-int smem_remove(char *filename);
-int smem_size(int driverhandle, long *size);
-int smem_flush(int driverhandle);
-int smem_seek(int driverhandle, long offset);
-int smem_read(int driverhandle, void *buffer, long nbytes);
-int smem_write(int driverhandle, void *buffer, long nbytes);
-
-#ifdef __cplusplus
-}
-#endif
diff --git a/include/eval_defs.h b/include/eval_defs.h
deleted file mode 100644
index c650311..0000000
--- a/include/eval_defs.h
+++ /dev/null
@@ -1,147 +0,0 @@
-#include <stdio.h>
-#include <math.h>
-#include <stdlib.h>
-#include <string.h>
-#if defined(__sgi) || defined(__hpux)
-#include <alloca.h>
-#endif
-#ifdef sparc
-#include <malloc.h>
-#endif
-#include "fitsio2.h"
-
-#ifndef FFBISON
-#include "eval_tab.h"
-#endif
-
-#define MAXDIMS 5
-#define MAXSUBS 10
-#define MAXVARNAME 80
-#define CONST_OP -1000
-#define pERROR -1
-
-typedef struct {
- char name[MAXVARNAME+1];
- int type;
- long nelem;
- int naxis;
- long naxes[MAXDIMS];
- char *undef;
- void *data;
- } DataInfo;
-
-typedef struct {
- long nelem;
- int naxis;
- long naxes[MAXDIMS];
- char *undef;
- union {
- double dbl;
- long lng;
- char log;
- char str[256];
- double *dblptr;
- long *lngptr;
- char *logptr;
- char **strptr;
- void *ptr;
- } data;
- } lval;
-
-typedef struct Node {
- int operation;
- void (*DoOp)(struct Node *this);
- int nSubNodes;
- int SubNodes[MAXSUBS];
- int type;
- lval value;
- } Node;
-
-typedef struct {
- fitsfile *def_fptr;
- int (*getData)( char *dataName, void *dataValue );
- int (*loadData)( int varNum, long fRow, long nRows,
- void *data, char *undef );
-
- int compressed;
- int timeCol;
- int parCol;
- int valCol;
-
- char *expr;
- int index;
- int is_eobuf;
-
- Node *Nodes;
- int nNodes;
- int nNodesAlloc;
- int resultNode;
-
- long firstRow;
- long nRows;
-
- int nCols;
- iteratorCol *colData;
- DataInfo *varData;
-
- long firstDataRow;
- long nDataRows;
- long totalRows;
-
- int datatype;
-
- int status;
- } ParseData;
-
-typedef enum {
- rnd_fct = 1001,
- sum_fct,
- nelem_fct,
- sin_fct,
- cos_fct,
- tan_fct,
- asin_fct,
- acos_fct,
- atan_fct,
- sinh_fct,
- cosh_fct,
- tanh_fct,
- exp_fct,
- log_fct,
- log10_fct,
- sqrt_fct,
- abs_fct,
- atan2_fct,
- ceil_fct,
- floor_fct,
- round_fct,
- min1_fct,
- min2_fct,
- max1_fct,
- max2_fct,
- near_fct,
- circle_fct,
- box_fct,
- elps_fct,
- isnull_fct,
- defnull_fct,
- gtifilt_fct,
- regfilt_fct,
- row_fct
- } funcOp;
-
-extern ParseData gParse;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- int ffparse(void);
- int fflex(void);
- void ffrestart(FILE*);
-
- void Evaluate_Parser( long firstRow, long nRows );
-
-#ifdef __cplusplus
- }
-#endif
diff --git a/include/eval_tab.h b/include/eval_tab.h
deleted file mode 100644
index 784ac91..0000000
--- a/include/eval_tab.h
+++ /dev/null
@@ -1,37 +0,0 @@
-typedef union {
- int Node; /* Index of Node */
- double dbl; /* real value */
- long lng; /* integer value */
- char log; /* logical value */
- char str[256]; /* string value */
-} FFSTYPE;
-#define BOOLEAN 258
-#define LONG 259
-#define DOUBLE 260
-#define STRING 261
-#define BITSTR 262
-#define FUNCTION 263
-#define BFUNCTION 264
-#define GTIFILTER 265
-#define REGFILTER 266
-#define COLUMN 267
-#define BCOLUMN 268
-#define SCOLUMN 269
-#define BITCOL 270
-#define ROWREF 271
-#define OR 272
-#define AND 273
-#define EQ 274
-#define NE 275
-#define GT 276
-#define LT 277
-#define LTE 278
-#define GTE 279
-#define POWER 280
-#define NOT 281
-#define INTCAST 282
-#define FLTCAST 283
-#define UMINUS 284
-
-
-extern FFSTYPE fflval;
diff --git a/include/f77_wrap.h b/include/f77_wrap.h
deleted file mode 100644
index 121850f..0000000
--- a/include/f77_wrap.h
+++ /dev/null
@@ -1,277 +0,0 @@
-#define UNSIGNED_BYTE
-#include "cfortran.h"
-
-/************************************************************************
- DEC C creates longs as 8-byte integers. On most other machines, ints
- and longs are both 4-bytes, so both are compatible with Fortrans
- default integer which is 4-bytes. To support DECs, we must redefine
- LONGs and convert them to 8-bytes when going to C, and restore them
- to 4-bytes when returning to Fortran. Ugh!!!
-*************************************************************************/
-
-#if (defined DECFortran) || (defined(__alpha) && defined(g77Fortran))
-
-#undef LONGV_cfSTR
-#undef PLONG_cfSTR
-#undef LONGVVVVVVV_cfTYPE
-#undef PLONG_cfTYPE
-#undef LONGV_cfT
-#undef PLONG_cfT
-
-#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LONGV,A,B,C,D,E)
-#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLONG,A,B,C,D,E)
-#define LONGVVVVVVV_cfTYPE int
-#define PLONG_cfTYPE int
-#define LONGV_cfQ(B) long *B, _(B,N);
-#define PLONG_cfQ(B) long B;
-#define LONGV_cfT(M,I,A,B,D) ( (_(B,N) = * _3(M,_LONGV_A,I)), \
- B = F2Clongv(_(B,N),A) )
-#define PLONG_cfT(M,I,A,B,D) ((B=*A),&B)
-#define LONGV_cfR(A,B,D) C2Flongv(_(B,N),A,B);
-#define PLONG_cfR(A,B,D) *A=B;
-#define LONGV_cfH(S,U,B)
-#define PLONG_cfH(S,U,B)
-
-static long *F2Clongv(long size, int *A)
-{
- long i;
- long *B;
-
- B=(long *)malloc( size*sizeof(long) );
- for(i=0;i<size;i++) B[i]=A[i];
- return(B);
-}
-
-static void C2Flongv(long size, int *A, long *B)
-{
- long i;
-
- for(i=0;i<size;i++) A[i]=B[i];
- free(B);
-}
-
-#endif
-
-/************************************************************************
- Modify cfortran.h's handling of strings. C interprets a "char **"
- parameter as an array of pointers to the strings (or as a handle),
- not as a pointer to a block of contiguous strings. Also set a
- a minimum length for string allocations, to minimize risk of
- overflow.
-*************************************************************************/
-
-extern unsigned long gMinStrLen;
-
-#undef STRINGV_cfQ
-#undef STRINGV_cfR
-#undef TTSTR
-#undef TTTTSTRV
-#undef RRRRPSTRV
-
-#undef PPSTRING_cfT
-
-#ifdef vmsFortran
-#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A->dsc$a_pointer
-
-/* We want single strings to be equivalent to string vectors with */
-/* a single element, so ignore the number of elements info in the */
-/* vector structure, and rely on the NUM_ELEM definitions. */
-
-#undef STRINGV_cfT
-#define STRINGV_cfT(M,I,A,B,D) TTTTSTRV(A->dsc$a_pointer, B, \
- A->dsc$w_length, \
- num_elem(A->dsc$a_pointer, \
- A->dsc$w_length, \
- _3(M,_STRV_A,I) ) )
-#else
-#ifdef CRAYFortran
-#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)_fcdtocp(A)
-#else
-#define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)A
-#endif
-#endif
-
-#define _cfMAX(A,B) ( (A>B) ? A : B )
-#define STRINGV_cfQ(B) char **B; unsigned int _(B,N), _(B,M);
-#define STRINGV_cfR(A,B,D) free(B[0]); free(B);
-#define TTSTR( A,B,D) \
- ((B=(char*)malloc(_cfMAX(D,gMinStrLen)+1))[D]='\0',memcpy(B,A,D), \
- kill_trailing(B,' '))
-#define TTTTSTRV( A,B,D,E) ( \
- _(B,N)=_cfMAX(E,1), \
- _(B,M)=_cfMAX(D,gMinStrLen)+1, \
- B=(char**)malloc(_(B,N)*sizeof(char*)), \
- B[0]=(char*)malloc(_(B,N)*_(B,M)), \
- vindex(B,_(B,M),_(B,N),f2cstrv2(A,B[0],D,_(B,M),_(B,N))) \
- )
-#define RRRRPSTRV(A,B,D) \
- c2fstrv2(B[0],A,_(B,M),D,_(B,N)), \
- free(B[0]), \
- free(B);
-
-static char **vindex(char **B, int elem_len, int nelem, char *B0)
-{
- int i;
- if( nelem )
- for( i=0;i<nelem;i++ ) B[i] = B0+i*elem_len;
- return B;
-}
-
-static char *c2fstrv2(char* cstr, char *fstr, int celem_len, int felem_len,
- int nelem)
-{
- int i,j;
-
- if( nelem )
- for (i=0; i<nelem; i++) {
- for (j=0; j<felem_len && *cstr; j++) *fstr++ = *cstr++;
- cstr += celem_len-j;
- for (; j<felem_len; j++) *fstr++ = ' ';
- }
- return( fstr-felem_len*nelem );
-}
-
-static char *f2cstrv2(char *fstr, char* cstr, int felem_len, int celem_len,
- int nelem)
-{
- int i,j;
-
- if( nelem )
- for (i=0; i<nelem; i++, cstr+=(celem_len-felem_len)) {
- for (j=0; j<felem_len; j++) *cstr++ = *fstr++;
- *cstr='\0';
- kill_trailingn( cstr-felem_len, ' ', cstr );
- }
- return( cstr-celem_len*nelem );
-}
-
-/************************************************************************
- The following definitions redefine the BYTE data type to be
- interpretted as a character*1 string instead of an integer*1 which
- is not supported by all compilers.
-*************************************************************************/
-
-#undef BYTE_cfT
-#undef BYTEV_cfT
-#undef BYTE_cfINT
-#undef BYTEV_cfINT
-#undef BYTE_cfSTR
-#undef BYTEV_cfSTR
-
-#define BYTE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTE,B,X,Y,Z,0)
-#define BYTEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTEV,B,X,Y,Z,0)
-#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTE,A,B,C,D,E)
-#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTEV,A,B,C,D,E)
-#define BYTE_cfSEP(T,B) INT_cfSEP(T,B)
-#define BYTEV_cfSEP(T,B) INT_cfSEP(T,B)
-#define BYTE_cfH(S,U,B) STRING_cfH(S,U,B)
-#define BYTEV_cfH(S,U,B) STRING_cfH(S,U,B)
-#define BYTE_cfQ(B)
-#define BYTEV_cfQ(B)
-#define BYTE_cfR(A,B,D)
-#define BYTEV_cfR(A,B,D)
-
-#ifdef vmsFortran
-#define BYTE_cfN(T,A) fstring * A
-#define BYTEV_cfN(T,A) fstringvector * A
-#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((A->dsc$a_pointer)[0])
-#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)A->dsc$a_pointer
-#else
-#ifdef CRAYFortran
-#define BYTE_cfN(T,A) _fcd A
-#define BYTEV_cfN(T,A) _fcd A
-#define BYTE_cfT(M,I,A,B,D) (INTEGER_BYTE)((_fcdtocp(A))[0])
-#define BYTEV_cfT(M,I,A,B,D) (INTEGER_BYTE*)_fcdtocp(A)
-#else
-#define BYTE_cfN(T,A) INTEGER_BYTE * A
-#define BYTEV_cfN(T,A) INTEGER_BYTE * A
-#define BYTE_cfT(M,I,A,B,D) A[0]
-#define BYTEV_cfT(M,I,A,B,D) A
-#endif
-#endif
-
-/************************************************************************
- The following definitions and functions handle conversions between
- C and Fortran arrays of LOGICALS. Individually, LOGICALS are
- treated as int's but as char's when in an array. cfortran defines
- (F2C/C2F)LOGICALV but never uses them, so these routines also
- handle TRUE/FALSE conversions.
-*************************************************************************/
-
-#undef LOGICALV_cfSTR
-#undef LOGICALV_cfT
-#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICALV,A,B,C,D,E)
-#define LOGICALV_cfQ(B) char *B; unsigned int _(B,N);
-#define LOGICALV_cfT(M,I,A,B,D) (_(B,N)= * _3(M,_LOGV_A,I), \
- B=F2CcopyLogVect(_(B,N),A))
-#define LOGICALV_cfR(A,B,D) C2FcopyLogVect(_(B,N),A,B);
-#define LOGICALV_cfH(S,U,B)
-
-static char *F2CcopyLogVect(long size, int *A)
-{
- long i;
- char *B;
-
- B=(char *)malloc(size*sizeof(char));
- for( i=0; i<size; i++ ) B[i]=F2CLOGICAL(A[i]);
- return(B);
-}
-
-static void C2FcopyLogVect(long size, int *A, char *B)
-{
- long i;
-
- for( i=0; i<size; i++ ) A[i]=C2FLOGICAL(B[i]);
- free(B);
-}
-
-/*------------------ Fortran File Handling ----------------------*/
-/* Fortran uses unit numbers, whereas C uses file pointers, so */
-/* a global array of file pointers is setup in which Fortran's */
-/* unit number serves as the index. Two FITSIO routines are */
-/* the integer unit number and the fitsfile file pointer. */
-/*-----------------------------------------------------------------*/
-
-#define MAXFITSFILES 200 /* Array of file pointers indexed */
-extern fitsfile *gFitsFiles[]; /* by Fortran unit numbers */
-
-#define FITSUNIT_cfINT(N,A,B,X,Y,Z) INT_cfINT(N,A,B,X,Y,Z)
-#define FITSUNIT_cfSTR(N,T,A,B,C,D,E) INT_cfSTR(N,T,A,B,C,D,E)
-#define FITSUNIT_cfT(M,I,A,B,D) gFitsFiles[*A]
-#define FITSUNITVVVVVVV_cfTYPE int
-#define PFITSUNIT_cfINT(N,A,B,X,Y,Z) PINT_cfINT(N,A,B,X,Y,Z)
-#define PFITSUNIT_cfSTR(N,T,A,B,C,D,E) PINT_cfSTR(N,T,A,B,C,D,E)
-#define PFITSUNIT_cfT(M,I,A,B,D) (gFitsFiles + *A)
-#define PFITSUNIT_cfTYPE int
-
-
-/*---------------------- Make C++ Happy -----------------------------*/
-/* Redefine FCALLSCFUNn so that they create prototypes of themselves */
-/* and change TTTTSTR to use (char *)0 instead of NULL */
-/*-------------------------------------------------------------------*/
-
-#undef FCALLSCFUN0
-#undef FCALLSCFUN14
-#undef TTTTSTR
-
-#define TTTTSTR(A,B,D) ( !(D<4||A[0]||A[1]||A[2]||A[3]) ) ? ((char*)0) : \
- memchr(A,'\0',D) ? A : TTSTR(A,B,D)
-
-#define FCALLSCFUN0(T0,CN,UN,LN) \
- CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)); \
- CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)) \
- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)}
-
-#define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \
- CFextern _(T0,_cfF)(UN,LN) \
- CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \
- { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \
- _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \
- TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \
- TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,A,1) TCF(LN,TB,B,1) TCF(LN,TC,C,1) \
- TCF(LN,TD,D,1) TCF(LN,TE,E,1) ); _Icf(0,K,T0,0,0) \
- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) \
- }
-
diff --git a/include/fitsio.h b/include/fitsio.h
deleted file mode 100644
index 9330127..0000000
--- a/include/fitsio.h
+++ /dev/null
@@ -1,1355 +0,0 @@
-#ifndef _FITSIO_H
-#define _FITSIO_H
-
-#include <stdio.h>
-/* stddef.h is apparently needed to define size_t */
-#include <stddef.h>
-
-/* The following exclusion if __CINT__ is defined is needed for ROOT */
-#ifndef __CINT__
-#include "longnam.h"
-#endif
-
-/* global variables */
-
-#define FLEN_FILENAME 1025 /* max length of a filename */
-#define FLEN_KEYWORD 72 /* max length of a keyword (HIERARCH convention) */
-#define FLEN_CARD 81 /* length of a FITS header card */
-#define FLEN_VALUE 71 /* max length of a keyword value string */
-#define FLEN_COMMENT 73 /* max length of a keyword comment string */
-#define FLEN_ERRMSG 81 /* max length of a FITSIO error message */
-#define FLEN_STATUS 31 /* max length of a FITSIO status text string */
-
-#define TBIT 1 /* codes for FITS table data types */
-#define TBYTE 11
-#define TLOGICAL 14
-#define TSTRING 16
-#define TUSHORT 20
-#define TSHORT 21
-#define TUINT 30
-#define TINT 31
-#define TULONG 40
-#define TLONG 41
-#define TFLOAT 42
-#define TDOUBLE 82
-#define TCOMPLEX 83
-#define TDBLCOMPLEX 163
-
-#define TYP_STRUC_KEY 10
-#define TYP_CMPRS_KEY 20
-#define TYP_SCAL_KEY 30
-#define TYP_NULL_KEY 40
-#define TYP_DIM_KEY 50
-#define TYP_RANG_KEY 60
-#define TYP_UNIT_KEY 70
-#define TYP_DISP_KEY 80
-#define TYP_HDUID_KEY 90
-#define TYP_CKSUM_KEY 100
-#define TYP_WCS_KEY 110
-#define TYP_REFSYS_KEY 120
-#define TYP_COMM_KEY 130
-#define TYP_CONT_KEY 140
-#define TYP_USER_KEY 150
-
-#define INT32BIT int /* 32-bit integer datatype. Currently this */
- /* datatype is an 'int' on all useful platforms */
- /* however, it is possible that that are cases */
- /* where 'int' is a 2-byte integer, in which case */
- /* FITSINT would need to be defined as 'long'. */
-
-#define BYTE_IMG 8 /* BITPIX code values for FITS image types */
-#define SHORT_IMG 16
-#define LONG_IMG 32
-#define FLOAT_IMG -32
-#define DOUBLE_IMG -64
- /* The following 2 codes are not true FITS */
- /* datatypes; these codes are only used internally */
- /* within cfitsio to make it easier for users */
- /* to deal with unsigned integers. */
-#define USHORT_IMG 20
-#define ULONG_IMG 40
-
-#define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */
-#define ASCII_TBL 1 /* ASCII table HDU */
-#define BINARY_TBL 2 /* Binary table HDU */
-#define ANY_HDU -1 /* matches any HDU type */
-
-#define READONLY 0 /* options when opening a file */
-#define READWRITE 1
-
-/* adopt a hopefully obscure number to use as a null value flag */
-/* could be problems if the FITS files contain data with these values */
-#define FLOATNULLVALUE -9.11912E-36F
-#define DOUBLENULLVALUE -9.1191291391491E-36
-
-/* Image compression algorithm types */
-#define MAX_COMPRESS_DIM 6
-#define RICE_1 11
-#define GZIP_1 21
-#define PLIO_1 31
-#define HCOMPRESS_1 41
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#define CASESEN 1 /* do case-sensitive string match */
-#define CASEINSEN 0 /* do case-insensitive string match */
-
-#define MAXHDU 1000 /* maximum number of extensions allowed in a FITS file */
-
-#define GT_ID_ALL_URI 0 /* hierarchical grouping parameters */
-#define GT_ID_REF 1
-#define GT_ID_POS 2
-#define GT_ID_ALL 3
-#define GT_ID_REF_URI 11
-#define GT_ID_POS_URI 12
-
-#define OPT_RM_GPT 0
-#define OPT_RM_ENTRY 1
-#define OPT_RM_MBR 2
-#define OPT_RM_ALL 3
-
-#define OPT_GCP_GPT 0
-#define OPT_GCP_MBR 1
-#define OPT_GCP_ALL 2
-
-#define OPT_MCP_ADD 0
-#define OPT_MCP_NADD 1
-#define OPT_MCP_REPL 2
-#define OPT_MCP_MOV 3
-
-#define OPT_MRG_COPY 0
-#define OPT_MRG_MOV 1
-
-#define OPT_CMT_MBR 1
-#define OPT_CMT_MBR_DEL 11
-
-typedef struct /* structure used to store table column information */
-{
- char ttype[70]; /* column name = FITS TTYPEn keyword; */
- long tbcol; /* offset in row to first byte of each column */
- int tdatatype; /* datatype code of each column */
- long trepeat; /* repeat count of column; number of elements */
- double tscale; /* FITS TSCALn linear scaling factor */
- double tzero; /* FITS TZEROn linear scaling zero point */
- long tnull; /* FITS null value for int image or binary table cols */
- char strnull[20]; /* FITS null value string for ASCII table columns */
- char tform[10]; /* FITS tform keyword value */
- long twidth; /* width of each ASCII table column */
-}tcolumn;
-
-#define VALIDSTRUC 555 /* magic value used to identify if structure is valid */
-
-typedef struct /* structure used to store basic FITS file information */
-{
- int filehandle; /* handle returned by the file open function */
- int driver; /* defines which set of I/O drivers should be used */
- int open_count; /* number of opened 'fitsfiles' using this structure */
- char *filename; /* file name */
- int validcode; /* magic value used to verify that structure is valid */
- long filesize; /* current size of the physical disk file in bytes */
- long logfilesize; /* logical size of file, including unflushed buffers */
- int lasthdu; /* is this the last HDU in the file? 0 = no, else yes */
- long bytepos; /* current logical I/O pointer position in file */
- long io_pos; /* current I/O pointer position in the physical file */
- int curbuf; /* number of I/O buffer currently in use */
- int curhdu; /* current HDU number; 0 = primary array */
- int hdutype; /* 0 = primary array, 1 = ASCII table, 2 = binary table */
- int writemode; /* 0 = readonly, 1 = readwrite */
- int maxhdu; /* highest numbered HDU known to exist in the file */
- long headstart[MAXHDU + 1]; /* byte offset in file to start of each HDU */
- long headend; /* byte offest in file to end of the current HDU header */
- long nextkey; /* byte offset in file to beginning of next keyword */
- long datastart; /* byte offset in file to start of the current data unit */
- int tfield; /* number of fields in the table (primary array has 2 */
- long origrows; /* original number of rows (value of NAXIS2 keyword) */
- long numrows; /* number of rows in the table (dynamically updated) */
- long rowlength; /* total length of a table row, in bytes */
- tcolumn *tableptr; /* pointer to the table structure */
- long heapstart; /* heap start byte relative to start of data unit */
- long heapsize; /* size of the heap, in bytes */
-
- /* the following elements are related to compress images */
- int compressimg; /* 1 if HDU contains a compressed image, else 0 */
- char zcmptype[12]; /* compression type string */
- int compress_type; /* type of compression algorithm */
- int zbitpix; /* FITS data type of image (BITPIX) */
- int zndim; /* dimension of image */
- long znaxis[MAX_COMPRESS_DIM]; /* length of each axis */
- long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
- long maxtilelen; /* max number of pixels in each image tile */
- long maxelem; /* maximum length of variable length arrays */
-
- int cn_compressed; /* column number for COMPRESSED_DATA column */
- int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
- int cn_zscale; /* column number for ZSCALE column */
- int cn_zzero; /* column number for ZZERO column */
- int cn_zblank; /* column number for the ZBLANK column */
-
- double zscale; /* scaling value, if same for all tiles */
- double zzero; /* zero pt, if same for all tiles */
- int zblank; /* value for null pixels, if not a column */
-
- int rice_blocksize; /* first compression parameter */
- int rice_nbits; /* second compression parameter */
-} FITSfile;
-
-typedef struct /* structure used to store basic HDU information */
-{
- int HDUposition; /* HDU position in file; 0 = first HDU */
- FITSfile *Fptr; /* pointer to FITS file structure */
-}fitsfile;
-
-typedef struct /* structure for the iterator function column information */
-{
- /* elements required as input to fits_iterate_data: */
-
- fitsfile *fptr; /* pointer to the HDU containing the column */
- int colnum; /* column number in the table (use name if < 1) */
- char colname[70]; /* name (= TTYPEn value) of the column (optional) */
- int datatype; /* output datatype (converted if necessary */
- int iotype; /* = InputCol, InputOutputCol, or OutputCol */
-
- /* output elements that may be useful for the work function: */
-
- void *array; /* pointer to the array (and the null value) */
- long repeat; /* binary table vector repeat value */
- long tlmin; /* legal minimum data value */
- long tlmax; /* legal maximum data value */
- char tunit[70]; /* physical unit string */
- char tdisp[70]; /* suggested display format */
-
-} iteratorCol;
-
-#define InputCol 0 /* flag for input only iterator column */
-#define InputOutputCol 1 /* flag for input and output iterator column */
-#define OutputCol 2 /* flag for output only iterator column */
-
-/* error status codes */
-
-#define USE_MEM_BUFF -101 /* use memory buffer when opening file */
-#define OVERFLOW_ERR -11 /* overflow during datatype conversion */
-#define SAME_FILE 101 /* input and output files are the same */
-#define TOO_MANY_FILES 103 /* tried to open too many FITS files */
-#define FILE_NOT_OPENED 104 /* could not open the named file */
-#define FILE_NOT_CREATED 105 /* could not create the named file */
-#define WRITE_ERROR 106 /* error writing to FITS file */
-#define END_OF_FILE 107 /* tried to move past end of file */
-#define READ_ERROR 108 /* error reading from FITS file */
-#define FILE_NOT_CLOSED 110 /* could not close the file */
-#define ARRAY_TOO_BIG 111 /* array dimensions exceed internal limit */
-#define READONLY_FILE 112 /* Cannot write to readonly file */
-#define MEMORY_ALLOCATION 113 /* Could not allocate memory */
-#define BAD_FILEPTR 114 /* invalid fitsfile pointer */
-#define NULL_INPUT_PTR 115 /* NULL input pointer to routine */
-#define SEEK_ERROR 116 /* error seeking position in file */
-
-#define BAD_URL_PREFIX 121 /* invalid URL prefix on file name */
-#define TOO_MANY_DRIVERS 122 /* tried to register too many IO drivers */
-#define DRIVER_INIT_FAILED 123 /* driver initialization failed */
-#define NO_MATCHING_DRIVER 124 /* matching driver is not registered */
-#define URL_PARSE_ERROR 125 /* failed to parse input file URL */
-
-#define SHARED_ERRBASE (150)
-#define SHARED_BADARG (SHARED_ERRBASE + 1)
-#define SHARED_NULPTR (SHARED_ERRBASE + 2)
-#define SHARED_TABFULL (SHARED_ERRBASE + 3)
-#define SHARED_NOTINIT (SHARED_ERRBASE + 4)
-#define SHARED_IPCERR (SHARED_ERRBASE + 5)
-#define SHARED_NOMEM (SHARED_ERRBASE + 6)
-#define SHARED_AGAIN (SHARED_ERRBASE + 7)
-#define SHARED_NOFILE (SHARED_ERRBASE + 8)
-#define SHARED_NORESIZE (SHARED_ERRBASE + 9)
-
-#define HEADER_NOT_EMPTY 201 /* header already contains keywords */
-#define KEY_NO_EXIST 202 /* keyword not found in header */
-#define KEY_OUT_BOUNDS 203 /* keyword record number is out of bounds */
-#define VALUE_UNDEFINED 204 /* keyword value field is blank */
-#define NO_QUOTE 205 /* string is missing the closing quote */
-#define BAD_KEYCHAR 207 /* illegal character in keyword name or card */
-#define BAD_ORDER 208 /* required keywords out of order */
-#define NOT_POS_INT 209 /* keyword value is not a positive integer */
-#define NO_END 210 /* couldn't find END keyword */
-#define BAD_BITPIX 211 /* illegal BITPIX keyword value*/
-#define BAD_NAXIS 212 /* illegal NAXIS keyword value */
-#define BAD_NAXES 213 /* illegal NAXISn keyword value */
-#define BAD_PCOUNT 214 /* illegal PCOUNT keyword value */
-#define BAD_GCOUNT 215 /* illegal GCOUNT keyword value */
-#define BAD_TFIELDS 216 /* illegal TFIELDS keyword value */
-#define NEG_WIDTH 217 /* negative table row size */
-#define NEG_ROWS 218 /* negative number of rows in table */
-#define COL_NOT_FOUND 219 /* column with this name not found in table */
-#define BAD_SIMPLE 220 /* illegal value of SIMPLE keyword */
-#define NO_SIMPLE 221 /* Primary array doesn't start with SIMPLE */
-#define NO_BITPIX 222 /* Second keyword not BITPIX */
-#define NO_NAXIS 223 /* Third keyword not NAXIS */
-#define NO_NAXES 224 /* Couldn't find all the NAXISn keywords */
-#define NO_XTENSION 225 /* HDU doesn't start with XTENSION keyword */
-#define NOT_ATABLE 226 /* the CHDU is not an ASCII table extension */
-#define NOT_BTABLE 227 /* the CHDU is not a binary table extension */
-#define NO_PCOUNT 228 /* couldn't find PCOUNT keyword */
-#define NO_GCOUNT 229 /* couldn't find GCOUNT keyword */
-#define NO_TFIELDS 230 /* couldn't find TFIELDS keyword */
-#define NO_TBCOL 231 /* couldn't find TBCOLn keyword */
-#define NO_TFORM 232 /* couldn't find TFORMn keyword */
-#define NOT_IMAGE 233 /* the CHDU is not an IMAGE extension */
-#define BAD_TBCOL 234 /* TBCOLn keyword value < 0 or > rowlength */
-#define NOT_TABLE 235 /* the CHDU is not a table */
-#define COL_TOO_WIDE 236 /* column is too wide to fit in table */
-#define COL_NOT_UNIQUE 237 /* more than 1 column name matches template */
-#define BAD_ROW_WIDTH 241 /* sum of column widths not = NAXIS1 */
-#define UNKNOWN_EXT 251 /* unrecognizable FITS extension type */
-#define UNKNOWN_REC 252 /* unrecognizable FITS record */
-#define END_JUNK 253 /* END keyword is not blank */
-#define BAD_HEADER_FILL 254 /* Header fill area not blank */
-#define BAD_DATA_FILL 255 /* Data fill area not blank or zero */
-#define BAD_TFORM 261 /* illegal TFORM format code */
-#define BAD_TFORM_DTYPE 262 /* unrecognizable TFORM datatype code */
-#define BAD_TDIM 263 /* illegal TDIMn keyword value */
-
-#define BAD_HDU_NUM 301 /* HDU number < 1 or > MAXHDU */
-#define BAD_COL_NUM 302 /* column number < 1 or > tfields */
-#define NEG_FILE_POS 304 /* tried to move before beginning of file */
-#define NEG_BYTES 306 /* tried to read or write negative bytes */
-#define BAD_ROW_NUM 307 /* illegal starting row number in table */
-#define BAD_ELEM_NUM 308 /* illegal starting element number in vector */
-#define NOT_ASCII_COL 309 /* this is not an ASCII string column */
-#define NOT_LOGICAL_COL 310 /* this is not a logical datatype column */
-#define BAD_ATABLE_FORMAT 311 /* ASCII table column has wrong format */
-#define BAD_BTABLE_FORMAT 312 /* Binary table column has wrong format */
-#define NO_NULL 314 /* null value has not been defined */
-#define NOT_VARI_LEN 317 /* this is not a variable length column */
-#define BAD_DIMEN 320 /* illegal number of dimensions in array */
-#define BAD_PIX_NUM 321 /* first pixel number greater than last pixel */
-#define ZERO_SCALE 322 /* illegal BSCALE or TSCALn keyword = 0 */
-#define NEG_AXIS 323 /* illegal axis length < 1 */
-
-#define NOT_GROUP_TABLE 340
-#define HDU_ALREADY_MEMBER 341
-#define MEMBER_NOT_FOUND 342
-#define GROUP_NOT_FOUND 343
-#define BAD_GROUP_ID 344
-#define TOO_MANY_HDUS_TRACKED 345
-#define HDU_ALREADY_TRACKED 346
-#define BAD_OPTION 347
-#define IDENTICAL_POINTERS 348
-
-#define BAD_I2C 401 /* bad int to formatted string conversion */
-#define BAD_F2C 402 /* bad float to formatted string conversion */
-#define BAD_INTKEY 403 /* can't interprete keyword value as integer */
-#define BAD_LOGICALKEY 404 /* can't interprete keyword value as logical */
-#define BAD_FLOATKEY 405 /* can't interprete keyword value as float */
-#define BAD_DOUBLEKEY 406 /* can't interprete keyword value as double */
-#define BAD_C2I 407 /* bad formatted string to int conversion */
-#define BAD_C2F 408 /* bad formatted string to float conversion */
-#define BAD_C2D 409 /* bad formatted string to double conversion */
-#define BAD_DATATYPE 410 /* bad keyword datatype code */
-#define BAD_DECIM 411 /* bad number of decimal places specified */
-#define NUM_OVERFLOW 412 /* overflow during datatype conversion */
-
-# define DATA_COMPRESSION_ERR 413 /* error in imcompress routines */
-# define DATA_DECOMPRESSION_ERR 414 /* error in imcompress routines */
-
-#define BAD_DATE 420 /* error in date or time conversion */
-
-#define PARSE_SYNTAX_ERR 431 /* syntax error in parser expression */
-#define PARSE_BAD_TYPE 432 /* expression did not evaluate to desired type */
-#define PARSE_LRG_VECTOR 433 /* vector result too large to return in array */
-#define PARSE_NO_OUTPUT 434 /* data parser failed not sent an out column */
-#define PARSE_BAD_COL 435 /* bad data encounter while parsing column */
-#define PARSE_BAD_OUTPUT 436 /* Output file not of proper type */
-
-#define ANGLE_TOO_BIG 501 /* celestial angle too large for projection */
-#define BAD_WCS_VAL 502 /* bad celestial coordinate or pixel value */
-#define WCS_ERROR 503 /* error in celestial coordinate calculation */
-#define BAD_WCS_PROJ 504 /* unsupported type of celestial projection */
-#define NO_WCS_KEY 505 /* celestial coordinate keywords not found */
-#define APPROX_WCS_KEY 506 /* approximate WCS keywords were calculated */
-
-/*------- following error codes are used in the grparser.c file -----------*/
-#define NGP_ERRBASE (360) /* base chosen so not to interfere with CFITSIO */
-#define NGP_OK (0)
-#define NGP_NO_MEMORY (NGP_ERRBASE + 0) /* malloc failed */
-#define NGP_READ_ERR (NGP_ERRBASE + 1) /* read error from file */
-#define NGP_NUL_PTR (NGP_ERRBASE + 2) /* null pointer passed as argument */
-#define NGP_EMPTY_CURLINE (NGP_ERRBASE + 3) /* line read seems to be empty */
-#define NGP_UNREAD_QUEUE_FULL (NGP_ERRBASE + 4) /* cannot unread more then 1 line (or single line twice) */
-#define NGP_INC_NESTING (NGP_ERRBASE + 5) /* too deep include file nesting (inf. loop ?) */
-#define NGP_ERR_FOPEN (NGP_ERRBASE + 6) /* fopen() failed, cannot open file */
-#define NGP_EOF (NGP_ERRBASE + 7) /* end of file encountered */
-#define NGP_BAD_ARG (NGP_ERRBASE + 8) /* bad arguments passed */
-#define NGP_TOKEN_NOT_EXPECT (NGP_ERRBASE + 9) /* token not expected here */
-
-/* The following exclusion if __CINT__ is defined is needed for ROOT */
-#ifndef __CINT__
-/* the following 3 lines are needed to support C++ compilers */
-#ifdef __cplusplus
-extern "C" {
-#endif
-#endif
-
-/*---------------- FITS file URL parsing routines -------------*/
-int fits_get_token(char **ptr, char *delimiter, char *token, int *isanumber);
-int ffiurl(char *url, char *urltype, char *infile,
- char *outfile, char *extspec, char *rowfilter,
- char *binspec, char *colspec, int *status);
-int ffrtnm(char *url, char *rootname, int *status);
-int ffourl(char *url, char *urltype, char *outfile, char *tmplfile,
- int *status);
-int ffexts(char *extspec, int *extnum, char *extname, int *extvers,
- int *hdutype, char *colname, char *rowexpress, int *status);
-int ffextn(char *url, int *extension_num, int *status);
-int ffurlt(fitsfile *fptr, char *urlType, int *status);
-int ffbins(char *binspec, int *imagetype, int *haxis,
- char colname[4][FLEN_VALUE], double *minin,
- double *maxin, double *binsizein,
- char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
- char binname[4][FLEN_VALUE], double *weight, char *wtname,
- int *recip, int *status);
-int ffbinr(char **binspec, char *colname, double *minin,
- double *maxin, double *binsizein, char *minname,
- char *maxname, char *binname, int *status);
-int ffimport_file( char *filename, char **contents, int *status );
-
-/*---------------- FITS file I/O routines -------------*/
-int ffomem(fitsfile **fptr, const char *name, int mode, void **buffptr,
- size_t *buffsize, size_t deltasize,
- void *(*mem_realloc)(void *p, size_t newsize),
- int *status);
-int ffopen(fitsfile **fptr, const char *filename, int iomode, int *status);
-int ffreopen(fitsfile *openfptr, fitsfile **newfptr, int *status);
-int ffinit(fitsfile **fptr, const char *filename, int *status);
-int fftplt(fitsfile **fptr, const char *filename, const char *tempname,
- int *status);
-int ffflus(fitsfile *fptr, int *status);
-int ffclos(fitsfile *fptr, int *status);
-int ffdelt(fitsfile *fptr, int *status);
-int ffflnm(fitsfile *fptr, char *filename, int *status);
-int ffflmd(fitsfile *fptr, int *filemode, int *status);
-
-/*---------------- utility routines -------------*/
-float ffvers(float *version);
-void ffupch(char *string);
-void ffgerr(int status, char *errtext);
-void ffpmsg(const char *err_message);
-int ffgmsg(char *err_message);
-void ffcmsg(void);
-void ffrprt(FILE *stream, int status);
-void ffcmps(char *templt, char *colname, int casesen, int *match,
- int *exact);
-int fftkey(char *keyword, int *status);
-int fftrec(char *card, int *status);
-int ffnchk(fitsfile *fptr, int *status);
-int ffkeyn(char *keyroot, int value, char *keyname, int *status);
-int ffnkey(int value, char *keyroot, char *keyname, int *status);
-int ffgkcl(char *card);
-int ffdtyp(char *cval, char *dtype, int *status);
-int ffpsvc(char *card, char *value, char *comm, int *status);
-int ffgknm(char *card, char *name, int *length, int *status);
-int ffgthd(char *tmplt, char *card, int *hdtype, int *status);
-int ffasfm(char *tform, int *datacode, long *width, int *decim, int *status);
-int ffbnfm(char *tform, int *datacode, long *repeat, long *width, int *status);
-int ffgabc(int tfields, char **tform, int space, long *rowlen, long *tbcol,
- int *status);
-
-/*----------------- write single keywords --------------*/
-int ffpky(fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int ffprec(fitsfile *fptr, const char *card, int *status);
-int ffpcom(fitsfile *fptr, const char *comm, int *status);
-int ffpunt(fitsfile *fptr, char *keyname, char *unit, int *status);
-int ffphis(fitsfile *fptr, const char *history, int *status);
-int ffpdat(fitsfile *fptr, int *status);
-int ffgstm(char *timestr, int *timeref, int *status);
-int ffgsdt(int *day, int *month, int *year, int *status);
-int ffdt2s(int year, int month, int day, char *datestr, int *status);
-int fftm2s(int year, int month, int day, int hour, int minute, double second,
- int decimals, char *datestr, int *status);
-int ffs2dt(char *datestr, int *year, int *month, int *day, int *status);
-int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour,
- int *minute, double *second, int *status);
-int ffpkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffpkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffpkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffplsw(fitsfile *fptr, int *status);
-int ffpkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffpkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffpkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffpkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffpkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffpkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffpkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffpkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffpkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffpkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffpkyt(fitsfile *fptr, char *keyname, long intval, double frac, char *comm,
- int *status);
-int ffptdm( fitsfile *fptr, int colnum, int naxis, long naxes[], int *status);
-
-/*----------------- write array of keywords --------------*/
-int ffpkns(fitsfile *fptr, char *keyroot, int nstart, int nkey, char *value[],
- char *comm[], int *status);
-int ffpknl(fitsfile *fptr, char *keyroot, int nstart, int nkey, int *value,
- char *comm[], int *status);
-int ffpknj(fitsfile *fptr, char *keyroot, int nstart, int nkey, long *value,
- char *comm[], int *status);
-int ffpknf(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
- int decim, char *comm[], int *status);
-int ffpkne(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
- int decim, char *comm[], int *status);
-int ffpkng(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
- int decim, char *comm[], int *status);
-int ffpknd(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
- int decim, char *comm[], int *status);
-int ffcpky(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
- char *rootname, int *status);
-
-/*----------------- write required header keywords --------------*/
-int ffphps( fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status);
-int ffphpr( fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[],
- long pcount, long gcount, int extend, int *status);
-int ffphtb(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
- long *tbcol, char **tform, char **tunit, char *extname, int *status);
-int ffphbn(fitsfile *fptr, long naxis2, int tfields, char **ttype,
- char **tform, char **tunit, char *extname, long pcount, int *status);
-
-/*----------------- write template keywords --------------*/
-int ffpktp(fitsfile *fptr, const char *filename, int *status);
-
-/*------------------ get header information --------------*/
-int ffghsp(fitsfile *fptr, int *nexist, int *nmore, int *status);
-int ffghps(fitsfile *fptr, int *nexist, int *position, int *status);
-
-/*------------------ move position in header -------------*/
-int ffmaky(fitsfile *fptr, int nrec, int *status);
-int ffmrky(fitsfile *fptr, int nrec, int *status);
-
-/*------------------ read single keywords -----------------*/
-int ffgnxk(fitsfile *fptr, char **inclist, int ninc, char **exclist,
- int nexc, char *card, int *status);
-int ffgrec(fitsfile *fptr, int nrec, char *card, int *status);
-int ffgcrd(fitsfile *fptr, char *keyname, char *card, int *status);
-int ffgunt(fitsfile *fptr, char *keyname, char *unit, int *status);
-int ffgkyn(fitsfile *fptr, int nkey, char *keyname, char *keyval, char *comm,
- int *status);
-int ffgkey(fitsfile *fptr, char *keyname, char *keyval, char *comm,
- int *status);
-
-int ffgky( fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int ffgkys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
-int ffgkls(fitsfile *fptr, char *keyname, char **value, char *comm, int *status)
-;
-int ffgkyl(fitsfile *fptr, char *keyname, int *value, char *comm, int *status);
-int ffgkyj(fitsfile *fptr, char *keyname, long *value, char *comm, int *status);
-int ffgkye(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
-int ffgkyd(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
-int ffgkyc(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
-int ffgkym(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
-int ffgkyt(fitsfile *fptr, char *keyname, long *ivalue, double *dvalue,
- char *comm, int *status);
-int ffgtdm(fitsfile *fptr, int colnum, int maxdim, int *naxis, long naxes[],
- int *status);
-int ffdtdm(fitsfile *fptr, char *tdimstr, int colnum, int maxdim,
- int *naxis, long naxes[], int *status);
-
-/*------------------ read array of keywords -----------------*/
-int ffgkns(fitsfile *fptr, char *keyname, int nstart, int nmax, char *value[],
- int *nfound, int *status);
-int ffgknl(fitsfile *fptr, char *keyname, int nstart, int nmax, int *value,
- int *nfound, int *status);
-int ffgknj(fitsfile *fptr, char *keyname, int nstart, int nmax, long *value,
- int *nfound, int *status);
-int ffgkne(fitsfile *fptr, char *keyname, int nstart, int nmax, float *value,
- int *nfound, int *status);
-int ffgknd(fitsfile *fptr, char *keyname, int nstart, int nmax, double *value,
- int *nfound, int *status);
-int ffh2st(fitsfile *fptr, char **header, int *status);
-
-/*----------------- read required header keywords --------------*/
-int ffghpr(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
- long naxes[], long *pcount, long *gcount, int *extend, int *status);
-
-int ffghtb(fitsfile *fptr,int maxfield, long *naxis1, long *naxis2,
- int *tfields, char **ttype, long *tbcol, char **tform, char **tunit,
- char *extname, int *status);
-
-int ffghbn(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
- char **ttype, char **tform, char **tunit, char *extname,
- long *pcount, int *status);
-
-/*--------------------- update keywords ---------------*/
-int ffuky(fitsfile *fptr, int datatype, char *keyname, void *value,
- char *comm, int *status);
-int ffucrd(fitsfile *fptr, char *keyname, char *card, int *status);
-int ffukyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffukys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
-int ffukls(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
-int ffukyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffukyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffukyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffukye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffukyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffukyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffukyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffukym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffukfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffukfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-
-/*--------------------- modify keywords ---------------*/
-int ffmrec(fitsfile *fptr, int nkey, char *card, int *status);
-int ffmcrd(fitsfile *fptr, char *keyname, char *card, int *status);
-int ffmnam(fitsfile *fptr, char *oldname, char *newname, int *status);
-int ffmcom(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffmkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffmkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffmkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffmkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffmkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffmkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffmkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffmkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffmkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffmkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffmkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffmkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffmkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-
-/*--------------------- insert keywords ---------------*/
-int ffirec(fitsfile *fptr, int nkey, char *card, int *status);
-int ffikyu(fitsfile *fptr, char *keyname, char *comm, int *status);
-int ffikys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffikls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
-int ffikyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
-int ffikyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
-int ffikyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffikye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
- int *status);
-int ffikyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffikyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
- int *status);
-int ffikyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffikym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-int ffikfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
- int *status);
-int ffikfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
- int *status);
-
-/*--------------------- delete keywords ---------------*/
-int ffdkey(fitsfile *fptr, char *keyname, int *status);
-int ffdrec(fitsfile *fptr, int keypos, int *status);
-
-/*--------------------- get HDU information -------------*/
-int ffghdn(fitsfile *fptr, int *chdunum);
-int ffghdt(fitsfile *fptr, int *exttype, int *status);
-int ffghad(fitsfile *fptr, long *headstart, long *datastart, long *dataend,
- int *status);
-int ffgipr(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis,
- long *naxes, int *status);
-int ffgidt(fitsfile *fptr, int *imgtype, int *status);
-int ffgidm(fitsfile *fptr, int *naxis, int *status);
-int ffgisz(fitsfile *fptr, int nlen, long *naxes, int *status);
-
-/*--------------------- HDU operations -------------*/
-int ffmahd(fitsfile *fptr, int hdunum, int *exttype, int *status);
-int ffmrhd(fitsfile *fptr, int hdumov, int *exttype, int *status);
-int ffmnhd(fitsfile *fptr, int exttype, char *hduname, int hduvers,
- int *status);
-int ffthdu(fitsfile *fptr, int *nhdu, int *status);
-int ffcrhd(fitsfile *fptr, int *status);
-int ffcrim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
-int ffcrtb(fitsfile *fptr, int tbltype, long naxis2, int tfields, char **ttype,
- char **tform, char **tunit, char *extname, int *status);
-int ffiimg(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
-int ffitab(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
- long *tbcol, char **tform, char **tunit, char *extname, int *status);
-int ffibin(fitsfile *fptr,long naxis2, int tfields, char **ttype, char **tform,
- char **tunit, char *extname, long pcount, int *status);
-int ffrsim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
-int ffdhdu(fitsfile *fptr, int *hdutype, int *status);
-int ffcopy(fitsfile *infptr, fitsfile *outfptr, int morekeys, int *status);
-int ffcphd(fitsfile *infptr, fitsfile *outfptr, int *status);
-int ffcpdt(fitsfile *infptr, fitsfile *outfptr, int *status);
-int ffchfl(fitsfile *fptr, int *status);
-int ffcdfl(fitsfile *fptr, int *status);
-
-int ffrdef(fitsfile *fptr, int *status);
-int ffhdef(fitsfile *fptr, int morekeys, int *status);
-int ffpthp(fitsfile *fptr, long theap, int *status);
-
-int ffcsum(fitsfile *fptr, long nrec, unsigned long *sum, int *status);
-void ffesum(unsigned long sum, int complm, char *ascii);
-unsigned long ffdsum(char *ascii, int complm, unsigned long *sum);
-int ffpcks(fitsfile *fptr, int *status);
-int ffupck(fitsfile *fptr, int *status);
-int ffvcks(fitsfile *fptr, int *datastatus, int *hdustatus, int *status);
-int ffgcks(fitsfile *fptr, unsigned long *datasum, unsigned long *hdusum,
- int *status);
-
-/*--------------------- define scaling or null values -------------*/
-int ffpscl(fitsfile *fptr, double scale, double zero, int *status);
-int ffpnul(fitsfile *fptr, long nulvalue, int *status);
-int fftscl(fitsfile *fptr, int colnum, double scale, double zero, int *status);
-int fftnul(fitsfile *fptr, int colnum, long nulvalue, int *status);
-int ffsnul(fitsfile *fptr, int colnum, char *nulstring, int *status);
-
-/*--------------------- get column information -------------*/
-int ffgcno(fitsfile *fptr, int casesen, char *templt, int *colnum,
- int *status);
-int ffgcnn(fitsfile *fptr, int casesen, char *templt, char *colname,
- int *colnum, int *status);
-
-int ffgtcl(fitsfile *fptr, int colnum, int *typecode, long *repeat,
- long *width, int *status);
-int ffgncl(fitsfile *fptr, int *ncols, int *status);
-int ffgnrw(fitsfile *fptr, long *nrows, int *status);
-int ffgacl(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
- char *tunit, char *tform, double *tscal, double *tzero,
- char *tnull, char *tdisp, int *status);
-int ffgbcl(fitsfile *fptr, int colnum, char *ttype, char *tunit,
- char *dtype, long *repeat, double *tscal, double *tzero,
- long *tnull, char *tdisp, int *status);
-int ffgrsz(fitsfile *fptr, long *nrows, int *status);
-int ffgcdw(fitsfile *fptr, int colnum, int *width, int *status);
-
-/*--------------------- read primary array or image elements -------------*/
-int ffgpv(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *nulval, void *array, int *anynul, int *status);
-int ffgpf(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *array, char *nullarray, int *anynul, int *status);
-int ffgpvb(fitsfile *fptr, long group, long firstelem, long nelem, unsigned
- char nulval, unsigned char *array, int *anynul, int *status);
-int ffgpvui(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned short nulval, unsigned short *array, int *anynul,
- int *status);
-int ffgpvi(fitsfile *fptr, long group, long firstelem, long nelem,
- short nulval, short *array, int *anynul, int *status);
-int ffgpvuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long nulval, unsigned long *array, int *anynul,
- int *status);
-int ffgpvj(fitsfile *fptr, long group, long firstelem, long nelem,
- long nulval, long *array, int *anynul, int *status);
-int ffgpvuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int nulval, unsigned int *array, int *anynul, int *status);
-int ffgpvk(fitsfile *fptr, long group, long firstelem, long nelem,
- int nulval, int *array, int *anynul, int *status);
-int ffgpve(fitsfile *fptr, long group, long firstelem, long nelem,
- float nulval, float *array, int *anynul, int *status);
-int ffgpvd(fitsfile *fptr, long group, long firstelem, long nelem,
- double nulval, double *array, int *anynul, int *status);
-
-int ffgpfb(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned char *array, char *nularray, int *anynul, int *status);
-int ffgpfui(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned short *array, char *nularray, int *anynul, int *status);
-int ffgpfi(fitsfile *fptr, long group, long firstelem, long nelem,
- short *array, char *nularray, int *anynul, int *status);
-int ffgpfuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long *array, char *nularray, int *anynul, int *status);
-int ffgpfj(fitsfile *fptr, long group, long firstelem, long nelem,
- long *array, char *nularray, int *anynul, int *status);
-int ffgpfuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int *array, char *nularray, int *anynul, int *status);
-int ffgpfk(fitsfile *fptr, long group, long firstelem, long nelem,
- int *array, char *nularray, int *anynul, int *status);
-int ffgpfe(fitsfile *fptr, long group, long firstelem, long nelem,
- float *array, char *nularray, int *anynul, int *status);
-int ffgpfd(fitsfile *fptr, long group, long firstelem, long nelem,
- double *array, char *nularray, int *anynul, int *status);
-
-int ffg2db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
- long naxis1, long naxis2, unsigned char *array,
- int *anynul, int *status);
-int ffg2dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
- long naxis1, long naxis2, unsigned short *array,
- int *anynul, int *status);
-int ffg2di(fitsfile *fptr, long group, short nulval, long ncols,
- long naxis1, long naxis2, short *array,
- int *anynul, int *status);
-int ffg2duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
- long naxis1, long naxis2, unsigned long *array,
- int *anynul, int *status);
-int ffg2dj(fitsfile *fptr, long group, long nulval, long ncols,
- long naxis1, long naxis2, long *array,
- int *anynul, int *status);
-int ffg2duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
- long naxis1, long naxis2, unsigned int *array,
- int *anynul, int *status);
-int ffg2dk(fitsfile *fptr, long group, int nulval, long ncols,
- long naxis1, long naxis2, int *array,
- int *anynul, int *status);
-int ffg2de(fitsfile *fptr, long group, float nulval, long ncols,
- long naxis1, long naxis2, float *array,
- int *anynul, int *status);
-int ffg2dd(fitsfile *fptr, long group, double nulval, long ncols,
- long naxis1, long naxis2, double *array,
- int *anynul, int *status);
-
-int ffg3db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned char *array, int *anynul, int *status);
-int ffg3dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned short *array, int *anynul, int *status);
-int ffg3di(fitsfile *fptr, long group, short nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- short *array, int *anynul, int *status);
-int ffg3duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned long *array, int *anynul, int *status);
-int ffg3dj(fitsfile *fptr, long group, long nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- long *array, int *anynul, int *status);
-int ffg3duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- unsigned int *array, int *anynul, int *status);
-int ffg3dk(fitsfile *fptr, long group, int nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- int *array, int *anynul, int *status);
-int ffg3de(fitsfile *fptr, long group, float nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- float *array, int *anynul, int *status);
-int ffg3dd(fitsfile *fptr, long group, double nulval, long ncols,
- long nrows, long naxis1, long naxis2, long naxis3,
- double *array, int *anynul, int *status);
-
-int ffgsvb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned char nulval, unsigned char *array,
- int *anynul, int *status);
-int ffgsvui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned short nulval, unsigned short *array,
- int *anynul, int *status);
-int ffgsvi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, short nulval, short *array, int *anynul, int *status);
-int ffgsvuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned long nulval, unsigned long *array,
- int *anynul, int *status);
-int ffgsvj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, long nulval, long *array, int *anynul, int *status);
-int ffgsvuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned int nulval, unsigned int *array,
- int *anynul, int *status);
-int ffgsvk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, int nulval, int *array, int *anynul, int *status);
-int ffgsve(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, float nulval, float *array, int *anynul, int *status);
-int ffgsvd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, double nulval, double *array, int *anynul,
- int *status);
-
-int ffgsfb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned char *array, char *flagval,
- int *anynul, int *status);
-int ffgsfui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned short *array, char *flagval, int *anynul,
- int *status);
-int ffgsfi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, short *array, char *flagval, int *anynul, int *status);
-int ffgsfuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned long *array, char *flagval, int *anynul,
- int *status);
-int ffgsfj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, long *array, char *flagval, int *anynul, int *status);
-int ffgsfuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, unsigned int *array, char *flagval, int *anynul,
- int *status);
-int ffgsfk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, int *array, char *flagval, int *anynul, int *status);
-int ffgsfe(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, float *array, char *flagval, int *anynul, int *status);
-int ffgsfd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
- long *trc, long *inc, double *array, char *flagval, int *anynul,
- int *status);
-
-int ffggpb(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned char *array, int *status);
-int ffggpui(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned short *array, int *status);
-int ffggpi(fitsfile *fptr, long group, long firstelem, long nelem,
- short *array, int *status);
-int ffggpuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long *array, int *status);
-int ffggpj(fitsfile *fptr, long group, long firstelem, long nelem,
- long *array, int *status);
-int ffggpuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int *array, int *status);
-int ffggpk(fitsfile *fptr, long group, long firstelem, long nelem,
- int *array, int *status);
-int ffggpe(fitsfile *fptr, long group, long firstelem, long nelem,
- float *array, int *status);
-int ffggpd(fitsfile *fptr, long group, long firstelem, long nelem,
- double *array, int *status);
-
-/*--------------------- read column elements -------------*/
-int ffgcv( fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *nulval, void *array, int *anynul,
- int *status);
-int ffgcf( fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *array, char *nullarray,
- int *anynul, int *status);
-int ffgcvs(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *nulval, char **array, int *anynul, int *status);
-int ffgcl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *array, int *status);
-int ffgcvl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char nulval, char *array, int *anynul, int *status);
-int ffgcvb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned char nulval, unsigned char *array,
- int *anynul, int *status);
-int ffgcvui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short nulval, unsigned short *array,
- int *anynul, int *status);
-int ffgcvi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short nulval, short *array, int *anynul, int *status);
-int ffgcvuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long nulval, unsigned long *array, int *anynul,
- int *status);
-int ffgcvj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long nulval, long *array, int *anynul, int *status);
-int ffgcvuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int nulval, unsigned int *array, int *anynul,
- int *status);
-int ffgcvk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int nulval, int *array, int *anynul, int *status);
-int ffgcve(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float nulval, float *array, int *anynul, int *status);
-int ffgcvd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double nulval, double *array, int *anynul, int *status);
-int ffgcvc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float nulval, float *array, int *anynul, int *status);
-int ffgcvm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double nulval, double *array, int *anynul, int *status);
-int ffgcx(fitsfile *fptr, int colnum, long firstrow, long firstbit,
- long nbits, char *larray, int *status);
-int ffgcxui(fitsfile *fptr, int colnum, long firstrow, long nrows,
- long firstbit, int nbits, unsigned short *array, int *status);
-int ffgcxuk(fitsfile *fptr, int colnum, long firstrow, long nrows,
- long firstbit, int nbits, unsigned int *array, int *status);
-
-int ffgcfs(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, char **array, char *nularray, int *anynul, int *status);
-int ffgcfl(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, char *array, char *nularray, int *anynul, int *status);
-int ffgcfb(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, unsigned char *array, char *nularray, int *anynul, int *status);
-int ffgcfui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short *array, char *nularray, int *anynul,
- int *status);
-int ffgcfi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short *array, char *nularray, int *anynul, int *status);
-int ffgcfuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long *array, char *nularray, int *anynul,
- int *status);
-int ffgcfj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long *array, char *nularray, int *anynul, int *status);
-int ffgcfuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int *array, char *nularray, int *anynul,
- int *status);
-int ffgcfk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *array, char *nularray, int *anynul, int *status);
-int ffgcfe(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, char *nularray, int *anynul, int *status);
-int ffgcfd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, char *nularray, int *anynul, int *status);
-int ffgcfc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, char *nularray, int *anynul, int *status);
-int ffgcfm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, char *nularray, int *anynul, int *status);
-
-int ffgdes(fitsfile *fptr, int colnum, long rownum, long *length,
- long *heapaddr, int *status);
-
-int ffgdess(fitsfile *fptr, int colnum, long firstrow, long nrows, long *length,
- long *heapaddr, int *status);
-
-int ffgtbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
- unsigned char *values, int *status);
-
-/*------------ write primary array or image elements -------------*/
-int ffppr(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *array, int *status);
-int ffpprb(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned char *array, int *status);
-int ffpprui(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned short *array, int *status);
-int ffppri(fitsfile *fptr, long group, long firstelem,
- long nelem, short *array, int *status);
-int ffppruj(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned long *array, int *status);
-int ffpprj(fitsfile *fptr, long group, long firstelem,
- long nelem, long *array, int *status);
-int ffppruk(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned int *array, int *status);
-int ffpprk(fitsfile *fptr, long group, long firstelem,
- long nelem, int *array, int *status);
-int ffppre(fitsfile *fptr, long group, long firstelem,
- long nelem, float *array, int *status);
-int ffpprd(fitsfile *fptr, long group, long firstelem,
- long nelem, double *array, int *status);
-
-int ffppru(fitsfile *fptr, long group, long firstelem, long nelem,
- int *status);
-int ffpprn(fitsfile *fptr, long firstelem, long nelem, int *status);
-
-int ffppn(fitsfile *fptr, int datatype, long firstelem, long nelem,
- void *array, void *nulval, int *status);
-int ffppnb(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned char *array, unsigned char nulval, int *status);
-int ffppnui(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned short *array, unsigned short nulval,
- int *status);
-int ffppni(fitsfile *fptr, long group, long firstelem,
- long nelem, short *array, short nulval, int *status);
-int ffppnj(fitsfile *fptr, long group, long firstelem,
- long nelem, long *array, long nulval, int *status);
-int ffppnuj(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned long *array, unsigned long nulval, int *status);
-int ffppnuk(fitsfile *fptr, long group, long firstelem, long nelem,
- unsigned int *array, unsigned int nulval, int *status);
-int ffppnk(fitsfile *fptr, long group, long firstelem,
- long nelem, int *array, int nulval, int *status);
-int ffppne(fitsfile *fptr, long group, long firstelem,
- long nelem, float *array, float nulval, int *status);
-int ffppnd(fitsfile *fptr, long group, long firstelem,
- long nelem, double *array, double nulval, int *status);
-
-int ffp2db(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned char *array, int *status);
-int ffp2dui(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned short *array, int *status);
-int ffp2di(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, short *array, int *status);
-int ffp2duj(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned long *array, int *status);
-int ffp2dj(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, long *array, int *status);
-int ffp2duk(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, unsigned int *array, int *status);
-int ffp2dk(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, int *array, int *status);
-int ffp2de(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, float *array, int *status);
-int ffp2dd(fitsfile *fptr, long group, long ncols, long naxis1,
- long naxis2, double *array, int *status);
-
-int ffp3db(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned char *array, int *status);
-int ffp3dui(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned short *array, int *status);
-int ffp3di(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, short *array, int *status);
-int ffp3duj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned long *array, int *status);
-int ffp3dj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, long *array, int *status);
-int ffp3duk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, unsigned int *array, int *status);
-int ffp3dk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, int *array, int *status);
-int ffp3de(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, float *array, int *status);
-int ffp3dd(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
- long naxis2, long naxis3, double *array, int *status);
-
-int ffpssb(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned char *array, int *status);
-int ffpssui(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned short *array, int *status);
-int ffpssi(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, short *array, int *status);
-int ffpssuj(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned long *array, int *status);
-int ffpssj(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, long *array, int *status);
-int ffpssuk(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, unsigned int *array, int *status);
-int ffpssk(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, int *array, int *status);
-int ffpsse(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, float *array, int *status);
-int ffpssd(fitsfile *fptr, long group, long naxis, long *naxes,
- long *fpixel, long *lpixel, double *array, int *status);
-
-int ffpgpb(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned char *array, int *status);
-int ffpgpui(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned short *array, int *status);
-int ffpgpi(fitsfile *fptr, long group, long firstelem,
- long nelem, short *array, int *status);
-int ffpgpuj(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned long *array, int *status);
-int ffpgpj(fitsfile *fptr, long group, long firstelem,
- long nelem, long *array, int *status);
-int ffpgpuk(fitsfile *fptr, long group, long firstelem,
- long nelem, unsigned int *array, int *status);
-int ffpgpk(fitsfile *fptr, long group, long firstelem,
- long nelem, int *array, int *status);
-int ffpgpe(fitsfile *fptr, long group, long firstelem,
- long nelem, float *array, int *status);
-int ffpgpd(fitsfile *fptr, long group, long firstelem,
- long nelem, double *array, int *status);
-
-/*--------------------- iterator functions -------------*/
-int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, char *colname,
- int datatype, int iotype);
-int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, int colnum,
- int datatype, int iotype);
-int fits_iter_set_file(iteratorCol *col, fitsfile *fptr);
-int fits_iter_set_colname(iteratorCol *col, char *colname);
-int fits_iter_set_colnum(iteratorCol *col, int colnum);
-int fits_iter_set_datatype(iteratorCol *col, int datatype);
-int fits_iter_set_iotype(iteratorCol *col, int iotype);
-
-fitsfile * fits_iter_get_file(iteratorCol *col);
-char * fits_iter_get_colname(iteratorCol *col);
-int fits_iter_get_colnum(iteratorCol *col);
-int fits_iter_get_datatype(iteratorCol *col);
-int fits_iter_get_iotype(iteratorCol *col);
-void * fits_iter_get_array(iteratorCol *col);
-long fits_iter_get_tlmin(iteratorCol *col);
-long fits_iter_get_tlmax(iteratorCol *col);
-long fits_iter_get_repeat(iteratorCol *col);
-char * fits_iter_get_tunit(iteratorCol *col);
-char * fits_iter_get_tdisp(iteratorCol *col);
-
-int ffiter(int ncols, iteratorCol *data, long offset, long nPerLoop,
- int (*workFn)( long totaln, long offset, long firstn,
- long nvalues, int narrays, iteratorCol *data, void *userPointer),
- void *userPointer, int *status);
-
-/*--------------------- write column elements -------------*/
-int ffpcl(fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *array, int *status);
-int ffpcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char **array, int *status);
-int ffpcll(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *array, int *status);
-int ffpclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned char *array, int *status);
-int ffpclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short *array, int *status);
-int ffpcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short *array, int *status);
-int ffpcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long *array, int *status);
-int ffpclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long *array, int *status);
-int ffpcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int *array, int *status);
-int ffpclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *array, int *status);
-int ffpcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, int *status);
-int ffpcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, int *status);
-int ffpclc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, int *status);
-int ffpclm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, int *status);
-int ffpclu(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *status);
-int ffpclx(fitsfile *fptr, int colnum, long frow, long fbit, long nbit,
- char *larray, int *status);
-
-int ffpcn(fitsfile *fptr, int datatype, int colnum, long firstrow,
- long firstelem, long nelem, void *array, void *nulval, int *status);
-int ffpcns( fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char **array, char *nulvalue, int *status);
-int ffpcnl( fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, char *array, char nulvalue, int *status);
-int ffpcnb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned char *array, unsigned char nulvalue,
- int *status);
-int ffpcnui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned short *array, unsigned short nulvalue,
- int *status);
-int ffpcni(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, short *array, short nulvalue, int *status);
-int ffpcnuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned long *array, unsigned long nulvalue,
- int *status);
-int ffpcnj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long *array, long nulvalue, int *status);
-int ffpcnuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, unsigned int *array, unsigned int nulvalue,
- int *status);
-int ffpcnk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int *array, int nulvalue, int *status);
-int ffpcne(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, float *array, float nulvalue, int *status);
-int ffpcnd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, double *array, double nulvalue, int *status);
-
-int ffpdes(fitsfile *fptr, int colnum, long rownum, long length,
- long heapaddr, int *status);
-
-int ffptbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
- unsigned char *values, int *status);
-
-int ffirow(fitsfile *fptr, long firstrow, long nrows, int *status);
-int ffdrow(fitsfile *fptr, long firstrow, long nrows, int *status);
-int ffdrws(fitsfile *fptr, long *rownum, long nrows, int *status);
-int fficol(fitsfile *fptr, int numcol, char *ttype, char *tform, int *status);
-int fficls(fitsfile *fptr, int firstcol, int ncols, char **ttype,
- char **tform, int *status);
-int ffmvec(fitsfile *fptr, int colnum, long newveclen, int *status);
-int ffdcol(fitsfile *fptr, int numcol, int *status);
-int ffcpcl(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
- int create_col, int *status);
-
-/*--------------------- WCS Utilities ------------------*/
-int ffgics(fitsfile *fptr, double *xrval, double *yrval, double *xrpix,
- double *yrpix, double *xinc, double *yinc, double *rot,
- char *type, int *status);
-int ffgtcs(fitsfile *fptr, int xcol, int ycol, double *xrval,
- double *yrval, double *xrpix, double *yrpix, double *xinc,
- double *yinc, double *rot, char *type, int *status);
-int ffwldp(double xpix, double ypix, double xref, double yref,
- double xrefpix, double yrefpix, double xinc, double yinc,
- double rot, char *type, double *xpos, double *ypos, int *status);
-int ffxypx(double xpos, double ypos, double xref, double yref,
- double xrefpix, double yrefpix, double xinc, double yinc,
- double rot, char *type, double *xpix, double *ypix, int *status);
-
-/* WCS support routines (provide interface to Doug Mink's WCS library */
-int ffgiwcs(fitsfile *fptr, char **header, int *status);
-int ffgtwcs(fitsfile *fptr, int xcol, int ycol, char **header, int *status);
-
-/*--------------------- lexical parsing routines ------------------*/
-int fftexp( fitsfile *fptr, char *expr, int maxdim,
- int *datatype, long *nelem, int *naxis,
- long *naxes, int *status );
-
-int fffrow( fitsfile *infptr, char *expr,
- long firstrow, long nrows,
- long *n_good_rows, char *row_status, int *status);
-
-int ffffrw( fitsfile *fptr, char *expr, long *rownum, int *status);
-
-int fffrwc( fitsfile *fptr, char *expr, char *timeCol,
- char *parCol, char *valCol, long ntimes,
- double *times, char *time_status, int *status );
-
-int ffsrow( fitsfile *infptr, fitsfile *outfptr, char *expr,
- int *status);
-
-int ffcrow( fitsfile *fptr, int datatype, char *expr,
- long firstrow, long nelements, void *nulval,
- void *array, int *anynul, int *status );
-
-int ffcalc_rng( fitsfile *infptr, char *expr, fitsfile *outfptr,
- char *parName, char *parInfo, int nRngs,
- long *start, long *end, int *status );
-
-int ffcalc( fitsfile *infptr, char *expr, fitsfile *outfptr,
- char *parName, char *parInfo, int *status );
-
- /* ffhist is not really intended as a user-callable routine */
- /* but it may be useful for some specialized applications */
-
-int ffhist(fitsfile **fptr, char *outfile, int imagetype, int naxis,
- char colname[4][FLEN_VALUE],
- double *minin, double *maxin, double *binsizein,
- char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
- char binname[4][FLEN_VALUE],
- double weightin, char wtcol[FLEN_VALUE],
- int recip, char *rowselect, int *status);
-
-int fits_select_image_section(fitsfile **fptr, char *outfile,
- char *imagesection, int *status);
-int fits_select_section( fitsfile *infptr, fitsfile *outfptr,
- char *imagesection, int *status);
-
-/*--------------------- grouping routines ------------------*/
-
-int ffgtcr(fitsfile *fptr, char *grpname, int grouptype, int *status);
-int ffgtis(fitsfile *fptr, char *grpname, int grouptype, int *status);
-int ffgtch(fitsfile *gfptr, int grouptype, int *status);
-int ffgtrm(fitsfile *gfptr, int rmopt, int *status);
-int ffgtcp(fitsfile *infptr, fitsfile *outfptr, int cpopt, int *status);
-int ffgtmg(fitsfile *infptr, fitsfile *outfptr, int mgopt, int *status);
-int ffgtcm(fitsfile *gfptr, int cmopt, int *status);
-int ffgtvf(fitsfile *gfptr, long *firstfailed, int *status);
-int ffgtop(fitsfile *mfptr,int group,fitsfile **gfptr,int *status);
-int ffgtam(fitsfile *gfptr, fitsfile *mfptr, int hdupos, int *status);
-int ffgtnm(fitsfile *gfptr, long *nmembers, int *status);
-int ffgmng(fitsfile *mfptr, long *nmembers, int *status);
-int ffgmop(fitsfile *gfptr, long member, fitsfile **mfptr, int *status);
-int ffgmcp(fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt,
- int *status);
-int ffgmtf(fitsfile *infptr, fitsfile *outfptr, long member, int tfopt,
- int *status);
-int ffgmrm(fitsfile *fptr, long member, int rmopt, int *status);
-
-/*--------------------- group template parser routines ------------------*/
-
-int fits_execute_template(fitsfile *ff, char *ngp_template, int *status);
-
-/*--------------------- image compression routines ------------------*/
-
-int fits_comp_img(fitsfile *infptr, fitsfile *outfptr, int compress_type,
- long *tilesize, int parm1, int parm2, int *status);
-int fits_is_compressed_image(fitsfile *fptr, int *status);
-int fits_decomp_img (fitsfile *infptr, fitsfile *outfptr, int *status);
-int fits_read_compressed_img(fitsfile *fptr,
- int datatype, long *fpixel,long *lpixel,long *inc,
- int nullcheck, void *nulval, void *array, char *nullarray,
- int *anynul, int *status);
-
-int fits_read_compressed_pixels(fitsfile *fptr,
- int datatype, long fpixel, long npixels,
- int nullcheck, void *nulval, void *array, char *nullarray,
- int *anynul, int *status);
-
-int fits_quantize_float (float fdata[], int nx, float in_null_value,
- int noise_bits, int idata[], double *bscale, double *bzero,
- int *iminval, int *imaxval);
-int fits_quantize_double (double fdata[], int nx, double in_null_value,
- int noise_bits, int idata[], double *bscale, double *bzero,
- int *iminval, int *imaxval);
-int fits_rcomp(int a[], int nx, unsigned char *c, int clen,int nblock);
-int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx,
- int nblock);
-
-/* The following exclusion if __CINT__ is defined is needed for ROOT */
-#ifndef __CINT__
-#ifdef __cplusplus
-}
-#endif
-#endif
-
-#endif
-
diff --git a/include/fitsio2.h b/include/fitsio2.h
deleted file mode 100644
index 5636cc3..0000000
--- a/include/fitsio2.h
+++ /dev/null
@@ -1,870 +0,0 @@
-#ifndef _FITSIO2_H
-#define _FITSIO2_H
-
-#include "fitsio.h"
-
-#define DBUFFSIZE 28800 /* size of data buffer in bytes */
-
-#define NIOBUF 25 /* number of IO buffers to create */
-#define IOBUFLEN 2880 /* size in bytes of each IO buffer */
-#define MINDIRECT 8640 /* minimum size for direct reads and writes */
- /* MINDIRECT must have a value >= 8640 */
-
-#define NATIVE 0 /* a generic machine that uses IEEE formats */
-#define ULTRIX 1
-#define ALPHA_OSF 2
-#define VAXVMS 3
-#define ALPHAVMS 4
-#define IBMPC 5
-#define CRAY 6
-
-#define GFLOAT 1
-#define IEEEFLOAT 2
-
-/* the following are used to determine what type machine we are running on */
-
-/* the following block determines the size of longs on SGI IRIX machines */
-#if defined(_MIPS_SZLONG)
-# if _MIPS_SZLONG == 32
-# define LONGSIZE 32
-# elif _MIPS_SZLONG == 64
-# define LONGSIZE 64
-# else
-# error "can't handle long size given by _MIPS_SZLONG"
-# endif
-#endif
-
-#if defined(vax) && defined(VMS)
-
-#define MACHINE VAXVMS
-#define BYTESWAPPED TRUE
-
-#elif defined(__alpha) && defined(__VMS)
-
-#if (__D_FLOAT == TRUE)
-
-/* this float option is the same as for VAX/VMS machines. */
-#define MACHINE VAXVMS
-#define BYTESWAPPED TRUE
-
-#elif (__G_FLOAT == TRUE)
-
-/* G_FLOAT is the default for ALPHA VMS systems */
-#define MACHINE ALPHAVMS
-#define BYTESWAPPED TRUE
-#define FLOATTYPE GFLOAT
-
-#elif (__IEEE_FLOAT == TRUE)
-
-#define MACHINE ALPHAVMS
-#define BYTESWAPPED TRUE
-#define FLOATTYPE IEEEFLOAT
-
-#endif
-
-#elif defined(__alpha) && defined(__unix__)
-
-#define MACHINE ALPHA_OSF
-#define BYTESWAPPED TRUE
-#define LONGSIZE 64
-
-#elif defined(ultrix) && defined(unix)
-
-#define MACHINE ULTRIX
-#define BYTESWAPPED TRUE
-
-#elif defined(__i386) || defined(__i386__) || defined(__i486__) || defined(__i586__)
-
-/* IBM PC */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__TURBOC__)
-
-/* IBM PC running DOS or Windows */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(_NI_mswin_)
-
-/* LabWindows/CVI with Windows 3.x, 95, or NT */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(__EMX__)
-
-/* IBM PC running OS/2 */
-#define MACHINE IBMPC
-#define BYTESWAPPED TRUE
-
-#elif defined(__sparcv9)
-
-/* SUN Solaris7 in 64-bit mode */
-#define BYTESWAPPED FALSE
-#define MACHINE NATIVE
-#define LONGSIZE 64
-
-#else
-
-/* assume machine uses the same IEEE formats as used in FITS files */
-#define MACHINE NATIVE
-#define BYTESWAPPED FALSE
-
-#endif
-
-/* assume longs are 4 bytes long, unless previously set otherwise */
-#ifndef LONGSIZE
-#define LONGSIZE 32
-#endif
-
-#define IGNORE_EOF 1
-#define REPORT_EOF 0
-#define DATA_UNDEFINED -1
-#define NULL_UNDEFINED 1234554321
-#define ASCII_NULL_UNDEFINED 1 /* indicate no defined null value */
-
-#define maxvalue(A,B) ((A) > (B) ? (A) : (B))
-#define minvalue(A,B) ((A) < (B) ? (A) : (B))
-
-#define FSTRCMP(a,b) ((a)[0]<(b)[0]? -1:(a)[0]>(b)[0]?1:strcmp((a),(b)))
-#define FSTRNCMP(a,b,n) ((a)[0]<(b)[0]?-1:(a)[0]>(b)[0]?1:strncmp((a),(b),(n)))
-
-#if defined(__VMS) || defined(VMS)
-
-#define FNANMASK 0xFFFF /* mask all bits */
-#define DNANMASK 0xFFFF /* mask all bits */
-
-#else
-
-#define FNANMASK 0x7F80 /* mask bits 1 - 8; all set on NaNs */
- /* all 0 on underflow or 0. */
-
-#define DNANMASK 0x7FF0 /* mask bits 1 - 11; all set on NaNs */
- /* all 0 on underflow or 0. */
-
-#endif
-
-#if MACHINE == CRAY
- /*
- Cray machines: the large negative integer corresponds
- to the 3 most sig digits set to 1. If these
- 3 bits are set in a floating point number (64 bits), then it represents
- a reserved value (i.e., a NaN)
- */
-#define fnan(L) ( (L) >= 0xE000000000000000 ? 1 : 0) )
-
-#else
- /* these functions work for both big and little endian machines */
- /* that use the IEEE floating point format for internal numbers */
-
- /* These functions tests whether the float value is a reserved IEEE */
- /* value such as a Not-a-Number (NaN), or underflow, overflow, or */
- /* infinity. The functions returns 1 if the value is a NaN, overflow */
- /* or infinity; it returns 2 if the value is an denormalized underflow */
- /* value; otherwise it returns 0. fnan tests floats, dnan tests doubles */
-
-#define fnan(L) \
- ( (L & FNANMASK) == FNANMASK ? 1 : (L & FNANMASK) == 0 ? 2 : 0)
-
-#define dnan(L) \
- ( (L & DNANMASK) == DNANMASK ? 1 : (L & DNANMASK) == 0 ? 2 : 0)
-
-#endif
-
-#define DUCHAR_MAX 255.49 /* max double value that fits in an unsigned char */
-#define DUCHAR_MIN -0.49 /* min double value that fits in an unsigned char */
-#define DUSHRT_MAX 65535.49 /* max double value that fits in a unsigned short*/
-#define DUSHRT_MIN -0.49 /* min double value that fits in an unsigned short */
-#define DSHRT_MAX 32767.49 /* max double value that fits in a short */
-#define DSHRT_MIN -32768.49 /* min double value that fits in a short */
-#define DULONG_MAX 4294967295.49 /* max double that fits in a unsigned long */
-#define DULONG_MIN -0.49 /* min double value that fits in an unsigned long */
-#define DLONG_MAX 2147483647.49 /* max double value that fits in a long */
-#define DLONG_MIN -2147483648.49 /* min double value that fits in a long */
-#define DUINT_MAX 4294967295.49 /* max dbl that fits in a unsigned 4-byte int */
-#define DUINT_MIN -0.49 /* min dbl that fits in an unsigned 4-byte int */
-#define DINT_MAX 2147483647.49 /* max double value that fits in a 4-byte int */
-#define DINT_MIN -2147483648.49 /* min double value that fits in a 4-byte int */
-
-#ifndef UINT32_MAX
-#define UINT32_MAX 4294967295U /* max unsigned 32-bit integer */
-#endif
-#ifndef INT32_MAX
-#define INT32_MAX 2147483647 /* max 32-bit integer */
-#endif
-#ifndef INT32_MIN
-#define INT32_MIN -2147483647 /* min 32-bit integer */
-#endif
-
-#define COMPRESS_NULL_VALUE -2147483647
-
-int ffmkky(char *keyname, char *keyval, char *comm, char *card, int *status);
-int ffgnky(fitsfile *fptr, char *card, int *status);
-void ffcfmt(char *tform, char *cform);
-void ffcdsp(char *tform, char *cform);
-void ffswap2(short *values, long nvalues);
-void ffswap4(INT32BIT *values, long nvalues);
-void ffswap8(double *values, long nvalues);
-int ffi2c(long ival, char *cval, int *status);
-int ffl2c(int lval, char *cval, int *status);
-int ffs2c(char *instr, char *outstr, int *status);
-int ffr2f(float fval, int decim, char *cval, int *status);
-int ffr2e(float fval, int decim, char *cval, int *status);
-int ffd2f(double dval, int decim, char *cval, int *status);
-int ffd2e(double dval, int decim, char *cval, int *status);
-int ffc2ii(char *cval, long *ival, int *status);
-int ffc2ll(char *cval, int *lval, int *status);
-int ffc2rr(char *cval, float *fval, int *status);
-int ffc2dd(char *cval, double *dval, int *status);
-int ffc2x(char *cval, char *dtype, long *ival, int *lval, char *sval,
- double *dval, int *status);
-int ffc2s(char *instr, char *outstr, int *status);
-int ffc2i(char *cval, long *ival, int *status);
-int ffc2r(char *cval, float *fval, int *status);
-int ffc2d(char *cval, double *dval, int *status);
-int ffc2l(char *cval, int *lval, int *status);
-void ffxmsg(int action, char *err_message);
-int ffgcnt(fitsfile *fptr, char *value, int *status);
-int ffgtkn(fitsfile *fptr, int numkey, char *keyname, long *value, int *status);
-int fftkyn(fitsfile *fptr, int numkey, char *keyname, char *value, int *status);
-int ffgphd(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
- long naxes[], long *pcount, long *gcount, int *extend, double *bscale,
- double *bzero, long *blank, int *nspace, int *status);
-int ffgttb(fitsfile *fptr, long *rowlen, long *nrows, long *pcount,
- long *tfield, int *status);
-
-int ffmkey(fitsfile *fptr, char *card, int *status);
-int ffikey(fitsfile *fptr, char *card, int *status);
-
-int ffmbyt(fitsfile *fptr, long bytpos, int ignore_err, int *status);
-int ffgbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
-int ffpbyt(fitsfile *fptr, long nbytes, void *buffer, int *status);
-int ffgbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
- void *buffer, int *status);
-int ffpbytoff(fitsfile *fptr, long gsize, long ngroups, long offset,
- void *buffer, int *status);
-int ffldrc(fitsfile *fptr, long record, int err_mode, int *status);
-int ffwhbf(fitsfile *fptr, int *nbuff);
-int ffcurbuf(int nbuff, FITSfile **Fptr);
-int ffflsh(fitsfile *fptr, int clearbuf, int *status);
-int ffbfeof(fitsfile *fptr, int *status);
-int ffbfwt(int nbuff, int *status);
-int fits_get_num_files(void);
-int ffpxsz(int datatype);
-
-int ffoptplt(fitsfile *fptr, const char *tempname, int *status);
-int fits_is_this_a_copy(char *urltype);
-int fits_already_open(fitsfile **fptr, char *url,
- char *urltype, char *infile, char *extspec, char *rowfilter,
- char *binspec, char *colspec, int mode,int *isopen, int *status);
-int ffedit_columns(fitsfile **fptr, char *outfile, char *expr, int *status);
-int fits_get_col_minmax(fitsfile *fptr, int colnum, float *datamin,
- float *datamax, int *status);
-int ffwritehisto(long totaln, long offset, long firstn, long nvalues,
- int narrays, iteratorCol *imagepars, void *userPointer);
-int ffcalchist(long totalrows, long offset, long firstrow, long nrows,
- int ncols, iteratorCol *colpars, void *userPointer);
-int fits_copy_image_cell(fitsfile **fptr, char *outfile, char *colname,
- long rownum, int *status);
-int fits_copy_image_keywords(fitsfile *infptr, fitsfile *outfptr, int *status);
-int fits_get_section_range(char **ptr,long *secmin,long *secmax,long *incre,
- int *status);
-int ffrhdu(fitsfile *fptr, int *hdutype, int *status);
-int ffpinit(fitsfile *fptr, int *status);
-int ffainit(fitsfile *fptr, int *status);
-int ffbinit(fitsfile *fptr, int *status);
-int ffchdu(fitsfile *fptr, int *status);
-int ffwend(fitsfile *fptr, int *status);
-int ffpdfl(fitsfile *fptr, int *status);
-int ffuptf(fitsfile *fptr, int *status);
-
-int ffdblk(fitsfile *fptr, long nblocks, int *status);
-int ffgext(fitsfile *fptr, int moveto, int *exttype, int *status);
-int ffgtbc(fitsfile *fptr, long *totalwidth, int *status);
-int ffgtbp(fitsfile *fptr, char *name, char *value, int *status);
-int ffiblk(fitsfile *fptr, long nblock, int headdata, int *status);
-int ffshft(fitsfile *fptr, long firstbyte, long nbytes, long nshift,
- int *status);
-
-int ffgcpr(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int writemode, double *scale, double *zero, char *tform,
- long *twidth, int *tcode, int *maxelem, long *startpos,
- long *elemnum, long *incre, long *repeat,long *rowlen,
- int *hdutype, long *tnull, char *snull, int *status);
-
-int ffflushx(FITSfile *fptr);
-int ffseek(FITSfile *fptr, long position);
-int ffread(FITSfile *fptr, long nbytes, void *buffer,
- int *status);
-int ffwrite(FITSfile *fptr, long nbytes, void *buffer,
- int *status);
-int fftrun(fitsfile *fptr, long filesize, int *status);
-
-int ffgcll(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
- nelem, int nultyp, char nulval, char *array, char *nularray,
- int *anynul, int *status);
-int ffgcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int nultyp, char *nulval,
- char **array, char *nularray, int *anynul, int *status);
-int ffgcls2(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, int nultyp, char *nulval,
- char **array, char *nularray, int *anynul, int *status);
-int ffgclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned char nulval,
- unsigned char *array, char *nularray, int *anynul, int *status);
-int ffgclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned short nulval,
- unsigned short *array, char *nularray, int *anynul, int *status);
-int ffgcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, short nulval,
- short *array, char *nularray, int *anynul, int *status);
-int ffgcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned long nulval,
- unsigned long *array, char *nularray, int *anynul, int *status);
-int ffgclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, long nulval, long *array,
- char *nularray, int *anynul, int *status);
-int ffgcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, unsigned int nulval,
- unsigned int *array, char *nularray, int *anynul, int *status);
-int ffgclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, int nulval, int *array,
- char *nularray, int *anynul, int *status);
-int ffgcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, float nulval, float *array,
- char *nularray, int *anynul, int *status);
-int ffgcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
- long nelem, long elemincre, int nultyp, double nulval,
- double *array, char *nularray, int *anynul, int *status);
-
-int ffpi1b(fitsfile *fptr, long nelem, long incre, unsigned char *buffer,
- int *status);
-int ffpi2b(fitsfile *fptr, long nelem, long incre, short *buffer, int *status);
-int ffpi4b(fitsfile *fptr, long nelem, long incre, INT32BIT *buffer,
- int *status);
-int ffpr4b(fitsfile *fptr, long nelem, long incre, float *buffer, int *status);
-int ffpr8b(fitsfile *fptr, long nelem, long incre, double *buffer, int *status);
-
-int ffgi1b(fitsfile *fptr, long pos, long nelem, long incre,
- unsigned char *buffer, int *status);
-int ffgi2b(fitsfile *fptr, long pos, long nelem, long incre, short *buffer,
- int *status);
-int ffgi4b(fitsfile *fptr, long pos, long nelem, long incre, INT32BIT *buffer,
- int *status);
-int ffgr4b(fitsfile *fptr, long pos, long nelem, long incre, float *buffer,
- int *status);
-int ffgr8b(fitsfile *fptr, long pos, long nelem, long incre, double *buffer,
- int *status);
-
-int ffcins(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
- long bytepos, int *status);
-int ffcdel(fitsfile *fptr, long naxis1, long naxis2, long nbytes,
- long bytepos, int *status);
-int ffkshf(fitsfile *fptr, int firstcol, int tfields, int nshift, int *status);
-
-int fffi1i1(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned char nullval, char
- *nullarray, int *anynull, unsigned char *output, int *status);
-int fffi2i1(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffi4i1(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffr4i1(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffr8i1(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char nullval, char *nullarray,
- int *anynull, unsigned char *output, int *status);
-int fffstri1(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned char nullval, char *nullarray, int *anynull,
- unsigned char *output, int *status);
-
-int fffi1u2(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned short nullval,
- char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffi2u2(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffi4u2(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffr4u2(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffr8u2(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned short nullval, char *nullarray,
- int *anynull, unsigned short *output, int *status);
-int fffstru2(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned short nullval, char *nullarray, int *anynull,
- unsigned short *output, int *status);
-
-int fffi1i2(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffi2i2(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffi4i2(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffr4i2(float *input, long ntodo, double scale, double zero,
- int nullcheck, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffr8i2(double *input, long ntodo, double scale, double zero,
- int nullcheck, short nullval, char *nullarray,
- int *anynull, short *output, int *status);
-int fffstri2(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- short nullval, char *nullarray, int *anynull, short *output,
- int *status);
-
-int fffi1u4(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned long nullval,
- char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffi2u4(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffi4u4(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffr4u4(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffr8u4(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned long nullval, char *nullarray,
- int *anynull, unsigned long *output, int *status);
-int fffstru4(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned long nullval, char *nullarray, int *anynull,
- unsigned long *output, int *status);
-
-int fffi1i4(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffi2i4(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffi4i4(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffr4i4(float *input, long ntodo, double scale, double zero,
- int nullcheck, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffr8i4(double *input, long ntodo, double scale, double zero,
- int nullcheck, long nullval, char *nullarray,
- int *anynull, long *output, int *status);
-int fffstri4(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- long nullval, char *nullarray, int *anynull, long *output,
- int *status);
-
-int fffi1int(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffi2int(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffi4int(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffr4int(float *input, long ntodo, double scale, double zero,
- int nullcheck, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffr8int(double *input, long ntodo, double scale, double zero,
- int nullcheck, int nullval, char *nullarray,
- int *anynull, int *output, int *status);
-int fffstrint(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- int nullval, char *nullarray, int *anynull, int *output,
- int *status);
-
-int fffi1uint(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, unsigned int nullval,
- char *nullarray, int *anynull, unsigned int *output, int *status);
-int fffi2uint(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffi4uint(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffr4uint(float *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffr8uint(double *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned int nullval, char *nullarray,
- int *anynull, unsigned int *output, int *status);
-int fffstruint(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- unsigned int nullval, char *nullarray, int *anynull,
- unsigned int *output, int *status);
-
-int fffi1r4(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffi2r4(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffi4r4(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffr4r4(float *input, long ntodo, double scale, double zero,
- int nullcheck, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffr8r4(double *input, long ntodo, double scale, double zero,
- int nullcheck, float nullval, char *nullarray,
- int *anynull, float *output, int *status);
-int fffstrr4(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- float nullval, char *nullarray, int *anynull, float *output,
- int *status);
-
-int fffi1r8(unsigned char *input, long ntodo, double scale, double zero,
- int nullcheck, unsigned char tnull, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffi2r8(short *input, long ntodo, double scale, double zero,
- int nullcheck, short tnull, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffi4r8(INT32BIT *input, long ntodo, double scale, double zero,
- int nullcheck, INT32BIT tnull, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffr4r8(float *input, long ntodo, double scale, double zero,
- int nullcheck, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffr8r8(double *input, long ntodo, double scale, double zero,
- int nullcheck, double nullval, char *nullarray,
- int *anynull, double *output, int *status);
-int fffstrr8(char *input, long ntodo, double scale, double zero,
- long twidth, double power, int nullcheck, char *snull,
- double nullval, char *nullarray, int *anynull, double *output,
- int *status);
-
-int ffi1fi1(unsigned char *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffu2fi1(unsigned short *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffi2fi1(short *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffu4fi1(unsigned long *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffi4fi1(long *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffuintfi1(unsigned int *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffintfi1(int *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffr4fi1(float *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-int ffr8fi1(double *array, long ntodo, double scale, double zero,
- unsigned char *buffer, int *status);
-
-int ffi1fi2(unsigned char *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffu2fi2(unsigned short *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffi2fi2(short *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffu4fi2(unsigned long *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffi4fi2(long *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffuintfi2(unsigned int *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffintfi2(int *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffr4fi2(float *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-int ffr8fi2(double *array, long ntodo, double scale, double zero,
- short *buffer, int *status);
-
-int ffi1fi4(unsigned char *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffu2fi4(unsigned short *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffi2fi4(short *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffu4fi4(unsigned long *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffi4fi4(long *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffuintfi4(unsigned int *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffintfi4(int *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffr4fi4(float *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-int ffr8fi4(double *array, long ntodo, double scale, double zero,
- INT32BIT *buffer, int *status);
-
-int ffi1fr4(unsigned char *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffu2fr4(unsigned short *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffi2fr4(short *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffu4fr4(unsigned long *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffi4fr4(long *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffuintfr4(unsigned int *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffintfr4(int *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffr4fr4(float *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-int ffr8fr4(double *array, long ntodo, double scale, double zero,
- float *buffer, int *status);
-
-int ffi1fr8(unsigned char *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffu2fr8(unsigned short *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffi2fr8(short *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffu4fr8(unsigned long *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffi4fr8(long *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffuintfr8(unsigned int *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffintfr8(int *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffr4fr8(float *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-int ffr8fr8(double *array, long ntodo, double scale, double zero,
- double *buffer, int *status);
-
-int ffi1fstr(unsigned char *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffu2fstr(unsigned short *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffi2fstr(short *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffu4fstr(unsigned long *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffi4fstr(long *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffintfstr(int *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffuintfstr(unsigned int *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffr4fstr(float *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-int ffr8fstr(double *input, long ntodo, double scale, double zero,
- char *cform, long twidth, char *output, int *status);
-
-/* the following 4 routines are VMS macros used on VAX or Alpha VMS */
-void ieevpd(double *inarray, double *outarray, long *nvals);
-void ieevud(double *inarray, double *outarray, long *nvals);
-void ieevpr(float *inarray, float *outarray, long *nvals);
-void ieevur(float *inarray, float *outarray, long *nvals);
-
-/* routines related to the lexical parser */
-int ffselect_table(fitsfile **fptr, char *outfile, char *expr, int *status);
-int ffiprs( fitsfile *fptr, int compressed, char *expr, int maxdim,
- int *datatype, long *nelem, int *naxis, long *naxes,
- int *status );
-void ffcprs( void );
-int ffcvtn( int inputType, void *input, char *undef, long ntodo,
- int outputType, void *nulval, void *output,
- int *anynull, int *status );
-int parse_data( long totalrows, long offset, long firstrow,
- long nrows, int nCols, iteratorCol *colData,
- void *userPtr );
-int uncompress_hkdata( fitsfile *fptr, long ntimes,
- double *times, int *status );
-int ffffrw_work( long totalrows, long offset, long firstrow,
- long nrows, int nCols, iteratorCol *colData,
- void *userPtr );
-
-
-/* image compression routines */
-int imcomp_init_table(fitsfile *outfptr, int compress_type,
- int bitpix, int naxis,long *naxes,long *tilesize,
- int rice_blocksize,int rice_nbits,int *status);
-int imcomp_calc_max_elem (int comptype, int nx, int blocksize);
-int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
- int *status);
-int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
- int *status);
-int imcomp_compress_tile (fitsfile *outfptr, long row,
- int datatype, void *tiledata, long tilelen, int *status);
-
-/* image decompression routines */
-int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
- int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
- long *inc, long *naxes, int nullcheck, void *nullval,
- void *array, char *nullarray, int *anynul, long *nread, int *status);
-int imcomp_get_compressed_image_par(fitsfile *infptr, int *status);
-int imcomp_decompress_tile (fitsfile *infptr,
- int nrow, int tilesize, int datatype, int nullcheck,
- void *nulval, void *buffer, char *bnullarray, int *anynul,
- int *status);
-int imcomp_copy_overlap (char *tile, int datatype, int ndim,
- long *tfpixel, long *tlpixel, char *bnullarray, char *image,
- long *fpixel, long *lpixel, int nullcheck, char *nullarray,
- int *status);
-
-int pl_p2li (int *pxsrc, int xs, short *lldst, int npix);
-int pl_l2pi (short *ll_src, int xs, int *px_dst, int npix);
-
-/* general driver routines */
-
-int urltype2driver(char *urltype, int *driver);
-int fits_init_cfitsio(void);
-
-int fits_register_driver( char *prefix,
- int (*init)(void),
- int (*fitsshutdown)(void),
- int (*setoptions)(int option),
- int (*getoptions)(int *options),
- int (*getversion)(int *version),
- int (*checkfile) (char *urltype, char *infile, char *outfile),
- int (*fitsopen)(char *filename, int rwmode, int *driverhandle),
- int (*fitscreate)(char *filename, int *driverhandle),
- int (*fitstruncate)(int driverhandle, long filesize),
- int (*fitsclose)(int driverhandle),
- int (*fremove)(char *filename),
- int (*size)(int driverhandle, long *size),
- int (*flush)(int driverhandle),
- int (*seek)(int driverhandle, long offset),
- int (*fitsread) (int driverhandle, void *buffer, long nbytes),
- int (*fitswrite)(int driverhandle, void *buffer, long nbytes));
-
-/* file driver I/O routines */
-
-int file_init(void);
-int file_setoptions(int options);
-int file_getoptions(int *options);
-int file_getversion(int *version);
-int file_shutdown(void);
-int file_checkfile(char *urltype, char *infile, char *outfile);
-int file_open(char *filename, int rwmode, int *driverhandle);
-int file_compress_open(char *filename, int rwmode, int *hdl);
-int file_openfile(char *filename, int rwmode, FILE **diskfile);
-int file_create(char *filename, int *driverhandle);
-int file_truncate(int driverhandle, long filesize);
-int file_size(int driverhandle, long *filesize);
-int file_close(int driverhandle);
-int file_remove(char *filename);
-int file_flush(int driverhandle);
-int file_seek(int driverhandle, long offset);
-int file_read (int driverhandle, void *buffer, long nbytes);
-int file_write(int driverhandle, void *buffer, long nbytes);
-int file_is_compressed(char *filename);
-
-/* memory driver I/O routines */
-
-int mem_init(void);
-int mem_setoptions(int options);
-int mem_getoptions(int *options);
-int mem_getversion(int *version);
-int mem_shutdown(void);
-int mem_create(char *filename, int *handle);
-int mem_openmem(void **buffptr, size_t *buffsize, size_t deltasize,
- void *(*memrealloc)(void *p, size_t newsize), int *handle);
-int mem_createmem(size_t memsize, int *handle);
-int stdin_checkfile(char *urltype, char *infile, char *outfile);
-int stdin_open(char *filename, int rwmode, int *handle);
-int stdin2mem(int hd);
-int stdin2file(int hd);
-int stdout_close(int handle);
-int mem_compress_open(char *filename, int rwmode, int *hdl);
-int mem_iraf_open(char *filename, int rwmode, int *hdl);
-int mem_size(int handle, long *filesize);
-int mem_truncate(int handle, long filesize);
-int mem_close_free(int handle);
-int mem_close_keep(int handle);
-int mem_seek(int handle, long offset);
-int mem_read(int hdl, void *buffer, long nbytes);
-int mem_write(int hdl, void *buffer, long nbytes);
-int mem_uncompress2mem(char *filename, FILE *diskfile, int hdl);
-
-int iraf2mem(char *filename, char **buffptr, size_t *buffsize,
- size_t *filesize, int *status);
-
-/* root driver I/O routines */
-
-int root_init(void);
-int root_setoptions(int options);
-int root_getoptions(int *options);
-int root_getversion(int *version);
-int root_shutdown(void);
-int root_open(char *filename, int rwmode, int *driverhandle);
-int root_create(char *filename, int *driverhandle);
-int root_close(int driverhandle);
-int root_flush(int driverhandle);
-int root_seek(int driverhandle, long offset);
-int root_read (int driverhandle, void *buffer, long nbytes);
-int root_write(int driverhandle, void *buffer, long nbytes);
-int root_size(int handle, long *filesize);
-
-/* http driver I/O routines */
-
-int http_checkfile(char *urltype, char *infile, char *outfile);
-int http_open(char *filename, int rwmode, int *driverhandle);
-int http_file_open(char *filename, int rwmode, int *driverhandle);
-int http_compress_open(char *filename, int rwmode, int *driverhandle);
-
-/* ftp driver I/O routines */
-
-int ftp_checkfile(char *urltype, char *infile, char *outfile);
-int ftp_open(char *filename, int rwmode, int *driverhandle);
-int ftp_file_open(char *filename, int rwmode, int *driverhandle);
-int ftp_compress_open(char *filename, int rwmode, int *driverhandle);
-
-
-int uncompress2mem(char *filename, FILE *diskfile,
- char **buffptr, size_t *buffsize,
- void *(*mem_realloc)(void *p, size_t newsize),
- size_t *filesize, int *status);
-
-int uncompress2mem_from_mem(
- char *inmemptr,
- size_t inmemsize,
- char **buffptr,
- size_t *buffsize,
- void *(*mem_realloc)(void *p, size_t newsize),
- size_t *filesize,
- int *status);
-
-int uncompress2file(char *filename,
- FILE *indiskfile,
- FILE *outdiskfile,
- int *status);
-
-int compress2mem_from_mem(
- char *inmemptr,
- size_t inmemsize,
- char **buffptr,
- size_t *buffsize,
- void *(*mem_realloc)(void *p, size_t newsize),
- size_t *filesize,
- int *status);
-
-/* ==================== SHARED MEMORY DRIVER SECTION ======================= */
-
-#ifdef HAVE_SHMEM_SERVICES
-#include "drvrsmem.h"
-#endif
-
-/* ==================== END OF SHARED MEMORY DRIVER SECTION ================ */
-
-#endif
-
-
-#if defined(vms) || defined(__vms) || defined(WIN32) || defined(__WIN32__) || defined(macintosh)
-
-/* ================================================================== */
-/* A hack for nonunix machines, which lack strcasecmp and strncasecmp */
-/* ================================================================== */
-
-int strcasecmp (const char *s1, const char *s2 );
-int strncasecmp(const char *s1, const char *s2, size_t n);
-
-#endif
diff --git a/include/fusebuf.h b/include/fusebuf.h
deleted file mode 100644
index 954a979..0000000
--- a/include/fusebuf.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Johns Hopkins University
- * Center For Astrophysical Sciences
- * FUSE
- *******************************************************************************
- *
- * Synopsis: #include "fusebuf.h"
- *
- * Description: Structure definitions and routine prototyping for multi-line
- * file buffering as handled by fusebuf.c.
- *
- * History: 08/17/98 gak Begin work
- * 08/18/98 gak Tested and working
- * (as called by cf_make_ff)
- *
- ******************************************************************************/
-
-typedef struct {
- fitsfile *fits; /* Pointer to open FITS structure. */
- int hdu; /* HDU containing image to buffer. */
- int nx, ny; /* X and Y dimensions of the image. */
- float **buf, /* Array of pointers to buffered lines. */
- **y; /* Pointers to buffered lines in y order. */
- int nl, /* Number of lines buffered. */
- yfirst, ylast, /* Row numbers of buffered lines */
- znext; /* Ordinal of next line ptr to use. */
-} imgbuf;
-
-int cf_openextn(fitsfile *, int, imgbuf *, int, int *);
-
-int cf_closeextn(imgbuf *, int *);
-
-float getpixf(imgbuf *, int, int);
-
diff --git a/include/group.h b/include/group.h
deleted file mode 100644
index f7aae5b..0000000
--- a/include/group.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#define MAX_HDU_TRACKER 1000
-
-typedef struct _HDUtracker HDUtracker;
-
-struct _HDUtracker
-{
- int nHDU;
-
- char *filename[MAX_HDU_TRACKER];
- int position[MAX_HDU_TRACKER];
-
- char *newFilename[MAX_HDU_TRACKER];
- int newPosition[MAX_HDU_TRACKER];
-};
-
-/* functions used internally in the grouping convention module */
-
-int ffgtdc(int grouptype, int xtensioncol, int extnamecol, int extvercol,
- int positioncol, int locationcol, int uricol, char *ttype[],
- char *tform[], int *ncols, int *status);
-
-int ffgtgc(fitsfile *gfptr, int *xtensionCol, int *extnameCol, int *extverCol,
- int *positionCol, int *locationCol, int *uriCol, int *grptype,
- int *status);
-
-int ffgmul(fitsfile *mfptr, int rmopt, int *status);
-
-int ffgmf(fitsfile *gfptr, char *xtension, char *extname, int extver,
- int position, char *location, long *member, int *status);
-
-int ffgtrmr(fitsfile *gfptr, HDUtracker *HDU, int *status);
-
-int ffgtcpr(fitsfile *infptr, fitsfile *outfptr, int cpopt, HDUtracker *HDU,
- int *status);
-
-int fftsad(fitsfile *mfptr, HDUtracker *HDU, int *newPosition,
- char *newFileName);
-
-int fftsud(fitsfile *mfptr, HDUtracker *HDU, int newPosition,
- char *newFileName);
-
-void prepare_keyvalue(char *keyvalue);
-
-int fits_path2url(char *inpath, char *outpath, int *status);
-
-int fits_url2path(char *inpath, char *outpath, int *status);
-
-int fits_get_cwd(char *cwd, int *status);
-
-int fits_get_url(fitsfile *fptr, char *realURL, char *startURL,
- char *realAccess, char *startAccess, int *iostate,
- int *status);
-
-int fits_clean_url(char *inURL, char *outURL, int *status);
-
-int fits_relurl2url(char *refURL, char *relURL, char *absURL, int *status);
-
-int fits_url2relurl(char *refURL, char *absURL, char *relURL, int *status);
-
-int fits_encode_url(char *inpath, char *outpath, int *status);
-
-int fits_unencode_url(char *inpath, char *outpath, int *status);
-
-int fits_is_url_absolute(char *url);
-
diff --git a/include/grparser.h b/include/grparser.h
deleted file mode 100644
index 32a172b..0000000
--- a/include/grparser.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/* T E M P L A T E P A R S E R H E A D E R F I L E
- =====================================================
-
- by Jerzy.Borkowski@obs.unige.ch
-
- Integral Science Data Center
- ch. d'Ecogia 16
- 1290 Versoix
- Switzerland
-
-14-Oct-98: initial release
-16-Oct-98: reference to fitsio.h removed, also removed strings after #endif
- directives to make gcc -Wall not to complain
-20-Oct-98: added declarations NGP_XTENSION_SIMPLE and NGP_XTENSION_FIRST
-24-Oct-98: prototype of ngp_read_line() function updated.
-22-Jan-99: prototype for ngp_set_extver() function added.
-*/
-
-#ifndef GRPARSER_H_INCLUDED
-#define GRPARSER_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /* error codes - now defined in fitsio.h */
-
- /* common constants definitions */
-
-#define NGP_ALLOCCHUNK (1000)
-#define NGP_MAX_INCLUDE (10) /* include file nesting limit */
-#define NGP_MAX_COMMENT (80) /* max size for comment */
-#define NGP_MAX_NAME (20) /* max size for KEYWORD (FITS limits it to 8 chars) */
-#define NGP_MAX_STRING (80) /* max size for various strings */
-#define NGP_MAX_ARRAY_DIM (999) /* max. number of dimensions in array */
-#define NGP_MAX_FNAME (1000) /* max size of combined path+fname */
-#define NGP_MAX_ENVFILES (10000) /* max size of CFITSIO_INCLUDE_FILES env. variable */
-
-#define NGP_TOKEN_UNKNOWN (-1) /* token type unknown */
-#define NGP_TOKEN_INCLUDE (0) /* \INCLUDE token */
-#define NGP_TOKEN_GROUP (1) /* \GROUP token */
-#define NGP_TOKEN_END (2) /* \END token */
-#define NGP_TOKEN_XTENSION (3) /* XTENSION token */
-#define NGP_TOKEN_SIMPLE (4) /* SIMPLE token */
-#define NGP_TOKEN_EOF (5) /* End Of File pseudo token */
-
-#define NGP_TTYPE_UNKNOWN (0) /* undef (yet) token type - invalid to print/write to disk */
-#define NGP_TTYPE_BOOL (1) /* boolean, it is 'T' or 'F' */
-#define NGP_TTYPE_STRING (2) /* something withing "" or starting with letter */
-#define NGP_TTYPE_INT (3) /* starting with digit and not with '.' */
-#define NGP_TTYPE_REAL (4) /* digits + '.' */
-#define NGP_TTYPE_COMPLEX (5) /* 2 reals, separated with ',' */
-#define NGP_TTYPE_NULL (6) /* NULL token, format is : NAME = / comment */
-#define NGP_TTYPE_RAW (7) /* HISTORY/COMMENT/8SPACES + comment string without / */
-
-#define NGP_FOUND_EQUAL_SIGN (1) /* line contains '=' after keyword name */
-
-#define NGP_FORMAT_OK (0) /* line format OK */
-#define NGP_FORMAT_ERROR (1) /* line format error */
-
-#define NGP_NODE_INVALID (0) /* default node type - invalid (to catch errors) */
-#define NGP_NODE_IMAGE (1) /* IMAGE type */
-#define NGP_NODE_ATABLE (2) /* ASCII table type */
-#define NGP_NODE_BTABLE (3) /* BINARY table type */
-
-#define NGP_NON_SYSTEM_ONLY (0) /* save all keywords except NAXIS,BITPIX,etc.. */
-#define NGP_REALLY_ALL (1) /* save really all keywords */
-
-#define NGP_XTENSION_SIMPLE (1) /* HDU defined with SIMPLE T */
-#define NGP_XTENSION_FIRST (2) /* this is first extension in template */
-
-#define NGP_LINE_REREAD (1) /* reread line */
-
-#define NGP_BITPIX_INVALID (-12345) /* default BITPIX (to catch errors) */
-
- /* common macro definitions */
-
-#ifdef NGP_PARSER_DEBUG_MALLOC
-
-#define ngp_alloc(x) dal_malloc(x)
-#define ngp_free(x) dal_free(x)
-#define ngp_realloc(x,y) dal_realloc(x,y)
-
-#else
-
-#define ngp_alloc(x) malloc(x)
-#define ngp_free(x) free(x)
-#define ngp_realloc(x,y) realloc(x,y)
-
-#endif
-
- /* type definitions */
-
-typedef struct NGP_RAW_LINE_STRUCT
- { char *line;
- char *name;
- char *value;
- int type;
- char *comment;
- int format;
- int flags;
- } NGP_RAW_LINE;
-
-
-typedef union NGP_TOKVAL_UNION
- { char *s; /* space allocated separately, be careful !!! */
- char b;
- int i;
- double d;
- struct NGP_COMPLEX_STRUCT
- { double re;
- double im;
- } c; /* complex value */
- } NGP_TOKVAL;
-
-
-typedef struct NGP_TOKEN_STRUCT
- { int type;
- char name[NGP_MAX_NAME];
- NGP_TOKVAL value;
- char comment[NGP_MAX_COMMENT];
- } NGP_TOKEN;
-
-
-typedef struct NGP_HDU_STRUCT
- { int tokcnt;
- NGP_TOKEN *tok;
- } NGP_HDU;
-
-
-typedef struct NGP_TKDEF_STRUCT
- { char *name;
- int code;
- } NGP_TKDEF;
-
-
-typedef struct NGP_EXTVER_TAB_STRUCT
- { char *extname;
- int version;
- } NGP_EXTVER_TAB;
-
-
- /* globally visible variables declarations */
-
-extern NGP_RAW_LINE ngp_curline;
-extern NGP_RAW_LINE ngp_prevline;
-
-extern int ngp_extver_tab_size;
-extern NGP_EXTVER_TAB *ngp_extver_tab;
-
-
- /* globally visible functions declarations */
-
-int ngp_get_extver(char *extname, int *version);
-int ngp_set_extver(char *extname, int version);
-int ngp_delete_extver_tab(void);
-int ngp_strcasecmp(char *p1, char *p2);
-int ngp_line_from_file(FILE *fp, char **p);
-int ngp_free_line(void);
-int ngp_free_prevline(void);
-int ngp_read_line_buffered(FILE *fp);
-int ngp_unread_line(void);
-int ngp_extract_tokens(NGP_RAW_LINE *cl);
-int ngp_include_file(char *fname);
-int ngp_read_line(int ignore_blank_lines);
-int ngp_keyword_is_write(NGP_TOKEN *ngp_tok);
-int ngp_keyword_all_write(NGP_HDU *ngph, fitsfile *ffp, int mode);
-int ngp_hdu_init(NGP_HDU *ngph);
-int ngp_hdu_clear(NGP_HDU *ngph);
-int ngp_hdu_insert_token(NGP_HDU *ngph, NGP_TOKEN *newtok);
-int ngp_append_columns(fitsfile *ff, NGP_HDU *ngph, int aftercol);
-int ngp_read_xtension(fitsfile *ff, int parent_hn, int simple_mode);
-int ngp_read_group(fitsfile *ff, char *grpname, int parent_hn);
-
- /* top level API function - now defined in fitsio.h */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/imcompress.h b/include/imcompress.h
deleted file mode 100644
index c5ba7d2..0000000
--- a/include/imcompress.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#define MAX_COMPRESS_DIM 6
-#define COMPRESS_NULL_VALUE -2147483647
-
-typedef struct {
- char zcmptype[12]; /* compression type string */
- int compress_type; /* type of compression algorithm */
- int bitpix; /* FITS data type of image (BITPIX) */
- int ndim; /* dimension of image */
- long naxis[MAX_COMPRESS_DIM]; /* length of each axis */
- int cn_compressed; /* column number for COMPRESSED_DATA column */
- int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
- int cn_zscale; /* column number for CSCALE column */
- int cn_zzero; /* column number for CZERO column */
- int cn_zblank; /* column number for the CBLANK column */
- double zscale; /* scaling value, if keyword and not column */
- double zzero; /* zero pt, if keyword and not column */
- int zblank; /* value for null pixels, if not a column */
- long nrows; /* number of rows in table */
- int ncols; /* number of columns in table */
- int rice_blocksize; /* first compression parameter */
- int rice_nbits; /* second compression parameter */
- long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
- long maxtilelen; /* max number of pixels in each image tile */
- long maxelem; /* maximum length of variable length arrays */
-} CompressImageInfo;
-
-/* image compression routines */
-static int imcomp_get_image_params(fitsfile *infptr, CompressImageInfo *otb,
- int *status);
-static int imcomp_init_table(fitsfile *outfptr,
- CompressImageInfo *otb, int *status);
-static int imcomp_calc_max_elem (int nx, int blocksize);
-static int imcomp_copy_imheader(fitsfile *infptr, fitsfile *outfptr,
- int *status);
-static int imcomp_img_to_tbl_special (char *card);
-static int imcomp_compress_image (fitsfile *infptr, fitsfile *outfptr,
- CompressImageInfo *otb, int *status);
-
-/* image decompression routines */
-int fits_read_compressed_img_plane(fitsfile *fptr, int datatype,
- int bytesperpixel, long nplane, long *firstcoord, long *lastcoord,
- long *inc, long *naxes, int nullcheck, void *nullval,
- void *array, char *nullarray, int *anynul, int *status);
-static int imcomp_get_table_params(fitsfile *infptr, CompressImageInfo *itb,
- int *status);
-static int imcomp_copy_tblheader(fitsfile *infptr, fitsfile *outfptr,
- int *status);
-static int imcomp_tbl_to_img_special (char *keyname);
-static int imcomp_decompress_tile (fitsfile *infptr, CompressImageInfo *itb,
- int nrow, int tilesize, int datatype, int nullcheck,
- void *nulval, void *buffer, char *bnullarray, int *anynul,
- int *status);
-static int imcomp_copy_overlap (char *tile, int datatype, int ndim,
- long *tfpixel, long *tlpixel, char *bnullarray, char *image,
- long *fpixel, long *lpixel, int nullcheck, char *nullarray,
- int *status);
diff --git a/include/longnam.h b/include/longnam.h
deleted file mode 100644
index ac083bc..0000000
--- a/include/longnam.h
+++ /dev/null
@@ -1,476 +0,0 @@
-#ifndef _LONGNAME_H
-#define _LONGNAME_H
-
-#define fits_parse_input_url ffiurl
-#define fits_parse_rootname ffrtnm
-#define fits_parse_output_url ffourl
-#define fits_parse_extspec ffexts
-#define fits_parse_extnum ffextn
-#define fits_parse_binspec ffbins
-#define fits_parse_binrange ffbinr
-#define fits_open_memfile ffomem
-#define fits_open_file ffopen
-#define fits_reopen_file ffreopen
-#define fits_create_file ffinit
-#define fits_create_template fftplt
-#define fits_flush_file ffflus
-#define fits_close_file ffclos
-#define fits_delete_file ffdelt
-#define fits_file_name ffflnm
-#define fits_file_mode ffflmd
-#define fits_url_type ffurlt
-
-#define fits_get_version ffvers
-#define fits_uppercase ffupch
-#define fits_get_errstatus ffgerr
-#define fits_write_errmsg ffpmsg
-#define fits_read_errmsg ffgmsg
-#define fits_clear_errmsg ffcmsg
-#define fits_report_error ffrprt
-#define fits_compare_str ffcmps
-#define fits_test_keyword fftkey
-#define fits_test_record fftrec
-#define fits_null_check ffnchk
-#define fits_make_keyn ffkeyn
-#define fits_make_nkey ffnkey
-#define fits_get_keyclass ffgkcl
-#define fits_get_keytype ffdtyp
-#define fits_parse_value ffpsvc
-#define fits_get_keyname ffgknm
-#define fits_parse_template ffgthd
-#define fits_ascii_tform ffasfm
-#define fits_binary_tform ffbnfm
-#define fits_get_tbcol ffgabc
-#define fits_get_rowsize ffgrsz
-#define fits_get_col_display_width ffgcdw
-
-#define fits_write_record ffprec
-#define fits_write_key ffpky
-#define fits_write_key_unit ffpunt
-#define fits_write_comment ffpcom
-#define fits_write_history ffphis
-#define fits_write_date ffpdat
-#define fits_get_system_time ffgstm
-#define fits_get_system_date ffgsdt
-#define fits_date2str ffdt2s
-#define fits_time2str fftm2s
-#define fits_str2date ffs2dt
-#define fits_str2time ffs2tm
-#define fits_write_key_longstr ffpkls
-#define fits_write_key_longwarn ffplsw
-#define fits_write_key_null ffpkyu
-#define fits_write_key_str ffpkys
-#define fits_write_key_log ffpkyl
-#define fits_write_key_lng ffpkyj
-#define fits_write_key_fixflt ffpkyf
-#define fits_write_key_flt ffpkye
-#define fits_write_key_fixdbl ffpkyg
-#define fits_write_key_dbl ffpkyd
-#define fits_write_key_fixcmp ffpkfc
-#define fits_write_key_cmp ffpkyc
-#define fits_write_key_fixdblcmp ffpkfm
-#define fits_write_key_dblcmp ffpkym
-#define fits_write_key_triple ffpkyt
-#define fits_write_tdim ffptdm
-#define fits_write_keys_str ffpkns
-#define fits_write_keys_log ffpknl
-#define fits_write_keys_lng ffpknj
-#define fits_write_keys_fixflt ffpknf
-#define fits_write_keys_flt ffpkne
-#define fits_write_keys_fixdbl ffpkng
-#define fits_write_keys_dbl ffpknd
-#define fits_copy_key ffcpky
-#define fits_write_imghdr ffphps
-#define fits_write_grphdr ffphpr
-#define fits_write_atblhdr ffphtb
-#define fits_write_btblhdr ffphbn
-#define fits_write_key_template ffpktp
-
-#define fits_get_hdrspace ffghsp
-#define fits_get_hdrpos ffghps
-#define fits_movabs_key ffmaky
-#define fits_movrel_key ffmrky
-#define fits_find_nextkey ffgnxk
-
-#define fits_read_record ffgrec
-#define fits_read_card ffgcrd
-#define fits_read_key_unit ffgunt
-#define fits_read_keyn ffgkyn
-#define fits_read_key ffgky
-#define fits_read_keyword ffgkey
-#define fits_read_key_str ffgkys
-#define fits_read_key_log ffgkyl
-#define fits_read_key_lng ffgkyj
-#define fits_read_key_flt ffgkye
-#define fits_read_key_dbl ffgkyd
-#define fits_read_key_cmp ffgkyc
-#define fits_read_key_dblcmp ffgkym
-#define fits_read_key_triple ffgkyt
-#define fits_read_key_longstr ffgkls
-#define fits_read_tdim ffgtdm
-#define fits_decode_tdim ffdtdm
-#define fits_read_keys_str ffgkns
-#define fits_read_keys_log ffgknl
-#define fits_read_keys_lng ffgknj
-#define fits_read_keys_flt ffgkne
-#define fits_read_keys_dbl ffgknd
-#define fits_read_imghdr ffghpr
-#define fits_read_atblhdr ffghtb
-#define fits_read_btblhdr ffghbn
-#define fits_header2str ffh2st
-
-#define fits_update_card ffucrd
-#define fits_update_key ffuky
-#define fits_update_key_null ffukyu
-#define fits_update_key_str ffukys
-#define fits_update_key_longstr ffukls
-#define fits_update_key_log ffukyl
-#define fits_update_key_lng ffukyj
-#define fits_update_key_fixflt ffukyf
-#define fits_update_key_flt ffukye
-#define fits_update_key_fixdbl ffukyg
-#define fits_update_key_dbl ffukyd
-#define fits_update_key_fixcmp ffukfc
-#define fits_update_key_cmp ffukyc
-#define fits_update_key_fixdblcmp ffukfm
-#define fits_update_key_dblcmp ffukym
-
-#define fits_modify_record ffmrec
-#define fits_modify_card ffmcrd
-#define fits_modify_name ffmnam
-#define fits_modify_comment ffmcom
-#define fits_modify_key_null ffmkyu
-#define fits_modify_key_str ffmkys
-#define fits_modify_key_longstr ffmkls
-#define fits_modify_key_log ffmkyl
-#define fits_modify_key_lng ffmkyj
-#define fits_modify_key_fixflt ffmkyf
-#define fits_modify_key_flt ffmkye
-#define fits_modify_key_fixdbl ffmkyg
-#define fits_modify_key_dbl ffmkyd
-#define fits_modify_key_fixcmp ffmkfc
-#define fits_modify_key_cmp ffmkyc
-#define fits_modify_key_fixdblcmp ffmkfm
-#define fits_modify_key_dblcmp ffmkym
-
-#define fits_insert_record ffirec
-#define fits_insert_key_null ffikyu
-#define fits_insert_key_str ffikys
-#define fits_insert_key_longstr ffikls
-#define fits_insert_key_log ffikyl
-#define fits_insert_key_lng ffikyj
-#define fits_insert_key_fixflt ffikyf
-#define fits_insert_key_flt ffikye
-#define fits_insert_key_fixdbl ffikyg
-#define fits_insert_key_dbl ffikyd
-#define fits_insert_key_fixcmp ffikfc
-#define fits_insert_key_cmp ffikyc
-#define fits_insert_key_fixdblcmp ffikfm
-#define fits_insert_key_dblcmp ffikym
-
-#define fits_delete_key ffdkey
-#define fits_delete_record ffdrec
-#define fits_get_hdu_num ffghdn
-#define fits_get_hdu_type ffghdt
-#define fits_get_hduaddr ffghad
-
-#define fits_get_img_param ffgipr
-#define fits_get_img_type ffgidt
-#define fits_get_img_dim ffgidm
-#define fits_get_img_size ffgisz
-
-#define fits_movabs_hdu ffmahd
-#define fits_movrel_hdu ffmrhd
-#define fits_movnam_hdu ffmnhd
-#define fits_get_num_hdus ffthdu
-#define fits_create_img ffcrim
-#define fits_create_tbl ffcrtb
-#define fits_create_hdu ffcrhd
-#define fits_insert_img ffiimg
-#define fits_insert_atbl ffitab
-#define fits_insert_btbl ffibin
-#define fits_resize_img ffrsim
-#define fits_delete_hdu ffdhdu
-#define fits_copy_hdu ffcopy
-#define fits_copy_header ffcphd
-#define fits_copy_data ffcpdt
-
-#define fits_set_hdustruc ffrdef
-#define fits_set_hdrsize ffhdef
-#define fits_write_theap ffpthp
-
-#define fits_encode_chksum ffesum
-#define fits_decode_chksum ffdsum
-#define fits_write_chksum ffpcks
-#define fits_update_chksum ffupck
-#define fits_verify_chksum ffvcks
-#define fits_get_chksum ffgcks
-
-#define fits_set_bscale ffpscl
-#define fits_set_tscale fftscl
-#define fits_set_imgnull ffpnul
-#define fits_set_btblnull fftnul
-#define fits_set_atblnull ffsnul
-
-#define fits_get_colnum ffgcno
-#define fits_get_colname ffgcnn
-#define fits_get_coltype ffgtcl
-#define fits_get_num_rows ffgnrw
-#define fits_get_num_cols ffgncl
-#define fits_get_acolparms ffgacl
-#define fits_get_bcolparms ffgbcl
-
-#define fits_iterate_data ffiter
-
-#define fits_read_grppar_byt ffggpb
-#define fits_read_grppar_usht ffggpui
-#define fits_read_grppar_ulng ffggpuj
-#define fits_read_grppar_sht ffggpi
-#define fits_read_grppar_lng ffggpj
-#define fits_read_grppar_int ffggpk
-#define fits_read_grppar_uint ffggpuk
-#define fits_read_grppar_flt ffggpe
-#define fits_read_grppar_dbl ffggpd
-
-#define fits_read_img ffgpv
-#define fits_read_imgnull ffgpf
-#define fits_read_img_byt ffgpvb
-#define fits_read_img_usht ffgpvui
-#define fits_read_img_ulng ffgpvuj
-#define fits_read_img_sht ffgpvi
-#define fits_read_img_lng ffgpvj
-#define fits_read_img_uint ffgpvuk
-#define fits_read_img_int ffgpvk
-#define fits_read_img_flt ffgpve
-#define fits_read_img_dbl ffgpvd
-
-#define fits_read_imgnull_byt ffgpfb
-#define fits_read_imgnull_usht ffgpfui
-#define fits_read_imgnull_ulng ffgpfuj
-#define fits_read_imgnull_sht ffgpfi
-#define fits_read_imgnull_lng ffgpfj
-#define fits_read_imgnull_uint ffgpfuk
-#define fits_read_imgnull_int ffgpfk
-#define fits_read_imgnull_flt ffgpfe
-#define fits_read_imgnull_dbl ffgpfd
-
-#define fits_read_2d_byt ffg2db
-#define fits_read_2d_usht ffg2dui
-#define fits_read_2d_ulng ffg2duj
-#define fits_read_2d_sht ffg2di
-#define fits_read_2d_lng ffg2dj
-#define fits_read_2d_uint ffg2duk
-#define fits_read_2d_int ffg2dk
-#define fits_read_2d_flt ffg2de
-#define fits_read_2d_dbl ffg2dd
-
-#define fits_read_3d_byt ffg3db
-#define fits_read_3d_usht ffg3dui
-#define fits_read_3d_ulng ffg3duj
-#define fits_read_3d_sht ffg3di
-#define fits_read_3d_lng ffg3dj
-#define fits_read_3d_uint ffg3duk
-#define fits_read_3d_int ffg3dk
-#define fits_read_3d_flt ffg3de
-#define fits_read_3d_dbl ffg3dd
-
-#define fits_read_subset_byt ffgsvb
-#define fits_read_subset_usht ffgsvui
-#define fits_read_subset_ulng ffgsvuj
-#define fits_read_subset_sht ffgsvi
-#define fits_read_subset_lng ffgsvj
-#define fits_read_subset_uint ffgsvuk
-#define fits_read_subset_int ffgsvk
-#define fits_read_subset_flt ffgsve
-#define fits_read_subset_dbl ffgsvd
-
-#define fits_read_subsetnull_byt ffgsfb
-#define fits_read_subsetnull_usht ffgsfui
-#define fits_read_subsetnull_ulng ffgsfuj
-#define fits_read_subsetnull_sht ffgsfi
-#define fits_read_subsetnull_lng ffgsfj
-#define fits_read_subsetnull_uint ffgsfuk
-#define fits_read_subsetnull_int ffgsfk
-#define fits_read_subsetnull_flt ffgsfe
-#define fits_read_subsetnull_dbl ffgsfd
-
-#define fits_read_col ffgcv
-#define fits_read_colnull ffgcf
-#define fits_read_col_str ffgcvs
-#define fits_read_col_log ffgcvl
-#define fits_read_col_byt ffgcvb
-#define fits_read_col_usht ffgcvui
-#define fits_read_col_ulng ffgcvuj
-#define fits_read_col_sht ffgcvi
-#define fits_read_col_lng ffgcvj
-#define fits_read_col_uint ffgcvuk
-#define fits_read_col_int ffgcvk
-#define fits_read_col_flt ffgcve
-#define fits_read_col_dbl ffgcvd
-#define fits_read_col_cmp ffgcvc
-#define fits_read_col_dblcmp ffgcvm
-#define fits_read_col_bit ffgcx
-#define fits_read_col_bit_usht ffgcxui
-#define fits_read_col_bit_uint ffgcxuk
-
-#define fits_read_colnull_str ffgcfs
-#define fits_read_colnull_log ffgcfl
-#define fits_read_colnull_byt ffgcfb
-#define fits_read_colnull_usht ffgcfui
-#define fits_read_colnull_ulng ffgcfuj
-#define fits_read_colnull_sht ffgcfi
-#define fits_read_colnull_lng ffgcfj
-#define fits_read_colnull_uint ffgcfuk
-#define fits_read_colnull_int ffgcfk
-#define fits_read_colnull_flt ffgcfe
-#define fits_read_colnull_dbl ffgcfd
-#define fits_read_colnull_cmp ffgcfc
-#define fits_read_colnull_dblcmp ffgcfm
-
-#define fits_read_descript ffgdes
-#define fits_read_descripts ffgdess
-#define fits_read_tblbytes ffgtbb
-
-#define fits_write_grppar_byt ffpgpb
-#define fits_write_grppar_usht ffpgpui
-#define fits_write_grppar_ulng ffpgpuj
-#define fits_write_grppar_sht ffpgpi
-#define fits_write_grppar_lng ffpgpj
-#define fits_write_grppar_uint ffpgpuk
-#define fits_write_grppar_int ffpgpk
-#define fits_write_grppar_flt ffpgpe
-#define fits_write_grppar_dbl ffpgpd
-
-#define fits_write_img ffppr
-#define fits_write_img_byt ffpprb
-#define fits_write_img_usht ffpprui
-#define fits_write_img_ulng ffppruj
-#define fits_write_img_sht ffppri
-#define fits_write_img_lng ffpprj
-#define fits_write_img_uint ffppruk
-#define fits_write_img_int ffpprk
-#define fits_write_img_flt ffppre
-#define fits_write_img_dbl ffpprd
-
-#define fits_write_imgnull ffppn
-#define fits_write_imgnull_byt ffppnb
-#define fits_write_imgnull_usht ffppnui
-#define fits_write_imgnull_ulng ffppnuj
-#define fits_write_imgnull_sht ffppni
-#define fits_write_imgnull_lng ffppnj
-#define fits_write_imgnull_uint ffppnuk
-#define fits_write_imgnull_int ffppnk
-#define fits_write_imgnull_flt ffppne
-#define fits_write_imgnull_dbl ffppnd
-
-#define fits_write_img_null ffppru
-#define fits_write_null_img ffpprn
-
-#define fits_write_2d_byt ffp2db
-#define fits_write_2d_usht ffp2dui
-#define fits_write_2d_ulng ffp2duj
-#define fits_write_2d_sht ffp2di
-#define fits_write_2d_lng ffp2dj
-#define fits_write_2d_uint ffp2duk
-#define fits_write_2d_int ffp2dk
-#define fits_write_2d_flt ffp2de
-#define fits_write_2d_dbl ffp2dd
-
-#define fits_write_3d_byt ffp3db
-#define fits_write_3d_usht ffp3dui
-#define fits_write_3d_ulng ffp3duj
-#define fits_write_3d_sht ffp3di
-#define fits_write_3d_lng ffp3dj
-#define fits_write_3d_uint ffp3duk
-#define fits_write_3d_int ffp3dk
-#define fits_write_3d_flt ffp3de
-#define fits_write_3d_dbl ffp3dd
-
-#define fits_write_subset_byt ffpssb
-#define fits_write_subset_usht ffpssui
-#define fits_write_subset_ulng ffpssuj
-#define fits_write_subset_sht ffpssi
-#define fits_write_subset_lng ffpssj
-#define fits_write_subset_uint ffpssuk
-#define fits_write_subset_int ffpssk
-#define fits_write_subset_flt ffpsse
-#define fits_write_subset_dbl ffpssd
-
-#define fits_write_col ffpcl
-#define fits_write_col_str ffpcls
-#define fits_write_col_log ffpcll
-#define fits_write_col_byt ffpclb
-#define fits_write_col_usht ffpclui
-#define fits_write_col_ulng ffpcluj
-#define fits_write_col_sht ffpcli
-#define fits_write_col_lng ffpclj
-#define fits_write_col_uint ffpcluk
-#define fits_write_col_int ffpclk
-#define fits_write_col_flt ffpcle
-#define fits_write_col_dbl ffpcld
-#define fits_write_col_cmp ffpclc
-#define fits_write_col_dblcmp ffpclm
-#define fits_write_col_null ffpclu
-#define fits_write_col_bit ffpclx
-
-#define fits_write_colnull ffpcn
-#define fits_write_colnull_str ffpcns
-#define fits_write_colnull_log ffpcnl
-#define fits_write_colnull_byt ffpcnb
-#define fits_write_colnull_usht ffpcnui
-#define fits_write_colnull_ulng ffpcnuj
-#define fits_write_colnull_sht ffpcni
-#define fits_write_colnull_lng ffpcnj
-#define fits_write_colnull_uint ffpcnuk
-#define fits_write_colnull_int ffpcnk
-#define fits_write_colnull_flt ffpcne
-#define fits_write_colnull_dbl ffpcnd
-
-#define fits_write_descript ffpdes
-
-#define fits_write_tblbytes ffptbb
-#define fits_insert_rows ffirow
-#define fits_delete_rows ffdrow
-#define fits_delete_rowlist ffdrws
-#define fits_insert_col fficol
-#define fits_insert_cols fficls
-#define fits_delete_col ffdcol
-#define fits_copy_col ffcpcl
-#define fits_modify_vector_len ffmvec
-
-#define fits_read_img_coord ffgics
-#define fits_read_tbl_coord ffgtcs
-#define fits_pix_to_world ffwldp
-#define fits_world_to_pix ffxypx
-
-#define fits_get_image_wcs_keys ffgiwcs
-#define fits_get_table_wcs_keys ffgtwcs
-
-#define fits_find_rows fffrow
-#define fits_find_first_row ffffrw
-#define fits_find_rows_cmp fffrwc
-#define fits_select_rows ffsrow
-#define fits_calc_rows ffcrow
-#define fits_calculator ffcalc
-#define fits_calculator_rng ffcalc_rng
-#define fits_test_expr fftexp
-
-#define fits_create_group ffgtcr
-#define fits_insert_group ffgtis
-#define fits_change_group ffgtch
-#define fits_remove_group ffgtrm
-#define fits_copy_group ffgtcp
-#define fits_merge_groups ffgtmg
-#define fits_compact_group ffgtcm
-#define fits_verify_group ffgtvf
-#define fits_open_group ffgtop
-#define fits_add_group_member ffgtam
-#define fits_get_num_members ffgtnm
-
-#define fits_get_num_groups ffgmng
-#define fits_open_member ffgmop
-#define fits_copy_member ffgmcp
-#define fits_transfer_member ffgmtf
-#define fits_remove_member ffgmrm
-
-#endif
diff --git a/include/pctype.h b/include/pctype.h
deleted file mode 100644
index 2ef4a67..0000000
--- a/include/pctype.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * These ones are necessary to override the behaviour of
- * PINT_cfB, which puts the & on before getting to the
- * TYPE specific PCINT_cfPP...
- * The only way to do this is to introduce PCDOUBLE_cfINT,
- * which means we use PCINT for alot of the generic macros.
- */
-
-#define PCINT_cfAA PINT_cfAA
-#define PCINT_cfN PINT_cfN
-#define PCINT_cfV PINT_cfV
-#define PCINT_cfZ(T,I,A) (__cfztringv[I]= (int ) *A),
-#define PCINT_cfSEP INT_cfSEP
-#define PCINT_cfCC PINT_cfCC
-#define PCINT_cfB(T,A) _(T,_cfPP) A
-#define PCINT_cfU PINT_cfU
-
-/* These are the real TYPE specific ones, and will need to be
- * duplicated for FLOAT,...
- */
-#define PCINT_cfINT PCDOUBLE_cfINT
-#define PCINT_cfAAP(A, B) A
-#define PCINT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PCINT_cfTYPE int
-#define PCINT_cfVP(A,B) int B = (int) *A; /* For ZSTRINGV_ARGS */
-#define PCINT_cfPP
-#define PCINT_cfCCC(A,B) A
-
-#define PCFLOAT_cfINT PCDOUBLE_cfINT
-#define PCFLOAT_cfAAP(A, B) A
-#define PCFLOAT_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PCFLOAT_cfTYPE float
-#define PCFLOAT_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
-#define PCFLOAT_cfPP
-#define PCFLOAT_cfCCC(A,B) A
-
-#define PCDOUBLE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,PCINT,B,X,Y,Z,0)
-#define PCDOUBLE_cfAAP(A, B) A
-#define PCDOUBLE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,DEFAULT,A,B,C,D,E)
-#define PCDOUBLE_cfTYPE double
-#define PCDOUBLE_cfVP PCINT_cfVP /* For ZSTRINGV_ARGS */
-#define PCDOUBLE_cfPP
-#define PCDOUBLE_cfCCC(A,B) A
-
-#define PCLOGICAL_cfINT PCDOUBLE_cfINT
-#define PCLOGICAL_cfA(M,I,A,B) *A=C2FLOGICAL(*A);
-#define PCLOGICAL_cfAAP(A,B) B = A
-#define PCLOGICAL_cfC(A,B,C) *A=C2FLOGICAL(*A);
-#define PCLOGICAL_cfH(S,U,B)
-#define PCLOGICAL_cfJ(B)
-#define PCLOGICAL_cfW(A,B) PLOGICAL_cfW(A,B)
-#define PCLOGICAL_cfS(M,I,A)
-#define PCLOGICAL_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PCLOGICAL,A,B,C,D,E)
-#define PCLOGICAL_cfTYPE int
-#define PCLOGICAL_cfVP PLOGICAL_cfVP /* For ZSTRINGV_ARGS */
-#define PCLOGICAL_cfPP
-#define PCLOGICAL_cfKK PLOGICAL_cfKK
-#define PCLOGICAL_cfCCC(A,B) B = A
-
-/*
- * I can't find where the following three defines are used...
- * So they may well be wrong.
- */
-
-#define PCLOGICAL_cfQ(B)
-#define PCLOGICAL_cfR(A,B,D) *A=C2FLOGICAL(*A);
-#define PCLOGICAL_cfT(M,I,A,B,D) ((*A=F2CLOGICAL(*A)),A)
-
-/* This is to get PZTRINGS to work for dynamically allocated
- * Contiguous arrays... The problem was that the array is massaged
- * coming in with the call: c2fstrv( A[0], A[0],... )
- * and coming out with: f2cstrv( (char *) A, (char *) A,... )
- *
- * If you dynamically allocate an array with the trick:
- *
- * char ** A;
- * A = (char **) malloc ( nelements * sizeof(char *) );
- * A[0] = (char *) malloc (nelements * elemSize * sizeof (char) );
- * for ( i = 1; i < nelements; i++) A[i] = A[0] + i * elemSize;
- *
- * Then the coming in call will kill you if you pass in A, and the
- * coming out call will kill you if you pass in A[0]...
- * So, I change the coming in call to (char *)A, and you must then
- * pass in A[0].
- *
- */
-
-
-#undef PZTRINGV_cfA
-#define PZTRINGV_cfA(M,I,A,B) APAZTRINGV_cfA(M,I,A,B, \
- (_3(M,_ELEMS_,I))*(( _3(M,_ELEMLEN_,I))+1), \
- (_3(M,_ELEMS_,I)),(_3(M,_ELEMLEN_,I))+1)
-#ifdef vmsFortran
-#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- initfstr(B,malloc((sA)-(filA)),(filA),(silA)-1), \ c2fstrv((char *) A,B.dsc$a_pointer,(silA),(sA));
-#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- initfstr(B,(char *) A,(filA),(silA)-1),c2fstrv((char *) A,(char *)A,(silA),(sA));
-#else
-#define AAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- (B.s=malloc((sA)-(filA)),B.fs=c2fstrv((char *)A,B.s,(B.flen=(silA)-1)+1,(sA)));
-#define APAZTRINGV_cfA(M,I,A,B, sA,filA,silA) \
- B.fs=c2fstrv((char *) A,(char *) A,(B.flen=(silA)-1)+1,B.sizeofA=(sA));
-#endif
-
-
-/*
- * This allows for character arrays longer than an unsigned short...
- */
-
-#ifndef vmsFortran
-#undef STRING_cfV
-#undef PSTRINGV_cfV
-#define STRING_cfV(T,A,B,F) struct {unsigned int clen, flen;} B;
-#define PSTRINGV_cfV(T,A,B,F) struct {char *fs; unsigned int sizeofA, flen;} B;
-#endif
-
-/*
- * This is to introduce a PZTRING ( NO V ) type
- */
-
-
-#ifdef vmsFortran
-#define PZTRING_cfV(T,A,B,F) static fstring B={0,DSC$K_DTYPE_T,DSC$K_CLASS_S,NULL};
-#define APATRING_cfA(M,I,A,B,silA) \
- (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
- B.dsc$w_length >= silA?0:(memset((A)+B.dsc$w_length,' ',silA-B.dsc$w_length-1), \
- A[B.dsc$w_length=silA-1]='\0'));
-#define PZTRING_cfC(A,B,C) \
- (B.dsc$w_length=strlen(A),B.dsc$a_pointer=A, \
- B.dsc$w_length >= C?0:(memset((A)+B.dsc$w_length,' ',C-B.dsc$w_length-1), \
- A[B.dsc$w_length=C-1]='\0'));
-#else
-#define PZTRING_cfV(T,A,B,F) int B;
-#define APATRING_cfA(M,I,A,B,silA) \
- (B=strlen(A),B >= silA?0:(memset((A)+B,' ',silA-B-1)),A[B = silA - 1]='\0');
-#define PZTRING_cfC(A,B,C) \
- (B=strlen(A),B > C?0:(memset((A)+B,' ',(C - 1)-B-1)),A[B = C - 1]='\0');
-#endif
-
-#define PZTRING_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PZTRING,A,B,C,D,E)
-#define PZTRING_cfINT PVOID_cfINT
-#define PZTRING_cfA(M,I,A,B) APATRING_cfA(M,I,A,B,(_3(M,_ELEMLEN_,I))+1)
-#define PZTRING_cfAA PSTRING_cfCC
-#define PZTRING_cfB PSTRING_cfB
-
-#define PZTRING_cfCC PSTRING_cfCC
-#define PZTRING_cfJ PSTRING_cfJ
-#define PZTRING_cfH STRING_cfH
-#define PZTRING_cfN(T,A) STRING_cfN(T,A) /* CRAY insists on arg.'s here. */
-#define PZTRING_cfS(M,I,A) ,( _3(M,_ELEMLEN_,I) + 1 )
-#define PZTRING_cfU(T,A) char *A
-#define PZTRING_cfW(A,B) kill_trailing(A,' ');
-#define PZTRING_cfZ(T,I,A)
-#define PZTRING_cfSEP INT_cfSEP
-#define PZTRING_cfKK STRING_cfKK
diff --git a/include/region.h b/include/region.h
deleted file mode 100644
index 4d7c96c..0000000
--- a/include/region.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/***************************************************************/
-/* REGION STUFF */
-/***************************************************************/
-
-#define myPI 3.1415926535897932385
-
-typedef struct {
- int exists;
- double xrefval, yrefval;
- double xrefpix, yrefpix;
- double xinc, yinc;
- double rot;
- char type[6];
-} WCSdata;
-
-typedef enum {
- point_rgn,
- line_rgn,
- circle_rgn,
- annulus_rgn,
- ellipse_rgn,
- elliptannulus_rgn,
- box_rgn,
- rectangle_rgn,
- diamond_rgn,
- sector_rgn,
- poly_rgn
-} shapeType;
-
-typedef enum { pixel_fmt, degree_fmt, hhmmss_fmt } coordFmt;
-
-typedef struct {
- char sign; /* Include or exclude? */
- shapeType shape; /* Shape of this region */
-
- union { /* Parameters - In pixels */
-
- /**** Generic Shape Data ****/
-
- struct {
- double p[8]; /* Region parameters */
- double sinT, cosT; /* For rotated shapes */
- double a, b; /* Extra scratch area */
- } gen;
-
- /**** Polygon Data ****/
-
- struct {
- int nPts; /* Number of Polygon pts */
- double *Pts; /* Polygon points */
- double xmin,xmax; /* Polygon bounding box */
- double ymin,ymax;
- } poly;
-
- } param;
-
-} RgnShape;
-
-typedef struct {
- int nShapes;
- RgnShape *Shapes;
- WCSdata wcs;
-} SAORegion;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int ffrrgn( const char *filename, WCSdata *wcs, SAORegion **Rgn, int *status );
-int fftrgn( double X, double Y, SAORegion *Rgn );
-void fffrgn( SAORegion *Rgn );
-
-#ifdef __cplusplus
- }
-#endif
-
-#define fits_read_rgnfile ffrrgn
-#define fits_in_region fftrgn
-#define fits_free_region fffrgn
-
diff --git a/include/ricecomp.h b/include/ricecomp.h
deleted file mode 100644
index 4a48328..0000000
--- a/include/ricecomp.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/* @(#) buffer.h 1.1 98/07/21 12:34:27 */
-/* buffer.h: structure for compression to buffer rather than to a file, including
- * bit I/O buffer
- *
- * R. White, 19 June 1998
- */
-
-
-typedef unsigned char Buffer_t;
-
-typedef struct {
- int bitbuffer; /* bit buffer */
- int bits_to_go; /* bits to go in buffer */
- Buffer_t *start; /* start of buffer */
- Buffer_t *current; /* current position in buffer */
- Buffer_t *end; /* end of buffer */
-} Buffer;
-
-#define buffree(mf) (free(mf->start), free(mf))
-#define bufused(mf) (mf->current - mf->start)
-#define bufreset(mf) (mf->current = mf->start)
-
-/*
- * getcbuf, putcbuf macros for character IO to buffer
- * putcbuf returns EOF on end of buffer, else returns 0
- */
-#define getcbuf(mf) ((mf->current >= mf->end) ? EOF : *(mf->current)++)
-#define putcbuf(c,mf) \
- ((mf->current >= mf->end) ? \
- EOF :\
- ((*(mf->current)++ = c), 0))
-
-/*
- * bufalloc sets up buffer of length n
- */
-
-/* not needed by CFITSIO
-
-static Buffer *bufalloc(int n)
-{
-Buffer *mf;
-
- mf = (Buffer *) malloc(sizeof(Buffer));
- if (mf == (Buffer *)NULL) return((Buffer *)NULL);
-
- mf->start = (Buffer_t *) malloc(n*sizeof(Buffer_t));
- if (mf->start == (Buffer_t *)NULL) {
- free(mf);
- return((Buffer *)NULL);
- }
- mf->bits_to_go = 8;
- mf->end = mf->start + n;
- mf->current = mf->start;
- return(mf);
-}
-*/
-
-/*
- * bufrealloc extends buffer (or truncates it) by
- * reallocating memory
- */
-
-/* not needed by CFITSIO
-static int bufrealloc(Buffer *mf, int n)
-{
-int len;
-
- len = mf->current - mf->start;
-
- * silently throw away data if buffer is already longer than n *
- if (len>n) len = n;
- if (len<0) len = 0;
-
- mf->start = (Buffer_t *) realloc(mf->start, n*sizeof(Buffer_t));
- if (mf->start == (Buffer_t *)NULL) return(0);
-
- mf->end = mf->start + n;
- mf->current = mf->start + len;
- return(n);
-}
-*/
-
-/*
- * bufdump dumps contents of buffer to outfile and resets
- * it to be empty. Returns number of bytes written.
- *
- * Note we don't write out the bit buffer -- you must call
- * done_outputing_bits() first to ensure that the bit buffer
- * is written out. I do it this way to allow incremental
- * buffer dumps while bit IO is still going on.
- */
-
-/* not needed by CFITSIO
-
-static int bufdump(FILE *outfile, Buffer *buffer)
-{
-int ndump;
-
- ndump = bufused(buffer);
- if (fwrite(buffer->start, 1, ndump, outfile) != ndump) {
- fprintf(stderr, "bufdump: error in write\n");
- exit(1);
- }
- bufreset(buffer);
- return(ndump);
-}
-*/
diff --git a/include/sgp4.h b/include/sgp4.h
deleted file mode 100644
index 289b969..0000000
--- a/include/sgp4.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* H+
- * Title : sgp4.h
- * Author : Bryce A. Roberts
- * Date : 23 February 1999
- * Synopsis : header file for SGP4 propagation routines
- * SCCS : @(#)sgp4.h 1.1 03/04/03
- * Revisions :
- * mm/dd/yy name description
- * H-
- */
-
-#ifndef _SGP4_H
-#define _SGP4_H
-
-#include <math.h>
-#include <stdlib.h>
-#include <time.h>
-#include <strings.h>
-
-#define MJD2000 (51544.0)
-
-/* the data structure itself */
-struct sgp4_st {
- /* NORAD tle components */
- double epochTime, n0, n0dt, n0dt2, bstar, i0, raan, e0, w0, M0;
-
- /* derived variables */
- double n0dp, a0dp, q0ms4, theta, theta_2, zeta_4, beta0_2, eta, C1,
- C1_2, C1_3, C1_4, C3, C4, C5, D2, D3, D4, mdot, wdot, raandot;
- };
-
-typedef struct sgp4_st * SGP4;
-
-/* create a new instance of SGP4 */
-extern SGP4 SGP4_create(void);
-
-/* destroy an instance of SGP4 */
-extern void SGP4_destroy(SGP4 sgp4);
-
-/* convert NORAD time string to TJD */
-extern int SGP4_getTime(const char *str, double *t);
-
-/* do time-invariant initializations */
-extern void SGP4_init(SGP4 sgp4);
-
-/* get a state vector at a point in time */
-extern void SGP4_getStateVector(SGP4 sgp4, double t, double pos[3],
- double vel[3]);
-
-/* finds the pole (orbit plane normal) */
-extern void SGP4_getPole(double pos[3], double vel[3], double pole[3]);
-
-/* sets the elements of an instance of SGP4 */
-extern void SGP4_set(SGP4 sgp4, double epochTime, double n0dt, double n0dt2,
- double bstar, double i0, double raan, double e0,
- double w0, double M0, double n0);
-
-/* precesses a direction vector from t1 to t2 */
-void SGP4_precess(double v[3], double t1, double t2);
-
-
-#endif
diff --git a/include/slalib.h b/include/slalib.h
deleted file mode 100644
index 1cba29a..0000000
--- a/include/slalib.h
+++ /dev/null
@@ -1,418 +0,0 @@
-#ifndef SLALIBHDEF
-#define SLALIBHDEF
-#include <math.h>
-
-/*
-** - - - - - - - - -
-** s l a l i b . h
-** - - - - - - - - -
-**
-** Prototype function declarations for slalib library.
-**
-** Last revision: 29 November 1996
-**
-** Copyright P.T.Wallace. All rights reserved.
-*/
-
-void slaAddet ( double rm, double dm, double eq, double *rc, double *dc );
-
-void slaAfin ( char *string, int *iptr, float *a, int *j );
-
-double slaAirmas ( double zd );
-
-void slaAltaz ( double ha, double dec, double phi,
- double *az, double *azd, double *azdd,
- double *el, double *eld, double *eldd,
- double *pa, double *pad, double *padd );
-
-void slaAmp ( double ra, double da, double date, double eq,
- double *rm, double *dm );
-
-void slaAmpqk ( double ra, double da, double amprms[21],
- double *rm, double *dm );
-
-void slaAop ( double rap, double dap, double date, double dut,
- double elongm, double phim, double hm, double xp,
- double yp, double tdk, double pmb, double rh,
- double wl, double tlr,
- double *aob, double *zob, double *hob,
- double *dob, double *rob );
-
-void slaAoppa ( double date, double dut, double elongm, double phim,
- double hm, double xp, double yp, double tdk, double pmb,
- double rh, double wl, double tlr, double aoprms[14] );
-
-void slaAoppat ( double date, double aoprms[14] );
-
-void slaAopqk ( double rap, double dap, double aoprms[14],
- double *aob, double *zob, double *hob,
- double *dob, double *rob );
-
-void slaAtmdsp ( double tdk, double pmb, double rh, double wl1,
- double a1, double b1, double wl2, double *a2, double *b2 );
-
-void slaAv2m ( float axvec[3], float rmat[3][3] );
-
-float slaBear ( float a1, float b1, float a2, float b2 );
-
-void slaCaf2r ( int ideg, int iamin, float asec, float *rad, int *j );
-
-void slaCaldj ( int iy, int im, int id, double *djm, int *j );
-
-void slaCalyd ( int iy, int im, int id, int *ny, int *nd, int *j );
-
-void slaCc2s ( float v[3], float *a, float *b );
-
-void slaCc62s ( float v[6], float *a, float *b, float *r,
- float *ad, float *bd, float *rd );
-
-void slaCd2tf ( int ndp, float days, char *sign, int ihmsf[4] );
-
-void slaCldj ( int iy, int im, int id, double *djm, int *j );
-
-void slaClyd ( int iy, int im, int id, int *ny, int *nd, int *jstat );
-
-void slaCr2af ( int ndp, float angle, char *sign, int idmsf[4] );
-
-void slaCr2tf ( int ndp, float angle, char *sign, int ihmsf[4] );
-
-void slaCs2c ( float a, float b, float v[3] );
-
-void slaCs2c6 ( float a, float b, float r, float ad,
- float bd, float rd, float v[6] );
-
-void slaCtf2d ( int ihour, int imin, float sec, float *days, int *j );
-
-void slaCtf2r ( int ihour, int imin, float sec, float *rad, int *j );
-
-void slaDaf2r ( int ideg, int iamin, double asec, double *rad, int *j );
-
-void slaDafin ( char *string, int *iptr, double *a, int *j );
-
-double slaDat ( double dju );
-
-void slaDav2m ( double axvec[3], double rmat[3][3] );
-
-double slaDbear ( double a1, double b1, double a2, double b2 );
-
-void slaDbjin ( char *string, int *nstrt,
- double *dreslt, int *jf1, int *jf2 );
-
-void slaDc62s ( double v[6], double *a, double *b, double *r,
- double *ad, double *bd, double *rd );
-
-void slaDcc2s ( double v[3], double *a, double *b );
-
-void slaDcmpf ( double coeffs[6], double *xz, double *yz, double *xs,
- double *ys, double *perp, double *orient );
-
-void slaDcs2c ( double a, double b, double v[3] );
-
-void slaDd2tf ( int ndp, double days, char *sign, int ihmsf[4] );
-
-void slaDe2h ( double ha, double dec, double phi,
- double *az, double *el );
-
-void slaDeuler ( char *order, double phi, double theta, double psi,
- double rmat[3][3] );
-
-void slaDfltin ( char *string, int *nstrt, double *dreslt, int *jflag );
-
-void slaDh2e ( double az, double el, double phi, double *ha, double *dec);
-
-void slaDimxv ( double dm[3][3], double va[3], double vb[3] );
-
-void slaDjcal ( int ndp, double djm, int iymdf[4], int *j );
-
-void slaDjcl ( double djm, int *iy, int *im, int *id, double *fd, int *j );
-
-void slaDm2av ( double rmat[3][3], double axvec[3] );
-
-void slaDmat ( int n, double *a, double *y, double *d, int *jf, int *iw );
-
-void slaDmoon ( double date, double pv[6] );
-
-void slaDmxm ( double a[3][3], double b[3][3], double c[3][3] );
-
-void slaDmxv ( double dm[3][3], double va[3], double vb[3] );
-
-void slaDr2af ( int ndp, double angle, char *sign, int idmsf[4] );
-
-void slaDr2tf ( int ndp, double angle, char *sign, int ihmsf[4] );
-
-double slaDrange ( double angle );
-
-double slaDranrm ( double angle );
-
-void slaDs2c6 ( double a, double b, double r, double ad, double bd,
- double rd, double v[6] );
-
-void slaDs2tp ( double ra, double dec, double raz, double decz,
- double *xi, double *eta, int *j );
-
-double slaDsep ( double a1, double b1, double a2, double b2 );
-
-double slaDt ( double epoch );
-
-void slaDtf2d ( int ihour, int imin, double sec, double *days, int *j );
-
-void slaDtf2r ( int ihour, int imin, double sec, double *rad, int *j );
-
-void slaDtp2s ( double xi, double eta, double raz, double decz,
- double *ra, double *dec );
-
-void slaDtp2v ( double xi, double eta, double v0[3], double v[3] );
-
-void slaDtps2c ( double xi, double eta, double ra, double dec,
- double *raz1, double *decz1,
- double *raz2, double *decz2, int *n );
-
-void slaDtpv2c ( double xi, double eta, double v[3],
- double v01[3], double v02[3], int *n );
-
-double slaDtt ( double dju );
-
-void slaDv2tp ( double v[3], double v0[3], double *xi, double *eta, int *j );
-
-double slaDvdv ( double va[3], double vb[3] );
-
-void slaDvn ( double v[3], double uv[3], double *vm );
-
-void slaDvxv ( double va[3], double vb[3], double vc[3] );
-
-void slaE2h ( float ha, float dec, float phi, float *az, float *el );
-
-void slaEarth ( int iy, int id, float fd, float posvel[6] );
-
-void slaEcleq ( double dl, double db, double date, double *dr, double *dd );
-
-void slaEcmat ( double date, double rmat[3][3] );
-
-void slaEcor ( float rm, float dm, int iy, int id, float fd,
- float *rv, float *tl );
-
-void slaEg50 ( double dr, double dd, double *dl, double *db );
-
-double slaEpb ( double date );
-
-double slaEpb2d ( double epb );
-
-double slaEpco ( char k0, char k, double e );
-
-double slaEpj ( double date );
-
-double slaEpj2d ( double epj );
-
-void slaEqecl ( double dr, double dd, double date, double *dl, double *db );
-
-double slaEqeqx ( double date );
-
-void slaEqgal ( double dr, double dd, double *dl, double *db );
-
-void slaEtrms ( double ep, double ev[3] );
-
-void slaEuler ( char *order, float phi, float theta, float psi,
- float rmat[3][3] );
-
-void slaEvp ( double date, double deqx,
- double dvb[3], double dpb[3],
- double dvh[3], double dph[3] );
-
-void slaFitxy ( int itype, int np, double xye[][2], double xym[][2],
- double coeffs[6], int *j );
-
-void slaFk425 ( double r1950, double d1950, double dr1950,
- double dd1950, double p1950, double v1950,
- double *r2000, double *d2000, double *dr2000,
- double *dd2000, double *p2000, double *v2000 );
-
-void slaFk45z ( double r1950, double d1950, double bepoch,
- double *r2000, double *d2000 );
-
-void slaFk524 ( double r2000, double d2000, double dr2000,
- double dd2000, double p2000, double v2000,
- double *r1950, double *d1950, double *dr1950,
- double *dd1950, double *p1950, double *v1950 );
-
-void slaFk54z ( double r2000, double d2000, double bepoch,
- double *r1950, double *d1950,
- double *dr1950, double *dd1950 );
-
-void slaFlotin ( char *string, int *nstrt, float *reslt, int *jflag );
-
-void slaGaleq ( double dl, double db, double *dr, double *dd );
-
-void slaGalsup ( double dl, double db, double *dsl, double *dsb );
-
-void slaGe50 ( double dl, double db, double *dr, double *dd );
-
-void slaGeoc ( double p, double h, double *r, double *z );
-
-double slaGmst ( double ut1 );
-
-double slaGmsta ( double date, double ut1 );
-
-void slaH2e ( float az, float el, float phi, float *ha, float *dec );
-
-void slaImxv ( float rm[3][3], float va[3], float vb[3] );
-
-void slaIntin ( char *string, int *nstrt, long *ireslt, int *jflag );
-
-void slaInvf ( double fwds[6], double bkwds[6], int *j );
-
-void slaKbj ( int jb, double e, char *k, int *j );
-
-void slaM2av ( float rmat[3][3], float axvec[3] );
-
-void slaMap ( double rm, double dm, double pr, double pd,
- double px, double rv, double eq, double date,
- double *ra, double *da );
-
-void slaMappa ( double eq, double date, double amprms[21] );
-
-void slaMapqk ( double rm, double dm, double pr, double pd,
- double px, double rv, double amprms[21],
- double *ra, double *da );
-
-void slaMapqkz ( double rm, double dm, double amprms[21],
- double *ra, double *da );
-
-void slaMoon ( int iy, int id, float fd, float posvel[6] );
-
-void slaMxm ( float a[3][3], float b[3][3], float c[3][3] );
-
-void slaMxv ( float rm[3][3], float va[3], float vb[3] );
-
-void slaNut ( double date, double rmatn[3][3] );
-
-void slaNutc ( double date, double *dpsi, double *deps, double *eps0 );
-
-void slaOap ( char *type, double ob1, double ob2, double date,
- double dut, double elongm, double phim, double hm,
- double xp, double yp, double tdk, double pmb,
- double rh, double wl, double tlr,
- double *rap, double *dap );
-
-void slaOapqk ( char *type, double ob1, double ob2, double aoprms[14],
- double *rap, double *dap );
-
-void slaObs ( int n, char *c, char *name, double *w, double *p, double *h );
-
-double slaPa ( double ha, double dec, double phi );
-
-void slaPcd ( double disco, double *x, double *y );
-
-void slaPda2h ( double p, double d, double a,
- double *h1, int *j1, double *h2, int *j2 );
-
-void slaPdq2h ( double p, double d, double q,
- double *h1, int *j1, double *h2, int *j2 );
-
-void slaPlanet ( double date, int np, double pv[6], int *j );
-
-void slaPm ( double r0, double d0, double pr, double pd,
- double px, double rv, double ep0, double ep1,
- double *r1, double *d1 );
-
-void slaPolmo ( double elongm, double phim, double xp, double yp,
- double *elong, double *phi, double *daz );
-
-void slaPrebn ( double bep0, double bep1, double rmatp[3][3] );
-
-void slaPrec ( double ep0, double ep1, double rmatp[3][3] );
-
-void slaPrecl ( double ep0, double ep1, double rmatp[3][3] );
-
-void slaPreces ( char sys[3], double ep0, double ep1,
- double *ra, double *dc );
-
-void slaPrenut ( double epoch, double date, double rmatpn[3][3] );
-
-void slaPvobs ( double p, double h, double stl, double pv[6] );
-
-void slaPxy ( int np, double xye[][2], double xym[][2],
- double coeffs[6],
- double xyp[][2], double *xrms, double *yrms, double *rrms );
-
-float slaRange ( float angle );
-
-float slaRanorm ( float angle );
-
-double slaRcc ( double tdb, double ut1, double wl, double u, double v );
-
-void slaRdplan ( double date, int np, double elong, double phi,
- double *ra, double *dec, double *diam );
-
-void slaRefco ( double hm, double tdk, double pmb, double rh,
- double wl, double phi, double tlr, double eps,
- double *refa, double *refb );
-
-void slaRefro ( double zobs, double hm, double tdk, double pmb,
- double rh, double wl, double phi, double tlr, double eps,
- double *ref );
-
-void slaRefv ( double vu[3], double refa, double refb, double vr[3] );
-
-void slaRefz ( double zu, double refa, double refb, double *zr );
-
-float slaRverot ( float phi, float ra, float da, float st );
-
-float slaRvgalc ( float r2000, float d2000 );
-
-float slaRvlg ( float r2000, float d2000 );
-
-float slaRvlsrd ( float r2000, float d2000 );
-
-float slaRvlsrk ( float r2000, float d2000 );
-
-void slaS2tp ( float ra, float dec, float raz, float decz,
- float *xi, float *eta, int *j );
-
-float slaSep ( float a1, float b1, float a2, float b2 );
-
-void slaSmat ( int n, float *a, float *y, float *d, int *jf, int *iw );
-
-void slaSubet ( double rc, double dc, double eq,
- double *rm, double *dm );
-
-void slaSupgal ( double dsl, double dsb, double *dl, double *db );
-
-void slaSvd ( int m, int n, int mp, int np,
- double *a, double *w, double *v, double *work,
- int *jstat );
-
-void slaSvdcov ( int n, int np, int nc,
- double *w, double *v, double *work, double *cvm );
-
-void slaSvdsol ( int m, int n, int mp, int np,
- double *b, double *u, double *w, double *v,
- double *work, double *x );
-
-void slaTp2s ( float xi, float eta, float raz, float decz,
- float *ra, float *dec );
-
-void slaTp2v ( float xi, float eta, float v0[3], float v[3] );
-
-void slaTps2c ( float xi, float eta, float ra, float dec,
- float *raz1, float *decz1,
- float *raz2, float *decz2, int *n );
-
-void slaTpv2c ( float xi, float eta, float v[3],
- float v01[3], float v02[3], int *n );
-
-void slaUnpcd ( double disco, double *x, double *y );
-
-void slaV2tp ( float v[3], float v0[3], float *xi, float *eta, int *j );
-
-float slaVdv ( float va[3], float vb[3] );
-
-void slaVn ( float v[3], float uv[3], float *vm );
-
-void slaVxv ( float va[3], float vb[3], float vc[3] );
-
-void slaXy2xy ( double x1, double y1, double coeffs[6],
- double *x2, double *y2 );
-
-double slaZd ( double ha, double dec, double phi );
-
-#endif
diff --git a/include/slamac.h b/include/slamac.h
deleted file mode 100644
index 6b0fa0e..0000000
--- a/include/slamac.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef SLAMACHDEF
-#define SLAMACHDEF
-
-/*
-** - - - - - - - - -
-** s l a m a c . h
-** - - - - - - - - -
-**
-** Macros used by slalib library.
-**
-** Last revision: 5 June 1996
-**
-** Copyright P.T.Wallace. All rights reserved.
-*/
-
-/* max(A,B) - larger (most +ve) of two numbers (generic) */
-#define gmax(A,B) ((A)>(B)?(A):(B))
-
-/* min(A,B) - smaller (least +ve) of two numbers (generic) */
-#define gmin(A,B) ((A)<(B)?(A):(B))
-
-/* dint(A) - truncate to nearest whole number towards zero (double) */
-#define dint(A) ((A)<0.0?ceil(A):floor(A))
-
-/* aint(A) - truncate to nearest whole number towards zero (float) */
-#define aint(A) ((A)<0.0f?(float)ceil((double)(A)):(float)floor((double)(A)))
-
-/* dnint(A) - round to nearest whole number (double) */
-#define dnint(A) ((A)<0.0?ceil((A)-0.5):floor((A)+0.5))
-
-/* anint(A) - round to nearest whole number (float) */
-#define anint(A) ((float)dnint((double)(A)))
-
-/* dsign(A,B) - magnitude of A with sign of B (double) */
-#define dsign(A,B) ((B)<0.0?-(A):(A))
-
-/* dmod(A,B) - A modulo B (double) */
-#define dmod(A,B) ((B)!=0.0?((A)*(B)>0.0?(A)-(B)*floor((A)/(B))\
- :(A)+(B)*floor(-(A)/(B))):(A))
-
-/* logicals */
-#if !defined(FALSE) || ((FALSE)!=0)
-#define FALSE 0
-#endif
-#if !defined(TRUE) || ((TRUE)!=1)
-#define TRUE 1
-#endif
-
-/* pi */
-#define DPI 3.1415926535897932384626433832795028841971693993751
-
-/* 2pi */
-#define D2PI 6.2831853071795864769252867665590057683943387987502
-
-/* 1/(2pi) */
-#define D1B2PI 0.15915494309189533576888376337251436203445964574046
-
-/* 4pi */
-#define D4PI 12.566370614359172953850573533118011536788677597500
-
-/* 1/(4pi) */
-#define D1B4PI 0.079577471545947667884441881686257181017229822870228
-
-/* pi^2 */
-#define DPISQ 9.8696044010893586188344909998761511353136994072408
-
-/* sqrt(pi) */
-#define DSQRPI 1.7724538509055160272981674833411451827975494561224
-
-/* pi/2: 90 degrees in radians */
-#define DPIBY2 1.5707963267948966192313216916397514420985846996876
-
-/* pi/180: degrees to radians */
-#define DD2R 0.017453292519943295769236907684886127134428718885417
-
-/* 180/pi: radians to degrees */
-#define DR2D 57.295779513082320876798154814105170332405472466564
-
-/* pi/(180*3600): arcseconds to radians */
-#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
-
-/* 180*3600/pi : radians to arcseconds */
-#define DR2AS 2.0626480624709635515647335733077861319665970087963e5
-
-/* pi/12: hours to radians */
-#define DH2R 0.26179938779914943653855361527329190701643078328126
-
-/* 12/pi: radians to hours */
-#define DR2H 3.8197186342054880584532103209403446888270314977709
-
-/* pi/(12*3600): seconds of time to radians */
-#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
-
-/* 12*3600/pi: radians to seconds of time */
-#define DR2S 1.3750987083139757010431557155385240879777313391975e4
-
-/* 15/(2pi): hours to degrees x radians to turns */
-#define D15B2P 2.3873241463784300365332564505877154305168946861068
-
-#endif
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index fd138f6..f796d7b 120000..100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1 +1,8364 @@
-/opt/local/share/aclocal/libtool.m4 \ No newline at end of file
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+])
+
+# serial 58 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_PREPARE_CC_BASENAME
+# -----------------------
+m4_defun([_LT_PREPARE_CC_BASENAME], [
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in @S|@*""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+])# _LT_PREPARE_CC_BASENAME
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
+# but that macro is also expanded into generated libtool script, which
+# arranges for $SED and $ECHO to be set by different means.
+m4_defun([_LT_CC_BASENAME],
+[m4_require([_LT_PREPARE_CC_BASENAME])dnl
+AC_REQUIRE([_LT_DECL_SED])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+func_cc_basename $1
+cc_basename=$func_cc_basename_result
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
+dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+m4_require([_LT_CMD_TRUNCATE])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options that allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a '.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+old_CC=$CC
+old_CFLAGS=$CFLAGS
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from 'configure', and 'config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# 'config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain=$ac_aux_dir/ltmain.sh
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the 'libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to 'config.status' so that its
+# declaration there will have the same value as in 'configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags='_LT_TAGS'dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into 'config.status', and then the shell code to quote escape them in
+# for loops in 'config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+ eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable. If COMMENT is supplied, it is inserted after the
+# '#!' sequence but before initialization text begins. After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script. The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test 0 = "$lt_write_fail" && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+'$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test 0 != $[#]
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try '$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try '$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test yes = "$silent" &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options that allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}"; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile=${ofile}T
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+# Generated automatically by $as_me ($PACKAGE) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$LT_SYS_LIBRARY_PATH"}
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ cat <<'_LT_EOF' >> "$cfgfile"
+## -------------------------------------- ##
+## Shell functions shared with configure. ##
+## -------------------------------------- ##
+
+_LT_PREPARE_MUNGE_PATH_LIST
+_LT_PREPARE_CC_BASENAME
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test set != "${COLLECT_NAMES+set}"; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+m4_ifndef([AC_PROG_GO], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_GO. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+m4_defun([AC_PROG_GO],
+[AC_LANG_PUSH(Go)dnl
+AC_ARG_VAR([GOC], [Go compiler command])dnl
+AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
+_AC_ARG_VAR_LDFLAGS()dnl
+AC_CHECK_TOOL(GOC, gccgo)
+if test -z "$GOC"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
+ fi
+fi
+if test -z "$GOC"; then
+ AC_CHECK_PROG(GOC, gccgo, gccgo, false)
+fi
+])#m4_defun
+])#m4_ifndef
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([AC_PROG_GO],
+ [LT_LANG(GO)],
+ [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "$LT_MULTI_MODULE"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ # If there is a non-empty error log, and "single_module"
+ # appears in it, assume the flag caused a linker warning
+ if test -s conftest.err && $GREP single_module conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ # Otherwise, if the output was created with a 0 exit code from
+ # the compiler, it worked.
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS=$save_LDFLAGS
+ ])
+
+ AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+ [lt_cv_ld_force_load=no
+ cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+ $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+ cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+ _lt_result=$?
+ if test -s conftest.err && $GREP force_load conftest.err; then
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
+ lt_cv_ld_force_load=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -f conftest.err libconftest.a conftest conftest.c
+ rm -rf conftest.dSYM
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]][[,.]]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
+ fi
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES([TAG])
+# ---------------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ if test yes = "$lt_cv_ld_force_load"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
+ [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
+ case $cc_basename in
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test yes = "$_lt_dar_can_shared"; then
+ output_verbose_link_cmd=func_echo_all
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ m4_if([$1], [CXX],
+[ if test yes != "$lt_cv_apple_cc_single_mod"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test set = "${lt_cv_aix_libpath+set}"; then
+ aix_libpath=$lt_cv_aix_libpath
+else
+ AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+ lt_aix_libpath_sed='[
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\([^ ]*\) *$/\1/
+ p
+ }
+ }]'
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ # Check for a 64-bit object if we didn't find anything.
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+ fi],[])
+ if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+ _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
+ fi
+ ])
+ aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script that will find a shell with a builtin
+# printf (that we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+ ECHO='printf %s\n'
+else
+ # Use this function as a fallback that always works.
+ func_fallback_echo ()
+ {
+ eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+ }
+ ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+ $ECHO "$*"
+}
+
+case $ECHO in
+ printf*) AC_MSG_RESULT([printf]) ;;
+ print*) AC_MSG_RESULT([print -r]) ;;
+ *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ PATH=/empty FPATH=/empty; export PATH FPATH
+ test "X`printf %s $ECHO`" = "X$ECHO" \
+ || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([$with_sysroot])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and where our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE=32
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE=64
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
+ ;;
+ powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test yes != "$lt_cv_cc_needs_belf"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS=$SAVE_CFLAGS
+ fi
+ ;;
+*-*solaris*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*)
+ case $host in
+ i?86-*-solaris*|x86_64-*-solaris*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ sparc*-*-solaris*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
+ if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
+ LD=${LD-ld}_sol2
+ fi
+ ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks=$enable_libtool_lock
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+ [lt_cv_ar_at_file=no
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+ [echo conftest.$ac_objext > conftest.lst
+ lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+ AC_TRY_EVAL([lt_ar_try])
+ if test 0 -eq "$ac_status"; then
+ # Ensure the archiver fails upon bogus file names.
+ rm -f conftest.$ac_objext libconftest.a
+ AC_TRY_EVAL([lt_ar_try])
+ if test 0 -ne "$ac_status"; then
+ lt_cv_ar_at_file=@
+ fi
+ fi
+ rm -f conftest.* libconftest.a
+ ])
+ ])
+
+if test no = "$lt_cv_ar_at_file"; then
+ archiver_list_spec=
+else
+ archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+ [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ bitrig* | openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
+fi
+
+case $host_os in
+ darwin*)
+ lock_old_archive_extraction=yes ;;
+ *)
+ lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+ [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test yes = "$cross_compiling"; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+/* When -fvisibility=hidden is used, assume the code has been annotated
+ correspondingly for the symbols needed. */
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else
+ {
+ if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ else puts (dlerror ());
+ }
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen=shl_load],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen=dlopen],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links=nottested
+if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test no = "$hard_links"; then
+ AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
+ [Define to the sub-directory where libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
+
+ # We can hardcode non-existent directories.
+ if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
+ test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
+ test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP"; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_PREPARE_MUNGE_PATH_LIST
+# ---------------------------
+# Make sure func_munge_path_list() is defined correctly.
+m4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
+[[# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x@S|@2 in
+ x)
+ ;;
+ *:)
+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \$@S|@1\"
+ ;;
+ x:*)
+ eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
+ ;;
+ *)
+ eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+]])# _LT_PREPARE_PATH_LIST
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test yes = "$GCC"; then
+ case $host_os in
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
+ esac
+ case $host_os in
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+ case $lt_search_path_spec in
+ *\;*)
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+ ;;
+ *)
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ esac
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary...
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo = "/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ # AWK program above erroneously prepends '/' to C:/dos/paths
+ # for these hosts.
+ case $host_os in
+ mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
+ esac
+ sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=.so
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+AC_ARG_VAR([LT_SYS_LIBRARY_PATH],
+[User-defined run-time library search path.])
+
+case $host_os in
+aix3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 supports IA64
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a[(]lib.so.V[)]'
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='$libname$shared_ext'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$cc_basename in
+ yes,*)
+ # gcc
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ ;;
+
+ *,cl*)
+ # Native MSVC
+ libname_spec='$name'
+ soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
+
+ case $build_os in
+ mingw*)
+ sys_lib_search_path_spec=
+ lt_save_ifs=$IFS
+ IFS=';'
+ for lt_path in $LIB
+ do
+ IFS=$lt_save_ifs
+ # Let DOS variable expansion print the short 8.3 style file name.
+ lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+ sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+ done
+ IFS=$lt_save_ifs
+ # Convert to MSYS style.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+ ;;
+ cygwin*)
+ # Convert to unix form, then to dos form, then back to unix form
+ # but this time dos style (no spaces!) so that the unix form looks
+ # like /cygdrive/c/PROGRA~1:/cygdr...
+ sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+ sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+ sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ ;;
+ *)
+ sys_lib_search_path_spec=$LIB
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # FIXME: find the short name or the path components, as spaces are
+ # common. (e.g. "Program Files" -> "PROGRA~1")
+ ;;
+ esac
+
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+ dynamic_linker='Win32 link.exe'
+ ;;
+
+ *)
+ # Assume MSVC wrapper
+ library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
+ dynamic_linker='Win32 ld.exe'
+ ;;
+ esac
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[23]].*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2.*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+haiku*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ dynamic_linker="$host_os runtime_loader"
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
+ fi
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+ postinstall_cmds='chmod 555 $lib'
+ # or fails outright, so override atomically:
+ install_override_mode=555
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test yes = "$lt_cv_prog_gnu_ld"; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+
+ # Some binutils ld are patched to set DT_RUNPATH
+ AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+ [lt_cv_shlibpath_overrides_runpath=no
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [lt_cv_shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+ ])
+ shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd* | bitrig*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec=/usr/lib
+ need_lib_prefix=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
+ else
+ need_version=yes
+ fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+os2*)
+ libname_spec='$name'
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
+ need_lib_prefix=no
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test yes = "$with_gnu_ld"; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec; then
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=sco
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test yes = "$with_gnu_ld"; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux # correct to gnu/linux during the next big refactor
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux # correct to gnu/linux during the next big refactor
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test no = "$dynamic_linker" && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test yes = "$GCC"; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
+fi
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
+fi
+
+# lt_cv_sys_lib... is unaugmented for libtool script decls...
+lt_cv_sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
+
+# ..but sys_lib_... needs LT_SYS_LIBRARY_PATH munging for
+# LT_SYS_DLSEARCH_PATH macro in ltdl.m4 to work with the correct paths:
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+ [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program that can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$1"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac])
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program that can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test no = "$withval" || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test no != "$with_gnu_ld" && break
+ ;;
+ *)
+ test yes != "$with_gnu_ld" && break
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+else
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
+fi])
+LD=$lt_cv_path_LD
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ if test yes != "$GCC"; then
+ reload_cmds=false
+ fi
+ ;;
+ darwin*)
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_PATH_DD
+# -----------
+# find a working dd
+m4_defun([_LT_PATH_DD],
+[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
+[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi])
+rm -f conftest.i conftest2.i conftest.out])
+])# _LT_PATH_DD
+
+
+# _LT_CMD_TRUNCATE
+# ----------------
+# find command to truncate a binary pipe
+m4_defun([_LT_CMD_TRUNCATE],
+[m4_require([_LT_PATH_DD])
+AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
+[printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
+_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
+ [Command to truncate a binary pipe])
+])# _LT_CMD_TRUNCATE
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# 'unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ # Keep this pattern in sync with the one in func_win32_libid.
+ lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc*)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+haiku*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be glibc/ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+ case $host_os in
+ mingw* | pw32*)
+ if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+ want_nocaseglob=yes
+ else
+ file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+ fi
+ ;;
+ esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+ [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+ [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM=$NM
+else
+ lt_nm_to_check=${ac_tool_prefix}nm
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
+ case `$DLLTOOL --help 2>&1` in
+ *--identify-strict*)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+ ;;
+ *)
+ lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+ ;;
+ esac
+ ;;
+*)
+ # fallback: assume linklib IS sharedlib
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
+ ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+ [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+ [lt_cv_path_mainfest_tool=no
+ echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+ $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+ lt_cv_path_mainfest_tool=yes
+ fi
+ rm -f conftest*])
+if test yes != "$lt_cv_path_mainfest_tool"; then
+ MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# _LT_DLL_DEF_P([FILE])
+# ---------------------
+# True iff FILE is a Windows DLL '.def' file.
+# Keep in sync with func_dll_def_p in the libtool script
+AC_DEFUN([_LT_DLL_DEF_P],
+[dnl
+ test DEF = "`$SED -n dnl
+ -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
+ -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
+ -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
+ -e q dnl Only consider the first "real" line
+ $1`" dnl
+])# _LT_DLL_DEF_P
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM=-lm)
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test yes = "$GCC"; then
+ case $cc_basename in
+ nvcc*)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+ esac
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test ia64 = "$host_cpu"; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+ lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
+ relocations are performed -- see ld's documentation on pseudo-relocs. */
+# define LT@&t@_DLSYM_CONST
+#elif defined __osf__
+/* This system does not cope well with relocations in const data. */
+# define LT@&t@_DLSYM_CONST
+#else
+# define LT@&t@_DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+LT@&t@_DLSYM_CONST struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_globsym_save_LIBS=$LIBS
+ lt_globsym_save_CFLAGS=$CFLAGS
+ LIBS=conftstm.$ac_objext
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
+ pipe_works=yes
+ fi
+ LIBS=$lt_globsym_save_LIBS
+ CFLAGS=$lt_globsym_save_CFLAGS
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test yes = "$pipe_works"; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+ nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
+ [Transform the output of nm into a list of symbols to manually relocate])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
+ [The name lister interface])
+_LT_DECL([], [nm_file_list_spec], [1],
+ [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64, which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+ # IBM XL 8.0, 9.0 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ haiku*)
+ # PIC is the default for Haiku.
+ # The "-static" flag exists, but is broken.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)=
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+
+ case $cc_basename in
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+ if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
+ fi
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test ia64 = "$host_cpu"; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ case $host_os in
+ os2*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
+ ;;
+ esac
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ # old Intel for x86_64, which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ nagfor*)
+ # NAG Fortran compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl* | bgxl* | bgf* | mpixl*)
+ # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ *Sun\ F* | *Sun*Fortran*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Intel*\ [[CF]]*Compiler*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ *Portland\ Group*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms that do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
+ ;;
+ cygwin* | mingw* | cegcc*)
+ case $cc_basename in
+ cl*)
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+ ;;
+ esac
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test yes != "$GCC"; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd* | bitrig*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+
+ # On some targets, GNU ld is compatible enough with the native linker
+ # that we're better off using the native interface for both.
+ lt_use_gnu_ld_interface=no
+ if test yes = "$with_gnu_ld"; then
+ case $host_os in
+ aix*)
+ # The AIX port of GNU ld has always aspired to compatibility
+ # with the native linker. However, as the warning in the GNU ld
+ # block says, versions before 2.19.5* couldn't really create working
+ # shared libraries, regardless of the interface used.
+ case `$LD -v 2>&1` in
+ *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+ *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+ *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ ;;
+ *)
+ lt_use_gnu_ld_interface=yes
+ ;;
+ esac
+ fi
+
+ if test yes = "$lt_use_gnu_ld_interface"; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='$wl'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test ia64 != "$host_cpu"; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test linux-dietlibc = "$host_os"; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test no = "$tmp_diet"
+ then
+ tmp_addflag=' $pic_flag'
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95* | pgfortran*)
+ # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
+ xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ nvcc*) # Cuda Compiler Driver 2.2
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ tcc*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
+ ;;
+ xlf* | bgf* | bgxlf* | mpixlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ ;;
+ esac
+
+ if test yes = "$GCC"; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ case $cc_basename in
+ cl*)
+ # Native MSVC
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # Assume MSVC wrapper
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+ esac
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2.*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ ;;
+
+ hpux10*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ m4_if($1, [], [
+ # Older versions of the 11.00 compiler do not understand -b yet
+ # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+ _LT_LINKER_OPTION([if $CC understands -b],
+ _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+ [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+ [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+ ;;
+ esac
+ fi
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ # This should be the same for all languages, so no per-tag cache variable.
+ AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+ [lt_cv_irix_exported_symbol],
+ [save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+ [C++], [[int foo (void) { return 0; }]],
+ [Fortran 77], [[
+ subroutine foo
+ end]],
+ [Fortran], [[
+ subroutine foo
+ end]])])],
+ [lt_cv_irix_exported_symbol=yes],
+ [lt_cv_irix_exported_symbol=no])
+ LDFLAGS=$save_LDFLAGS])
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
+ fi
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ osf3*)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='$wl'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test sequent = "$host_vendor"; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test yes = "$GCC"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test sni = "$host_vendor"; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test yes,yes = "$GCC,$enable_shared"; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+ [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+ [$RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ ])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting $shlibpath_var if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+ [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC=$CC
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report what library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC=$lt_save_CC
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test no != "$CXX" &&
+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+ (test g++ != "$CXX"))); then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_caught_CXX_error"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_CFLAGS=$CFLAGS
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ CFLAGS=$CXXFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test yes = "$GXX"; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test yes = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='$wl'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test ia64 = "$host_cpu"; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ ;;
+ esac
+
+ if test yes = "$GXX"; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`$CC -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag=$shared_flag' $wl-G'
+ fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
+ else
+ # not using gcc
+ if test ia64 = "$host_cpu"; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
+ else
+ shared_flag='$wl-bM:SRE'
+ fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ # The "-G" linker flag allows undefined symbols.
+ _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
+ else
+ if test ia64 = "$host_cpu"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX([$1])
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
+ # We only use this code for GNU lds that support --whole-archive.
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ else
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared
+ # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $GXX,$cc_basename in
+ ,cl* | no,cl*)
+ # Native MSVC
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='@'
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=.dll
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
+ # The linker will not automatically build a static lib if we build a DLL.
+ # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ # Don't use ranlib
+ _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+ _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
+ ;;
+ *)
+ # g++
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ shrext_cmds=.dll
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd2.*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ haiku*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 6 and above use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ ;;
+ xl* | mpixl* | bgxl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd* | bitrig*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=func_echo_all
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ ;;
+ *)
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC* | sunCC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands '-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='func_echo_all'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We CANNOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+ '"$_LT_TAGVAR(old_archive_cmds, $1)"
+ _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+ '"$_LT_TAGVAR(reload_cmds, $1)"
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)=$GXX
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test yes != "$_lt_caught_CXX_error"
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+ case @S|@2 in
+ .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
+ *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
+ esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
+package foo
+func foo() {
+}
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $prev$p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test x-L = "$p" ||
+ test x-R = "$p"; then
+ prev=$p
+ continue
+ fi
+
+ # Expand the sysroot to ease extracting the directories later.
+ if test -z "$prev"; then
+ case $p in
+ -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+ -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+ -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+ esac
+ fi
+ case $p in
+ =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+ esac
+ if test no = "$pre_test_object_deps_done"; then
+ case $prev in
+ -L | -R)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)=$prev$p
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
+ fi
+ fi
+ prev=
+ ;;
+
+ *.lto.$objext) ;; # Ignore GCC LTO objects
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test no = "$pre_test_object_deps_done"; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)=$p
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)=$p
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test no = "$F77"; then
+ _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_disable_F77"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${F77-"f77"}
+ CFLAGS=$FFLAGS
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)=$G77
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_F77"
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test no = "$FC"; then
+ _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test yes != "$_lt_disable_FC"; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_GCC=$GCC
+ lt_save_CFLAGS=$CFLAGS
+ CC=${FC-"f95"}
+ CFLAGS=$FCFLAGS
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test no = "$can_build_shared" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test yes = "$enable_shared" && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test yes = "$enable_shared" || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
+ _LT_TAGVAR(LD, $1)=$LD
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC=$lt_save_CC
+ CFLAGS=$lt_save_CFLAGS
+fi # test yes != "$_lt_disable_FC"
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_GO_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Go compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_GO_CONFIG],
+[AC_REQUIRE([LT_PROG_GO])dnl
+AC_LANG_SAVE
+
+# Source file extension for Go test sources.
+ac_ext=go
+
+# Object file extension for compiled Go test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="package main; func main() { }"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='package main; func main() { }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GOC-"gccgo"}
+CFLAGS=$GOFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)=$LD
+_LT_CC_BASENAME([$compiler])
+
+# Go did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GO_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to 'libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=$lt_simple_compile_test_code
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_GO
+# ----------
+AC_DEFUN([LT_PROG_GO],
+[AC_CHECK_TOOL(GOC, gccgo,)
+])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f "$lt_ac_sed" && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test 10 -lt "$lt_ac_count" && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test "$lt_ac_count" -gt "$lt_ac_max"; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine what file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path). These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+ ;;
+ esac
+ ;;
+ *-*-cygwin* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+ ;;
+ *-*-cygwin* )
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+ * ) # otherwise, assume *nix
+ lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+ ;;
+ esac
+ ;;
+ * ) # unhandled hosts (and "normal" native builds)
+ lt_cv_to_host_file_cmd=func_convert_file_noop
+ ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+ [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+ *-*-mingw* )
+ case $build in
+ *-*-mingw* ) # actually msys
+ lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+ ;;
+ esac
+ ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+ [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index c703e35..94b0829 120000..100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -1 +1,437 @@
-/opt/local/share/aclocal/ltoptions.m4 \ No newline at end of file
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 8 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option '$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+ [_LT_WITH_AIX_SONAME([aix])])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+ AC_MSG_CHECKING([which variant of shared library versioning to provide])
+ AC_ARG_WITH([aix-soname],
+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+ [case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname],
+ [AC_CACHE_VAL([lt_cv_with_aix_soname],
+ [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+ with_aix_soname=$lt_cv_with_aix_soname])
+ AC_MSG_RESULT([$with_aix_soname])
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+ [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# LT_INIT options.
+# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [pic_mode=m4_default([$1], [default])])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/m4/ltsugar.m4 b/m4/ltsugar.m4
index b13a2d6..48bc934 120000..100644
--- a/m4/ltsugar.m4
+++ b/m4/ltsugar.m4
@@ -1 +1,124 @@
-/opt/local/share/aclocal/ltsugar.m4 \ No newline at end of file
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59, which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/m4/ltversion.m4 b/m4/ltversion.m4
index 9463860..a4c5ed4 120000..100644
--- a/m4/ltversion.m4
+++ b/m4/ltversion.m4
@@ -1 +1,23 @@
-/opt/local/share/aclocal/ltversion.m4 \ No newline at end of file
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 4171 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.5])
+m4_define([LT_PACKAGE_REVISION], [2.4.5])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.5'
+macro_revision='2.4.5'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/m4/lt~obsolete.m4 b/m4/lt~obsolete.m4
index 7b1ec91..c6b26f8 120000..100644
--- a/m4/lt~obsolete.m4
+++ b/m4/lt~obsolete.m4
@@ -1 +1,99 @@
-/opt/local/share/aclocal/lt~obsolete.m4 \ No newline at end of file
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 1f3b7d7..98f1c6c 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -1,4 +1,7 @@
+SUBDIRS = .
bin_SCRIPTS = \
+ calfuse.csh \
+ calfuse.sh \
calfuse.wavecal \
cf_make_900_obs.csh \
cf_make_all.csh \
@@ -11,13 +14,25 @@ bin_SCRIPTS = \
listhead \
listtra
-EXTRA_DIST = cfsetup.csh.in \
- cfsetup.sh.in
+EXTRA_DIST = \
+ cfsetup.csh.in \
+ cfsetup.sh.in \
+ calfuse.csh \
+ calfuse.sh \
+ calfuse.wavecal \
+ cf_make_900_obs.csh \
+ cf_make_all.csh \
+ cf_make_all_obs.csh \
+ idl_obsplot.pl \
+ idlplot_rate.pl \
+ idlplot_spex.pl \
+ listhead \
+ listtra
CLEANFILES = cfsetup.csh \
cfsetup.sh
-do_subst = sed -e 's,[@]DATADIR[@],$(datadir),g' \
+do_subst = sed -e 's,[@]DATADIR[@],$(pkgdatadir)-$(VERSION),g' \
-e 's,[@]PREFIX[@],$(prefix),g' \
-e 's,[@]VERSION[@],$(VERSION),g'
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
index 57e8ec5..630df69 100644
--- a/scripts/Makefile.in
+++ b/scripts/Makefile.in
@@ -144,14 +144,74 @@ am__v_at_0 = @
am__v_at_1 =
SOURCES =
DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ distdir
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
@@ -276,7 +336,10 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+SUBDIRS = .
bin_SCRIPTS = \
+ calfuse.csh \
+ calfuse.sh \
calfuse.wavecal \
cf_make_900_obs.csh \
cf_make_all.csh \
@@ -289,17 +352,29 @@ bin_SCRIPTS = \
listhead \
listtra
-EXTRA_DIST = cfsetup.csh.in \
- cfsetup.sh.in
+EXTRA_DIST = \
+ cfsetup.csh.in \
+ cfsetup.sh.in \
+ calfuse.csh \
+ calfuse.sh \
+ calfuse.wavecal \
+ cf_make_900_obs.csh \
+ cf_make_all.csh \
+ cf_make_all_obs.csh \
+ idl_obsplot.pl \
+ idlplot_rate.pl \
+ idlplot_spex.pl \
+ listhead \
+ listtra
CLEANFILES = cfsetup.csh \
cfsetup.sh
-do_subst = sed -e 's,[@]DATADIR[@],$(datadir),g' \
+do_subst = sed -e 's,[@]DATADIR[@],$(pkgdatadir)-$(VERSION),g' \
-e 's,[@]PREFIX[@],$(prefix),g' \
-e 's,[@]VERSION[@],$(VERSION),g'
-all: all-am
+all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@@ -372,12 +447,105 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags TAGS:
-ctags CTAGS:
-
-cscope cscopelist:
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -409,22 +577,48 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
check-am: all-am
-check: check-am
+check: check-recursive
all-am: Makefile $(SCRIPTS)
-installdirs:
+installdirs: installdirs-recursive
+installdirs-am:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-am
+installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
@@ -447,85 +641,86 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
-distclean: distclean-am
+distclean: distclean-recursive
-rm -f Makefile
-distclean-am: clean-am distclean-generic
+distclean-am: clean-am distclean-generic distclean-tags
-dvi: dvi-am
+dvi: dvi-recursive
dvi-am:
-html: html-am
+html: html-recursive
html-am:
-info: info-am
+info: info-recursive
info-am:
install-data-am:
-install-dvi: install-dvi-am
+install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am: install-binSCRIPTS
-install-html: install-html-am
+install-html: install-html-recursive
install-html-am:
-install-info: install-info-am
+install-info: install-info-recursive
install-info-am:
install-man:
-install-pdf: install-pdf-am
+install-pdf: install-pdf-recursive
install-pdf-am:
-install-ps: install-ps-am
+install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
-pdf: pdf-am
+pdf: pdf-recursive
pdf-am:
-ps: ps-am
+ps: ps-recursive
ps-am:
uninstall-am: uninstall-binSCRIPTS
-.MAKE: install-am install-strip
+.MAKE: $(am__recursive_targets) install-am install-strip
-.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- cscopelist-am ctags-am distclean distclean-generic \
- distclean-libtool distdir dvi dvi-am html html-am info info-am \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-binSCRIPTS install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+ installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-binSCRIPTS
.PRECIOUS: Makefile
diff --git a/scripts/calfuse.csh b/scripts/calfuse.csh
index 4a828d1..94c0433 100755
--- a/scripts/calfuse.csh
+++ b/scripts/calfuse.csh
@@ -1,4 +1,4 @@
-#!/usr/local/bin/tcsh -f
+#!/usr/bin/env tcsh -f
#******************************************************************************
#* Johns Hopkins University
#* Center For Astrophysical Sciences
diff --git a/scripts/calfuse.sh b/scripts/calfuse.sh
index 0cd23a9..66934a5 100755
--- a/scripts/calfuse.sh
+++ b/scripts/calfuse.sh
@@ -40,11 +40,11 @@ ttag=`echo $froot | grep -c ttag`
# Put a timestamp in the log file (the OPUS trailer file).
if [ $ttag = 1 ]; then
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin TTAG file $1" >> $logfile 2>&1
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin TTAG file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin TTAG file $1" >> $logfile 2>&1
else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Begin HIST file $1" >> $logfile 2>&1
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin HIST file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Begin HIST file $1" >> $logfile 2>&1
fi
cfstat=1
@@ -126,15 +126,15 @@ fi
if [ $cfstat = 0 ]; then
if [ $ttag = 1 ]; then
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End TTAG file $1" >> $logfile 2>&1
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End TTAG file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End TTAG file $1" >> $logfile 2>&1
else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: End HIST file $1" >> $logfile 2>&1
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End HIST file $1"
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: End HIST file $1" >> $logfile 2>&1
fi
else
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1"
- echo `date '+%Y %b %e %T'` "calfuse.csh-1.15: Error processing $1" >> $logfile 2>&1
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Error processing $1"
+ echo `date '+%Y %b %e %T'` "calfuse.sh-1.15: Error processing $1" >> $logfile 2>&1
fi
exit $cfstat
diff --git a/scripts/calfuse.wavecal b/scripts/calfuse.wavecal
index eae4653..fc00c54 100755
--- a/scripts/calfuse.wavecal
+++ b/scripts/calfuse.wavecal
@@ -1,4 +1,4 @@
-#!/usr/local/bin/tcsh -f
+#!/usr/bin/env tcsh -f
#******************************************************************************
#* Johns Hopkins University
#* Center For Astrophysical Sciences
diff --git a/scripts/cf_make_900_obs.csh b/scripts/cf_make_900_obs.csh
index 9edbc70..8d2ce4e 100755
--- a/scripts/cf_make_900_obs.csh
+++ b/scripts/cf_make_900_obs.csh
@@ -1,4 +1,4 @@
-#!/usr/local/bin/tcsh -f
+#!/usr/bin/env tcsh -f
#******************************************************************************
#* Johns Hopkins University
@@ -31,7 +31,7 @@
set DELETE_BPM # Delete bad-pixel map files
# Set program path
-set rm = "/bin/rm -f"
+set rm = "rm -f"
set cf_xcorr = cf_xcorr
set cf_combine = cf_combine
diff --git a/scripts/cf_make_all.csh b/scripts/cf_make_all.csh
index 2cfbc46..b63fde0 100755
--- a/scripts/cf_make_all.csh
+++ b/scripts/cf_make_all.csh
@@ -1,4 +1,4 @@
-#!/usr/local/bin/tcsh -f
+#!/usr/bin/env tcsh -f
#******************************************************************************
#* Johns Hopkins University
@@ -40,7 +40,7 @@
#*****************************************************************************/
# Set program path
-set rm = "/bin/rm -f"
+set rm = "rm -f"
set cf_xcorr = cf_xcorr
set cf_combine = cf_combine
diff --git a/scripts/cf_make_all_obs.csh b/scripts/cf_make_all_obs.csh
index 2a97247..a6a0ac2 100755
--- a/scripts/cf_make_all_obs.csh
+++ b/scripts/cf_make_all_obs.csh
@@ -1,4 +1,4 @@
-#!/usr/local/bin/tcsh -f
+#!/usr/bin/env tcsh -f
#******************************************************************************
#* Johns Hopkins University
@@ -69,7 +69,7 @@
#set DELETE_BPM # Delete bad-pixel map files
# Set program path
-set rm = "/bin/rm -f"
+set rm = "rm -f"
set cf_xcorr = cf_xcorr
set cf_combine = cf_combine
diff --git a/scripts/cfsetup.csh.in b/scripts/cfsetup.csh.in
index 8951b36..69dc3df 100644
--- a/scripts/cfsetup.csh.in
+++ b/scripts/cfsetup.csh.in
@@ -2,7 +2,7 @@
#
set CF_DIR="@PREFIX@"
set CF_VERSION="@VERSION@"
-setenv PATH "@PREFIX@/bin:${PATH}"
+setenv PATH "${CF_DIR}/bin:${PATH}"
setenv CF_CALDIR "@DATADIR@/calfiles"
setenv CF_PARMDIR "@DATADIR@/parmfiles"
setenv CF_IDLDIR "@DATADIR@/idl"
diff --git a/scripts/cfsetup.sh.in b/scripts/cfsetup.sh.in
index bdc85d4..f821c12 100644
--- a/scripts/cfsetup.sh.in
+++ b/scripts/cfsetup.sh.in
@@ -3,8 +3,8 @@
CF_DIR="@PREFIX@"
CF_VERSION="@VERSION@"
export PATH="${CF_DIR}/bin:${PATH}"
-export CF_CALDIR="${CF_DIR}/calfiles"
-export CF_PARMDIR="${CF_DIR}/parmfiles"
-export CF_IDLDIR="${CF_DIR}/idl"
+export CF_CALDIR="@DATADIR@/calfiles"
+export CF_PARMDIR="@DATADIR@/parmfiles"
+export CF_IDLDIR="@DATADIR@/idl"
export CF_HISTDIR=`pwd`
diff --git a/src/Makefile.in b/src/Makefile.in
index c617f20..df509b3 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -97,7 +97,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
diff --git a/src/analysis/Makefile.am b/src/analysis/Makefile.am
index 42e9122..5c9d665 100644
--- a/src/analysis/Makefile.am
+++ b/src/analysis/Makefile.am
@@ -51,4 +51,4 @@ ttag_lightcurve_mjd2hmjd_SOURCES = ttag_lightcurve_mjd2hmjd.c gethmjd.c
ttag_lightcurve_periodogram_SOURCES = ttag_lightcurve_periodogram.c
LDADD = ../libcf/libcf.la ../slalib/libsla.la $(cfitsio_LIBS)
-AM_CFLAGS = -I../../include -I./ -DCFORTRAN -Df2cFortran
+AM_CFLAGS = -I$(top_srcdir)/include -I./ -DCFORTRAN -Df2cFortran
diff --git a/src/analysis/Makefile.in b/src/analysis/Makefile.in
index f3d2ddd..02ba382 100644
--- a/src/analysis/Makefile.in
+++ b/src/analysis/Makefile.in
@@ -110,7 +110,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
@@ -263,7 +263,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -531,7 +531,7 @@ ttag_lightcurve_combine_SOURCES = ttag_lightcurve_combine.c
ttag_lightcurve_mjd2hmjd_SOURCES = ttag_lightcurve_mjd2hmjd.c gethmjd.c
ttag_lightcurve_periodogram_SOURCES = ttag_lightcurve_periodogram.c
LDADD = ../libcf/libcf.la ../slalib/libsla.la $(cfitsio_LIBS)
-AM_CFLAGS = -I../../include -I./ -DCFORTRAN -Df2cFortran
+AM_CFLAGS = -I$(top_srcdir)/include -I./ -DCFORTRAN -Df2cFortran
all: all-recursive
.SUFFIXES:
diff --git a/src/analysis/cf_make_900_obs.csh b/src/analysis/cf_make_900_obs.csh
deleted file mode 100755
index 9edbc70..0000000
--- a/src/analysis/cf_make_900_obs.csh
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/usr/local/bin/tcsh -f
-
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: cf_make_900_obs.csh association_file
-#*
-#* Description: This routine is derived from cf_make_all_obs.csh, but modified
-#* to consider only 900+ (airglow) files. Output is a single
-#* quick-look image of the airglow spactrum.
-#*
-#* Extracted spectra are combined, not IDF files.
-#*
-#* When an expected data set is missing, the script stops, cleans
-#* the directory, and returns 1.
-#*
-#* History: 08/08/08 1.00 wvd Create separate quick-look image
-#* for 900+ (airglow) exposures.
-#* Always combine extracted spectra. If
-#* cf_xcorr fails, combine with no shift.
-#* 08/08/08 1.01 wvd Rename airglow quick-look file to
-#* M112580100000airgttagf.gif
-#*
-#*****************************************************************************/
-
-# Delete files after processing? (Default is no.)
-#set DELETE_IDF # Delete intermediate data files
-set DELETE_BPM # Delete bad-pixel map files
-
-# Set program path
-set rm = "/bin/rm -f"
-
-set cf_xcorr = cf_xcorr
-set cf_combine = cf_combine
-set cf_pack = cf_pack
-set cf_nvo = cf_nvo
-set idl_obsplot = idl_obsplot.pl
-set modhead = modhead
-
-# Init var list
-set detector = (1a 2b)
-set channel = (lif sic)
-set resolution = (2 3 4)
-set obsmod = (hist ttag)
-
-# Determine the root name and the program ID
-set asnf = $1
-set rn = ${asnf:s/000asnf.fit//}
-set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
-
-# Determine the object class
-set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
-set tmp_buf = `$modhead $tmp_file OBJCLASS`
-set objclass = $tmp_buf[2]
-
-# Clean tmp files that the script will create (safe)
-$rm tmp_xcorr.res tmp_combine.lis
-$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
-$rm DN_${rn}*.fit
-
-foreach om ($obsmod)
- foreach res ($resolution)
- foreach chan ($channel)
- foreach det ($detector)
-
- set ignore_exp_stat = ''
- if ($om == hist) set ignore_exp_stat = -a
- if ($pid == S100) set ignore_exp_stat = -a
- if ($pid == M106) set ignore_exp_stat = -a
-
- # Find exposures that match the current segment
- set seg = $det$chan$res$om
- set readfiles = 0
- ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
- if ($? == 0) then
- set readfiles = 2
- set ignore_exp_stat = -a
- endif
-
- if ($readfiles >= 1) then # There are one or more exposures
-
- echo " "
- echo "*** Processing: $seg ***"
- # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
- if ($det == 1a) set det2 = 1b
- if ($det == 2b) set det2 = 2a
- set seg2 = $det2$chan$res$om
-
- echo "----- cf_xcorr input -----"
- cat tmp_exp.lis
- echo "----------------------------"
- $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
- echo "----- cf_xcorr results -----"
- cat tmp_xcorr.res
- echo "----------------------------"
-
- awk '{if ($3 >= 0) {print $6, $2} else {print $6}}' tmp_xcorr.res > tmp_good_exp.lis
-
- #
- # --- Path 1: Optimize resolution ---
- #
-
- echo "Optimize resolution..."
- set n_good = `cat tmp_good_exp.lis | wc -l`
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}900${seg}fcal.fit
- awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}900${seg2}fcal.fit
- awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- endif
- end
-
- $rm tmp_xcorr.res tmp_combine.lis
- $rm tmp_good_exp.lis tmp_exp.lis
-
- end
-
- # Pack the 8 [detector][channel] pairs together
- if (-e tmp_seg_dn.lis) then
-
- set fcal_all = ${rn}00900all$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_dn.lis | wc -l`
-
- if (!($n_segs == 8)) then
-
- @ mseg = 8 - $n_segs
- echo "ERROR: $mseg (day + night) segments are missing"
- $rm tmp_seg_dn.lis
- goto crash
-
- else
-
- $cf_pack tmp_seg_dn.lis $fcal_all
- $rm tmp_seg_dn.lis
-
- # Plot figures, delete unwanted files
- $idl_obsplot {$rn} airglow
- mv ${rn}00900spec${om}f.gif ${rn}00000airg${om}f.gif
- $rm ${rn}00900lif*.gif ${rn}00900sic*.gif
- $rm $fcal_all
-
- endif
- endif
- end
-end
-
-# Clean [dn] files.
-$rm DN_${rn}*.fit
-
-# Delete IDF files
-if $?DELETE_IDF then
- echo "NOTE: Deleting intermediate data files."
- $rm ${rn}*idf.fit
-endif
-
-# Delete bad-pixel-map (bpm) files
-if $?DELETE_BPM then
- echo "NOTE: Deleting bad pixel map (bpm) files."
- $rm ${rn}*bpm.fit
-endif
-
-exit(0)
-
-crash: # Procedure when script crashes
-
-# Clean directory
-$rm tmp_xcorr.res tmp_combine.lis
-$rm tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis
-$rm DN_*.fit
-
-# Return 1
-exit(1)
diff --git a/src/analysis/cf_make_all_obs.csh b/src/analysis/cf_make_all_obs.csh
deleted file mode 100755
index 2a97247..0000000
--- a/src/analysis/cf_make_all_obs.csh
+++ /dev/null
@@ -1,555 +0,0 @@
-#!/usr/local/bin/tcsh -f
-
-#******************************************************************************
-#* Johns Hopkins University
-#* Center For Astrophysical Sciences
-#* FUSE
-#******************************************************************************
-#*
-#* Synopsis: cf_make_all_obs.csh association_file
-#*
-#* Description: Creates 3 files from Calfuse output (properly run):
-#*
-#* 1) An "all" file containing 1 extension per detector (= 8).
-#* Each extension contains a combined spectrum from the set
-#* of exposures, using "Xcorr" or "Background" method.
-#* 2) In the case of TTAG data, creates an "ano" file. Same as
-#* the "all" file but considering "night only" exposure time.
-#* 3) A National Virtual Observatory "nvo" file. One extension
-#* containing wavelengths that span the whole FUSE range.
-#*
-#* The Xcorr method consists of co-adding spectra, the latter
-#* being corrected for a possible shift. The Background method
-#* consists of combining all the IDF files.
-#*
-#* The Xcorr test is performed on 4 (detector, channel) pairs, the
-#* method of other pairs are given by them:
-#* LiF 1a -> Lif 1b
-#* LiF 2b -> LiF 2a
-#* SiC 1a -> Sic 1b
-#* Sic 2b -> Sic 2a
-#* In the script, the left segments are referred as to $seg (or
-#* $det) and the right segments are referred as to $seg2 (or
-#* $det2).
-#*
-#* When an expected data set is missing, the script stops, cleans
-#* the directory, and returns 1.
-#*
-#* History: 04/15/05 1.0 tc First release
-#* 08/22/05 1.1 wvd Argument is name of association file.
-#* 10/20/05 1.2 wvd Use idl_obsplot.pl to call cf_obsplot.
-#* 10/25/05 1.3 wvd Add option to delete BPM or IDF files.
-#* 03/21/06 1.4 wvd If there's only one exposure, always
-#* follow the cross-correlation path.
-#* Don't check the number of night-only
-#* spectra before calling cf_pack.
-#* 03/28/06 1.5 wvd If there's no good time in any exposure,
-#* follow the cross-correlation path.
-#* 04/27/06 1.6 wvd Be smarter when discarding 000 files.
-#* Always use cross-corr for HIST data.
-#* 05/23/06 1.7 wvd Move -k to proper spot after cf_combine.
-#* 06/02/06 1.8 wvd If OBJCLASS = 7 (Sky Background)
-#* always combine IDF files.
-#* 06/22/06 1.9 wvd Call idf_combine with -z flag.
-#* 05/24/07 1.10 bot If only 900+ spectra are available,
-#* use them.
-#* 04/04/08 1.11 bot Ignore EXP_STAT in cf_combine for HIST
-#* data.
-#* 07/25/08 1.12 wvd Ignore EXP_STAT in cf_combine and
-#* idf_combine for BR-EARTH observations
-#* (S100, M106, and 900+ exposures).
-#* 08/08/08 1.13 wvd Don't ignore EXP_STAT for 900+ exposures.
-#* 08/15/08 1.14 wvd Call cf_make_900_obs.csh
-#* to make quick-look airglow plot.
-#*
-#*****************************************************************************/
-
-# Delete files after processing? (Default is no.)
-#set DELETE_IDF # Delete intermediate data files
-#set DELETE_BPM # Delete bad-pixel map files
-
-# Set program path
-set rm = "/bin/rm -f"
-
-set cf_xcorr = cf_xcorr
-set cf_combine = cf_combine
-set cf_pack = cf_pack
-set cf_nvo = cf_nvo
-set idl_obsplot = idl_obsplot.pl
-set modhead = modhead
-
-#set cf_xcorr = /home/vela/civeit/Work/CalFuse/Xcorr/New/cf_xcorr
-#set cf_combine = /home/vela/civeit/Work/CalFuse/Shiftexp/cf_combine
-#set cf_pack = /home/vela/civeit/Work/CalFuse/Pack/cf_pack
-#set cf_nvo = /home/vela/civeit/Work/CalFuse/Nvo/cf_nvo
-#set modhead = /home/vela/civeit/local/bin/modhead
-
-#set cf_obsplot = /data1/fuse/calfuse/v3.1/idl/cf_obsplot.pro
-
-# Init var list
-set detector = (1a 2b)
-set channel = (lif sic)
-set resolution = (2 3 4)
-set obsmod = (hist ttag)
-
-# Determine the root name and the program ID
-set asnf = $1
-set rn = ${asnf:s/000asnf.fit//}
-set pid = `echo $rn | awk '{print substr($1, 1, 4)}'`
-
-# Determine the object class
-set tmp_file = `ls ${rn}*fcal.fit | awk '{if (NR == 1) print}'`
-set tmp_buf = `$modhead $tmp_file OBJCLASS`
-set objclass = $tmp_buf[2]
-
-# Clean tmp files that the script will create (safe)
-$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
-$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
-$rm DN_${rn}*.fit NO_${rn}*.fit
-
-foreach om ($obsmod)
- foreach res ($resolution)
- foreach chan ($channel)
- foreach det ($detector)
-
- set ignore_exp_stat = ''
- if ($om == hist) set ignore_exp_stat = -a
- if ($pid == S100) set ignore_exp_stat = -a
- if ($pid == M106) set ignore_exp_stat = -a
-
- # Find exposures that match the current segment
- set seg = $det$chan$res$om
- set readfiles = 0
- ls ${rn}[0-8][0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Reject EXP "9xx" and "000"
-
- if ($? == 0) then
- set readfiles = 1
- else
- ls ${rn}9[0-9][0-9]${seg}fcal.fit |& grep -v 000${seg} > tmp_exp.lis # Keep only "9xx" exposures
- if ($? == 0) set readfiles = 2
- endif
-
- if ($readfiles >= 1) then # There are one or more exposures
-
- echo " "
- echo "*** Processing: $seg ***"
- # [1a][lif] -> [1b][lif], [2b][lif] -> [2a][lif] etc...
- if ($det == 1a) set det2 = 1b
- if ($det == 2b) set det2 = 2a
- set seg2 = $det2$chan$res$om
-
- echo "----- cf_xcorr input -----"
- cat tmp_exp.lis
- echo "----------------------------"
- $cf_xcorr tmp_exp.lis tmp_xcorr.res # Compute shift and sigma_shift
- echo "----- cf_xcorr results -----"
- cat tmp_xcorr.res
- echo "----------------------------"
-
- awk '{if ($5 > 0) print $6, $4, $5}' tmp_xcorr.res > tmp_all_night_exp.lis
- awk '{if ($3 >= 0) print $6, $2}' tmp_xcorr.res > tmp_good_exp.lis
- awk '{if (($3 >= 0) && ($5 > 0)) print $6, $2, $4, $5}' tmp_xcorr.res > tmp_night_exp.lis
- set time_good = `awk 'BEGIN{$t = 0} {if ($3 >= 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
- set time_bad = `awk 'BEGIN{$t = 0} {if ($3 < 0) $t = $t + $4} END{print $t}' tmp_xcorr.res`
- echo "Xcorr time: $time_good - Background time: $time_bad"
- set n_exp = `cat tmp_xcorr.res | wc -l`
-
- if (($time_good > 2 * $time_bad && $objclass != 7) || ($time_good == 0 && $time_bad == 0) || $n_exp == 1 || $om == hist) then
-
- #
- # --- Path 1: Optimize resolution ---
- #
-
- echo "Optimize resolution..."
- set n_good = `cat tmp_good_exp.lis | wc -l`
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}000${seg}fcal.fit
- awk '{print "'$rn'"$1"'$seg'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}000${seg2}fcal.fit
- awk '{print "'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_good_exp.lis > tmp_combine.lis # Combine $seg2 [dn]
- # echo "----- Combining Files ----- "
- # cat tmp_combine.lis
- # echo "Output: " $s
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_good
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_dn.lis
-
- set n_night = `cat tmp_night_exp.lis | wc -l`
- if ($om == ttag && $n_night > 0) then # Create and combine night only files
-
- echo "*** Creating night only files ***"
- set exp_nums = `awk '{print $1}' tmp_night_exp.lis`
-
- foreach exp ($exp_nums)
-
- # Create night-only BPM and FCAL files if they do not already exist.
- set bno1 = NO_$rn$exp$det${om}fbpm.fit # Bad-pixel maps
- set bno2 = NO_$rn$exp$det2${om}fbpm.fit
- set cno1 = NO_$rn$exp${seg}fcal.fit # Extracted spectra
- set cno2 = NO_$rn$exp${seg2}fcal.fit
-
- set etime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $3}'`
- set ntime = `egrep "^$exp" tmp_night_exp.lis | awk '{print $4}'`
- set ratio = `egrep "^$exp" tmp_night_exp.lis | awk '{printf "%.0f", 0.5+$4/$3*10.}'`
-
- if (!(-e $cno1)) then
- if ($etime == $ntime) then
- echo "$cno1 is a symbolic link to $rn$exp${seg}fcal.fit"
- ln -s $rn$exp${seg}fcal.fit $cno1
- else
-
- set idf_file = $rn$exp$det${om}fidf.fit
- if (!(-e $bno1)) then
- if ($ratio > 9) then
- echo "$bno1 is a symbolic link to $rn$exp$det${om}fbpm.fit"
- ln -s $rn$exp$det${om}fbpm.fit $bno1
- else
- echo "Creating BPM: $bno1 ..."
- cf_bad_pixels -n $bno1 $idf_file
- endif
- endif
-
- echo "Creating (LiF + SiC) FCAL: $cno1 ..."
- cf_extract_spectra -n $bno1 -r NO_$rn$exp $idf_file # Existence of $bno1 is not required
- endif
- endif
-
- if (!(-e $cno2)) then
- if ($etime == $ntime) then
- echo "Using a symbolic link to $cno2"
- ln -s $rn$exp${seg2}fcal.fit NO_$rn$exp${seg2}fcal.fit
- else
-
- set idf_file = $rn$exp$det2${om}fidf.fit
- if (!(-e $bno2)) then
- if ($ratio > 9) then
- echo "Using a symbolic link to $bno2"
- ln -s $rn$exp$det2${om}fbpm.fit NO_$rn$exp$det2${om}fbpm.fit
- else
- echo "Creating BPM: $bno2 ..."
- cf_bad_pixels -n $bno2 $idf_file
- endif
- endif
-
- echo "Creating (LiF + SiC) FCAL: $cno2 ..."
- cf_extract_spectra -n $bno2 -r NO_$rn$exp $idf_file # Existence of $bno2 is not required
- endif
- endif
-
- end
-
- # Combine exposures into a single spectrum.
- set s = NO_${rn}000${seg}fcal.fit
- awk '{print "NO_'$rn'"$1"'$seg'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg [no]
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_night
- $modhead "${s}[0]" DAYNIGHT NIGHT
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_no.lis
-
- set s = NO_${rn}000${seg2}fcal.fit
- awk '{print "NO_'$rn'"$1"'$seg2'fcal.fit",$2}' tmp_night_exp.lis > tmp_combine.lis # Combine $seg2 [no]
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- # $modhead "${s}[1]" NUM_EXP $n_night
- $modhead "${s}[0]" DAYNIGHT NIGHT
- $modhead "${s}[1]" COMBMETH XCORR
- echo $s >> tmp_seg_no.lis
-
- endif
-
- else
-
- #
- # --- Path 2: Optimize background ---
- #
-
- echo "Optimize background..."
-
- # Combine IDF files
- set idf1_all = DN_${rn}000$det${om}fidf.fit # Same for [dn] and [no]
- set idf2_all = DN_${rn}000$det2${om}fidf.fit
-
- if (!(-e $idf1_all)) then
- echo "Creating IDF: $idf1_all ..."
- if ($readfiles == 1) then
- ls ${rn}[0-8][0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Reject EXP "9xx" and "000"
- else
- ls ${rn}9[0-9][0-9]$det${om}fidf.fit |& grep -v 000${det} > tmp_idf.lis # Consider only airglow
- endif
- if ($? == 0) then # IDF files exist
-
- set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
- # echo "Combining IDF files: " $idf_lis
- idf_combine -cz $ignore_exp_stat $idf1_all $idf_lis # Create combined IDF file for $seg
- $rm tmp_idf.lis
-
- else
-
- echo "ERROR: IDF files are missing"
- $rm tmp_idf.lis
- goto crash
-
- endif
- endif
-
- if (!(-e $idf2_all)) then
- echo "Creating IDF: $idf2_all ..."
- if ($readfiles == 1) then
- ls ${rn}[0-8][0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Reject EXP "9xx" and "000"
- else
- ls ${rn}9[0-9][0-9]$det2${om}fidf.fit |& grep -v 000${det2} > tmp_idf.lis # Consider only airglow
- endif
- if ($? == 0) then # IDF files exist
-
- set idf_lis = `awk '{printf "%s ",$1}' tmp_idf.lis`
- # echo "Combining IDF files: " $idf_lis
- idf_combine -cz $ignore_exp_stat $idf2_all $idf_lis # Create combined IDF file for $seg2
- $rm tmp_idf.lis
-
- else
-
- echo "ERROR: IDF files are missing"
- $rm tmp_idf.lis
- goto crash
-
- endif
- endif
-
- # Get the number of (valid) combined IDF files
- set tmp_buf = `$modhead $idf1_all NSPEC`
- set n_comb1 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf1_all SPEC001`
- set idf1_1 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf2_all NSPEC`
- set n_comb2 = $tmp_buf[3]
- set tmp_buf = `$modhead $idf2_all SPEC001`
- set idf2_1 = $tmp_buf[3]
-
- # Combine BPM files
- set bpm1_all = DN_${rn}000$det${om}fbpm.fit
- set bpm2_all = DN_${rn}000$det2${om}fbpm.fit
-
- if (!(-e $bpm1_all)) then
- echo "Combine all BPM (from IDF): $bpm1_all ..."
- bpm_combine $bpm1_all $idf1_all # Create combined BPM file [dn] for $seg
- endif
-
- if (!(-e $bpm2_all)) then
- echo "Combine all BPM (from IDF): $bpm2_all ..."
- bpm_combine $bpm2_all $idf2_all # Idem for $seg2
- endif
-
- # Extract [Day + Night] spectra
- set s = DN_${rn}000${seg}fcal.fit
- set xxx = DN_${rn}xxx${seg}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb1
- $modhead "${s}[0]" SPEC001 $idf1_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_dn.lis
-
- set s = DN_${rn}000${seg2}fcal.fit
- set xxx = DN_${rn}xxx${seg2}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -r DN_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb2
- $modhead "${s}[0]" SPEC001 $idf2_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_dn.lis
-
- set n_night = `cat tmp_all_night_exp.lis | wc -l`
- if ($om == ttag && $n_night > 0) then # Create and combine night only files
-
- echo "*** Creating night only files ***"
- set exp_nums = `awk '{print $1}' tmp_all_night_exp.lis`
- $rm tmp_bpm1.lis tmp_bpm2.lis
-
- foreach exp ($exp_nums)
-
- # Create bpm night only files (if they do not exist yet)
- set bno1 = NO_$rn$exp$det${om}fbpm.fit
- set bno2 = NO_$rn$exp$det2${om}fbpm.fit
-
- set idf_file = $rn$exp$det${om}fidf.fit
- if (!(-e $bno1)) then
- echo "Creating BPM: $bno1 ..."
- cf_bad_pixels -n $bno1 $idf_file
- endif
- if (-e $bno1) echo $bno1 >> tmp_bpm1.lis # If valid, add in $seg list
-
- set idf_file = $rn$exp$det2${om}fidf.fit
- if (!(-e $bno2)) then
- echo "Creating BPM: $bno2 ..."
- cf_bad_pixels -n $bno2 $idf_file
- endif
- if (-e $bno2) echo $bno2 >> tmp_bpm2.lis # If valid, add in $seg2 list
-
- end
-
-
- # Combine BPM for $seg and extract spectra
-
- set bpm1_all = NO_${rn}000$det${om}fbpm.fit
- set n_bpm = `cat tmp_bpm1.lis | wc -l`
- echo "Number of valid BPM files: $n_bpm"
-
- if ($n_bpm > 0) then
-
- echo $n_bpm > tmp_bpm.lis
- cat tmp_bpm1.lis >> tmp_bpm.lis
-
- if (!(-e $bpm1_all)) then
- echo "Combine all BPM (from list): $bpm1_all ..."
- bpm_combine $bpm1_all tmp_bpm.lis # Create combined BPM file [no] for $seg
- endif
- $rm tmp_bpm.lis
-
- endif
-
- # Extract [Night only] spectra. The existence of $bpm1_all is not required
- set s = NO_${rn}000${seg}fcal.fit
- set xxx = NO_${rn}xxx${seg}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -n $bpm1_all -r NO_${rn}xxx $idf1_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb1
- $modhead "${s}[0]" SPEC001 $idf1_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_no.lis
-
-
- # Combine BPM for $seg2 and extract spectra
-
- set bpm2_all = NO_${rn}000$det2${om}fbpm.fit
- set n_bpm = `cat tmp_bpm2.lis | wc -l`
- echo "Number of valid BPM files: $n_bpm"
-
- if ($n_bpm > 0) then
-
- echo $n_bpm > tmp_bpm.lis
- cat tmp_bpm2.lis >> tmp_bpm.lis
-
- if (!(-e $bpm2_all)) then
- echo "Combine all BPM (from list): $bpm2_all ..."
- bpm_combine $bpm2_all tmp_bpm.lis # Create combined BPM file [no] for $seg2
- endif
- $rm tmp_bpm.lis
-
- endif
-
- # Extract [Night only] spectra. The existence of $bpm2_all is not required
- set s = NO_${rn}000${seg2}fcal.fit
- set xxx = NO_${rn}xxx${seg2}fcal.fit
- if (!(-e $xxx)) cf_extract_spectra -n $bpm2_all -r NO_${rn}xxx $idf2_all # Avoid overwrite LiF | SiC
- echo $xxx > tmp_combine.lis
- $cf_combine -k $ignore_exp_stat tmp_combine.lis $s
- $modhead "${s}[0]" NSPEC $n_comb2
- $modhead "${s}[0]" SPEC001 $idf2_1
- $modhead "${s}[1]" COMBMETH BACKGRND
- echo $s >> tmp_seg_no.lis
-
- endif
- endif
- endif
- end
-
- $rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis
- $rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_night_exp.lis
-
- end
-
- # Pack the 8 [detector][channel] pairs together ([dn] and [no] for ttag)
- if (-e tmp_seg_dn.lis) then
-
- set fcal_all = ${rn}00000all$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_dn.lis | wc -l`
-
- if (!($n_segs == 8)) then
-
- @ mseg = 8 - $n_segs
- echo "ERROR: $mseg (day + night) segments are missing"
- $rm tmp_seg_dn.lis
- goto crash
-
- else
-
- $cf_pack tmp_seg_dn.lis $fcal_all
- $rm tmp_seg_dn.lis
-
- # Plot figures
- $idl_obsplot {$rn}
-
- # Create National Virtual Observatory file
- set nvo_file = ${rn}00000nvo$res${om}fcal.fit
- $rm $nvo_file # Clean (safe)
- $cf_nvo $fcal_all $nvo_file # Create file
-
- if (-e tmp_seg_no.lis) then
-
- set fcal_all = ${rn}00000ano$res${om}fcal.fit # Final output name
- $rm $fcal_all # Clean (safe)
- set n_segs = `cat tmp_seg_no.lis | wc -l`
-
- # if (!($n_segs == 8)) then
- #
- # @ mseg = 8 - $n_segs
- # echo "ERROR: $mseg (night only) segments are missing"
- # $rm tmp_seg_no.lis
- # # goto crash
- #
- # else
-
- $cf_pack tmp_seg_no.lis $fcal_all
- $rm tmp_seg_no.lis
-
- # endif
-
- endif
- endif
- endif
- end
-end
-
-# Clean [dn] and [no] files. Just keep all, (ano) and nvo
-$rm DN_${rn}*.fit NO_${rn}*.fit
-
-# Delete IDF files
-if $?DELETE_IDF then
- echo "NOTE: Deleting intermediate data files."
- $rm ${rn}*idf.fit
-endif
-
-# Delete bad-pixel-map (bpm) files
-if $?DELETE_BPM then
- echo "NOTE: Deleting bad pixel map (bpm) files."
- $rm ${rn}*bpm.fit
-endif
-
-# Call routine to make quick-look airglow plot.
-cf_make_900_obs.csh $1
-
-exit(0)
-
-crash: # Procedure when script crashes
-
-# Clean directory
-$rm tmp_xcorr.res tmp_bpm1.lis tmp_bpm2.lis tmp_combine.lis tmp_night_exp.lis
-$rm tmp_all_night_exp.lis tmp_good_exp.lis tmp_exp.lis tmp_seg_dn.lis tmp_seg_no.lis
-$rm DN_*.fit NO_*.fit
-
-# Return 1
-exit(1)
diff --git a/src/analysis/gethmjd.h b/src/analysis/gethmjd.h
deleted file mode 100644
index e69de29..0000000
--- a/src/analysis/gethmjd.h
+++ /dev/null
diff --git a/src/cal/Makefile.in b/src/cal/Makefile.in
index d419942..7bd0ca3 100644
--- a/src/cal/Makefile.in
+++ b/src/cal/Makefile.in
@@ -97,7 +97,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
diff --git a/src/cal/jitter/Makefile.am b/src/cal/jitter/Makefile.am
index 693ae7a..2eaa6d0 100644
--- a/src/cal/jitter/Makefile.am
+++ b/src/cal/jitter/Makefile.am
@@ -4,4 +4,4 @@ bin_PROGRAMS = cf_jitter_diag \
cf_jitter_diag_SOURCES = cf_jitter_diag.c
cf_jitter_SOURCES = cf_jitter.c
LDADD = ../../libcf/libcf.la ../../slalib/libsla.la $(cfitsio_LIBS)
-AM_CFLAGS = -I../../../include -I./ -DCFORTRAN -Df2cFortran $(cfitsio_CFLAGS)
+AM_CFLAGS = -I$(top_srcdir)/include -I./ -DCFORTRAN -Df2cFortran $(cfitsio_CFLAGS)
diff --git a/src/cal/jitter/Makefile.in b/src/cal/jitter/Makefile.in
index 31675d5..17bfb6f 100644
--- a/src/cal/jitter/Makefile.in
+++ b/src/cal/jitter/Makefile.in
@@ -99,7 +99,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
@@ -131,7 +131,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -351,7 +351,7 @@ SUBDIRS = .
cf_jitter_diag_SOURCES = cf_jitter_diag.c
cf_jitter_SOURCES = cf_jitter.c
LDADD = ../../libcf/libcf.la ../../slalib/libsla.la $(cfitsio_LIBS)
-AM_CFLAGS = -I../../../include -I./ -DCFORTRAN -Df2cFortran $(cfitsio_CFLAGS)
+AM_CFLAGS = -I$(top_srcdir)/include -I./ -DCFORTRAN -Df2cFortran $(cfitsio_CFLAGS)
all: all-recursive
.SUFFIXES:
diff --git a/src/fes/Makefile.am b/src/fes/Makefile.am
index 7aba311..ffeee17 100644
--- a/src/fes/Makefile.am
+++ b/src/fes/Makefile.am
@@ -5,4 +5,4 @@ cf_calfes_SOURCES = \
cf_fes_cal.c cf_fes_get_cal_image.c cf_limbang.c \
cf_fes_apply_bias.c cf_fes_apply_flat.c cf_fes_apply_mask.c
cf_calfes_LDADD = ../slalib/libsla.la ../libcf/libcf.la
-cf_calfes_CFLAGS = -I../../include -I./
+cf_calfes_CFLAGS = -I$(top_srcdir)/include -I./
diff --git a/src/fes/Makefile.in b/src/fes/Makefile.in
index f63f549..2a1d28f 100644
--- a/src/fes/Makefile.in
+++ b/src/fes/Makefile.in
@@ -99,7 +99,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
@@ -135,7 +135,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -358,7 +358,7 @@ cf_calfes_SOURCES = \
cf_fes_apply_bias.c cf_fes_apply_flat.c cf_fes_apply_mask.c
cf_calfes_LDADD = ../slalib/libsla.la ../libcf/libcf.la
-cf_calfes_CFLAGS = -I../../include -I./
+cf_calfes_CFLAGS = -I$(top_srcdir)/include -I./
all: all-recursive
.SUFFIXES:
diff --git a/src/fuv/Makefile.am b/src/fuv/Makefile.am
index 2772a69..efeaa71 100644
--- a/src/fuv/Makefile.am
+++ b/src/fuv/Makefile.am
@@ -1,6 +1,6 @@
SUBDIRS = .
BUILD_LIBS = ../slalib/libsla.la ../libcf/libcf.la $(cfitsio_LIBS)
-BUILD_FLAGS = -I../../include -I./ $(cfitsio_CFLAGS)
+BUILD_FLAGS = -I../include -I./ $(cfitsio_CFLAGS)
bin_PROGRAMS = cf_assign_wavelength \
cf_bad_pixels \
cf_convert_to_farf \
@@ -24,26 +24,5 @@ cf_remove_motions_SOURCES = cf_remove_motions.c
cf_screen_photons_SOURCES = cf_screen_photons.c
cf_ttag_init_SOURCES = cf_ttag_init.c
-cf_assign_wavelength_LDADD = $(BUILD_LIBS)
-cf_bad_pixels_LDADD = $(BUILD_LIBS)
-cf_convert_to_farf_LDADD = $(BUILD_LIBS)
-cf_countmap_LDADD = $(BUILD_LIBS)
-cf_extract_spectra_LDADD = $(BUILD_LIBS)
-cf_flux_calibrate_LDADD = $(BUILD_LIBS)
-cf_gainmap_LDADD = $(BUILD_LIBS)
-cf_hist_init_LDADD = $(BUILD_LIBS)
-cf_remove_motions_LDADD = $(BUILD_LIBS)
-cf_screen_photons_LDADD = $(BUILD_LIBS)
-cf_ttag_init_LDADD = $(BUILD_LIBS)
-
-cf_assign_wavelength_CFLAGS = $(BUILD_FLAGS)
-cf_bad_pixels_CFLAGS = $(BUILD_FLAGS)
-cf_convert_to_farf_CFLAGS = $(BUILD_FLAGS)
-cf_countmap_CFLAGS = $(BUILD_FLAGS)
-cf_extract_spectra_CFLAGS = $(BUILD_FLAGS)
-cf_flux_calibrate_CFLAGS = $(BUILD_FLAGS)
-cf_gainmap_CFLAGS = $(BUILD_FLAGS)
-cf_hist_init_CFLAGS = $(BUILD_FLAGS)
-cf_remove_motions_CFLAGS = $(BUILD_FLAGS)
-cf_screen_photons_CFLAGS = $(BUILD_FLAGS)
-cf_ttag_init_CFLAGS = $(BUILD_FLAGS)
+LDADD = $(BUILD_LIBS)
+AM_CFLAGS = $(BUILD_FLAGS)
diff --git a/src/fuv/Makefile.in b/src/fuv/Makefile.in
index d40613a..80d7a39 100644
--- a/src/fuv/Makefile.in
+++ b/src/fuv/Makefile.in
@@ -104,14 +104,14 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_cf_assign_wavelength_OBJECTS = \
- cf_assign_wavelength-cf_assign_wavelength.$(OBJEXT)
+am_cf_assign_wavelength_OBJECTS = cf_assign_wavelength.$(OBJEXT)
cf_assign_wavelength_OBJECTS = $(am_cf_assign_wavelength_OBJECTS)
+cf_assign_wavelength_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
am__DEPENDENCIES_2 = ../slalib/libsla.la ../libcf/libcf.la \
$(am__DEPENDENCIES_1)
@@ -120,80 +120,46 @@ AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
am__v_lt_1 =
-cf_assign_wavelength_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(cf_assign_wavelength_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-am_cf_bad_pixels_OBJECTS = cf_bad_pixels-cf_bad_pixels.$(OBJEXT)
+am_cf_bad_pixels_OBJECTS = cf_bad_pixels.$(OBJEXT)
cf_bad_pixels_OBJECTS = $(am_cf_bad_pixels_OBJECTS)
+cf_bad_pixels_LDADD = $(LDADD)
cf_bad_pixels_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_bad_pixels_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cf_bad_pixels_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_cf_convert_to_farf_OBJECTS = \
- cf_convert_to_farf-cf_convert_to_farf.$(OBJEXT)
+am_cf_convert_to_farf_OBJECTS = cf_convert_to_farf.$(OBJEXT)
cf_convert_to_farf_OBJECTS = $(am_cf_convert_to_farf_OBJECTS)
+cf_convert_to_farf_LDADD = $(LDADD)
cf_convert_to_farf_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_convert_to_farf_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(cf_convert_to_farf_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-am_cf_countmap_OBJECTS = cf_countmap-cf_countmap.$(OBJEXT)
+am_cf_countmap_OBJECTS = cf_countmap.$(OBJEXT)
cf_countmap_OBJECTS = $(am_cf_countmap_OBJECTS)
+cf_countmap_LDADD = $(LDADD)
cf_countmap_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_countmap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cf_countmap_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_cf_extract_spectra_OBJECTS = \
- cf_extract_spectra-cf_extract_spectra.$(OBJEXT)
+am_cf_extract_spectra_OBJECTS = cf_extract_spectra.$(OBJEXT)
cf_extract_spectra_OBJECTS = $(am_cf_extract_spectra_OBJECTS)
+cf_extract_spectra_LDADD = $(LDADD)
cf_extract_spectra_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_extract_spectra_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(cf_extract_spectra_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
- $(LDFLAGS) -o $@
-am_cf_flux_calibrate_OBJECTS = \
- cf_flux_calibrate-cf_flux_calibrate.$(OBJEXT)
+am_cf_flux_calibrate_OBJECTS = cf_flux_calibrate.$(OBJEXT)
cf_flux_calibrate_OBJECTS = $(am_cf_flux_calibrate_OBJECTS)
+cf_flux_calibrate_LDADD = $(LDADD)
cf_flux_calibrate_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_flux_calibrate_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(cf_flux_calibrate_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_cf_gainmap_OBJECTS = cf_gainmap-cf_gainmap.$(OBJEXT)
+am_cf_gainmap_OBJECTS = cf_gainmap.$(OBJEXT)
cf_gainmap_OBJECTS = $(am_cf_gainmap_OBJECTS)
+cf_gainmap_LDADD = $(LDADD)
cf_gainmap_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_gainmap_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cf_gainmap_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_cf_hist_init_OBJECTS = cf_hist_init-cf_hist_init.$(OBJEXT)
+am_cf_hist_init_OBJECTS = cf_hist_init.$(OBJEXT)
cf_hist_init_OBJECTS = $(am_cf_hist_init_OBJECTS)
+cf_hist_init_LDADD = $(LDADD)
cf_hist_init_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_hist_init_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cf_hist_init_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-am_cf_remove_motions_OBJECTS = \
- cf_remove_motions-cf_remove_motions.$(OBJEXT)
+am_cf_remove_motions_OBJECTS = cf_remove_motions.$(OBJEXT)
cf_remove_motions_OBJECTS = $(am_cf_remove_motions_OBJECTS)
+cf_remove_motions_LDADD = $(LDADD)
cf_remove_motions_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_remove_motions_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(cf_remove_motions_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_cf_screen_photons_OBJECTS = \
- cf_screen_photons-cf_screen_photons.$(OBJEXT)
+am_cf_screen_photons_OBJECTS = cf_screen_photons.$(OBJEXT)
cf_screen_photons_OBJECTS = $(am_cf_screen_photons_OBJECTS)
+cf_screen_photons_LDADD = $(LDADD)
cf_screen_photons_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_screen_photons_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
- $(cf_screen_photons_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
- -o $@
-am_cf_ttag_init_OBJECTS = cf_ttag_init-cf_ttag_init.$(OBJEXT)
+am_cf_ttag_init_OBJECTS = cf_ttag_init.$(OBJEXT)
cf_ttag_init_OBJECTS = $(am_cf_ttag_init_OBJECTS)
+cf_ttag_init_LDADD = $(LDADD)
cf_ttag_init_DEPENDENCIES = $(am__DEPENDENCIES_2)
-cf_ttag_init_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
- $(LIBTOOLFLAGS) --mode=link $(CCLD) $(cf_ttag_init_CFLAGS) \
- $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -206,7 +172,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -434,7 +400,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = .
BUILD_LIBS = ../slalib/libsla.la ../libcf/libcf.la $(cfitsio_LIBS)
-BUILD_FLAGS = -I../../include -I./ $(cfitsio_CFLAGS)
+BUILD_FLAGS = -I../include -I./ $(cfitsio_CFLAGS)
cf_assign_wavelength_SOURCES = cf_assign_wavelength.c
cf_bad_pixels_SOURCES = cf_bad_pixels.c
cf_convert_to_farf_SOURCES = cf_convert_to_farf.c
@@ -446,28 +412,8 @@ cf_hist_init_SOURCES = cf_hist_init.c
cf_remove_motions_SOURCES = cf_remove_motions.c
cf_screen_photons_SOURCES = cf_screen_photons.c
cf_ttag_init_SOURCES = cf_ttag_init.c
-cf_assign_wavelength_LDADD = $(BUILD_LIBS)
-cf_bad_pixels_LDADD = $(BUILD_LIBS)
-cf_convert_to_farf_LDADD = $(BUILD_LIBS)
-cf_countmap_LDADD = $(BUILD_LIBS)
-cf_extract_spectra_LDADD = $(BUILD_LIBS)
-cf_flux_calibrate_LDADD = $(BUILD_LIBS)
-cf_gainmap_LDADD = $(BUILD_LIBS)
-cf_hist_init_LDADD = $(BUILD_LIBS)
-cf_remove_motions_LDADD = $(BUILD_LIBS)
-cf_screen_photons_LDADD = $(BUILD_LIBS)
-cf_ttag_init_LDADD = $(BUILD_LIBS)
-cf_assign_wavelength_CFLAGS = $(BUILD_FLAGS)
-cf_bad_pixels_CFLAGS = $(BUILD_FLAGS)
-cf_convert_to_farf_CFLAGS = $(BUILD_FLAGS)
-cf_countmap_CFLAGS = $(BUILD_FLAGS)
-cf_extract_spectra_CFLAGS = $(BUILD_FLAGS)
-cf_flux_calibrate_CFLAGS = $(BUILD_FLAGS)
-cf_gainmap_CFLAGS = $(BUILD_FLAGS)
-cf_hist_init_CFLAGS = $(BUILD_FLAGS)
-cf_remove_motions_CFLAGS = $(BUILD_FLAGS)
-cf_screen_photons_CFLAGS = $(BUILD_FLAGS)
-cf_ttag_init_CFLAGS = $(BUILD_FLAGS)
+LDADD = $(BUILD_LIBS)
+AM_CFLAGS = $(BUILD_FLAGS)
all: all-recursive
.SUFFIXES:
@@ -553,47 +499,47 @@ clean-binPROGRAMS:
cf_assign_wavelength$(EXEEXT): $(cf_assign_wavelength_OBJECTS) $(cf_assign_wavelength_DEPENDENCIES) $(EXTRA_cf_assign_wavelength_DEPENDENCIES)
@rm -f cf_assign_wavelength$(EXEEXT)
- $(AM_V_CCLD)$(cf_assign_wavelength_LINK) $(cf_assign_wavelength_OBJECTS) $(cf_assign_wavelength_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_assign_wavelength_OBJECTS) $(cf_assign_wavelength_LDADD) $(LIBS)
cf_bad_pixels$(EXEEXT): $(cf_bad_pixels_OBJECTS) $(cf_bad_pixels_DEPENDENCIES) $(EXTRA_cf_bad_pixels_DEPENDENCIES)
@rm -f cf_bad_pixels$(EXEEXT)
- $(AM_V_CCLD)$(cf_bad_pixels_LINK) $(cf_bad_pixels_OBJECTS) $(cf_bad_pixels_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_bad_pixels_OBJECTS) $(cf_bad_pixels_LDADD) $(LIBS)
cf_convert_to_farf$(EXEEXT): $(cf_convert_to_farf_OBJECTS) $(cf_convert_to_farf_DEPENDENCIES) $(EXTRA_cf_convert_to_farf_DEPENDENCIES)
@rm -f cf_convert_to_farf$(EXEEXT)
- $(AM_V_CCLD)$(cf_convert_to_farf_LINK) $(cf_convert_to_farf_OBJECTS) $(cf_convert_to_farf_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_convert_to_farf_OBJECTS) $(cf_convert_to_farf_LDADD) $(LIBS)
cf_countmap$(EXEEXT): $(cf_countmap_OBJECTS) $(cf_countmap_DEPENDENCIES) $(EXTRA_cf_countmap_DEPENDENCIES)
@rm -f cf_countmap$(EXEEXT)
- $(AM_V_CCLD)$(cf_countmap_LINK) $(cf_countmap_OBJECTS) $(cf_countmap_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_countmap_OBJECTS) $(cf_countmap_LDADD) $(LIBS)
cf_extract_spectra$(EXEEXT): $(cf_extract_spectra_OBJECTS) $(cf_extract_spectra_DEPENDENCIES) $(EXTRA_cf_extract_spectra_DEPENDENCIES)
@rm -f cf_extract_spectra$(EXEEXT)
- $(AM_V_CCLD)$(cf_extract_spectra_LINK) $(cf_extract_spectra_OBJECTS) $(cf_extract_spectra_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_extract_spectra_OBJECTS) $(cf_extract_spectra_LDADD) $(LIBS)
cf_flux_calibrate$(EXEEXT): $(cf_flux_calibrate_OBJECTS) $(cf_flux_calibrate_DEPENDENCIES) $(EXTRA_cf_flux_calibrate_DEPENDENCIES)
@rm -f cf_flux_calibrate$(EXEEXT)
- $(AM_V_CCLD)$(cf_flux_calibrate_LINK) $(cf_flux_calibrate_OBJECTS) $(cf_flux_calibrate_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_flux_calibrate_OBJECTS) $(cf_flux_calibrate_LDADD) $(LIBS)
cf_gainmap$(EXEEXT): $(cf_gainmap_OBJECTS) $(cf_gainmap_DEPENDENCIES) $(EXTRA_cf_gainmap_DEPENDENCIES)
@rm -f cf_gainmap$(EXEEXT)
- $(AM_V_CCLD)$(cf_gainmap_LINK) $(cf_gainmap_OBJECTS) $(cf_gainmap_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_gainmap_OBJECTS) $(cf_gainmap_LDADD) $(LIBS)
cf_hist_init$(EXEEXT): $(cf_hist_init_OBJECTS) $(cf_hist_init_DEPENDENCIES) $(EXTRA_cf_hist_init_DEPENDENCIES)
@rm -f cf_hist_init$(EXEEXT)
- $(AM_V_CCLD)$(cf_hist_init_LINK) $(cf_hist_init_OBJECTS) $(cf_hist_init_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_hist_init_OBJECTS) $(cf_hist_init_LDADD) $(LIBS)
cf_remove_motions$(EXEEXT): $(cf_remove_motions_OBJECTS) $(cf_remove_motions_DEPENDENCIES) $(EXTRA_cf_remove_motions_DEPENDENCIES)
@rm -f cf_remove_motions$(EXEEXT)
- $(AM_V_CCLD)$(cf_remove_motions_LINK) $(cf_remove_motions_OBJECTS) $(cf_remove_motions_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_remove_motions_OBJECTS) $(cf_remove_motions_LDADD) $(LIBS)
cf_screen_photons$(EXEEXT): $(cf_screen_photons_OBJECTS) $(cf_screen_photons_DEPENDENCIES) $(EXTRA_cf_screen_photons_DEPENDENCIES)
@rm -f cf_screen_photons$(EXEEXT)
- $(AM_V_CCLD)$(cf_screen_photons_LINK) $(cf_screen_photons_OBJECTS) $(cf_screen_photons_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_screen_photons_OBJECTS) $(cf_screen_photons_LDADD) $(LIBS)
cf_ttag_init$(EXEEXT): $(cf_ttag_init_OBJECTS) $(cf_ttag_init_DEPENDENCIES) $(EXTRA_cf_ttag_init_DEPENDENCIES)
@rm -f cf_ttag_init$(EXEEXT)
- $(AM_V_CCLD)$(cf_ttag_init_LINK) $(cf_ttag_init_OBJECTS) $(cf_ttag_init_LDADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) $(cf_ttag_init_OBJECTS) $(cf_ttag_init_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -601,17 +547,17 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_assign_wavelength-cf_assign_wavelength.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_bad_pixels-cf_bad_pixels.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_convert_to_farf-cf_convert_to_farf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_countmap-cf_countmap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_extract_spectra-cf_extract_spectra.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_flux_calibrate-cf_flux_calibrate.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_gainmap-cf_gainmap.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_hist_init-cf_hist_init.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_remove_motions-cf_remove_motions.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_screen_photons-cf_screen_photons.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_ttag_init-cf_ttag_init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_assign_wavelength.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_bad_pixels.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_convert_to_farf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_countmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_extract_spectra.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_flux_calibrate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_gainmap.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_hist_init.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_remove_motions.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_screen_photons.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cf_ttag_init.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -634,160 +580,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
-cf_assign_wavelength-cf_assign_wavelength.o: cf_assign_wavelength.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_assign_wavelength_CFLAGS) $(CFLAGS) -MT cf_assign_wavelength-cf_assign_wavelength.o -MD -MP -MF $(DEPDIR)/cf_assign_wavelength-cf_assign_wavelength.Tpo -c -o cf_assign_wavelength-cf_assign_wavelength.o `test -f 'cf_assign_wavelength.c' || echo '$(srcdir)/'`cf_assign_wavelength.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_assign_wavelength-cf_assign_wavelength.Tpo $(DEPDIR)/cf_assign_wavelength-cf_assign_wavelength.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_assign_wavelength.c' object='cf_assign_wavelength-cf_assign_wavelength.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_assign_wavelength_CFLAGS) $(CFLAGS) -c -o cf_assign_wavelength-cf_assign_wavelength.o `test -f 'cf_assign_wavelength.c' || echo '$(srcdir)/'`cf_assign_wavelength.c
-
-cf_assign_wavelength-cf_assign_wavelength.obj: cf_assign_wavelength.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_assign_wavelength_CFLAGS) $(CFLAGS) -MT cf_assign_wavelength-cf_assign_wavelength.obj -MD -MP -MF $(DEPDIR)/cf_assign_wavelength-cf_assign_wavelength.Tpo -c -o cf_assign_wavelength-cf_assign_wavelength.obj `if test -f 'cf_assign_wavelength.c'; then $(CYGPATH_W) 'cf_assign_wavelength.c'; else $(CYGPATH_W) '$(srcdir)/cf_assign_wavelength.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_assign_wavelength-cf_assign_wavelength.Tpo $(DEPDIR)/cf_assign_wavelength-cf_assign_wavelength.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_assign_wavelength.c' object='cf_assign_wavelength-cf_assign_wavelength.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_assign_wavelength_CFLAGS) $(CFLAGS) -c -o cf_assign_wavelength-cf_assign_wavelength.obj `if test -f 'cf_assign_wavelength.c'; then $(CYGPATH_W) 'cf_assign_wavelength.c'; else $(CYGPATH_W) '$(srcdir)/cf_assign_wavelength.c'; fi`
-
-cf_bad_pixels-cf_bad_pixels.o: cf_bad_pixels.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_bad_pixels_CFLAGS) $(CFLAGS) -MT cf_bad_pixels-cf_bad_pixels.o -MD -MP -MF $(DEPDIR)/cf_bad_pixels-cf_bad_pixels.Tpo -c -o cf_bad_pixels-cf_bad_pixels.o `test -f 'cf_bad_pixels.c' || echo '$(srcdir)/'`cf_bad_pixels.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_bad_pixels-cf_bad_pixels.Tpo $(DEPDIR)/cf_bad_pixels-cf_bad_pixels.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_bad_pixels.c' object='cf_bad_pixels-cf_bad_pixels.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_bad_pixels_CFLAGS) $(CFLAGS) -c -o cf_bad_pixels-cf_bad_pixels.o `test -f 'cf_bad_pixels.c' || echo '$(srcdir)/'`cf_bad_pixels.c
-
-cf_bad_pixels-cf_bad_pixels.obj: cf_bad_pixels.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_bad_pixels_CFLAGS) $(CFLAGS) -MT cf_bad_pixels-cf_bad_pixels.obj -MD -MP -MF $(DEPDIR)/cf_bad_pixels-cf_bad_pixels.Tpo -c -o cf_bad_pixels-cf_bad_pixels.obj `if test -f 'cf_bad_pixels.c'; then $(CYGPATH_W) 'cf_bad_pixels.c'; else $(CYGPATH_W) '$(srcdir)/cf_bad_pixels.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_bad_pixels-cf_bad_pixels.Tpo $(DEPDIR)/cf_bad_pixels-cf_bad_pixels.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_bad_pixels.c' object='cf_bad_pixels-cf_bad_pixels.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_bad_pixels_CFLAGS) $(CFLAGS) -c -o cf_bad_pixels-cf_bad_pixels.obj `if test -f 'cf_bad_pixels.c'; then $(CYGPATH_W) 'cf_bad_pixels.c'; else $(CYGPATH_W) '$(srcdir)/cf_bad_pixels.c'; fi`
-
-cf_convert_to_farf-cf_convert_to_farf.o: cf_convert_to_farf.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_convert_to_farf_CFLAGS) $(CFLAGS) -MT cf_convert_to_farf-cf_convert_to_farf.o -MD -MP -MF $(DEPDIR)/cf_convert_to_farf-cf_convert_to_farf.Tpo -c -o cf_convert_to_farf-cf_convert_to_farf.o `test -f 'cf_convert_to_farf.c' || echo '$(srcdir)/'`cf_convert_to_farf.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_convert_to_farf-cf_convert_to_farf.Tpo $(DEPDIR)/cf_convert_to_farf-cf_convert_to_farf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_convert_to_farf.c' object='cf_convert_to_farf-cf_convert_to_farf.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_convert_to_farf_CFLAGS) $(CFLAGS) -c -o cf_convert_to_farf-cf_convert_to_farf.o `test -f 'cf_convert_to_farf.c' || echo '$(srcdir)/'`cf_convert_to_farf.c
-
-cf_convert_to_farf-cf_convert_to_farf.obj: cf_convert_to_farf.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_convert_to_farf_CFLAGS) $(CFLAGS) -MT cf_convert_to_farf-cf_convert_to_farf.obj -MD -MP -MF $(DEPDIR)/cf_convert_to_farf-cf_convert_to_farf.Tpo -c -o cf_convert_to_farf-cf_convert_to_farf.obj `if test -f 'cf_convert_to_farf.c'; then $(CYGPATH_W) 'cf_convert_to_farf.c'; else $(CYGPATH_W) '$(srcdir)/cf_convert_to_farf.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_convert_to_farf-cf_convert_to_farf.Tpo $(DEPDIR)/cf_convert_to_farf-cf_convert_to_farf.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_convert_to_farf.c' object='cf_convert_to_farf-cf_convert_to_farf.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_convert_to_farf_CFLAGS) $(CFLAGS) -c -o cf_convert_to_farf-cf_convert_to_farf.obj `if test -f 'cf_convert_to_farf.c'; then $(CYGPATH_W) 'cf_convert_to_farf.c'; else $(CYGPATH_W) '$(srcdir)/cf_convert_to_farf.c'; fi`
-
-cf_countmap-cf_countmap.o: cf_countmap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_countmap_CFLAGS) $(CFLAGS) -MT cf_countmap-cf_countmap.o -MD -MP -MF $(DEPDIR)/cf_countmap-cf_countmap.Tpo -c -o cf_countmap-cf_countmap.o `test -f 'cf_countmap.c' || echo '$(srcdir)/'`cf_countmap.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_countmap-cf_countmap.Tpo $(DEPDIR)/cf_countmap-cf_countmap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_countmap.c' object='cf_countmap-cf_countmap.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_countmap_CFLAGS) $(CFLAGS) -c -o cf_countmap-cf_countmap.o `test -f 'cf_countmap.c' || echo '$(srcdir)/'`cf_countmap.c
-
-cf_countmap-cf_countmap.obj: cf_countmap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_countmap_CFLAGS) $(CFLAGS) -MT cf_countmap-cf_countmap.obj -MD -MP -MF $(DEPDIR)/cf_countmap-cf_countmap.Tpo -c -o cf_countmap-cf_countmap.obj `if test -f 'cf_countmap.c'; then $(CYGPATH_W) 'cf_countmap.c'; else $(CYGPATH_W) '$(srcdir)/cf_countmap.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_countmap-cf_countmap.Tpo $(DEPDIR)/cf_countmap-cf_countmap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_countmap.c' object='cf_countmap-cf_countmap.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_countmap_CFLAGS) $(CFLAGS) -c -o cf_countmap-cf_countmap.obj `if test -f 'cf_countmap.c'; then $(CYGPATH_W) 'cf_countmap.c'; else $(CYGPATH_W) '$(srcdir)/cf_countmap.c'; fi`
-
-cf_extract_spectra-cf_extract_spectra.o: cf_extract_spectra.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_extract_spectra_CFLAGS) $(CFLAGS) -MT cf_extract_spectra-cf_extract_spectra.o -MD -MP -MF $(DEPDIR)/cf_extract_spectra-cf_extract_spectra.Tpo -c -o cf_extract_spectra-cf_extract_spectra.o `test -f 'cf_extract_spectra.c' || echo '$(srcdir)/'`cf_extract_spectra.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_extract_spectra-cf_extract_spectra.Tpo $(DEPDIR)/cf_extract_spectra-cf_extract_spectra.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_extract_spectra.c' object='cf_extract_spectra-cf_extract_spectra.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_extract_spectra_CFLAGS) $(CFLAGS) -c -o cf_extract_spectra-cf_extract_spectra.o `test -f 'cf_extract_spectra.c' || echo '$(srcdir)/'`cf_extract_spectra.c
-
-cf_extract_spectra-cf_extract_spectra.obj: cf_extract_spectra.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_extract_spectra_CFLAGS) $(CFLAGS) -MT cf_extract_spectra-cf_extract_spectra.obj -MD -MP -MF $(DEPDIR)/cf_extract_spectra-cf_extract_spectra.Tpo -c -o cf_extract_spectra-cf_extract_spectra.obj `if test -f 'cf_extract_spectra.c'; then $(CYGPATH_W) 'cf_extract_spectra.c'; else $(CYGPATH_W) '$(srcdir)/cf_extract_spectra.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_extract_spectra-cf_extract_spectra.Tpo $(DEPDIR)/cf_extract_spectra-cf_extract_spectra.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_extract_spectra.c' object='cf_extract_spectra-cf_extract_spectra.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_extract_spectra_CFLAGS) $(CFLAGS) -c -o cf_extract_spectra-cf_extract_spectra.obj `if test -f 'cf_extract_spectra.c'; then $(CYGPATH_W) 'cf_extract_spectra.c'; else $(CYGPATH_W) '$(srcdir)/cf_extract_spectra.c'; fi`
-
-cf_flux_calibrate-cf_flux_calibrate.o: cf_flux_calibrate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_flux_calibrate_CFLAGS) $(CFLAGS) -MT cf_flux_calibrate-cf_flux_calibrate.o -MD -MP -MF $(DEPDIR)/cf_flux_calibrate-cf_flux_calibrate.Tpo -c -o cf_flux_calibrate-cf_flux_calibrate.o `test -f 'cf_flux_calibrate.c' || echo '$(srcdir)/'`cf_flux_calibrate.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_flux_calibrate-cf_flux_calibrate.Tpo $(DEPDIR)/cf_flux_calibrate-cf_flux_calibrate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_flux_calibrate.c' object='cf_flux_calibrate-cf_flux_calibrate.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_flux_calibrate_CFLAGS) $(CFLAGS) -c -o cf_flux_calibrate-cf_flux_calibrate.o `test -f 'cf_flux_calibrate.c' || echo '$(srcdir)/'`cf_flux_calibrate.c
-
-cf_flux_calibrate-cf_flux_calibrate.obj: cf_flux_calibrate.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_flux_calibrate_CFLAGS) $(CFLAGS) -MT cf_flux_calibrate-cf_flux_calibrate.obj -MD -MP -MF $(DEPDIR)/cf_flux_calibrate-cf_flux_calibrate.Tpo -c -o cf_flux_calibrate-cf_flux_calibrate.obj `if test -f 'cf_flux_calibrate.c'; then $(CYGPATH_W) 'cf_flux_calibrate.c'; else $(CYGPATH_W) '$(srcdir)/cf_flux_calibrate.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_flux_calibrate-cf_flux_calibrate.Tpo $(DEPDIR)/cf_flux_calibrate-cf_flux_calibrate.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_flux_calibrate.c' object='cf_flux_calibrate-cf_flux_calibrate.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_flux_calibrate_CFLAGS) $(CFLAGS) -c -o cf_flux_calibrate-cf_flux_calibrate.obj `if test -f 'cf_flux_calibrate.c'; then $(CYGPATH_W) 'cf_flux_calibrate.c'; else $(CYGPATH_W) '$(srcdir)/cf_flux_calibrate.c'; fi`
-
-cf_gainmap-cf_gainmap.o: cf_gainmap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_gainmap_CFLAGS) $(CFLAGS) -MT cf_gainmap-cf_gainmap.o -MD -MP -MF $(DEPDIR)/cf_gainmap-cf_gainmap.Tpo -c -o cf_gainmap-cf_gainmap.o `test -f 'cf_gainmap.c' || echo '$(srcdir)/'`cf_gainmap.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_gainmap-cf_gainmap.Tpo $(DEPDIR)/cf_gainmap-cf_gainmap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_gainmap.c' object='cf_gainmap-cf_gainmap.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_gainmap_CFLAGS) $(CFLAGS) -c -o cf_gainmap-cf_gainmap.o `test -f 'cf_gainmap.c' || echo '$(srcdir)/'`cf_gainmap.c
-
-cf_gainmap-cf_gainmap.obj: cf_gainmap.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_gainmap_CFLAGS) $(CFLAGS) -MT cf_gainmap-cf_gainmap.obj -MD -MP -MF $(DEPDIR)/cf_gainmap-cf_gainmap.Tpo -c -o cf_gainmap-cf_gainmap.obj `if test -f 'cf_gainmap.c'; then $(CYGPATH_W) 'cf_gainmap.c'; else $(CYGPATH_W) '$(srcdir)/cf_gainmap.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_gainmap-cf_gainmap.Tpo $(DEPDIR)/cf_gainmap-cf_gainmap.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_gainmap.c' object='cf_gainmap-cf_gainmap.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_gainmap_CFLAGS) $(CFLAGS) -c -o cf_gainmap-cf_gainmap.obj `if test -f 'cf_gainmap.c'; then $(CYGPATH_W) 'cf_gainmap.c'; else $(CYGPATH_W) '$(srcdir)/cf_gainmap.c'; fi`
-
-cf_hist_init-cf_hist_init.o: cf_hist_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_hist_init_CFLAGS) $(CFLAGS) -MT cf_hist_init-cf_hist_init.o -MD -MP -MF $(DEPDIR)/cf_hist_init-cf_hist_init.Tpo -c -o cf_hist_init-cf_hist_init.o `test -f 'cf_hist_init.c' || echo '$(srcdir)/'`cf_hist_init.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_hist_init-cf_hist_init.Tpo $(DEPDIR)/cf_hist_init-cf_hist_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_hist_init.c' object='cf_hist_init-cf_hist_init.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_hist_init_CFLAGS) $(CFLAGS) -c -o cf_hist_init-cf_hist_init.o `test -f 'cf_hist_init.c' || echo '$(srcdir)/'`cf_hist_init.c
-
-cf_hist_init-cf_hist_init.obj: cf_hist_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_hist_init_CFLAGS) $(CFLAGS) -MT cf_hist_init-cf_hist_init.obj -MD -MP -MF $(DEPDIR)/cf_hist_init-cf_hist_init.Tpo -c -o cf_hist_init-cf_hist_init.obj `if test -f 'cf_hist_init.c'; then $(CYGPATH_W) 'cf_hist_init.c'; else $(CYGPATH_W) '$(srcdir)/cf_hist_init.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_hist_init-cf_hist_init.Tpo $(DEPDIR)/cf_hist_init-cf_hist_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_hist_init.c' object='cf_hist_init-cf_hist_init.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_hist_init_CFLAGS) $(CFLAGS) -c -o cf_hist_init-cf_hist_init.obj `if test -f 'cf_hist_init.c'; then $(CYGPATH_W) 'cf_hist_init.c'; else $(CYGPATH_W) '$(srcdir)/cf_hist_init.c'; fi`
-
-cf_remove_motions-cf_remove_motions.o: cf_remove_motions.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_remove_motions_CFLAGS) $(CFLAGS) -MT cf_remove_motions-cf_remove_motions.o -MD -MP -MF $(DEPDIR)/cf_remove_motions-cf_remove_motions.Tpo -c -o cf_remove_motions-cf_remove_motions.o `test -f 'cf_remove_motions.c' || echo '$(srcdir)/'`cf_remove_motions.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_remove_motions-cf_remove_motions.Tpo $(DEPDIR)/cf_remove_motions-cf_remove_motions.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_remove_motions.c' object='cf_remove_motions-cf_remove_motions.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_remove_motions_CFLAGS) $(CFLAGS) -c -o cf_remove_motions-cf_remove_motions.o `test -f 'cf_remove_motions.c' || echo '$(srcdir)/'`cf_remove_motions.c
-
-cf_remove_motions-cf_remove_motions.obj: cf_remove_motions.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_remove_motions_CFLAGS) $(CFLAGS) -MT cf_remove_motions-cf_remove_motions.obj -MD -MP -MF $(DEPDIR)/cf_remove_motions-cf_remove_motions.Tpo -c -o cf_remove_motions-cf_remove_motions.obj `if test -f 'cf_remove_motions.c'; then $(CYGPATH_W) 'cf_remove_motions.c'; else $(CYGPATH_W) '$(srcdir)/cf_remove_motions.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_remove_motions-cf_remove_motions.Tpo $(DEPDIR)/cf_remove_motions-cf_remove_motions.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_remove_motions.c' object='cf_remove_motions-cf_remove_motions.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_remove_motions_CFLAGS) $(CFLAGS) -c -o cf_remove_motions-cf_remove_motions.obj `if test -f 'cf_remove_motions.c'; then $(CYGPATH_W) 'cf_remove_motions.c'; else $(CYGPATH_W) '$(srcdir)/cf_remove_motions.c'; fi`
-
-cf_screen_photons-cf_screen_photons.o: cf_screen_photons.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_screen_photons_CFLAGS) $(CFLAGS) -MT cf_screen_photons-cf_screen_photons.o -MD -MP -MF $(DEPDIR)/cf_screen_photons-cf_screen_photons.Tpo -c -o cf_screen_photons-cf_screen_photons.o `test -f 'cf_screen_photons.c' || echo '$(srcdir)/'`cf_screen_photons.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_screen_photons-cf_screen_photons.Tpo $(DEPDIR)/cf_screen_photons-cf_screen_photons.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_screen_photons.c' object='cf_screen_photons-cf_screen_photons.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_screen_photons_CFLAGS) $(CFLAGS) -c -o cf_screen_photons-cf_screen_photons.o `test -f 'cf_screen_photons.c' || echo '$(srcdir)/'`cf_screen_photons.c
-
-cf_screen_photons-cf_screen_photons.obj: cf_screen_photons.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_screen_photons_CFLAGS) $(CFLAGS) -MT cf_screen_photons-cf_screen_photons.obj -MD -MP -MF $(DEPDIR)/cf_screen_photons-cf_screen_photons.Tpo -c -o cf_screen_photons-cf_screen_photons.obj `if test -f 'cf_screen_photons.c'; then $(CYGPATH_W) 'cf_screen_photons.c'; else $(CYGPATH_W) '$(srcdir)/cf_screen_photons.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_screen_photons-cf_screen_photons.Tpo $(DEPDIR)/cf_screen_photons-cf_screen_photons.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_screen_photons.c' object='cf_screen_photons-cf_screen_photons.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_screen_photons_CFLAGS) $(CFLAGS) -c -o cf_screen_photons-cf_screen_photons.obj `if test -f 'cf_screen_photons.c'; then $(CYGPATH_W) 'cf_screen_photons.c'; else $(CYGPATH_W) '$(srcdir)/cf_screen_photons.c'; fi`
-
-cf_ttag_init-cf_ttag_init.o: cf_ttag_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_ttag_init_CFLAGS) $(CFLAGS) -MT cf_ttag_init-cf_ttag_init.o -MD -MP -MF $(DEPDIR)/cf_ttag_init-cf_ttag_init.Tpo -c -o cf_ttag_init-cf_ttag_init.o `test -f 'cf_ttag_init.c' || echo '$(srcdir)/'`cf_ttag_init.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_ttag_init-cf_ttag_init.Tpo $(DEPDIR)/cf_ttag_init-cf_ttag_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_ttag_init.c' object='cf_ttag_init-cf_ttag_init.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_ttag_init_CFLAGS) $(CFLAGS) -c -o cf_ttag_init-cf_ttag_init.o `test -f 'cf_ttag_init.c' || echo '$(srcdir)/'`cf_ttag_init.c
-
-cf_ttag_init-cf_ttag_init.obj: cf_ttag_init.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_ttag_init_CFLAGS) $(CFLAGS) -MT cf_ttag_init-cf_ttag_init.obj -MD -MP -MF $(DEPDIR)/cf_ttag_init-cf_ttag_init.Tpo -c -o cf_ttag_init-cf_ttag_init.obj `if test -f 'cf_ttag_init.c'; then $(CYGPATH_W) 'cf_ttag_init.c'; else $(CYGPATH_W) '$(srcdir)/cf_ttag_init.c'; fi`
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/cf_ttag_init-cf_ttag_init.Tpo $(DEPDIR)/cf_ttag_init-cf_ttag_init.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cf_ttag_init.c' object='cf_ttag_init-cf_ttag_init.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cf_ttag_init_CFLAGS) $(CFLAGS) -c -o cf_ttag_init-cf_ttag_init.obj `if test -f 'cf_ttag_init.c'; then $(CYGPATH_W) 'cf_ttag_init.c'; else $(CYGPATH_W) '$(srcdir)/cf_ttag_init.c'; fi`
-
mostlyclean-libtool:
-rm -f *.lo
diff --git a/src/libcf/Makefile.am b/src/libcf/Makefile.am
index 5d45f30..d59fc62 100644
--- a/src/libcf/Makefile.am
+++ b/src/libcf/Makefile.am
@@ -32,6 +32,7 @@ libcf_la_SOURCES = \
cf_init_support.c cf_modify_hist_pha.c \
cf_fes_proc_check.c cf_fes_proc_update.c
libcf_la_LDFLAGS = -lm -lgfortran
-libcf_la_CFLAGS = $(cfitsio_CFLAGS) -I../include -I./ -I../../include
+libcf_la_CFLAGS = $(cfitsio_CFLAGS)
libcf_la_LIBADD = $(cfitsio_LIBS)
+AM_CFLAGS = -I$(top_srcdir)/include
diff --git a/src/libcf/Makefile.in b/src/libcf/Makefile.in
index 2b20728..c04b91d 100644
--- a/src/libcf/Makefile.in
+++ b/src/libcf/Makefile.in
@@ -98,7 +98,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -200,7 +200,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
@@ -409,8 +409,9 @@ libcf_la_SOURCES = \
cf_fes_proc_check.c cf_fes_proc_update.c
libcf_la_LDFLAGS = -lm -lgfortran
-libcf_la_CFLAGS = $(cfitsio_CFLAGS) -I../include -I./ -I../../include
+libcf_la_CFLAGS = $(cfitsio_CFLAGS)
libcf_la_LIBADD = $(cfitsio_LIBS)
+AM_CFLAGS = -I$(top_srcdir)/include
all: all-am
.SUFFIXES:
diff --git a/src/slalib/Makefile.am b/src/slalib/Makefile.am
index 895eea9..7b5f1e1 100644
--- a/src/slalib/Makefile.am
+++ b/src/slalib/Makefile.am
@@ -184,4 +184,4 @@ libsla_la_SOURCES = \
xy2xy.f \
zd.f
-AM_CFLAGS = -I../include -I./
+AM_CFLAGS = -I$(top_srcdir)/include -I./
diff --git a/src/slalib/Makefile.in b/src/slalib/Makefile.in
index 643c07f..c175c19 100644
--- a/src/slalib/Makefile.in
+++ b/src/slalib/Makefile.in
@@ -98,7 +98,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
-CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_HEADER = $(top_builddir)/src/include/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -175,7 +175,7 @@ AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include
F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
LTF77COMPILE = $(LIBTOOL) $(AM_V_lt) --tag=F77 $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(F77) $(AM_FFLAGS) $(FFLAGS)
@@ -529,7 +529,7 @@ libsla_la_SOURCES = \
xy2xy.f \
zd.f
-AM_CFLAGS = -I../include -I./
+AM_CFLAGS = -I$(top_srcdir)/include -I./
all: all-am
.SUFFIXES: